/* ============================================================
   Forensic Scientific Investigations, LLC — shared stylesheet
   Modern, centered, responsive, offline-friendly (system fonts)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --red: #9d080d;
  --red-dark: #7c060a;
  --red-soft: #fdf3f3;
  --teal: #0e4b54;
  --teal-dark: #093840;
  --teal-soft: #eaf3f4;
  --ink: #1e2328;
  --body: #3a4148;
  --muted: #626b73;
  --paper: #ffffff;
  --bg: #f6f7f8;
  --line: #e2e6e9;
  --gold: #c9a227;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 30, 0.08);
  --shadow-md: 0 6px 24px rgba(15, 23, 30, 0.1);
  --font-display: Georgia, "Times New Roman", "Noto Serif", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --wrap: 1100px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.6em;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(1.9rem, 4.2vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-top: 0; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.3em; }

/* ---------- Utilities ---------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: clamp(2.2rem, 6vw, 3.75rem); }
.section-alt { background: #fff; border-block: 1px solid var(--line); }

.section-head { max-width: 46rem; margin-bottom: 1.75rem; }
.section-head .kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.4rem;
}
.section-head p { color: var(--muted); margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.btn-outline { border-color: var(--red); color: var(--red); background: transparent; }
.btn-outline:hover { background: var(--red); color: #fff; }

/* ---------- Top bar ---------- */
.topbar { background: var(--teal-dark); color: #d9e6e8; font-size: 0.85rem; }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.45rem;
  flex-wrap: wrap;
}
.topbar-tag { margin: 0; font-style: italic; }
.topbar-phone {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-phone:hover { color: #ffd97a; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 50;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--red), var(--red-dark));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--ink);
}
.brand-sub { font-size: 0.78rem; color: var(--muted); }

.masthead-cta { text-align: right; }
.masthead-phone {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--red);
  text-decoration: none;
}
.masthead-phone:hover { color: var(--red-dark); }
.masthead-phone small { display: block; font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--muted); }

/* ---------- Navigation ---------- */
.site-nav { background: var(--teal); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav > .wrap > ul {
  display: flex;
  flex-wrap: wrap;
}
.site-nav li { position: relative; }
.site-nav a {
  display: block;
  padding: 0.85rem 1rem;
  color: #eef4f5;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  letter-spacing: 0.01em;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.site-nav a[aria-current="page"] {
  background: var(--red);
  color: #fff;
}
.site-nav .nav-cta {
  background: var(--red);
  color: #fff;
  margin-left: auto;
}
.site-nav .nav-cta:hover { background: var(--red-dark); }

.has-sub > a::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.4em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.22em) rotate(45deg);
}
.sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.35rem 0;
  z-index: 60;
}
.sub li { width: 100%; }
.sub a { color: var(--ink); padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.sub a:hover { background: var(--teal-soft); color: var(--teal-dark); }
.sub a[aria-current="page"] { background: var(--red-soft); color: var(--red-dark); }
.has-sub:hover > .sub,
.has-sub:focus-within > .sub { display: block; }

.nav-toggle {
  display: none;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
  padding: 0;
  font-size: 0.82rem;
  color: #bcd3d6;
}
.breadcrumbs li + li::before { content: "›"; margin-right: 0.35rem; color: #7fa8ad; }
.breadcrumbs a { color: #d7e7e9; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; color: #fff; }
.breadcrumbs [aria-current="page"] { color: #fff; font-weight: 600; }

/* ---------- Heroes ---------- */
.hero {
  background:
    linear-gradient(120deg, rgba(9, 56, 64, 0.96) 0%, rgba(14, 75, 84, 0.9) 55%, rgba(9, 56, 64, 0.97) 100%),
    var(--teal-dark);
  color: #e8f1f2;
  padding-block: clamp(2.75rem, 7vw, 4.75rem);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -55% auto;
  width: 55%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(157, 8, 13, 0.35), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 46rem; }
.hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffd97a;
  margin-bottom: 0.6rem;
}
.hero h1 { color: #fff; margin-bottom: 0.5rem; }
.hero .lede { font-size: 1.12rem; color: #cfe0e2; max-width: 42rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.hero-note { margin-top: 1.1rem; font-size: 0.85rem; color: #9fc0c4; }

.page-hero {
  background:
    linear-gradient(120deg, rgba(9, 56, 64, 0.96) 0%, rgba(14, 75, 84, 0.92) 60%, rgba(9, 56, 64, 0.97) 100%),
    var(--teal-dark);
  color: #dfebee;
  padding-block: clamp(1.75rem, 4.5vw, 2.75rem);
}
.page-hero h1 { color: #fff; margin-bottom: 0.25rem; }
.page-hero .lede { color: #c3d8db; max-width: 44rem; margin-bottom: 0; font-size: 1.05rem; }

/* ---------- Stat band ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.stat {
  background: #fff;
  text-align: center;
  padding: 1.4rem 1rem;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--red);
  line-height: 1.1;
}
.stat span { font-size: 0.88rem; color: var(--muted); }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.4rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--red); }
.card p { font-size: 0.94rem; color: var(--body); margin-bottom: 0.9rem; }
.card .more { margin-top: auto; font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.card .card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}
.card-photo {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-bottom: 1rem;
  background: var(--teal-soft);
}

/* ---------- Split layout (text + photo) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.split.reverse { grid-template-columns: 0.85fr 1.15fr; }
.figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.6rem;
  box-shadow: var(--shadow-sm);
}
.figure img { border-radius: calc(var(--radius-lg) - 6px); width: 100%; }
.figure figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.55rem 0.5rem 0.2rem;
  text-align: center;
}

/* ---------- Feature list ---------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.55rem;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4.5vw, 2.6rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; margin-bottom: 0.2rem; }
.cta-band p { color: #ffd9d9; margin-bottom: 0; }
.cta-band .cta-phone {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.cta-band .cta-phone:hover { color: #ffd97a; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.8rem; max-width: 52rem; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--red);
  flex: none;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.2rem 1.1rem; color: var(--body); margin: 0; }

/* ---------- Case list ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.case-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.case-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.case-card p { margin: 0; font-size: 0.92rem; color: var(--body); }

/* ---------- Resource links (curated resources page) ---------- */
.resource-link {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}
.resource-link:hover { color: var(--red-dark); text-decoration: underline; }
.resource-more { color: var(--teal-dark); }
.resource-more:hover { color: var(--red); }

/* ---------- Recommended reading (home module) ---------- */
.rec-reading {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  box-shadow: var(--shadow-sm);
}
.rec-reading .section-head { margin-bottom: 1.2rem; }
.rec-reading .rcard {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rec-reading .rcard h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.rec-reading .rcard p { font-size: 0.9rem; color: var(--body); margin: 0; }
.rec-reading .rcard a { color: var(--red); font-weight: 700; text-decoration: none; }
.rec-reading .rcard a:hover { color: var(--red-dark); text-decoration: underline; }
.rec-reading .rcard-list { margin: 0.5rem 0 0; padding-left: 1.1em; }
.rec-reading .rcard-list li { margin-bottom: 0.3rem; font-size: 0.9rem; }

/* ---------- Quote ---------- */
.pull-quote {
  border-left: 4px solid var(--gold);
  background: var(--teal-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.4rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--teal-dark);
  margin: 1.5rem 0;
}

/* ---------- Contact cards ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.contact-card .icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 0.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 1.2rem;
}
.contact-card h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.contact-card a { font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.contact-card p { color: var(--muted); font-size: 0.88rem; margin: 0.3rem 0 0; }

/* ---------- Info note ---------- */
.note {
  background: var(--teal-soft);
  border: 1px solid #cfe2e4;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 0.92rem;
  color: var(--teal-dark);
}
.note strong { color: var(--teal-dark); }

/* ---------- Table (simple) ---------- */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.94rem;
}
.simple-table th,
.simple-table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.simple-table th { background: var(--teal-soft); color: var(--teal-dark); }
.simple-table tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-dark);
  color: #b9cfd3;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-size: 0.9rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 2rem;
  padding-block: clamp(2rem, 5vw, 3rem) 1.8rem;
}
.site-footer h2, .site-footer h3 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #cfe2e5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand p { color: #9db8bc; }
.footer-contact a { font-weight: 700; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-block: 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #8fb0b5;
}
.footer-bottom a { color: #b9cfd3; }

/* ---------- Page hero breadcrumb spacing ---------- */
.page-hero .breadcrumbs { margin-bottom: 0.6rem; }

/* ---------- Article body ---------- */
.article { max-width: 46rem; }
.article .figure { max-width: 420px; }
.article-side { max-width: 30rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: 1fr; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split .figure { order: -1; max-width: 520px; }
}

@media (max-width: 680px) {
  .cards, .cards-2 { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 1.4rem; }
  .masthead { padding-block: 0.7rem; }
  .masthead-phone { font-size: 1rem; }
  .brand-sub { display: none; }

  /* Mobile navigation */
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  body.nav-open .site-nav { display: block; }
  .site-nav > .wrap > ul { flex-direction: column; padding-block: 0.4rem; }
  .site-nav a { padding: 0.8rem 1.2rem; }
  .site-nav .nav-cta { margin: 0.4rem 1.2rem 0.8rem; border-radius: 999px; text-align: center; }
  .sub {
    display: block;
    position: static;
    min-width: 0;
    border: 0;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 0;
  }
  .sub li:first-child a::before {
    content: "— Services —";
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9fc0c4;
    padding: 0.7rem 1.2rem 0.2rem;
  }
  .hero { padding-block: 2.2rem; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-nav, .topbar, .nav-toggle, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}