/* =============================================================================
   ObGynAssist™ — Website design system
   "Clinical observatory at night" — deep near-black stage, single mint-emerald
   signal, frosted-glass instrument panels, glowing precise numerals.
   Visual identity inherited from the keynote (#06080a / #4cd198) and the app
   Brand palette (Brand.swift). Zero JS frameworks, zero CSS dependencies.
   ============================================================================= */

/* ----------------------------------------------------------------------------
   0. Tokens
   ---------------------------------------------------------------------------- */
:root {
  /* Stage */
  --bg:        #06080a;   /* deep keynote stage                       */
  --bg-1:      #080b0e;   /* faint raise                              */
  --bg-2:      #0b0f12;   /* panel base                               */
  --bg-3:      #10161a;   /* raised panel / hover                     */

  /* Depth gradient (Brand.accentGradient — navy → teal → green descent) */
  --depth-1:   #001A2E;
  --depth-2:   #042F3E;
  --depth-3:   #073B3A;
  --depth-4:   #0B3B2E;   /* obsidianGreen */

  /* Signal */
  --accent:        #4cd198;             /* mint-emerald — the single accent */
  --accent-2:      #14B8A6;             /* vibrantTeal (Brand) */
  --accent-deep:   #2f6f57;
  --accent-soft:   #8fe6c2;
  --accent-glow:   rgba(76, 209, 152, 0.35);
  --accent-line:   rgba(76, 209, 152, 0.22);
  --accent-wash:   rgba(76, 209, 152, 0.06);

  /* The "AI" / negative side */
  --ai:        #cf7f77;
  --ai-wash:   rgba(207, 127, 119, 0.08);
  --ai-line:   rgba(207, 127, 119, 0.22);

  /* Ink */
  --ink:       #f3f6f5;
  --dim:       #c3ccc7;
  --faint:     #8a948e;
  --ghost:     #5b655f;

  /* Structure */
  --line:        rgba(255, 255, 255, 0.08);
  --line-soft:   rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.14);
  --panel:       rgba(16, 24, 22, 0.55);
  --panel-2:     rgba(20, 30, 27, 0.66);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius-s: 10px;
  --radius:   16px;
  --radius-l: 24px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------------------------------------------------------
   1. Reset & base
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--dim);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Atmosphere: living radial glow + fine grain over the deep stage */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70% 50% at 50% -8%, rgba(76, 209, 152, 0.10), transparent 60%),
    radial-gradient(90% 60% at 88% 4%, rgba(20, 184, 166, 0.06), transparent 55%),
    radial-gradient(120% 80% at 0% 100%, rgba(0, 58, 93, 0.14), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #03130c; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #04140d;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 14px; }

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

/* ----------------------------------------------------------------------------
   2. Typography
   ---------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 460;
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
}

.display {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 420;
  line-height: 1.0;
  letter-spacing: -0.025em;
}
h2.section-title {
  font-size: clamp(1.9rem, 3.8vw, 3.05rem);
  letter-spacing: -0.02em;
}
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.01em; }

p { text-wrap: pretty; }
.lead {
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
  line-height: 1.55;
  color: var(--dim);
}

strong, b { color: var(--ink); font-weight: 600; }
em { font-style: italic; color: var(--accent-soft); }

.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* Eyebrow / kicker label */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent-line);
}
.kicker.center::before { display: none; }

.accent { color: var(--accent); }
.ai-text { color: var(--ai); }
.muted { color: var(--faint); }

/* ----------------------------------------------------------------------------
   3. Layout
   ---------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 820px; }

section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 150px); }
.section-pad-sm { padding-block: clamp(48px, 7vw, 90px); }

.divider-line { height: 1px; background: var(--line); border: 0; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .kicker { margin-bottom: 20px; }
.section-head p { margin-top: 18px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ----------------------------------------------------------------------------
   4. Navigation
   ---------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(6, 8, 10, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(6, 8, 10, 0.86);
}
.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 15px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  white-space: nowrap;
}
.brand-mark {
  width: 1.5em;
  height: 1.5em;
  border-radius: 0.32em;
  flex: none;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.brand-word { display: inline-block; }
.brand .tm {
  display: inline-block;
  font-size: 0.5em;
  font-family: var(--font-sans);
  font-weight: 400;
  transform: translateY(-0.7em);
  margin-left: 0.06em;
  color: var(--accent);
}
.brand .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--dim);
  padding: 9px 14px;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--accent); }

.nav-cta {
  font-size: 0.9rem;
  font-weight: 500;
  color: #04140d !important;
  background: var(--accent);
  padding: 9px 18px !important;
  border-radius: 999px;
  transition: transform 0.2s var(--ease), box-shadow 0.3s;
  box-shadow: 0 0 0 1px rgba(76,209,152,0.4), 0 8px 28px -10px var(--accent-glow);
}
.nav-cta:hover { transform: translateY(-1px); background: var(--accent-soft) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  width: 42px; height: 38px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 18px; height: 1.6px; background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ----------------------------------------------------------------------------
   5. Buttons
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.3s;
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--accent);
  color: #04140d;
  box-shadow: 0 0 0 1px rgba(76,209,152,0.4), 0 14px 40px -14px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-soft); transform: translateY(-2px); }

.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-wash); transform: translateY(-2px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
  transition: border-color 0.2s, gap 0.2s;
}
.textlink:hover { border-color: var(--accent); gap: 0.65em; }

/* ----------------------------------------------------------------------------
   6. Cards & panels
   ---------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 32px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s;
}
.card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.98rem; }

/* card with a top gradient hairline that lights on hover */
.card-lit::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.card-lit:hover::before { opacity: 1; }

.card-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  display: block;
}

.icon-badge {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  margin-bottom: 20px;
}
.icon-badge svg { width: 22px; height: 22px; }

/* ----------------------------------------------------------------------------
   7. Stat / glowing-number blocks
   ---------------------------------------------------------------------------- */
.stat-num {
  font-family: var(--font-display);
  font-weight: 420;
  font-variant-numeric: tabular-nums;
  line-height: 0.94;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.stat-num.glow {
  color: var(--accent);
  text-shadow: 0 0 28px var(--accent-glow), 0 0 6px rgba(76,209,152,0.4);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 12px;
}

.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.statbar .cell {
  background: var(--bg-2);
  padding: clamp(22px, 3vw, 34px) 22px;
  text-align: center;
}
.statbar .stat-num { font-size: clamp(2.1rem, 4vw, 3.1rem); }

/* big single hero figure */
.figure-hero .stat-num { font-size: clamp(3.4rem, 10vw, 8rem); }

/* ----------------------------------------------------------------------------
   8. Pills, chips, badges
   ---------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--dim);
  background: rgba(255,255,255,0.02);
}
.pill .led {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.pill.accent { border-color: var(--accent-line); color: var(--accent-soft); background: var(--accent-wash); }

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--accent-line);
  color: var(--accent-soft);
  background: var(--accent-wash);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----------------------------------------------------------------------------
   9. Pipeline steps (numbered vertical/horizontal flow)
   ---------------------------------------------------------------------------- */
.pipeline { display: grid; gap: 14px; counter-reset: step; }
.pipeline .step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px clamp(18px, 2vw, 26px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s;
}
.pipeline .step:hover { border-color: var(--accent-line); }
.pipeline .step .num {
  counter-increment: step;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 9px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent-wash);
}
.pipeline .step .num::before { content: counter(step, decimal-leading-zero); }
.pipeline .step h3,
.pipeline .step h4 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: 5px; letter-spacing: 0; }
.pipeline .step p { font-size: 0.95rem; }

/* ----------------------------------------------------------------------------
   10. Comparison table (AI vs Engine)
   ---------------------------------------------------------------------------- */
.versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.versus .col { background: var(--bg-2); padding: clamp(24px, 3vw, 38px); }
.versus .col.ai { background: linear-gradient(180deg, var(--ai-wash), transparent 40%); }
.versus .col.engine { background: linear-gradient(180deg, var(--accent-wash), transparent 40%); }
.versus .col h3 { display: flex; align-items: center; gap: 0.5em; margin-bottom: 22px; }
.versus .col.ai h3 { color: var(--ai); }
.versus .col.engine h3 { color: var(--accent); }
.versus ul { list-style: none; padding: 0; display: grid; gap: 14px; }
.versus li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.96rem;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.versus li:last-child { border-bottom: 0; padding-bottom: 0; }
.versus .glyph { font-family: var(--font-mono); font-weight: 600; line-height: 1.5; }
.versus .ai .glyph { color: var(--ai); }
.versus .engine .glyph { color: var(--accent); }

/* ----------------------------------------------------------------------------
   11. Callout / quote / chapter divider
   ---------------------------------------------------------------------------- */
.callout {
  border: 1px solid var(--accent-line);
  background: var(--accent-wash);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
}
.callout.warn { border-color: var(--ai-line); background: var(--ai-wash); }

.pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 380;
}
.pullquote .accent { font-style: italic; }

.chapter-divider {
  text-align: center;
  padding-block: clamp(60px, 9vw, 120px);
}
.chapter-divider .word {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 360;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 0.9;
}
.chapter-divider .word .dot { color: var(--accent); }

/* ----------------------------------------------------------------------------
   12. Hero
   ---------------------------------------------------------------------------- */
.hero { padding-block: clamp(80px, 13vw, 168px) clamp(56px, 8vw, 110px); position: relative; }
.hero .wrap { position: relative; z-index: 2; }
.hero .display { margin-block: 26px 0; max-width: 16ch; }
.hero .lead { margin-top: 30px; max-width: 56ch; }
.hero .btn-row { margin-top: 40px; }
.hero-meta {
  margin-top: 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.hero-meta .item { display: flex; flex-direction: column; gap: 2px; }
.hero-meta .item .v { font-family: var(--font-mono); color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hero-meta .item .k { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* ----------------------------------------------------------------------------
   13. Module list
   ---------------------------------------------------------------------------- */
.module-card { display: flex; flex-direction: column; height: 100%; }
.module-card .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.module-card h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.01em; }
.module-card .src { margin-top: auto; padding-top: 16px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--faint); }

/* ----------------------------------------------------------------------------
   14. Device / app mock frame
   ---------------------------------------------------------------------------- */
.device {
  border: 1px solid var(--line-strong);
  border-radius: 40px;
  padding: 12px;
  background: linear-gradient(170deg, var(--bg-3), var(--bg-2));
  box-shadow: 0 50px 90px -50px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.03) inset;
  max-width: 320px;
}
.device .screen {
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(76,209,152,0.10), transparent 60%),
    linear-gradient(180deg, var(--depth-1), var(--bg));
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  gap: 14px;
}

/* Real-screenshot triptych — three framed phones, middle elevated */
.shots {
  display: flex;
  gap: clamp(10px, 1.6vw, 18px);
  align-items: center;
  justify-content: center;
}
.shot { text-align: center; }
.shot img {
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  width: 100%;
}
.shot.lift { transform: translateY(-18px); }
.shot .cap {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 14px;
}
@media (max-width: 760px) {
  .shots { flex-direction: column; }
  .shot { max-width: 260px; }
  .shot.lift { transform: none; }
}

/* ----------------------------------------------------------------------------
   15. Footer
   ---------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 7vw, 84px) 40px;
  background: linear-gradient(180deg, transparent, rgba(0, 58, 93, 0.06));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer .brand { font-size: 1.5rem; margin-bottom: 16px; }
.footer .col h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}
.footer .col ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.footer .col a { color: var(--dim); font-size: 0.94rem; transition: color 0.2s; }
.footer .col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ghost);
}

/* The regulatory companion disclaimer — appears site-wide above footer bottom */
.disclaimer {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--faint);
  max-width: 760px;
  border-left: 2px solid var(--accent-line);
  padding-left: 18px;
}

/* ----------------------------------------------------------------------------
   16. Scroll-reveal
   ---------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ----------------------------------------------------------------------------
   17. Responsive
   ---------------------------------------------------------------------------- */
@media (max-width: 940px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .statbar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px var(--gutter) 28px;
    background: rgba(6, 8, 10, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 13px 14px; border-radius: 10px; }
  .nav-links a.active { background: var(--accent-wash); }
  .nav-cta { text-align: center; margin-top: 8px; }
  .nav-toggle { display: flex; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .statbar { grid-template-columns: 1fr 1fr; }
  .hero .display { max-width: none; }
  .pipeline .step { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 440px) {
  .statbar { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------------
   18. Dynamics — keynote-grade motion layer
   Every effect is meaningful, GPU-cheap, and disabled under reduced motion.
   ---------------------------------------------------------------------------- */

/* Gradient-sheen display headlines — top-lit ink, Apple keynote style */
.display {
  background: linear-gradient(180deg, #ffffff 0%, #eef3f0 52%, #b4c1bb 115%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.display .accent {
  -webkit-text-fill-color: var(--accent);
  text-shadow: 0 0 36px rgba(76, 209, 152, 0.28);
}

/* Living background — the stage breathes, very slowly */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: bgdrift 30s ease-in-out infinite alternate; will-change: transform; }
}
@keyframes bgdrift {
  from { transform: translate3d(-1%, -0.7%, 0) scale(1.04); }
  to   { transform: translate3d(1.1%, 1%, 0) scale(1.08); }
}

/* Chapter dividers — rack-focus: blurred and large, then snapping sharp */
.chapter-divider [data-reveal] {
  transform: scale(1.16);
  filter: blur(18px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out);
}
.chapter-divider [data-reveal].in { transform: none; filter: none; }

/* Cursor-tracked glow on cards (pointer position set by site.js) */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
              rgba(76, 209, 152, 0.09), transparent 70%);
}
.card:hover::after { opacity: 1; }

/* Pipeline — steps light in sequence, badge flashes as it activates */
.pipeline[data-reveal] .step {
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.pipeline[data-reveal].in .step { opacity: 1; transform: none; }
.pipeline[data-reveal].in .step:nth-child(1) { transition-delay: 0.05s; }
.pipeline[data-reveal].in .step:nth-child(2) { transition-delay: 0.18s; }
.pipeline[data-reveal].in .step:nth-child(3) { transition-delay: 0.31s; }
.pipeline[data-reveal].in .step:nth-child(4) { transition-delay: 0.44s; }
.pipeline[data-reveal].in .step:nth-child(5) { transition-delay: 0.57s; }
.pipeline[data-reveal].in .step:nth-child(6) { transition-delay: 0.70s; }
.pipeline[data-reveal].in .step:nth-child(7) { transition-delay: 0.83s; }
.pipeline[data-reveal].in .step .num { animation: numflash 0.9s var(--ease) both; }
.pipeline[data-reveal].in .step:nth-child(1) .num { animation-delay: 0.25s; }
.pipeline[data-reveal].in .step:nth-child(2) .num { animation-delay: 0.38s; }
.pipeline[data-reveal].in .step:nth-child(3) .num { animation-delay: 0.51s; }
.pipeline[data-reveal].in .step:nth-child(4) .num { animation-delay: 0.64s; }
.pipeline[data-reveal].in .step:nth-child(5) .num { animation-delay: 0.77s; }
.pipeline[data-reveal].in .step:nth-child(6) .num { animation-delay: 0.90s; }
.pipeline[data-reveal].in .step:nth-child(7) .num { animation-delay: 1.03s; }
@keyframes numflash {
  0%   { box-shadow: 0 0 0 0 rgba(76, 209, 152, 0); }
  40%  { box-shadow: 0 0 20px 3px rgba(76, 209, 152, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(76, 209, 152, 0); }
}

/* Versus table — rows cascade in */
.versus[data-reveal] li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.versus[data-reveal].in li { opacity: 1; transform: none; }
.versus[data-reveal].in li:nth-child(1) { transition-delay: 0.10s; }
.versus[data-reveal].in li:nth-child(2) { transition-delay: 0.22s; }
.versus[data-reveal].in li:nth-child(3) { transition-delay: 0.34s; }
.versus[data-reveal].in li:nth-child(4) { transition-delay: 0.46s; }
.versus[data-reveal].in li:nth-child(5) { transition-delay: 0.58s; }

/* Glowing numerals breathe; status LEDs pulse — only when motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .statbar .stat-num.glow { animation: glowbreathe 3.4s ease-in-out infinite alternate; }
  .pill .led { animation: ledpulse 2.4s ease-out infinite; }
}
@keyframes glowbreathe {
  from { text-shadow: 0 0 18px rgba(76, 209, 152, 0.25), 0 0 4px rgba(76, 209, 152, 0.3); }
  to   { text-shadow: 0 0 36px rgba(76, 209, 152, 0.5), 0 0 9px rgba(76, 209, 152, 0.45); }
}
@keyframes ledpulse {
  0%   { box-shadow: 0 0 0 0 rgba(76, 209, 152, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(76, 209, 152, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 209, 152, 0); }
}

/* Hero centile curve — draws itself on load; the signature moment */
.hero-curve {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-52%);
  width: min(46vw, 620px);
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}
@media (max-width: 1080px) { .hero-curve { display: none; } }
.hero-curve .hc-grid { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
.hero-curve .hc-band { fill: none; stroke: rgba(76, 209, 152, 0.14); stroke-width: 1.4; }
.hero-curve .hc-band.mid { stroke-dasharray: 5 7; stroke: rgba(76, 209, 152, 0.2); }
.hero-curve .hc-traj {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px rgba(76, 209, 152, 0.5));
  animation: hcdraw 2.4s var(--ease-out) 0.5s both;
}
@keyframes hcdraw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
.hero-curve .hc-dot { fill: var(--accent); animation: hcpop 0.5s var(--ease-out) both; }
.hero-curve .hc-dot.d1 { animation-delay: 1.0s; }
.hero-curve .hc-dot.d2 { animation-delay: 1.5s; }
.hero-curve .hc-dot.d3 { animation-delay: 2.0s; }
.hero-curve .hc-dot.d4 { animation-delay: 2.6s; }
@keyframes hcpop {
  from { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; }
  to   { opacity: 1; transform: scale(1); transform-box: fill-box; transform-origin: center; }
}
.hero-curve .hc-halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-curve .hc-halo { animation: hchalo 2.6s ease-out 2.8s infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes hchalo {
  0%   { opacity: 0.7; transform: scale(0.4); }
  70%  { opacity: 0;   transform: scale(1.9); }
  100% { opacity: 0;   transform: scale(1.9); }
}

/* Parallax hooks (transform applied by site.js) + screenshot tilt */
[data-parallax] { will-change: transform; }
@media (hover: hover) and (pointer: fine) {
  .shot img { transition: transform 0.18s ease-out; }
}

/* Determinism replay demo (evidence page) */
.demo-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.demo-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; }
@media (max-width: 760px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-in, .demo-out {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 18px 20px;
  font-size: 0.82rem;
  line-height: 2;
  color: var(--dim);
}
.demo-in .stat-label, .demo-out .stat-label { margin: 0 0 8px; }
.demo-out .ok { color: var(--accent); }
.demo-out .faded { color: var(--faint); }
.demo-out.flash { animation: outflash 0.55s var(--ease) both; }
@keyframes outflash {
  0%   { border-color: var(--accent); box-shadow: 0 0 24px -4px rgba(76, 209, 152, 0.35); }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(76, 209, 152, 0); }
}
.demo-note { margin-top: 16px; font-size: 0.72rem; color: var(--faint); }
