/* ============================================================
   SENTINEL / GOUD — Landing page
   Surveillance-tech aesthetic. Legora-inspired infographic
   density. Dark default + light theme.
   ============================================================ */

/* ===================== TOKENS ===================== */
:root {
  /* Surfaces — deep ink */
  --bg: #0A1014;
  --bg-elev: #0F1519;
  --surface: #131A20;
  --surface-2: #1A2229;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #E8EEF2;
  --text-muted: #8A96A1;
  --text-faint: #4A5560;

  /* Accent — radar amber/green */
  --accent: #C9F36A;
  --accent-soft: rgba(201, 243, 106, 0.5);
  --accent-ink: #0A1014;

  /* Map */
  --map-dot: rgba(255, 255, 255, 0.08);
  --map-line: rgba(201, 243, 106, 0.35);

  /* Pulse divergence states (4 — inviolate, no fifth, no gradients).
     high news + high movement → red · high news + low movement → white
     low news + high movement → the accent (the only state that pulses)
     low everything → quiet */
  --pulse-red: #E63946;
  --pulse-white: #F4F1E8;
  --pulse-sentinel: var(--accent);
  --pulse-quiet: #3A3F46;

  /* "Paper" tokens for hand-drawn illustration card */
  --paper: #F4EFE3;
  --ink: #1B1A17;
  --ink-line: rgba(27, 26, 23, 0.55);
  --ink-line-soft: rgba(27, 26, 23, 0.18);
  --ink-accent: #B23A1E;
  --ink-muted: rgba(27, 26, 23, 0.6);

  /* Type */
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(80px, 11vw, 160px);
  --radius: 4px;
  --radius-lg: 14px;
}

[data-theme='light'] {
  --bg: #F5F2EA;
  --bg-elev: #EFEBE0;
  --surface: #FFFFFF;
  --surface-2: #ECE7D9;
  --border: rgba(20, 20, 20, 0.10);
  --border-strong: rgba(20, 20, 20, 0.20);
  --text: #14181B;
  --text-muted: #5B6770;
  --text-faint: #98A0A8;
  --accent: #2E5C30;
  --accent-soft: rgba(46, 92, 48, 0.5);
  --accent-ink: #F5F2EA;
  --map-dot: rgba(20, 20, 20, 0.10);
  --map-line: rgba(46, 92, 48, 0.40);
  /* divergence states, light-theme legible variants */
  --pulse-red: #C42B37;
  --pulse-white: #A89F86;
  --pulse-sentinel: var(--accent);
  --pulse-quiet: #C9C4B6;
}

/* ===================== BASE ===================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
em { font-style: italic; font-family: var(--font-display); font-weight: 400; }
strong { font-weight: 600; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ===================== ANNOUNCE ===================== */
.announce {
  position: relative; z-index: 30;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.announce__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 9px var(--gutter);
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted);
}
.announce__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.announce__text { color: var(--text-muted); }
.announce__link {
  margin-left: auto; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity 0.2s;
}
.announce__link:hover { opacity: 0.7; }

/* ===================== NAV ===================== */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav__links {
  display: flex; gap: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav__links a { transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  justify-self: center;
}
.brand__mark { width: 22px; height: 22px; color: var(--text); }
.brand__word {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--text);
}
.nav__actions {
  display: flex; align-items: center; gap: 14px;
  justify-self: end;
}
.nav__login {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__login:hover { color: var(--text); }

/* ===================== CTA BUTTONS ===================== */
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 9px 9px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 24%, transparent); }
.cta__icon {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-ink);
  color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.cta__icon svg { width: 12px; height: 12px; }
.cta--lg {
  padding: 11px 11px 11px 22px;
  font-size: 12px;
}
.cta--lg .cta__icon { width: 30px; height: 30px; }
.cta--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.cta--ghost:hover { background: var(--surface); }
.cta--ghost .cta__icon { background: transparent; border: 1px solid var(--border-strong); color: var(--text); font-size: 14px; }
.cta--solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.cta--solid .cta__icon { background: var(--bg); color: var(--text); }

/* Theme toggle — HIGH SPECIFICITY override for icon visibility */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background-color 0.2s, color 0.2s;
}
.theme-toggle:hover { background: var(--surface); }
.theme-toggle svg, [data-theme-toggle] svg {
  width: 16px !important;
  height: 16px !important;
  max-width: none;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  padding: clamp(70px, 11vw, 130px) var(--gutter) 60px;
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero__map {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.95;
}
.hero__svg { width: 100%; height: 100%; }
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.hero__eyebrow-tag { color: var(--text); }
.hero__eyebrow-tag:nth-child(3),
.hero__eyebrow-tag:nth-child(5) { color: var(--text-muted); }
.hero__eyebrow-divider { color: var(--text-faint); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  color: var(--text);
}
.hero__title-line { display: block; }
.hero__title em, .hero__title-accent {
  font-style: italic;
  color: var(--accent);
}
.hero__lede {
  max-width: 640px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 40px;
}
.hero__lede em { color: var(--text); font-size: 1.1em; }

.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Telemetry strip */
.hero__telemetry {
  position: relative; z-index: 2;
  max-width: var(--container);
  margin: clamp(60px, 9vw, 110px) auto 0;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.tm {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border-right: 1px solid var(--border);
}
.tm:last-child { border-right: 0; }
.tm__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint);
}
.tm__dot--ok {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.tm__group { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.tm__value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tm__value--accent { color: var(--accent); }

/* Map animation primitives */
.pulse-ring { transform-origin: center; animation: pulseRing 2.6s ease-out infinite; }
@keyframes pulseRing {
  0% { r: 3; opacity: 0.9; }
  100% { r: 18; opacity: 0; }
}
.radar-sweep { transform-origin: 0 0; animation: radarSweep 5s linear infinite; }
@keyframes radarSweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.hero__arcs path { opacity: 0.7; }

/* ===================== TRUST ===================== */
.trust {
  border-bottom: 1px solid var(--border);
  padding: 28px var(--gutter);
  background: var(--bg-elev);
}
.trust__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 32px;
}
.trust__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.trust__logos {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: center;
}
.trust-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.trust-logo:hover { opacity: 1; }

/* ===================== STATS ===================== */
.stats { padding: var(--section-y) var(--gutter); border-bottom: 1px solid var(--border); }
.stats__inner { max-width: var(--container); margin: 0 auto; }
.stats__head { max-width: 920px; margin-bottom: clamp(50px, 7vw, 90px); }
.stats__eyebrow, .engine__eyebrow, .gauntlet__eyebrow, .ladd__eyebrow, .evidence__eyebrow, .tiers__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.stats__title, .engine__title, .gauntlet__title, .ladd__title, .evidence__title, .tiers__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0;
  color: var(--text);
}
.stats__title em, .engine__title em, .gauntlet__title em,
.ladd__title em, .evidence__title em, .tiers__title em { color: var(--accent); }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.stat {
  padding: 36px 28px 30px 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 22px;
}
.stat:last-child { border-right: 0; padding-right: 0; }
.stat:not(:first-child) { padding-left: 28px; }
.stat__number {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 104px);
  line-height: 1;
  color: var(--text);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.stat__divider { color: var(--accent); font-style: italic; }
.stat__copy { display: flex; flex-direction: column; gap: 10px; }
.stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
}
.stat__copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ===================== ENGINE ===================== */
.engine { padding: var(--section-y) var(--gutter); border-bottom: 1px solid var(--border); }
.engine__inner { max-width: var(--container); margin: 0 auto; }
.engine__head { max-width: 880px; margin-bottom: clamp(50px, 7vw, 90px); }
.engine__deck, .gauntlet__deck, .ladd__deck, .evidence__deck {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  max-width: 680px;
}
.engine__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}
.detector {
  padding: 32px 28px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
  background: var(--bg-elev);
  transition: background-color 0.3s;
}
.detector:nth-child(2n) { border-right: 0; }
.detector:nth-last-child(-n+2) { border-bottom: 0; }
.detector:hover { background: var(--surface); }
.detector__meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.detector__id { color: var(--accent); }
.detector__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.1;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
}
.detector__copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}
.detector__viz {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.viz-svg { width: 100%; height: 110px; }
.viz-svg--center { display: block; }
.viz-text-mono {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  fill: var(--text-faint);
}
.viz-text-mono--accent { fill: var(--accent); }
.detector__readout {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.readout__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.readout__value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent);
  font-weight: 400;
}

/* Detector animations */
.spike-path { stroke-dasharray: 800; stroke-dashoffset: 800; animation: drawLine 2.4s ease-out forwards; }
.spike-fill { opacity: 0; animation: fadeIn 1s 1.8s ease-out forwards; }
.spike-dot { transform-origin: center; animation: spikePulse 1.6s 1.6s ease-out infinite; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes spikePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}
.compress-obs rect { animation: tickPulse 2s ease-in-out infinite; }
.compress-obs rect:nth-child(2) { animation-delay: 0.1s; }
.compress-obs rect:nth-child(3) { animation-delay: 0.2s; }
.compress-obs rect:nth-child(4) { animation-delay: 0.3s; }
.compress-obs rect:nth-child(5) { animation-delay: 0.4s; }
.compress-obs rect:nth-child(6) { animation-delay: 0.5s; }
.compress-obs rect:nth-child(7) { animation-delay: 0.6s; }
@keyframes tickPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.diverge-rays line { stroke-dasharray: 50; stroke-dashoffset: 50; animation: drawLine 1.4s ease-out forwards; }
.diverge-rays line:nth-child(2) { animation-delay: 0.05s; }
.diverge-rays line:nth-child(3) { animation-delay: 0.1s; }
.diverge-rays line:nth-child(4) { animation-delay: 0.15s; }
.diverge-rays line:nth-child(5) { animation-delay: 0.2s; }
.diverge-rays line:nth-child(6) { animation-delay: 0.25s; }
.diverge-rays line:nth-child(7) { animation-delay: 0.3s; }
.diverge-rays line:nth-child(8) { animation-delay: 0.35s; }
.diverge-rays line:nth-child(9) { animation-delay: 0.4s; }
.cohort-nodes circle { transform-origin: center; transform-box: fill-box; animation: cohortPing 3s ease-in-out infinite; }
.cohort-nodes circle:nth-child(2) { animation-delay: 0.3s; }
.cohort-nodes circle:nth-child(3) { animation-delay: 0.6s; }
.cohort-nodes circle:nth-child(4) { animation-delay: 0.9s; }
.cohort-nodes circle:nth-child(5) { animation-delay: 1.2s; }
.cohort-nodes circle:nth-child(6) { animation-delay: 1.5s; }
.cohort-nodes circle:nth-child(7) { animation-delay: 1.8s; }
@keyframes cohortPing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Composite */
.engine__composite {
  margin-top: 36px;
  padding: 28px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.composite__formula { display: flex; flex-direction: column; gap: 12px; }
.composite__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.composite__eq {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.composite__eq em { font-family: var(--font-display); color: var(--accent); font-size: 18px; }
.composite__dial { display: flex; align-items: center; gap: 18px; }
.dial-svg { width: 180px; height: 108px; }
.dial-fill { animation: dialFill 1.6s 0.5s ease-out forwards; stroke-dashoffset: 251; }
@keyframes dialFill { to { stroke-dashoffset: 22; } }
.dial-needle { transform-origin: 100px 100px; transform: rotate(-90deg); animation: dialNeedle 1.6s 0.5s ease-out forwards; }
@keyframes dialNeedle { to { transform: rotate(50deg); } }
.dial-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  fill: var(--accent);
}
.composite__readout { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.composite__big {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
}
.composite__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ===================== GAUNTLET ===================== */
.gauntlet { padding: var(--section-y) var(--gutter); border-bottom: 1px solid var(--border); }
.gauntlet__inner { max-width: var(--container); margin: 0 auto; }
.gauntlet__head { max-width: 880px; margin-bottom: clamp(40px, 6vw, 70px); }
.gauntlet__scrolly {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: flex-start;
}
.gauntlet__pane { position: relative; }
.pane-sticky { position: sticky; top: 90px; }
.gates {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 18px;
  counter-reset: gates;
}
.gate {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: border-color 0.3s, background-color 0.3s;
}
.gate.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-elev));
}
.gate__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  color: var(--accent);
  width: 32px; height: 32px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.gate__body h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.gate__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.gate__ex {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.gate__ex strong { color: var(--accent); font-weight: 500; }

/* Funnel viz */
.gauntlet__viz { position: relative; }
.funnel-sticky {
  position: sticky; top: 90px;
}
.funnel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 28px;
  display: flex; flex-direction: column; gap: 22px;
}
.funnel__input, .funnel__output {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.funnel__output {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}
.funnel__input-label, .funnel__output-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.funnel__output-label { color: var(--accent); }
.funnel__input-count {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text);
  line-height: 1;
}
.funnel__output-count {
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--accent);
  line-height: 1;
  display: flex; align-items: baseline; gap: 8px;
}
.funnel__output-of {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.funnel__output-rate {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 16px;
}
.funnel__stages { display: flex; flex-direction: column; gap: 10px; }
.funnel__stage { display: flex; flex-direction: column; gap: 5px; }
.funnel__bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.funnel__bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.funnel__stage.is-revealed .funnel__bar-fill { width: var(--w); }
.funnel__stage-meta {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.funnel__stage-label { color: var(--text-muted); }
.funnel__stage-count { color: var(--text); }
.funnel__caption {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.4;
  color: var(--text-muted);
  font-style: italic;
}

/* ===================== LADD ===================== */
.ladd { padding: var(--section-y) var(--gutter); border-bottom: 1px solid var(--border); }
.ladd__inner { max-width: var(--container); margin: 0 auto; }
.ladd__head { max-width: 880px; margin-bottom: clamp(40px, 6vw, 70px); }
.ladd__compare {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.ladd-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  display: flex; flex-direction: column; gap: 14px;
}
.ladd-card--accent {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-elev));
}
.ladd-card__head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.ladd-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ladd-card--accent .ladd-card__tag { color: var(--accent); }
.ladd-card__pct {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--text);
  line-height: 1;
}
.ladd-card--accent .ladd-card__pct { color: var(--accent); }
.ladd-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
}
.ladd-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}
.ladd-card__list {
  list-style: none;
  margin: 6px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.ladd-card__list li {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.x { color: #E07B6A; font-weight: 500; }
.ok { color: var(--accent); font-weight: 500; }

.ladd__bar {
  margin-top: 36px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  display: flex; flex-direction: column; gap: 18px;
}
.vbar {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  gap: 16px;
  align-items: center;
}
.vbar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.vbar__track {
  height: 14px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.vbar__fill {
  height: 100%;
  width: 0;
  background: var(--text-muted);
  border-radius: 2px;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.vbar__fill--accent { background: var(--accent); }
.vbar.is-revealed .vbar__fill { width: var(--w); }
.vbar__val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  text-align: right;
}

/* ===================== EVIDENCE ===================== */
.evidence { padding: var(--section-y) var(--gutter); border-bottom: 1px solid var(--border); }
.evidence__inner { max-width: var(--container); margin: 0 auto; }
.evidence__head { max-width: 880px; margin-bottom: clamp(40px, 6vw, 70px); }
.evidence__card-wrap {
  max-width: 980px;
  margin: 0 auto;
}
.evidence-card {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}
.evidence-card__chrome {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.chrome-dots { display: flex; gap: 6px; }
.chrome-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-faint); opacity: 0.6;
}
.chrome-dots span:nth-child(1) { background: #FF5F57; }
.chrome-dots span:nth-child(2) { background: #FEBC2E; }
.chrome-dots span:nth-child(3) { background: #28C840; }
.chrome-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}
.chrome-tier {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--accent);
}
.chrome-tier__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 1.6s ease-in-out infinite;
}
.evidence-card__body { padding: 28px 32px; }
.ev-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  gap: 24px;
}
.ev-head__id {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.ev-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ev-head__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.ev-head__index { text-align: right; }
.ev-head__index-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}
.ev-head__index-value {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--accent);
  line-height: 1;
  margin-top: 4px;
}
.ev-grid { padding: 20px 0; display: flex; flex-direction: column; gap: 4px; }
.ev-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.ev-row:last-child { border-bottom: 0; }
.ev-row__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  padding-top: 2px;
}
.ev-row__value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.pill--pass {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 1px solid var(--accent);
}
.ev-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.ev-foot__hash {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.ev-foot__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 0.2s;
}
.ev-foot__cta:hover { opacity: 0.7; }

/* ===================== TIERS ===================== */
.tiers { padding: var(--section-y) var(--gutter); border-bottom: 1px solid var(--border); }
.tiers__inner { max-width: var(--container); margin: 0 auto; }
.tiers__head { max-width: 880px; margin-bottom: clamp(40px, 6vw, 70px); }
.tiers__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tier {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  display: flex; flex-direction: column; gap: 18px;
  min-height: 320px;
}
.tier--top {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-elev));
}
.tier__badge {
  position: absolute; top: -10px; left: 22px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 3px;
}
.tier__top {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.tier__name {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.tier--top .tier__name { color: var(--accent); }
.tier__range {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.tier__copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}
.tier__list {
  margin: auto 0 0; padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}
.tier__list li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.tier__list li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===================== FINAL CTA ===================== */
.final-cta { padding: var(--section-y) var(--gutter); }
.final-cta__inner { max-width: var(--container); margin: 0 auto; }
.cta-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
}
.cta-card__left {
  padding: clamp(36px, 5vw, 60px);
  display: flex; flex-direction: column; gap: 18px;
  justify-content: center;
}
.cta-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.cta-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text);
}
.cta-card__title em { color: var(--accent); }
.cta-card__copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 540px;
}
.cta-card__fine {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.cta-card__right {
  background: var(--paper);
  padding: 32px;
  display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--border);
}
.cta-card__illo { width: 100%; max-width: 360px; height: auto; }
.illo-mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.10em; }
.illo-mono--sm { font-size: 9px; }
.illo-serif { font-family: var(--font-display); font-size: 22px; }
.illo-stroke { stroke-linecap: round; }

/* Access form */
.access-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 8px;
  max-width: 560px;
}
.access-form__input, .access-form__select {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.2s;
}
.access-form__input::placeholder { color: var(--text-faint); }
.access-form__input:focus, .access-form__select:focus { border-color: var(--accent); }
.access-form__select { grid-column: 1 / -1; }
.access-form button { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }

/* ===================== FOOTER ===================== */
.footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: clamp(50px, 6vw, 80px) var(--gutter) 30px;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border);
}
.footer__brand { display: flex; gap: 14px; align-items: flex-start; }
.footer__mark { width: 30px; height: 30px; color: var(--text); flex-shrink: 0; }
.footer__word {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--text);
  margin-bottom: 8px;
}
.footer__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer__col {
  display: flex; flex-direction: column; gap: 10px;
}
.footer__head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.footer__col a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--accent); }
.footer__legal {
  max-width: var(--container);
  margin: 30px auto 0;
  padding-top: 24px;
}
.footer__legal p {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-faint);
  max-width: 920px;
}
.footer__meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 10px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===================== HOW IT WORKS ===================== */
.how { padding: var(--section-y) var(--gutter); border-bottom: 1px solid var(--border); background: var(--surface); }
.how__inner { max-width: var(--container); margin: 0 auto; }
.how__head { max-width: 880px; margin-bottom: clamp(50px, 7vw, 80px); }
.how__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.how__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0;
  color: var(--text);
}
.how__title em { color: var(--accent); font-style: italic; }
.how__deck {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  max-width: 680px;
}
.how__deck em { color: var(--text); font-style: italic; }

.how__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.how-step {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 36px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.how-step:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); transform: translateY(-2px); }
.how-step__num {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}
.how-step__product {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.how-step__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--text);
  margin: 0;
}
.how-step__copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}
.how-step__copy strong { color: var(--text); font-weight: 500; }
.how-step__viz {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.viz-svg { width: 100%; height: auto; display: block; }
.viz-text-mono {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  fill: var(--text-faint);
}
.viz-text-mono--accent { fill: var(--accent); }

/* ===================== REVEAL ON SCROLL ===================== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-revealed { opacity: 1; transform: translateY(0); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { padding-top: 36px; }
  .stat:nth-child(3) { border-right: 1px solid var(--border); }
  .engine__grid { grid-template-columns: 1fr; }
  .detector { border-right: 0; }
  .gauntlet__scrolly { grid-template-columns: 1fr; gap: 32px; }
  .pane-sticky, .funnel-sticky { position: static; }
  .ladd__compare { grid-template-columns: 1fr; }
  .tiers__grid { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; }
  .cta-card__right { border-left: 0; border-top: 1px solid var(--border); padding: 28px; }
  .footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .composite__formula .composite__eq { font-size: 12px; }
  .engine__composite { grid-template-columns: 1fr; gap: 20px; }
  .how__steps { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__inner { grid-template-columns: auto 1fr auto; padding: 12px var(--gutter); }
  .nav__links { display: none; }
  .nav__login { display: none; }
  .nav__actions .cta { display: none; }
  .brand { justify-self: start; }
  .hero__eyebrow { flex-wrap: wrap; row-gap: 4px; padding: 6px 12px; font-size: 9px; letter-spacing: 0.10em; }
  .hero__eyebrow-divider { display: none; }
  .hero__telemetry { grid-template-columns: repeat(2, 1fr); }
  .tm:nth-child(even) { border-right: 0; }
  .tm:nth-child(5) { grid-column: 1 / -1; border-right: 0; border-top: 1px solid var(--border); padding-top: 12px; }
  .hero { min-height: auto; padding-top: 70px; }
  .hero__title { font-size: clamp(38px, 10vw, 56px); }
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; padding-left: 0 !important; }
  .ev-row { grid-template-columns: 1fr; gap: 4px; }
  .ev-head { flex-direction: column; gap: 14px; }
  .ev-head__index { text-align: left; }
  .composite__formula .composite__eq { font-size: 11px; word-break: break-word; }
  .access-form { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .vbar { grid-template-columns: 80px 1fr 50px; gap: 10px; }
  .ev-row__label { padding-top: 0; }
  .announce__inner { font-size: 10px; gap: 8px; }
  .announce__text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
