/* CogniGraph v2 landing — tokens are inherited from the app itself
   (Fraunces / IBM Plex, the five mode accents, near-black blue ground). */
:root {
  --bg: #070910;
  --bg-2: #0c1019;
  --bg-3: #111624;
  --line: rgba(232, 236, 246, 0.10);
  --line-2: rgba(232, 236, 246, 0.18);
  --ink: #eef0f6;
  --ink-2: #b7bfd0;
  --ink-3: #7e8799;
  --pathways: #5ee1d6;
  --atlas: #a98ef2;
  --neurons: #f5b74a;
  --scenario: #f28b74;
  --learn: #7ed69a;
  --danger: #ff6b7a;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: rgba(238, 240, 246, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; font-variation-settings: "opsz" 96; }
h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; font-variation-settings: "opsz" 48; }
p { margin: 0; }
p + p { margin-top: 0.9em; }
::selection { background: rgba(94, 225, 214, 0.28); color: #fff; }

:focus-visible { outline: 2px solid var(--pathways); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 6px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pathways); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }
.lede { font-size: clamp(17px, 1.5vw, 20px); max-width: 60ch; color: var(--ink-2); }
.mono { font-family: var(--mono); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pathways); box-shadow: 0 0 14px var(--pathways); align-self: center; }
.brand .name { font-family: var(--display); font-weight: 500; font-size: 21px; font-variation-settings: "opsz" 24; }
.brand .ver { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; }
.site-nav { display: flex; gap: 26px; font-size: 14.5px; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }
.head-cta { display: inline-flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--ink);
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink-3); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn .arrow { font-family: var(--mono); font-weight: 400; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 110px) 0 clamp(36px, 5vw, 64px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 {
  font-size: clamp(44px, 7.2vw, 96px); line-height: 0.98; letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144; font-weight: 300; max-width: 11ch;
}
.hero h1 em { font-style: italic; font-weight: 300; color: var(--pathways); }
.hero .lede { margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; align-items: center; }
.hero-foot { margin-top: 22px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.hero-foot b { color: var(--ink-2); font-weight: 500; }

.hero-visual { position: relative; min-height: 380px; }
.hero-visual img {
  width: 118%; max-width: none; margin-left: -6%;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 52% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 60% at 52% 50%, #000 55%, transparent 100%);
}
.hero-visual figcaption {
  position: absolute; right: 4px; bottom: 6px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.04em;
}

/* replay strip — the page's signature: a real pathway from the app, ticking */
.replay { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); padding-top: 22px; }
.replay-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; }
.replay-head .eyebrow { margin: 0; }
.replay-clock { font-family: var(--mono); font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.replay-clock b { color: var(--ink); font-weight: 500; min-width: 3ch; display: inline-block; text-align: right; }
.replay-track { position: relative; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 4px; }
.replay-track::-webkit-scrollbar { display: none; }
.replay-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; min-width: 1040px; }
.step {
  position: relative; padding: 16px 14px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease);
}
.step::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px;
  background: var(--pathways); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.step.is-on { border-color: rgba(94, 225, 214, 0.5); background: var(--bg-3); }
.step.is-on::before { transform: scaleX(1); }
.step.is-past { border-color: var(--line-2); }
.step .ms { font-family: var(--mono); font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.step .ms b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.step .region { font-family: var(--display); font-size: 21px; color: var(--ink); margin-top: 6px; font-variation-settings: "opsz" 24; }
.step .region small { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.step .what { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.human { color: #9ef0e7; border-color: rgba(94, 225, 214, 0.45); }
.badge.animal { color: #f6cf85; border-color: rgba(245, 183, 74, 0.45); }
.badge.estimate { color: var(--ink-3); border-style: dashed; }
.badge.ok { color: #a9e6bb; border-color: rgba(126, 214, 154, 0.45); }
.badge.simplified { color: #f6cf85; border-color: rgba(245, 183, 74, 0.45); }
.badge.metaphor { color: #f7a896; border-color: rgba(242, 139, 116, 0.5); }
.badge.direct { color: #9ef0e7; border-color: rgba(94, 225, 214, 0.45); }
.replay-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); max-width: 78ch; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 130px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head .lede { font-size: 16.5px; }

/* film */
.film-frame {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2);
  background: #000; box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
}
.film-frame video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.film-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.film-bar b { color: var(--ink-2); font-weight: 500; }

/* modes */
.modes { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.mode-index { position: sticky; top: 92px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mode-index a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink-3); font-size: 15px; transition: color 0.25s, background 0.25s;
}
.mode-index a .k { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0.55; transition: opacity 0.25s, box-shadow 0.25s; }
.mode-index a .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-left: auto; }
.mode-index a:hover, .mode-index a.is-active { color: var(--ink); background: var(--bg-2); }
.mode-index a.is-active .k { opacity: 1; box-shadow: 0 0 12px var(--c); }
.mode-list { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 110px); }
.mode { scroll-margin-top: 100px; }
.mode-shot {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  background: var(--bg-2);
}
.mode-shot img { aspect-ratio: 16 / 9; object-fit: cover; }
.mode-copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 40px; margin-top: 26px; align-items: start; }
.mode-tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mode-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.mode-copy p { margin-top: 12px; font-size: 16px; }
.try { border-left: 2px solid var(--c); padding: 4px 0 4px 16px; }
.try .l { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.try p { margin-top: 6px; font-size: 15.5px; color: var(--ink); }
.try p em { font-style: italic; font-family: var(--display); font-variation-settings: "opsz" 24; font-size: 17px; }

/* badges section */
.honesty { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 64px; align-items: start; }
.badge-groups { display: grid; gap: 28px; }
.badge-group { border-top: 1px solid var(--line); padding-top: 18px; }
.badge-group .l { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.badge-row { display: grid; gap: 12px; }
.badge-row > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 15px; }
.badge-row .badge { font-size: 11.5px; justify-self: start; }
.quiet { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; color: var(--ink-2); background: var(--bg-2); }
.quiet b { color: var(--ink); font-weight: 500; }

/* under the hood */
.hood { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px 64px; align-items: start; }
.spec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.spec li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.spec .k { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-3); text-transform: uppercase; padding-top: 3px; }
.spec .v b { color: var(--ink); font-weight: 500; }
.devnote { position: sticky; top: 100px; border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: var(--bg-2); }
.devnote .l { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.devnote h3 { margin-top: 8px; font-size: 24px; }
.devnote p { margin-top: 12px; font-size: 14.5px; }
.devnote img { border-radius: 8px; margin-top: 16px; border: 1px solid var(--line); }

/* cta */
.cta { text-align: center; padding: clamp(72px, 10vw, 140px) 0; }
.cta h2 { font-size: clamp(34px, 5.5vw, 64px); }
.cta .lede { margin: 18px auto 0; }
.cta .hero-actions { justify-content: center; }
.cta .links { margin-top: 26px; font-family: var(--mono); font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }

.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.site-foot a { color: var(--ink-2); }

/* reveal */
.rv { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 0; margin: -20px auto 0; max-width: 620px; }
  .hero-visual img { width: 100%; margin-left: 0; }
  .hero h1 { max-width: none; }
  .section-head, .mode-copy, .honesty, .hood { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; gap: 28px; }
  .mode-index { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .mode-index a { padding: 8px 12px; border: 1px solid var(--line); font-size: 14px; }
  .mode-index a .n { display: none; }
  .devnote { position: static; }
}
@media (max-width: 760px) {
  .site-nav { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand .ver { display: none; }
  .replay-steps { grid-template-columns: repeat(5, 220px); min-width: 0; }
  .badge-row > div, .spec li { grid-template-columns: 1fr; gap: 6px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-visual { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .step, .step::before, .btn { transition: none; }
}

[hidden] { display: none !important; }
