/* ============================================================
   NeoAgent Landing — Control Surface, second edition
   Warm olive/gold agent OS · live UI replicas · editorial serif
   Palette mirrors flutter_app/lib/src/theme/palette.dart
   ============================================================ */

:root {
  color-scheme: light dark;

  --bg: #f4f1e8;
  --bg-2: #ede9dc;
  --bg-3: #f1ede1;
  --surface: rgba(253, 252, 248, 0.82);
  --surface-solid: #fdfcf8;
  --surface-strong: #ffffff;

  --ink: #1c2117;
  --ink-2: #49503f;
  --ink-3: #7e8470;

  --line: rgba(28, 33, 23, 0.10);
  --line-2: rgba(28, 33, 23, 0.16);
  --line-strong: rgba(28, 33, 23, 0.22);

  --gold: #b07d2b;
  --gold-soft: #c8943f;
  --gold-ink: #8a5f1c;
  --gold-muted: rgba(176, 125, 43, 0.14);
  --sage: #5e6b4c;
  --sage-soft: #84ba87;
  --teal: #2f7d6e;
  --success: #527c4f;
  --danger: #ae473c;

  --btn: #1c2117;
  --btn-ink: #fdfcf8;
  --btn-hover: #2a3226;

  --nav: rgba(244, 241, 232, 0.72);
  --glow-a: rgba(176, 125, 43, 0.18);
  --glow-b: rgba(94, 107, 76, 0.14);
  --grain: 0.45;

  /* the app's dark surface — used for the always-dark UI replicas */
  --app-bg: #0e1511;
  --app-card: #171f1a;
  --app-well: #1c261f;
  --app-ink: #ecefe5;
  --app-ink-2: #aeb7a6;
  --app-ink-3: #7e8877;
  --app-line: rgba(224, 240, 224, 0.09);
  --app-line-2: rgba(224, 240, 224, 0.16);
  --app-gold: #e1b052;
  --app-sage: #84ba87;
  --app-success: #74c07c;

  --shadow-xs: 0 1px 2px rgba(28, 33, 23, 0.04);
  --shadow-sm: 0 8px 24px -16px rgba(28, 33, 23, 0.22), 0 2px 8px rgba(28, 33, 23, 0.05);
  --shadow-md: 0 18px 48px -24px rgba(28, 33, 23, 0.28), 0 8px 20px -12px rgba(28, 33, 23, 0.12);
  --shadow-lg: 0 40px 90px -36px rgba(28, 33, 23, 0.36), 0 18px 40px -24px rgba(28, 33, 23, 0.16);
  --shadow-gold: 0 18px 50px -20px rgba(176, 125, 43, 0.35);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(18px, 4.5vw, 48px);
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1511;
    --bg-2: #0a0f0c;
    --bg-3: #171f1a;
    --surface: rgba(23, 31, 26, 0.78);
    --surface-solid: #171f1a;
    --surface-strong: #1c261f;

    --ink: #ecefe5;
    --ink-2: #aeb7a6;
    --ink-3: #7e8877;

    --line: rgba(224, 240, 224, 0.08);
    --line-2: rgba(224, 240, 224, 0.14);
    --line-strong: rgba(224, 240, 224, 0.2);

    --gold: #e1b052;
    --gold-soft: #eac272;
    --gold-ink: #eac272;
    --gold-muted: rgba(225, 176, 82, 0.14);
    --sage: #84ba87;
    --sage-soft: #9dcca0;
    --teal: #6fb0a4;
    --success: #74c07c;
    --danger: #de8a78;

    --btn: #e1b052;
    --btn-ink: #0e1511;
    --btn-hover: #eac272;

    --nav: rgba(10, 15, 12, 0.72);
    --glow-a: rgba(225, 176, 82, 0.16);
    --glow-b: rgba(132, 186, 135, 0.12);
    --grain: 0.28;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-sm: 0 10px 28px -16px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 24px 60px -28px rgba(0, 0, 0, 0.65), 0 10px 24px -16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 48px 110px -40px rgba(0, 0, 0, 0.75), 0 20px 48px -28px rgba(0, 0, 0, 0.42);
    --shadow-gold: 0 22px 60px -18px rgba(225, 176, 82, 0.28);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 12% -8%, var(--glow-a), transparent 58%),
    radial-gradient(900px 520px at 92% 4%, var(--glow-b), transparent 52%),
    radial-gradient(700px 420px at 70% 88%, rgba(47, 125, 110, 0.08), transparent 60%),
    var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: overlay; }
}

body > * { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
p { margin: 0; text-wrap: pretty; }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--gold-muted);
  color: var(--gold-ink);
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1, h2 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.015em;
  line-height: 1.04;
}
h1 em, h2 em {
  font-style: italic;
  font-weight: 420;
  color: var(--gold-ink);
}
h3, h4 { letter-spacing: -0.03em; font-weight: 650; line-height: 1.15; }
::selection { background: color-mix(in srgb, var(--gold) 28%, transparent); color: var(--ink); }

.wrap { width: min(var(--max), calc(100% - (var(--gutter) * 2))); margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 0 4px var(--gold-muted);
}

.lede {
  color: var(--ink-2);
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.65;
  max-width: 54ch;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2.4s ease-in-out infinite; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 20%, transparent); }
  50% { box-shadow: 0 0 0 7px transparent; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform .28s var(--ease), background .28s var(--ease),
    border-color .28s var(--ease), box-shadow .28s var(--ease), color .2s ease;
}

.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--btn) 92%, white), var(--btn));
  color: var(--btn-ink);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.18);
}

.btn-primary:hover { background: var(--btn-hover); box-shadow: var(--shadow-md), var(--shadow-gold); }

.btn-primary svg { transition: transform .28s var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,0.35);
}

.btn-secondary:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.btn-ghost { color: var(--ink-2); padding-inline: 14px; min-height: 42px; }
.btn-ghost:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }

.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 15.5px; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: var(--nav);
  border-bottom-color: var(--line);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 10px 40px -28px rgba(0,0,0,0.35);
}

.nav-inner {
  width: min(1280px, calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,0.2);
  flex: 0 0 auto;
}

.brand-mark svg { width: 100%; height: 100%; display: block; }

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  transition: background .2s ease, color .2s ease;
}

.nav-links a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-actions .btn-primary { min-height: 40px; padding: 8px 16px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px var(--gutter) 18px;
  border-bottom: 1px solid var(--line);
  background: var(--nav);
  backdrop-filter: blur(20px);
}

.mobile-menu a {
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 550;
}

.mobile-menu .btn { margin-top: 10px; width: 100%; border-bottom: 0; }
.nav.open .mobile-menu { display: flex; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 150px 0 clamp(56px, 7vw, 104px);
}

/* eyebrow, rule, and the channel the instruction arrived on */
.hrun-rule {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: clamp(26px, 3.4vw, 42px);
}

.hrun-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-2);
}

.hrun-channel {
  flex: 0 0 auto;
  justify-items: end;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Stacked slides share one grid cell, so each block is always as tall as
   its tallest member and nothing has to be measured by hand. */
.hrun-stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.hrun-stage > * { grid-area: 1 / 1; }

.hrun-say {
  max-width: 1160px;
  font-size: clamp(38px, 5.9vw, 82px);
  line-height: 1.03;
  letter-spacing: -0.028em;
  text-wrap: pretty;
}

.hrun-offer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(28px, 3.4vw, 44px);
}

.hrun-offer .lede { margin: 0; max-width: 56ch; }

.hrun-act {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 0 0 auto;
}

.hrun-act .hero-note { margin: 0; }
.hrun-act .hero-actions { margin: 0; }

/* the run log */
.hrun-log {
  margin-top: clamp(32px, 4vw, 56px);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 2.6vw, 34px) clamp(22px, 2.6vw, 34px) clamp(24px, 2.4vw, 32px);
  box-shadow: var(--shadow-lg);
}

.hrun-log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(20px, 2.2vw, 28px);
}

.hrun-status {
  flex: 0 0 auto;
  justify-items: end;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hrun-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One node markup, two rails: horizontal here, vertical under 1080. */
.hrun-node {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  grid-template-areas:
    "mark wire"
    "time time"
    "act act"
    "detail detail";
  align-content: start;
  padding-right: 26px;
}

.hrun-rail > .hrun-node:last-child { padding-right: 0; }

.hrun-mark {
  grid-area: mark;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  box-sizing: border-box;
}

.hrun-done { background: var(--sage); }
.hrun-hold { background: transparent; border: 3px solid var(--gold); }

.hrun-wire {
  grid-area: wire;
  align-self: center;
  height: 1px;
  background: var(--line-2);
}

.hrun-rail > .hrun-node:last-child .hrun-wire { visibility: hidden; }

.hrun-node time {
  grid-area: time;
  margin-top: 15px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

.hrun-node b {
  grid-area: act;
  margin-top: 7px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.hrun-node:has(.hrun-hold) b { color: var(--gold-ink); }

.hrun-detail {
  grid-area: detail;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- instruction rotation ---------- */
.hrun-slide {
  opacity: 0;
  animation: hrun-cycle 28s var(--ease) infinite;
}

/* Negative delays put every slide at its correct phase from the first
   painted frame, so instruction 1 is on screen at t=0 instead of fading
   up from an empty stage. The static opacity is the no-animation fallback. */
.hrun [data-slide="1"] { animation-delay: 0s; }
.hrun [data-slide="2"] { animation-delay: -21s; }
.hrun [data-slide="3"] { animation-delay: -14s; }
.hrun [data-slide="4"] { animation-delay: -7s; }
.hrun-slide[data-slide="1"] { opacity: 1; }

/* The outgoing slide clears before the next arrives — at this size a
   symmetrical cross-dissolve reads as two headlines at once. */
@keyframes hrun-cycle {
  0%, 20% { opacity: 1; transform: none; }
  23% { opacity: 0; transform: translateY(-6px); }
  97% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}

.hrun-dots {
  display: flex;
  gap: 7px;
  margin-top: clamp(22px, 2.4vw, 30px);
}

.hrun-dots i {
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: var(--line-2);
  animation: hrun-dot 28s linear infinite;
}

.hrun-dots i[data-slide="1"] { background: var(--gold); }

@keyframes hrun-dot {
  0%, 24.9% { background: var(--gold); }
  25%, 100% { background: var(--line-2); }
}

/* hold still while someone is reading */
.hrun:hover .hrun-slide,
.hrun:hover .hrun-dots i,
.hrun:focus-within .hrun-slide,
.hrun:focus-within .hrun-dots i { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .hrun-slide,
  .hrun-dots i { animation: none; }

  .hrun-slide { opacity: 0; transform: none; }
  .hrun-slide[data-slide="1"] { opacity: 1; }

  .hrun-dots i { background: var(--line-2); }
  .hrun-dots i[data-slide="1"] { background: var(--gold); }
}


/* ---------- manifesto ---------- */
.section { padding: clamp(76px, 10vw, 132px) 0; }
.section-tight { padding: clamp(48px, 7vw, 88px) 0; }

.manifesto-inner { max-width: 980px; margin-inline: auto; }

.big-line {
  font-family: var(--serif);
  font-weight: 480;
  font-size: clamp(24px, 3.3vw, 40px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  margin-bottom: clamp(44px, 6vw, 72px);
  text-wrap: balance;
}

.big-line .dim { color: var(--gold-ink); font-style: italic; font-weight: 420; }

.manifesto-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.m-item { border-top: 1px solid var(--line-2); padding-top: 20px; }

.m-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-ink);
}

.m-item h3 { font-size: 19px; margin: 10px 0 8px; }
.m-item p { color: var(--ink-2); font-size: 14.5px; line-height: 1.62; }

/* ---------- scrollytelling ---------- */
.story-section { padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 110px); }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { margin-top: 14px; font-size: clamp(30px, 4.2vw, 50px); }

.story {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.story-stage-wrap {
  position: sticky;
  top: 96px;
  z-index: 2;
}

.story-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--app-line-2);
  background: var(--app-bg);
  color: var(--app-ink);
  box-shadow: var(--shadow-lg);
  min-height: clamp(380px, 46vw, 470px);
  transform: perspective(1400px) rotateY(calc(var(--ty, 0) * 1deg)) rotateX(calc(var(--tx, 0) * 1deg));
  transition: transform .5s var(--ease);
}

.story-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(18px) scale(0.99);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  pointer-events: none;
}

.story-panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.panel-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-card);
}

.pc-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--app-success);
  box-shadow: 0 0 0 4px rgba(116,192,124,0.15);
}

.pc-dot.gold { background: var(--app-gold); box-shadow: 0 0 0 4px rgba(225,176,82,0.16); }
.pc-dot.sage { background: var(--app-sage); box-shadow: 0 0 0 4px rgba(132,186,135,0.16); }

.pc-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-ink-3);
}

.pc-steps {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pc-steps i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--app-line-2);
  transition: background .35s ease, width .35s var(--ease);
}

.pc-steps i.on {
  width: 18px;
  background: var(--app-gold);
}

.panel-body {
  flex: 1;
  padding: clamp(18px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 0;
}

.pb-meta {
  align-self: flex-end;
  color: var(--app-ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.pb-msg {
  max-width: 88%;
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
}

.pb-msg.user {
  align-self: flex-end;
  background: linear-gradient(120deg, #7fa662, #c9a44a);
  color: #101408;
  font-weight: 550;
  border-bottom-right-radius: 6px;
}

.pb-msg.agent {
  align-self: flex-start;
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-bottom-left-radius: 6px;
}

.pb-tools { display: flex; flex-wrap: wrap; gap: 7px; }

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--app-line-2);
  background: var(--app-well);
  color: var(--app-ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
}

.tool-chip svg { width: 12px; height: 12px; color: var(--app-gold); }
.tool-chip.on { border-color: rgba(225,176,82,0.35); color: var(--app-ink); }

.pb-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--app-ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
}

.pb-foot i {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--app-success);
}

/* memory panel */
.memory-panel { gap: 14px; }
.mem-graph { width: 100%; height: auto; flex: 1; min-height: 0; }

.mem-links line {
  stroke: rgba(224, 240, 224, 0.14);
  stroke-width: 1;
  transition: stroke .25s ease, stroke-width .25s ease;
}

.mem-links line.lit { stroke: rgba(225, 176, 82, 0.65); stroke-width: 1.5; }

.mem-node { cursor: pointer; }
.mem-node circle.halo {
  fill: rgba(225, 176, 82, 0.1);
  transition: fill .25s ease;
}
.mem-node circle.core {
  fill: #d3a85f;
  transition: fill .25s ease;
}
.mem-node.lit circle.halo { fill: rgba(225, 176, 82, 0.22); }
.mem-node.lit circle.core { fill: #f2cd85; }
.mem-node text {
  fill: var(--app-ink-2);
  font-family: var(--mono);
  font-size: 10px;
  text-anchor: middle;
}

.mem-fact {
  border-radius: 14px;
  border: 1px solid var(--app-line);
  background: var(--app-card);
  padding: 12px 14px;
}

.mf-chips { display: flex; gap: 6px; margin-bottom: 8px; }

.mf-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--app-line-2);
  background: var(--app-well);
  color: var(--app-ink-2);
  font-family: var(--mono);
  font-size: 9.5px;
}

.mf-chip.kind { color: var(--app-gold); border-color: rgba(225,176,82,0.3); }
.mf-chip.ok { color: var(--app-success); border-color: rgba(116,192,124,0.3); }

.mem-fact p { font-size: 12.5px; color: var(--app-ink); line-height: 1.5; min-height: 2.9em; }

/* run panel */
.run-panel { justify-content: flex-start; }

.run-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.run-head h4 { font-size: 17px; color: var(--app-ink); }
.run-head .when { font-family: var(--mono); font-size: 10.5px; color: var(--app-ink-3); }

.run-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--app-success);
  font-size: 11.5px;
  font-weight: 700;
}

.run-live i { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .run-live i { animation: pulse 1.6s ease-in-out infinite; }
}

.run-steps { display: flex; flex-direction: column; }

.run-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--app-line);
  color: var(--app-ink-2);
  font-size: 13.5px;
}

.run-step .rs-chk {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1.5px solid var(--app-line-2);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #0e1511;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}

.run-step .rs-chk svg {
  width: 12px; height: 12px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity .3s var(--ease) .1s, transform .3s var(--ease) .1s;
}

.run-step.done { color: var(--app-ink); }
.run-step.done .rs-chk {
  background: linear-gradient(180deg, #9dcca0, #6fb0a4);
  border-color: transparent;
}
.run-step.done .rs-chk svg { opacity: 1; transform: none; }

.run-step.doing .rs-chk { border-color: var(--app-gold); }
@media (prefers-reduced-motion: no-preference) {
  .run-step.doing .rs-chk::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    border: 1.5px solid var(--app-gold);
    border-top-color: transparent;
    animation: spin .9s linear infinite;
  }
}

.run-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  color: var(--app-ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.run-foot svg { width: 13px; height: 13px; color: var(--app-sage); flex: 0 0 auto; }

.story-steps { display: flex; flex-direction: column; }

.story-step {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  opacity: 0.34;
  transition: opacity .45s ease;
}

.story-step.is-active { opacity: 1; }

.story-step h3 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.story-step p { color: var(--ink-2); font-size: 15.5px; line-height: 1.66; max-width: 44ch; }

/* ---------- devices ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.split.rev > :first-child { order: 2; }

.split-copy .eyebrow { margin-bottom: 14px; }
.split-copy h2 { font-size: clamp(28px, 3.8vw, 44px); margin-bottom: 16px; }
.split-copy > p { color: var(--ink-2); font-size: 16.5px; line-height: 1.68; margin-bottom: 22px; max-width: 50ch; }

.plainlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.plainlist li {
  position: relative;
  padding: 11px 0 11px 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14.5px;
}

.plainlist li:last-child { border-bottom: 1px solid var(--line); }

.plainlist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.35em;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-muted);
}

.device-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
  transform: perspective(1400px) rotateY(calc(var(--ty, 5) * 1deg)) rotateX(calc(var(--tx, -2) * 1deg));
  transition: transform .5s var(--ease);
}

.dv-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.dv-traffic { display: flex; gap: 6px; }
.dv-traffic i { width: 9px; height: 9px; border-radius: 999px; }
.dv-traffic i:nth-child(1) { background: #e26e61; }
.dv-traffic i:nth-child(2) { background: #e0b24a; }
.dv-traffic i:nth-child(3) { background: #4bbf85; }

.dv-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.term-title {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.dv-cursor {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  color: #1c2117;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
  pointer-events: none;
  top: 30%;
  left: 20%;
}

.dv-cursor svg path { stroke: #fdfcf8; stroke-width: 1.5; }

@media (prefers-reduced-motion: no-preference) {
  .dv-cursor { animation: cursor-tour 9s var(--ease) infinite; }
}

@keyframes cursor-tour {
  0%   { transform: translate(0, 0); }
  16%  { transform: translate(180px, 60px); }
  22%  { transform: translate(180px, 60px) scale(0.82); }
  26%  { transform: translate(180px, 60px) scale(1); }
  48%  { transform: translate(60px, 150px); }
  54%  { transform: translate(60px, 150px) scale(0.82); }
  58%  { transform: translate(60px, 150px) scale(1); }
  82%  { transform: translate(260px, 110px); }
  88%  { transform: translate(260px, 110px) scale(0.82); }
  92%  { transform: translate(260px, 110px) scale(1); }
  100% { transform: translate(0, 0); }
}

.shot-pair .lm { display: block; }
.shot-pair .dm { display: none; }

@media (prefers-color-scheme: dark) {
  .shot-pair .lm { display: none; }
  .shot-pair .dm { display: block; }
}

/* ---------- channels ---------- */
.channels { border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 50%, transparent); }

.channels-inner { text-align: center; max-width: 860px; margin-inline: auto; }

.channels-lede,
.channels-note {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 480;
  color: var(--ink-2);
}

.channel-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), border-color .2s ease, color .2s ease, opacity .5s var(--ease);
}

[data-stagger] .channel-chip {
  opacity: 0;
  transform: translateY(14px);
}

[data-stagger].in .channel-chip {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 55ms);
}

.channel-chip:hover {
  transform: translateY(-3px) rotate(calc(var(--r, 0) * 1deg));
  color: var(--gold-ink);
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
}

/* ---------- terminal ---------- */
.term {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--app-line-2);
  background: #0b100d;
  box-shadow: var(--shadow-lg);
}

.term-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  background: var(--app-card);
  border-bottom: 1px solid var(--app-line);
}

.term-chrome .term-title { color: var(--app-ink-3); }

.term-body {
  padding: 22px 24px 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--app-ink-2);
  min-height: 248px;
}

.term-line { color: var(--app-ink); }
.term .prompt { color: var(--app-sage); margin-right: 4px; }
.term .cmd2 { color: var(--app-ink); }
.term .ok { color: var(--app-success); }
.term .dim-line { color: var(--app-ink-3); font-style: italic; }

.term-out > div {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .4s ease, transform .4s ease;
}

.term-out > div.show { opacity: 1; transform: none; }

[data-term-cmd]::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--app-gold);
}

@media (prefers-reduced-motion: no-preference) {
  [data-term-cmd]::after { animation: blink 1.05s steps(1) infinite; }
}

/* ---------- final CTA ---------- */
.final {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  padding: clamp(52px, 8vw, 96px) var(--gutter);
  text-align: center;
  background:
    radial-gradient(circle at 18% 20%, var(--glow-a), transparent 35%),
    radial-gradient(circle at 82% 70%, var(--glow-b), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 70%, transparent), var(--surface-solid));
  box-shadow: var(--shadow-md);
}

.final h2 { font-size: clamp(34px, 5vw, 62px); margin-bottom: 18px; }

.final p {
  color: var(--ink-2);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 auto 30px;
  line-height: 1.65;
}

.final .hero-actions { justify-content: center; margin-bottom: 0; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 42px 0 28px;
  margin-top: clamp(40px, 6vw, 72px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 14px;
  max-width: 30ch;
  line-height: 1.55;
}

.footer h4 {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--ink-2); font-size: 14px; transition: color .2s ease; }
.footer-links a:hover { color: var(--gold-ink); }

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

/* ---------- reveals & motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
}

.reveal.in { opacity: 1; transform: none; filter: none; }

.reveal[data-d="1"] { transition-delay: .09s; }
.reveal[data-d="2"] { transition-delay: .18s; }
.reveal[data-d="3"] { transition-delay: .27s; }
.reveal[data-d="4"] { transition-delay: .36s; }

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 40%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, [data-stagger] .channel-chip { opacity: 1; transform: none; filter: none; transition: none; }
  .story-stage, .device-visual { transform: none !important; }
  .btn:hover { transform: none; }
  .term-out > div { opacity: 1; transform: none; }
  [data-term-cmd]::after { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero { padding-top: 120px; }
  .split { grid-template-columns: 1fr; }
  .split.rev > :first-child { order: 0; }

  .hrun-offer { flex-direction: column; align-items: flex-start; }
  .hrun-act { flex-wrap: wrap; gap: 18px; }

  /* the rail stands up: same markup, the wire moves to the gutter */
  .hrun-rail { grid-template-columns: minmax(0, 1fr); }

  .hrun-node {
    grid-template-columns: 13px minmax(0, 1fr);
    grid-template-areas:
      "mark time"
      "wire act"
      "wire detail";
    column-gap: 14px;
    padding-right: 0;
    padding-bottom: 18px;
  }

  .hrun-rail > .hrun-node:last-child { padding-bottom: 0; }

  .hrun-wire {
    justify-self: center;
    align-self: stretch;
    width: 1px;
    height: auto;
    margin: 5px 0 0;
  }

  .hrun-node time { margin-top: 0; align-self: center; }
  .hrun-node b { margin-top: 4px; }

  .story { grid-template-columns: 1fr; }
  .story-stage-wrap { position: sticky; top: 78px; }
  .story-stage { min-height: clamp(360px, 60vw, 440px); }
  .story-step { min-height: 52vh; text-align: left; }
  .story-step:first-child { padding-top: 8vh; }

  .manifesto-row { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav-actions .btn-primary { display: none; }
}

@media (max-width: 640px) {
  .hero { padding-top: 104px; }
  .hrun-say { font-size: clamp(31px, 8.8vw, 42px); }
  .hrun-act { width: 100%; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .final .hero-actions .btn { width: 100%; }

  .hrun-channel, .hrun-status { font-size: 10.5px; letter-spacing: 0.12em; }

  /* space-between crushes the eyebrow to one word per line at this width */
  .hrun-log-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hrun-status { justify-items: start; }

  .story-stage-wrap { top: 70px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-inner { min-height: 64px; }
}
