/* ============================================================
   EITX — Fraud Detection · Light editorial system
   ============================================================ */

@font-face {
  font-family: "EvolveSans";
  src: url("assets/EvolveSans-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e1233;          /* deepest navy — body text on light */
  --navy: #1f2570;         /* brand navy */
  --navy-soft: #2a3180;    /* logo navy */
  --teal: #3ec0b3;         /* brand teal */
  --teal-deep: #1f9c8e;
  --teal-glow: rgba(62, 192, 179, 0.35);

  --bg: #f5f3ee;           /* warm off-white */
  --paper: #ffffff;
  --rule: #e3dfd2;
  --rule-strong: #cfcabb;
  --muted: #6b6f8a;

  --shadow-sm: 0 1px 0 rgba(14,18,51,0.04), 0 4px 12px -6px rgba(14,18,51,0.08);
  --shadow-md: 0 2px 0 rgba(14,18,51,0.04), 0 24px 60px -28px rgba(14,18,51,0.25);
  --shadow-lg: 0 30px 80px -40px rgba(14,18,51,0.45);

  --font-display: "Space Grotesk", "EvolveSans", system-ui, sans-serif;
  --font-body: "Geist", "Inter Tight", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
}

/* ------- DARK MODE ------- */
.theme-dark {
  --bg: #0c0f2b;
  --paper: #11163b;
  --rule: rgba(255,255,255,0.08);
  --rule-strong: rgba(255,255,255,0.18);
  --ink: #f4f5fb;
  --navy: #3ec0b3;
  --navy-soft: #6cd1c5;
  --muted: #9da3c4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

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

/* ------- TYPE ------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(62,192,179,0.18);
  flex: 0 0 auto;
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
  color: var(--ink);
  text-wrap: balance;
}

h1.display { font-size: clamp(54px, 8.4vw, 132px); }
h2.display { font-size: clamp(38px, 5.4vw, 84px); }
h3.display { font-size: clamp(28px, 3.2vw, 44px); font-weight: 500; }

.lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 58ch;
  text-wrap: pretty;
}

.muted { color: var(--muted); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ------- LAYOUT ------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { position: relative; }

.section-pad { padding: clamp(80px, 11vw, 160px) 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(24px, 4vw, 80px);
  margin-bottom: clamp(48px, 6vw, 88px);
  align-items: start;
}
.section-head .left { position: sticky; top: 80px; }
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .left { position: static; }
}

.rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* ------- BUTTONS ------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 200ms cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--teal);
  color: var(--ink);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn .arr {
  width: 16px; height: 16px;
  display: inline-block;
  transition: transform 200ms;
}
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: all 240ms ease;
}
.nav.scrolled {
  background: rgba(245,243,238,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.theme-dark .nav.scrolled {
  background: rgba(12,15,43,0.82);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 18px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  overflow: hidden;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-wordmark {
  font-family: "EvolveSans", var(--font-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1;
}
.no-circuit .brain-deco { display: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
}
.nav-links a {
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 160ms;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a:hover { opacity: 1; }
.nav .btn { padding: 10px 16px; font-size: 11px; }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  /* taller container to drive the pinned zoom-out — tightened so the
     payoff (stats) arrives sooner. 140vh = 40vh of "pin scroll" after
     the initial 100vh viewport. */
  min-height: 140vh;
  position: relative;
  padding-top: 0;
  padding-bottom: 0;
  z-index: 1;
}
.hero-stick {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: clamp(80px, 12vh, 140px);
  padding-bottom: clamp(40px, 6vw, 80px);
  /* scroll-driven progress var, set by JS (0 → 1) */
  --p: 0;
}

.hero-stick > .container {
  width: 100%;
  /* When scrolling, content as a whole drifts up slightly */
  transform: translateY(calc(var(--p) * -40px));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
}

.hero-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0;
  /* Big scroll-driven explode-out — camera flies into the text */
  transform-origin: 30% 50%;
  transform: scale(calc(1 + var(--p) * 2.6)) translateY(calc(var(--p) * -10px));
  opacity: calc(1 - var(--p) * 1.7);
  filter: blur(calc(var(--p) * 8px));
  will-change: transform, opacity, filter;
  transition: filter 100ms linear;
}

.hero h1 .ink-em {
  display: inline-block;
  position: relative;
  color: var(--ink);
}

.hero h1 .teal-em {
  color: var(--teal-deep);
  font-style: italic;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Other hero content fades + drifts up with scroll progress */
.hero-stick .hero-top,
.hero-stick .hero-sub,
.hero-stick .hero-tag-strip {
  opacity: calc(1 - var(--p) * 1.4);
  transform: translateY(calc(var(--p) * -20px));
  will-change: transform, opacity;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
}
.hero-meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #65d36a;
  box-shadow: 0 0 0 4px rgba(101,211,106,0.25);
  display: inline-block;
  margin-right: 6px;
  animation: livepulse 2s infinite;
}
@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(101,211,106,0.25); }
  50% { box-shadow: 0 0 0 8px rgba(101,211,106,0); }
}

.hero-sub {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  padding-top: clamp(32px, 5vw, 64px);
  border-top: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .hero-sub { grid-template-columns: 1fr; }
  .hero-top { grid-template-columns: 1fr; align-items: start; }
  .hero-meta { align-items: flex-start; text-align: left; }
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Brain-circuit pattern decorations using the user's PNG */
.brain-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
}
.brain-deco img { width: 100%; height: 100%; object-fit: contain; }
.brain-deco--hero {
  right: -180px;
  top: 80px;
  width: 720px;
  height: 720px;
  opacity: 0.045;
}
.brain-deco--corner {
  right: -120px;
  bottom: -120px;
  width: 360px; height: 360px;
  opacity: 0.05;
}

.hero-tag-strip {
  display: flex;
  gap: clamp(20px, 4vw, 56px);
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: clamp(60px, 10vw, 120px);
  align-items: center;
}
.hero-tag-strip .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-tag-strip .tag::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--teal);
  flex: 0 0 auto;
}
.hero-tag-strip .tag-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
  margin-right: clamp(12px, 2vw, 32px);
  opacity: 0.5;
}

/* ============================================================
   STATS / TRACK RECORD
   ============================================================ */
.stats {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.stat {
  background: var(--paper);
  padding: clamp(40px, 5vw, 64px) clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink);
}
.stat .num .unit {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--teal-deep);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ABOUT / Manifesto
   ============================================================ */
.about-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 22ch;
}
.about-headline em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  color: var(--teal-deep);
  font-weight: 400;
}

.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(40px, 5vw, 64px);
}
.about-body p { margin: 0; font-size: 17px; line-height: 1.6; }
@media (max-width: 720px) { .about-body { grid-template-columns: 1fr; } }

/* Ambient graph — atmospheric decoration in About left column */
.ambient-graph {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.05;
  max-width: 340px;
  margin-top: 32px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(62,192,179,0.06), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(31,37,112,0.04), transparent 60%),
    var(--paper);
  border: 1px solid var(--rule);
}
/* Hide ambient graph on mobile — it filled the screen and looked broken */
@media (max-width: 720px) {
  .ambient-graph { display: none; }
}
.ambient-graph canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.ambient-graph-cap {
  position: absolute;
  left: 14px; bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ambient-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(62,192,179,0.18);
  animation: ambient-blink 1.6s infinite ease-in-out;
}
@keyframes ambient-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(62,192,179,0.18); }
  50%      { opacity: 0.5; box-shadow: 0 0 0 5px rgba(62,192,179,0); }
}

/* ============================================================
   GRAPH SECTION (centerpiece)
   ============================================================ */
.graph-section {
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  position: relative;
}
.graph-section .eyebrow { color: var(--teal); }
.graph-section .eyebrow::before { background: var(--teal); box-shadow: 0 0 0 4px rgba(62,192,179,0.22); }
.graph-section .display { color: var(--bg); }
.graph-section .lede { color: rgba(255,255,255,0.78); }
.graph-section .muted { color: rgba(255,255,255,0.55); }

.graph-section .rule { background: rgba(255,255,255,0.08); }

.graph-canvas-wrap {
  position: relative;
  background: linear-gradient(180deg, #11163b 0%, #0a0d28 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 100px -60px rgba(0,0,0,0.7);
}

.graph-canvas {
  display: block;
  width: 100%;
  height: clamp(480px, 62vh, 720px);
  background: 
    radial-gradient(ellipse at 30% 30%, rgba(62,192,179,0.10), transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(31,37,112,0.4), transparent 70%),
    #0a0d28;
}

.graph-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  gap: 16px;
  flex-wrap: wrap;
}
.graph-toolbar-left, .graph-toolbar-right {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.graph-windowdots {
  display: flex; gap: 6px;
}
.graph-windowdots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.graph-windowdots span:nth-child(1) { background: #ff5f57; opacity: 0.7; }
.graph-windowdots span:nth-child(2) { background: #febc2e; opacity: 0.7; }
.graph-windowdots span:nth-child(3) { background: #28c840; opacity: 0.7; }

.graph-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}
.graph-status b { color: var(--teal); font-weight: 500; }

.chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.02);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 160ms;
  white-space: nowrap;
}
.chip:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--ink);
  font-weight: 500;
}
.chip .swatch {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}

/* Filter toggle button — hidden on desktop, shown on mobile to collapse chips */
.graph-filters-toggle {
  display: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  background: rgba(255,255,255,0.04);
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.graph-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}

.graph-legend {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: rgba(10,13,40,0.72);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Legend toggle button — hidden on desktop, shown on mobile */
.graph-legend-toggle {
  display: none;
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  background: rgba(10,13,40,0.78);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.graph-legend-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 2px;
}
.graph-legend-row { display: flex; align-items: center; gap: 8px; }
.graph-legend-row .swatch {
  width: 10px; height: 10px; border-radius: 50%;
}

.graph-detail {
  position: absolute;
  right: 18px;
  top: 78px;
  width: 280px;
  background: rgba(10,13,40,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
  border-radius: 14px;
  padding: 18px;
  color: #fff;
  transform: translateX(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 240ms cubic-bezier(.2,.7,.3,1);
}
.graph-detail.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.graph-detail-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.graph-detail-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(62,192,179,0.16);
  display: grid; place-items: center;
  color: var(--teal);
}
.graph-detail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
}
.graph-detail-id {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.graph-detail dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.graph-detail dt { color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; }
.graph-detail dd { margin: 0; color: #fff; text-align: right; }
.graph-detail dd.risk-high { color: #ff7a7a; }
.graph-detail dd.risk-med { color: #ffbf57; }
.graph-detail dd.risk-low { color: var(--teal); }
.graph-detail-score {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.graph-detail-score-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.graph-detail-score-bar {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden;
}
.graph-detail-score-fill {
  height: 100%; background: linear-gradient(90deg, var(--teal), #ff7a7a);
  border-radius: 4px;
  transition: width 400ms;
}

.graph-hint {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.graph-hint::before {
  content: "";
  width: 24px;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

/* Graph node text */
.gnode-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
  transition: fill 200ms;
}
.gnode.is-focus .gnode-label,
.gnode.is-neighbor .gnode-label {
  fill: rgba(255,255,255,0.9);
}
.gnode.is-dim .gnode-label { fill: rgba(255,255,255,0.18); }

.gnode-circle {
  transition: r 200ms, stroke-width 200ms, opacity 200ms;
  cursor: pointer;
}
.gnode.is-dim .gnode-circle { opacity: 0.25; }
.gnode.is-focus .gnode-circle {
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 0 12px var(--teal-glow));
}

.gedge {
  transition: stroke 200ms, opacity 200ms, stroke-width 200ms;
}
.gedge.is-dim { opacity: 0.08; }
.gedge.is-focus { stroke: var(--teal) !important; opacity: 1 !important; }

@media (max-width: 720px) {
  .graph-detail { position: static; width: 100%; transform: none; opacity: 1; pointer-events: auto; margin-top: 12px; }
  .graph-canvas { height: 420px; }
}

/* ============================================================
   VERTICALS
   ============================================================ */
.verticals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
@media (max-width: 860px) { .verticals { grid-template-columns: 1fr; } }

.vertical-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: all 240ms cubic-bezier(.2,.7,.3,1);
  min-height: 380px;
}
.vertical-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}
.vertical-card .pin {
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.vertical-card h3 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}
.vertical-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.vertical-card .vstat {
  margin-top: auto;
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}
.vertical-card .vstat .big { font-size: 56px; line-height: 0.9; font-weight: 500; }
.vertical-card .vstat .sm { font-size: 14px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }

.vertical-mini {
  height: 80px;
  margin: 8px 0;
  position: relative;
  overflow: hidden;
}
.vertical-mini svg { width: 100%; height: 100%; }

/* ============================================================
   APPROACH (bespoke)
   ============================================================ */
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 860px) { .approach-grid { grid-template-columns: 1fr; } }

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.step .step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--teal-deep);
}
.step .step-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.step .step-desc { color: var(--muted); font-size: 15px; margin: 0; }
.step .step-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   COMPARISON
   ============================================================ */
.compare {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.compare-row:last-child { border-bottom: 0; }
.compare-row > div { padding: 18px 22px; font-size: 14px; }
.compare-row .lbl { color: var(--muted); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.compare-row.head { background: var(--bg); }
.compare-row.head > div {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink);
}
.compare-row.head .us { color: var(--teal-deep); font-weight: 500; }
.compare-row .us-cell { color: var(--ink); font-weight: 500; }
.compare-row .them-cell { color: var(--muted); }
.compare-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.compare-check svg { width: 14px; height: 14px; }

/* ============================================================
   WAITLIST
   ============================================================ */
.waitlist-section {
  background: var(--ink);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.waitlist-section .display { color: var(--bg); }
.waitlist-section .lede { color: rgba(255,255,255,0.78); }

.waitlist-section .brain-deco {
  opacity: 0.08;
  width: 600px; height: 600px;
  right: -100px; top: 20%;
}

.waitlist-form {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  max-width: 540px;
  margin-top: 32px;
  transition: all 200ms;
}
.waitlist-form:focus-within {
  border-color: var(--teal);
  background: rgba(62,192,179,0.08);
}
.waitlist-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 20px;
  outline: none;
}
.waitlist-form input::placeholder { color: rgba(255,255,255,0.4); }
.waitlist-form button {
  background: var(--teal);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 200ms;
}
.waitlist-form button:hover { background: #fff; }
.waitlist-success {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 240ms;
}
.waitlist-success.show { opacity: 1; }

.waitlist-meta {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  margin-top: 56px;
  flex-wrap: wrap;
}
.waitlist-meta-item {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em;
}
.waitlist-meta-item b {
  font-family: var(--font-body);
  font-size: 15px;
  color: #fff;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  padding: 64px 0 32px;
  border-top: 1px solid var(--rule);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 14px; color: var(--ink); opacity: 0.85; }
.footer ul a:hover { opacity: 1; color: var(--teal-deep); }

.footer-tag {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 28ch;
  margin: 16px 0 0;
  color: var(--muted);
}

.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============================================================
   UTILITY + SCROLL MOTION
   ============================================================ */

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-deep));
  width: 0%;
  transform-origin: left center;
  will-change: width;
}

/* Reveal — base */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(.2,.7,.3,1),
              transform 900ms cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] { transform: none; }
[data-reveal="slide-left"] { transform: translateX(-32px); }
[data-reveal="slide-left"].in { transform: translateX(0); }
[data-reveal="scale"] { transform: scale(0.96); transform-origin: center; }
[data-reveal="scale"].in { transform: scale(1); }

/* Hero headline split-line reveal */
.hero h1 {
  overflow: hidden;
}
.hero h1 .ink-line,
.hero h1 .teal-em {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 900ms cubic-bezier(.18,.8,.25,1),
              opacity 600ms cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.hero.in h1 .ink-line,
.hero.in h1 .teal-em {
  transform: translateY(0);
  opacity: 1;
}

/* Eyebrow line grow */
.section-no {
  --line-w: 24px;
}
.section-no::before {
  width: 0px;
  transition: width 700ms cubic-bezier(.2,.7,.3,1);
  transition-delay: 100ms;
}
.section-no.in::before { width: var(--line-w); }

/* Stat reveal — scroll-driven zoom-in.
   --sp (stats progress, 0→1) is set on .stats by JS based on how far the
   section is into the viewport. Numbers start massive + blurred and shrink
   to their target size as the user scrolls into the section. */
.stats {
  --sp: 0;
  position: relative;
  z-index: 2;
}
.stat {
  /* Always at least 35% visible so the box is never blank */
  opacity: calc(0.35 + var(--sp) * 0.65);
  transform: translateY(calc((1 - var(--sp)) * 18px));
  transition: none;
}
.stat .num {
  transform-origin: left center;
  /* Subtle scale-in, no blur — feels more like settling in than zooming */
  transform: scale(calc(1 + (1 - var(--sp)) * 0.35));
  opacity: calc(0.3 + var(--sp) * 0.7);
  will-change: transform, opacity;
}
.stat .label {
  opacity: calc((var(--sp) - 0.3) * 1.6);
  transform: translateY(calc((1 - var(--sp)) * 8px));
}
@media (prefers-reduced-motion: reduce) {
  .stat, .stat .num, .stat .label { transform: none !important; filter: none !important; opacity: 1 !important; }
}

/* ============================================================
   MOBILE GRAPH — collapse filter chips + legend behind buttons
   ============================================================ */
@media (max-width: 720px) {
  .graph-toolbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .graph-toolbar-right {
    position: relative;
    margin-left: auto;
  }
  /* Hide all chips by default on mobile */
  .graph-toolbar-right .chip {
    display: none;
  }
  /* Show the filter toggle button */
  .graph-filters-toggle {
    display: inline-flex;
  }
  /* When the panel is open: reveal chips in a floating dropdown */
  .graph-toolbar-right.open {
    position: absolute;
    top: 56px;
    right: 12px;
    z-index: 5;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10,13,40,0.94);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 10px;
    gap: 6px;
    min-width: 200px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  }
  .graph-toolbar-right.open .chip {
    display: inline-flex;
    justify-content: flex-start;
    white-space: normal;
    text-align: left;
  }
  .graph-toolbar-right.open .graph-filters-toggle {
    order: -1;
    align-self: flex-end;
    border-color: transparent;
    background: transparent;
  }

  /* Hide legend by default; show toggle button */
  .graph-legend { display: none; }
  .graph-legend.open {
    display: flex;
    left: 14px; right: 14px; bottom: 60px;
    max-width: none;
  }
  .graph-legend-toggle { display: inline-flex; }
  /* When legend is open, swap label */
  .graph-legend.open + nothing { /* placeholder; toggle handles it */ }

  /* Detail card → full-width drawer at bottom on mobile */
  .graph-detail {
    right: 12px;
    left: 12px;
    top: auto;
    bottom: 60px;
    max-width: none;
  }
}

/* The stats section itself emerges from below the dissolving hero */
.stats { /* override duplicate */
  position: relative;
  z-index: 2;
}

/* Vertical card reveal */
.vertical-card {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 700ms cubic-bezier(.2,.7,.3,1),
              transform 900ms cubic-bezier(.2,.7,.3,1),
              border-color 240ms, box-shadow 240ms;
  transition-delay: var(--vcard-delay, 0ms);
}
.vertical-card.in { opacity: 1; transform: translateY(0); }

/* Step reveal */
.step {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 600ms cubic-bezier(.2,.7,.3,1),
              transform 700ms cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--step-delay, 0ms);
}
.step.in { opacity: 1; transform: translateX(0); }

/* Comparison rows reveal */
.compare-row:not(.head) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 600ms cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--cmp-delay, 0ms);
}
.compare-row.in, .compare-row.head { opacity: 1; transform: translateY(0); }

/* Parallax brain decorations */
.brain-deco {
  will-change: transform;
  transition: transform 80ms linear;
}

/* Graph canvas entry */
.graph-canvas-wrap {
  opacity: 0;
  transform: translateY(40px) scale(0.985);
  transition: opacity 900ms cubic-bezier(.2,.7,.3,1),
              transform 1100ms cubic-bezier(.2,.7,.3,1);
}
.graph-canvas-wrap.in { opacity: 1; transform: translateY(0) scale(1); }

/* Graph node pop-in */
.gnode {
  opacity: 0;
  transform: scale(0.6);
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 600ms ease, transform 700ms cubic-bezier(.2,1.4,.4,1);
  transition-delay: var(--gn-delay, 0ms);
}
.gnode.popped { opacity: 1; transform: scale(1); }
.gedge {
  opacity: 0;
  transition: opacity 600ms ease, stroke 200ms, stroke-width 200ms;
  transition-delay: var(--ge-delay, 600ms);
}
.gedge.popped { opacity: 1; }
/* When focus state overrides, keep popped */
.gnode.is-focus, .gnode.is-neighbor, .gnode.is-dim { opacity: 1; transform: scale(1); }

.fadeup {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 700ms cubic-bezier(.2,.7,.3,1);
}
.fadeup.in {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll-hint icon */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.7;
  pointer-events: none;
}
.scroll-hint .line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--ink));
  animation: scrollline 2.2s infinite;
  transform-origin: top;
}
@keyframes gedgepulse {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -32; }
}

@keyframes scrollline {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Section labels */
.section-no {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-no::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--rule-strong);
}
