/* ============================================================
   BloodAI — Design System
   Paper + ink + terracotta + clinical teal
   ============================================================ */

:root {
  /* Brand palette (from DESIGN.md) */
  --terracotta: #B14C3E;
  --terracotta-deep: #8C382C;
  --terracotta-bright: #C75B49;
  --terracotta-tint: #EEDBD5;

  --teal: #2C5A60;
  --teal-mid: #3E7C82;
  --teal-tint: #D7E4E3;

  --ink: #231C19;
  --ink-soft: #5C504A;
  --ink-faint: #8A7D75;

  --paper: #FAF6F1;
  --paper-card: #F3ECE3;
  --line: #E3D7CC;
  --line-soft: #ECE3D9;

  /* Type */
  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Layout */
  --container: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(35, 28, 25, 0.04), 0 8px 28px rgba(35, 28, 25, 0.05);
  --shadow-lift: 0 2px 6px rgba(35, 28, 25, 0.06), 0 18px 44px rgba(35, 28, 25, 0.10);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

/* ============================================================
   DARK THEME
   Warm, clinical dark — not pure black. Neutrals + tints flip;
   the terracotta brand hue is preserved.
   ============================================================ */
:root[data-theme="dark"] {
  color-scheme: dark;

  --terracotta: #B14C3E;
  --terracotta-deep: #DD7E69;   /* brightened: used as accent text on dark */
  --terracotta-bright: #C75B49;
  --terracotta-tint: #3A211B;   /* dark attention-pill / callout background */

  --teal: #8CC0BF;              /* light teal: accent text / values */
  --teal-mid: #A6D2D0;
  --teal-tint: #173331;         /* dark in-range-pill background */

  --ink: #F2EAE1;
  --ink-soft: #C2B5AB;
  --ink-faint: #8F8279;

  --paper: #181310;
  --paper-card: #221A16;
  --line: #382C25;
  --line-soft: #271F1A;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.30), 0 18px 44px rgba(0, 0, 0, 0.45);
}

/* Follow OS preference when the user hasn't explicitly chosen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --terracotta: #B14C3E;
    --terracotta-deep: #DD7E69;
    --terracotta-bright: #C75B49;
    --terracotta-tint: #3A211B;

    --teal: #8CC0BF;
    --teal-mid: #A6D2D0;
    --teal-tint: #173331;

    --ink: #F2EAE1;
    --ink-soft: #C2B5AB;
    --ink-faint: #8F8279;

    --paper: #181310;
    --paper-card: #221A16;
    --line: #382C25;
    --line-soft: #271F1A;

    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.30), 0 18px 44px rgba(0, 0, 0, 0.45);
  }
}

/* Smooth theme transition */
body, .nav, .card, .preview-card, .report, .explain, .attention,
.legal__updated, .legal__statements p, .legal__callout, .chip, .score {
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography helpers ---------- */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mono-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  font-weight: 500;
}
.eyebrow--center { justify-content: center; color: var(--ink-faint); }
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 4px var(--terracotta-tint);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease),
              box-shadow .25s var(--ease), border-color .25s var(--ease), color .2s;
  white-space: nowrap;
}
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--sm { padding: 9px 18px; font-size: 14px; }

.btn--primary { background: var(--terracotta); color: #fff; box-shadow: 0 6px 18px rgba(177,76,62,0.22); }
.btn--primary:hover { background: var(--terracotta-deep); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(140,56,44,0.30); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--paper-card); border-color: var(--ink-faint); transform: translateY(-2px); }

.btn--cream { background: #FAF6F1; color: #8C382C; }
.btn--cream:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lift); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 241, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
:root[data-theme="dark"] .nav { background: rgba(24, 19, 16, 0.82); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav { background: rgba(24, 19, 16, 0.82); }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: transparent;
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease);
}
.theme-toggle:hover { color: var(--terracotta); border-color: var(--ink-faint); background: var(--paper-card); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { color: var(--terracotta); display: inline-flex; }
.aperture { width: 100%; height: 100%; }
.aperture--sm { width: 30px; height: 30px; }
.aperture--xs { width: 26px; height: 26px; }
.brand__word {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__word-ai { color: var(--terracotta); }

.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-size: 15px; color: var(--ink-soft); font-weight: 500;
  position: relative; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--terracotta);
  transition: width .25s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 14px; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile[hidden] { display: none; }
.nav__mobile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px clamp(20px, 5vw, 48px) 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper);
}
.nav__mobile a { padding: 10px 4px; font-size: 16px; color: var(--ink-soft); font-weight: 500; }
.nav__mobile .btn { margin-top: 6px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero__grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 80% at 70% 25%, #000 0%, transparent 72%);
          mask-image: radial-gradient(120% 80% at 70% 25%, #000 0%, transparent 72%);
  opacity: 0.55;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(56px, 9vw, 110px);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 6.6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 20px 0 22px;
  color: var(--ink);
}
.hero__title .focus {
  font-style: italic;
  color: var(--terracotta);
  position: relative;
}
.hero__sub {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-soft);
  max-width: 30em;
  margin-bottom: 30px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero__trust {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--ink-faint);
}
.hero__trust svg { color: var(--teal); flex-shrink: 0; }

/* Hero visual */
.hero__visual {
  position: relative;
  min-height: 440px;
  display: flex; align-items: center; justify-content: center;
}
.rings {
  position: relative;
  width: min(420px, 86%);
  aspect-ratio: 1;
  display: grid; place-items: center;
}
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--line);
  inset: 0; margin: auto;
}
.ring--1 { width: 100%; height: 100%; }
.ring--2 { width: 74%; height: 74%; border-color: var(--terracotta-tint); }
.ring--3 { width: 50%; height: 50%; border-style: dashed; border-color: var(--teal-tint); animation: spin-slow 60s linear infinite reverse; }
.ring__tick {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--terracotta); opacity: .6;
}
.ring__tick--n { top: -3px; left: calc(50% - 3px); }
.ring__tick--s { bottom: -3px; left: calc(50% - 3px); background: var(--teal); }
.ring__tick--e { right: -3px; top: calc(50% - 3px); background: var(--teal); }
.ring__tick--w { left: -3px; top: calc(50% - 3px); }

.aperture-wrap {
  width: 38%; aspect-ratio: 1;
  color: var(--terracotta);
  filter: drop-shadow(0 8px 20px rgba(177,76,62,0.18));
}
.aperture--spin { animation: spin-slow 90s linear infinite; }

@keyframes spin-slow { to { transform: rotate(360deg); } }

/* Floating chips */
.chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 7px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--paper);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}
.chip b { font-weight: 600; font-family: var(--font-body); }
.chip--teal { color: var(--teal); border-color: var(--teal-tint); }
.chip--terra { color: var(--terracotta-deep); border-color: var(--terracotta-tint); }
.chip--float1 { top: 8%; left: -2%; animation: float 7s ease-in-out infinite; }
.chip--float2 { top: 34%; right: -4%; animation: float 8s ease-in-out infinite 1s; }
.chip--float3 { bottom: 24%; left: 2%; animation: float 9s ease-in-out infinite .5s; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Hero preview card */
.preview-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lift);
}
.preview-card--hero {
  position: absolute;
  bottom: -6%; right: -4%;
  width: min(280px, 72%);
}
.preview-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.preview-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.preview-row:last-child { border-bottom: none; }
.preview-row__name { font-size: 14px; font-weight: 500; }
.preview-row__val { font-size: 13px; color: var(--ink-soft); }
.preview-row .pill { grid-column: 2; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pill--teal { background: var(--teal-tint); color: var(--teal); }
.pill--terra { background: var(--terracotta-tint); color: var(--terracotta-deep); }
.pill--neutral { background: var(--paper); color: var(--ink-faint); border: 1px solid var(--line); }

/* ============================================================
   STRIP / PULL QUOTE
   ============================================================ */
.strip { border-block: 1px solid var(--line-soft); background: var(--paper-card); }
.strip__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  padding-block: clamp(28px, 4vw, 44px);
}
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 2.8vw, 30px);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.strip__stats { display: flex; gap: clamp(24px, 4vw, 52px); }
.strip__stats > div { display: flex; flex-direction: column; }
.strip__num { font-size: 24px; font-weight: 600; color: var(--terracotta); }
.strip__lbl { font-size: 13px; color: var(--ink-faint); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--card-bg { background: var(--paper-card); border-block: 1px solid var(--line-soft); }

.section__head { max-width: 680px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
}
.section__title--left { text-align: left; }
.section__lede { color: var(--ink-soft); font-size: clamp(16px, 1.4vw, 18px); }

/* ---------- Card grids ---------- */
.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.section--card-bg .card { background: var(--paper); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--terracotta-tint); }
.card__title {
  font-family: var(--font-display);
  font-weight: 600; font-size: 21px; letter-spacing: -0.01em;
  margin: 14px 0 8px;
}
.card__text { color: var(--ink-soft); font-size: 15.5px; }

.step-card__icon {
  width: 50px; height: 50px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--terracotta-tint); color: var(--terracotta-deep);
  margin-top: 18px;
}
.step-card__icon .aperture { color: var(--terracotta); }

/* Feature cards */
.feature-card { position: relative; }
.feature-card__tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--radius-pill);
}
.feature-card__tag--teal { background: var(--teal-tint); color: var(--teal); }
.feature-card__tag--terra { background: var(--terracotta-tint); color: var(--terracotta-deep); }

/* ============================================================
   PRODUCT PREVIEW
   ============================================================ */
.product {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  align-items: stretch;
}
.report, .explain, .attention {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.product__side { display: flex; flex-direction: column; gap: 22px; }

.report__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 22px;
}
.report__summary { font-size: 16px; color: var(--ink); margin-top: 8px; max-width: 32em; }
.report__summary b { color: var(--terracotta-deep); }
.score {
  flex-shrink: 0; text-align: center;
  border: 1px solid var(--teal-tint); border-radius: var(--radius-sm);
  padding: 10px 16px; background: var(--teal-tint);
}
.score__num { display: block; font-size: 28px; font-weight: 600; color: var(--teal); line-height: 1; }
.score__lbl { font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-mid); }

.biomarkers { width: 100%; border-collapse: collapse; }
.biomarkers th {
  text-align: left;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 500;
  padding: 0 0 12px; border-bottom: 1px solid var(--line);
}
.biomarkers__status { text-align: right; }
.biomarkers td {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}
.biomarkers tr:last-child td { border-bottom: none; }
.biomarkers td:first-child { font-weight: 500; }
.biomarkers td.mono { color: var(--ink-soft); }
.biomarkers td:last-child { text-align: right; }

.explain__text { font-size: 15.5px; color: var(--ink-soft); margin: 12px 0 14px; }
.explain__text b { color: var(--ink); }
.explain__note {
  display: flex; gap: 8px; font-size: 14px; color: var(--teal);
  font-style: italic; font-family: var(--font-display);
}
.explain__icon { color: var(--terracotta); font-weight: 700; font-style: normal; }

.attention { background: var(--paper); }
.attention__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.prob-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 11px 0; font-size: 14.5px;
  border-bottom: 1px solid var(--line-soft);
}
.prob-list li:last-child { border-bottom: none; }
.prob-list__val { color: var(--terracotta-deep); font-size: 13px; }
.attention__foot { font-size: 13px; color: var(--ink-faint); margin-top: 12px; }

/* ============================================================
   TRUST & SAFETY
   ============================================================ */
.safety {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.safety__lede { color: var(--ink-soft); font-size: 17px; margin: 16px 0 24px; }
.pull-quote--left { text-align: left; color: var(--terracotta-deep); }
.safety__list { display: grid; gap: 16px; }
.safety__list li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; color: var(--ink-soft); }
.safety__list b { color: var(--ink); }
.safety__check {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-tint); color: var(--teal);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  margin-top: 2px;
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.cta { padding-block: clamp(64px, 9vw, 120px); }
.cta__inner {
  position: relative; overflow: hidden;
  background: #B14C3E;
  background-image: radial-gradient(120% 130% at 50% -10%, #C75B49, #B14C3E 45%, #8C382C);
  color: #FAF6F1;
  border-radius: 28px;
  text-align: center;
  padding: clamp(48px, 7vw, 90px) clamp(24px, 5vw, 64px);
}
.cta__rings { position: relative; height: 96px; margin-bottom: 8px; display: grid; place-items: center; }
.cta__rings .ring { border-color: rgba(250,246,241,0.25); }
.ring--c1 { width: 96px; height: 96px; }
.ring--c2 { width: 64px; height: 64px; border-style: dashed; animation: spin-slow 50s linear infinite; }
.cta__mark { width: 46px; height: 46px; color: #FAF6F1; position: absolute; }
.cta__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 52px);
  letter-spacing: -0.02em; line-height: 1.05;
}

.cta__actions { display: flex; justify-content: center; margin-top: 24px; }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal { padding-block: clamp(40px, 6vw, 76px) clamp(56px, 8vw, 96px); }
.legal__wrap { max-width: 820px; margin-inline: auto; }
.legal__back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
  margin-bottom: 28px;
  transition: color .2s, gap .2s var(--ease);
}
.legal__back:hover { color: var(--terracotta); gap: 10px; }
.legal__back svg { width: 16px; height: 16px; }

.legal__eyebrow {
  display: block;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--terracotta-deep); font-weight: 500;
}
.legal__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.02em; line-height: 1.08;
  margin: 12px 0 14px;
}
.legal__updated {
  display: inline-block;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--ink-faint);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--paper-card);
}
.legal__intro {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--ink-soft);
  margin: 26px 0 8px;
  max-width: 70ch;
}
.legal__divider { height: 1px; background: var(--line); border: 0; margin: 36px 0; }

.legal section { margin-top: 38px; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(21px, 2.6vw, 27px);
  letter-spacing: -0.01em;
  color: var(--terracotta-deep);
  margin-bottom: 12px;
  scroll-margin-top: 90px;
}
.legal p { color: var(--ink-soft); margin-bottom: 14px; max-width: 72ch; }
.legal p:last-child { margin-bottom: 0; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--terracotta-deep); }

.legal ul.legal__list { display: grid; gap: 12px; margin: 0 0 14px; max-width: 72ch; }
.legal ul.legal__list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
}
.legal ul.legal__list li::before {
  content: ""; position: absolute; left: 4px; top: 10px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--teal); transform: rotate(45deg);
}

/* "Not a..." emphasis lines for medical disclaimer */
.legal__statements {
  display: grid; gap: 10px;
  margin: 4px 0 14px;
}
.legal__statements p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink);
  padding: 14px 18px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--terracotta);
  border-radius: var(--radius-sm);
}

/* Emergency callout */
.legal__callout {
  margin-top: 38px;
  background: var(--terracotta-tint);
  border: 1px solid var(--terracotta);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.legal__callout h2 { color: var(--terracotta-deep); margin-bottom: 8px; }
.legal__callout p { color: var(--terracotta-deep); }

.legal__note {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint);
}
.cta__sub { color: rgba(250,246,241,0.86); font-size: clamp(16px, 1.5vw, 19px); margin: 14px auto 28px; max-width: 36em; }
.cta__trust { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: rgba(250,246,241,0.7); margin-top: 18px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px) 28px; }
.footer__inner {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 32px; align-items: start;
  padding-bottom: 28px; border-bottom: 1px solid var(--line-soft);
}
.footer__brand { display: grid; grid-template-columns: auto auto; gap: 4px 10px; align-items: center; }
.brand__mark--footer { color: var(--terracotta); }
.brand__word--footer { font-size: 20px; }
.footer__tag { grid-column: 1 / -1; color: var(--ink-faint); font-size: 14px; max-width: 30em; margin-top: 4px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: flex-end; }
.footer__links a { color: var(--ink-soft); font-size: 15px; transition: color .2s; }
.footer__links a:hover { color: var(--terracotta); }
.footer__legal-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 20px;
}
.footer__legal-links a {
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
  transition: color .2s;
}
.footer__legal-links a:hover { color: var(--terracotta); }
.footer__dot { color: var(--line); }
.footer__legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-top: 14px; font-size: 12.5px; color: var(--ink-faint);
}
.footer__legal .mono { font-size: 12px; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
/* stagger cards inside a grid */
.cards .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3) { transition-delay: .16s; }
.cards .reveal:nth-child(4) { transition-delay: .08s; }
.cards .reveal:nth-child(5) { transition-delay: .16s; }
.cards .reveal:nth-child(6) { transition-delay: .24s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  body { font-size: 16px; }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { min-height: 400px; order: 2; }
  .hero__title br { display: none; }
  .product { grid-template-columns: 1fr; }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .safety { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__actions .btn--primary { display: none; }
  .nav__toggle { display: flex; }

  .strip__inner { flex-direction: column; align-items: flex-start; }
  .cards--3 { grid-template-columns: 1fr; }

  .preview-card--hero { width: min(300px, 88%); right: 0; bottom: -10%; }
  .chip--float2 { right: 0; }
  .chip--float1 { left: 0; }

  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .container { padding-inline: 18px; }
  .hero__visual { min-height: 360px; }
  .strip__stats { gap: 22px; flex-wrap: wrap; }
  .report, .explain, .attention { padding: 20px; }
}

@media (min-width: 1440px) {
  :root { --container: 1240px; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
