/* =========================================================
   Apprentice by Eighteen Eight — "The Ledger" (v3)
   Vanilla CSS. No build step. Mobile-first.
   ========================================================= */

:root {
  /* Palette — light */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FAFBFA;
  --tint: #E7F6EE;
  --tint-line: #CDEBD9;
  --ink: #0E1116;
  --ink-muted: #5A626B;
  --primary: #15A35A;        /* emerald — large text, fills, icons only */
  --primary-dark: #0F7A43;
  --primary-strong: #0B6E3B; /* AA-safe emerald for small text/links on white */
  --on-primary: #06140C;     /* near-black text on emerald buttons */
  --border: #E3E6E3;

  /* Palette — dark (3 elevations) */
  --dark-bg: #0E1116;        /* page band */
  --dark-card: #161A20;      /* card */
  --dark-raised: #1C222A;    /* raised */
  --dark-heading: rgba(255,255,255,0.92);
  --dark-body: rgba(255,255,255,0.62);
  --dark-mono: rgba(255,255,255,0.82);
  --dark-hair: rgba(255,255,255,0.08);
  --dark-accent: #3DDC91;
  --dark-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.25);

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Layout */
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 2.5rem);
  --section-y: clamp(3.75rem, 2.5rem + 5vw, 7rem);
  --radius: 14px;
  --radius-sm: 9px;

  /* Motion — ONE easing everywhere */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; }
b, strong { font-weight: 600; }

/* ---------- Helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.anchor-top { position: absolute; top: 0; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.45; display: inline-block; flex: none; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 0.78rem; --pad-x: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; line-height: 1;
  padding: var(--pad-y) var(--pad-x); border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; min-height: 44px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-sm { --pad-y: 0.55rem; --pad-x: 1rem; font-size: 0.9rem; min-height: 40px; }
.btn-lg { --pad-y: 0.95rem; --pad-x: 1.9rem; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(6,20,12,0.15); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 22px -10px rgba(21,163,90,0.6); }
.btn-primary:active { transform: none; }
.btn-ghost-light { background: transparent; color: var(--dark-heading); border-color: var(--dark-hair); }
.btn-ghost-light:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--primary-strong); margin: 0 0 0.9rem;
  display: inline-flex; align-items: center;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--primary);
  margin-right: 0.7rem; display: inline-block;
}
.eyebrow-on-dark { color: var(--dark-accent); }
.eyebrow-on-dark::before { background: var(--dark-accent); }
.eyebrow-pill {
  border: 1px solid var(--dark-hair); border-radius: 999px;
  padding: 0.45rem 0.9rem 0.45rem 0.75rem; color: var(--dark-body);
  letter-spacing: 0.06em;
}
.eyebrow-pill::before { width: 18px; margin-right: 0.55rem; background: var(--dark-accent); }
.eyebrow-pill .x { margin: 0 0.5em; color: var(--dark-accent); }

/* ---------- Section scaffolding ---------- */
.section { padding-block: var(--section-y); position: relative; }
.section-head { max-width: 48rem; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.25rem); }
.section-head h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 144;
  font-weight: 400;
  font-size: clamp(1.9rem, 1.1rem + 3vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.section-sub { margin-top: 1rem; font-size: 1.12rem; color: var(--ink-muted); max-width: 46rem; }
.section-sub-on-dark { color: var(--dark-body); }

/* ---------- Dark bands (page elevation + grid + grain) ---------- */
.band-dark {
  background: var(--dark-bg); color: var(--dark-heading);
  position: relative; overflow: hidden;
}
.band-dark .section-head h2 { color: var(--dark-heading); }
/* Tiled feTurbulence grain overlay */
.band-dark::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}
.band-dark > .wrap { position: relative; z-index: 1; }

/* Grid texture for dark blocks */
.grid-texture {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 95%);
}

/* Emerald light — radial glow */
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(600px circle at 50% 0%, rgba(21,163,90,0.18), transparent 70%);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(255,255,255,0.94); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }

.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none;
  font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
}
.wordmark-logo { display: block; flex-shrink: 0; border-radius: 7px; }
.wordmark-eight { font-size: 1.05rem; color: var(--ink); }
.wordmark-eight b { color: var(--primary-strong); font-weight: 600; }
.wordmark-divider { width: 1px; height: 18px; background: var(--border); }
.wordmark-product { font-size: 1.05rem; color: var(--ink); font-weight: 500; }

.primary-nav { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 0.4rem; }
.nav-links > li > a {
  text-decoration: none; color: var(--ink); font-size: 0.92rem; font-weight: 500;
  padding: 0.5rem 0.7rem; border-radius: 8px; display: inline-block;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.nav-links > li > a:not(.btn):hover { color: var(--primary-strong); background: var(--tint); }
.nav-cta-item { margin-left: 0.35rem; }

.nav-toggle { display: none; }

/* =========================================================
   1 · HERO
   ========================================================= */
.hero { padding-top: clamp(3rem, 2rem + 5vw, 5.5rem); }
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 1rem + 6vw, 4rem);
  padding-bottom: clamp(3.5rem, 2rem + 5vw, 5.5rem); align-items: center;
}
.hero-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 144;
  font-weight: 370;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 1.2rem 0 0; color: var(--dark-heading); max-width: 15ch; text-wrap: balance;
}
.hero-title .hl { color: var(--dark-accent); }
.hero-sub { margin-top: 1.6rem; font-size: 1.18rem; line-height: 1.6; color: var(--dark-body); max-width: 42ch; }
.hero-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }

/* Security micro-proof line beside the CTA */
.micro-proof {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.82rem; color: var(--dark-body); letter-spacing: 0.01em; max-width: 30ch;
}
.micro-proof .mp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dark-accent); flex: none; box-shadow: 0 0 8px rgba(61,220,145,0.6); }
.micro-proof--center { justify-content: center; text-align: left; }

/* Hero lookup card */
.hero-card { position: relative; z-index: 1; }
.lookup-card {
  background: var(--dark-card); border: 1px solid var(--dark-hair); border-radius: var(--radius);
  padding: 1.4rem; max-width: 27rem; box-shadow: var(--dark-shadow);
}
.lookup-card--light {
  background: #fff; border-color: var(--border); color: var(--ink);
  box-shadow: 0 1px 2px rgba(14,17,22,0.06), 0 24px 50px -34px rgba(14,17,22,0.4);
}
.lookup-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.lookup-label {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--dark-body);
}
.lookup-card--light .lookup-label { color: var(--ink-muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dark-accent); box-shadow: 0 0 0 0 rgba(61,220,145,0.55); animation: pulse 2.4s var(--ease) infinite; margin-left: auto; }
.live-text { font-size: 0.72rem; font-weight: 600; color: var(--dark-accent); margin-left: 0.4rem; letter-spacing: 0.04em; }
.lookup-card--light .live-text { color: var(--primary-strong); }
.lookup-card--light .live-dot { background: var(--primary); box-shadow: 0 0 0 0 rgba(21,163,90,0.5); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61,220,145,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(61,220,145,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,145,0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.lookup-q { font-size: 1.02rem; color: var(--dark-heading); margin-bottom: 1rem; line-height: 1.45; }
.lookup-card--light .lookup-q { color: var(--ink); }
.lookup-foot { margin-top: 1rem; font-size: 0.86rem; color: var(--dark-body); line-height: 1.5; }
.lookup-card--light .lookup-foot { color: var(--ink-muted); }
.quoted-tag { color: var(--dark-accent); font-weight: 600; }
.lookup-card--light .quoted-tag { color: var(--primary-strong); }

/* The signature record-card (exact-quote motif) */
.record-card {
  font-family: var(--font-mono); font-size: 0.95rem; letter-spacing: 0;
  background: rgba(61,220,145,0.07); border-left: 2px solid var(--primary);
  padding: 0.75rem 0.9rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--dark-mono); display: flex; align-items: center; gap: 0.5rem;
  min-height: 2.9rem; word-break: break-word;
}
.lookup-card--light .record-card { background: var(--tint); color: var(--ink); border-left-color: var(--primary); }
.record-value { white-space: pre-wrap; }
.record-check { color: var(--primary); font-weight: 700; margin-left: auto; }
.lookup-card--light .record-check { color: var(--primary-dark); }

.rating { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.thumb { font-size: 0.78rem; font-weight: 600; padding: 0.35rem 0.6rem; border-radius: 7px; border: 1px solid var(--border); color: var(--ink-muted); }
.thumb-up { color: var(--primary-strong); border-color: var(--tint-line); background: var(--tint); }

/* =========================================================
   2 · PROBLEM
   ========================================================= */
.problem-grid { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3rem); }
.problem-lede { font-size: 1.18rem; line-height: 1.6; color: var(--ink); max-width: 52ch; }
.problem-list { display: grid; gap: 0.85rem; }
.problem-list li {
  position: relative; padding-left: 1.5rem; color: var(--ink-muted); font-size: 1rem;
}
.problem-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px;
  background: var(--primary); border-radius: 1px;
}

/* =========================================================
   3 · HOW IT WORKS
   ========================================================= */
.section-how { background: var(--surface-2); border-block: 1px solid var(--border); }

.how-centerpiece {
  display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  align-items: center; margin-bottom: clamp(2.5rem, 1.6rem + 3vw, 4rem);
}
@media (min-width: 860px) { .how-centerpiece { grid-template-columns: 1.05fr 0.95fr; } }

/* Audit-trail document card (show-don't-tell centerpiece) */
.audit-card {
  background: var(--dark-bg); color: var(--dark-heading);
  border: 1px solid var(--dark-hair); border-radius: var(--radius);
  padding: 1.3rem 1.4rem 1.5rem; box-shadow: var(--dark-shadow);
  position: relative; overflow: hidden;
}
.audit-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.audit-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 0.9rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--dark-hair);
}
.audit-file { font-size: 0.75rem; letter-spacing: 0.06em; color: var(--dark-body); text-transform: uppercase; }
.audit-sig {
  display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--dark-accent);
}
.audit-sig-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dark-accent); box-shadow: 0 0 8px rgba(61,220,145,0.6); }
.audit-rows { display: grid; gap: 0.15rem; position: relative; z-index: 1; }
.audit-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.2rem; border-bottom: 1px dashed rgba(255,255,255,0.06);
  font-family: var(--font-mono); font-size: 0.82rem; min-height: 2.5rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.audit-row:last-child { border-bottom: 0; }
.audit-row.is-in { opacity: 1; transform: none; }
.audit-ts { color: rgba(255,255,255,0.45); font-size: 0.76rem; white-space: nowrap; }
.audit-text { color: var(--dark-mono); white-space: pre-wrap; word-break: break-word; }
.audit-caret { color: var(--dark-accent); animation: caret 1s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .audit-caret { animation: none; } }
@keyframes caret { 50% { opacity: 0; } }
.audit-redact {
  display: inline-block; width: 3.4em; height: 0.95em; border-radius: 2px; vertical-align: -0.12em;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.28) 0 6px, rgba(255,255,255,0.12) 6px 10px);
}
.audit-chip {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.02em; white-space: nowrap;
  padding: 0.2rem 0.55rem; border-radius: 999px;
  color: var(--dark-accent); background: rgba(61,220,145,0.1); border: 1px solid rgba(61,220,145,0.28);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.audit-row.is-done .audit-chip { opacity: 1; }
.audit-caption {
  position: relative; z-index: 1; margin-top: 1.1rem; font-size: 0.9rem;
  color: var(--dark-body); line-height: 1.5;
}

/* Flow diagram (screen-share -> procedure -> runs; earned-autonomy ladder) */
.flow-diagram { margin: 0; }
.flow-diagram svg { width: 100%; height: auto; display: block; }
.fd-box { fill: var(--surface); stroke: var(--tint-line); stroke-width: 1; }
.fd-nodes text { fill: var(--ink); }
.fd-nodes text.fd-sub { fill: var(--ink-muted); }
.fd-line { stroke: var(--primary); stroke-dasharray: 40; stroke-dashoffset: 40; }
.flow-diagram.is-in .fd-line { animation: draw 0.7s var(--ease) forwards; }
.flow-diagram.is-in .fd-line:nth-of-type(2) { animation-delay: 0.25s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fd-ladder-label { fill: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.fd-pill rect { fill: var(--tint); stroke: var(--tint-line); stroke-width: 1; }
.fd-pill text { fill: var(--primary-strong); }
.fd-pill:last-of-type rect { fill: var(--primary); stroke: var(--primary); }
.fd-pill:last-of-type text { fill: #fff; }
.flow-cap { margin-top: 0.9rem; font-size: 0.9rem; color: var(--ink-muted); line-height: 1.5; max-width: 44ch; }
@media (prefers-reduced-motion: reduce) {
  .fd-line { stroke-dashoffset: 0; }
  .flow-diagram.is-in .fd-line { animation: none; }
}

/* Modes */
.modes { margin-top: 0.5rem; }
.mode-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; background: var(--surface);
}
.mode-tab {
  appearance: none; background: var(--surface); border: 0; cursor: pointer;
  padding: 1.1rem 1.25rem; text-align: left; font-family: var(--font-body);
  display: flex; flex-direction: column; gap: 0.25rem; min-height: 44px;
  border-bottom: 3px solid transparent; transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.mode-tab + .mode-tab { border-left: 1px solid var(--border); }
.mode-tab-k { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.mode-tab-d { font-size: 0.86rem; color: var(--ink-muted); }
.mode-tab:hover { background: var(--tint); }
.mode-tab.is-active { background: var(--tint); border-bottom-color: var(--primary); }
.mode-tab.is-active .mode-tab-k { color: var(--primary-strong); }

.mode-panel {
  display: grid; grid-template-columns: 1fr; gap: clamp(1.75rem, 1rem + 3vw, 3rem);
  align-items: start;
}
.mode-panel[hidden] { display: none; }
.mode-copy h3 { font-size: 1.3rem; margin-bottom: 0.9rem; }
.mode-copy p { color: var(--ink-muted); margin-bottom: 0.9rem; max-width: 46ch; }
.mode-copy em { color: var(--ink); }

.ticks { display: grid; gap: 0.6rem; margin-top: 1.3rem; }
.ticks li { position: relative; padding-left: 1.7rem; font-size: 0.98rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.12em; width: 18px; height: 18px;
  border-radius: 50%; background: var(--tint);
}
.ticks li::after {
  content: "✓"; position: absolute; left: 0; top: 0.12em; width: 18px; height: 18px;
  display: grid; place-items: center; font-size: 0.72rem; color: var(--primary-dark); font-weight: 700;
}

/* Flow card mock */
.mode-mock { display: flex; }
.flow-card, .mode-mock .lookup-card { width: 100%; max-width: 27rem; }
.flow-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: 0 1px 2px rgba(14,17,22,0.05), 0 24px 50px -36px rgba(14,17,22,0.35);
}
.flow-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.flow-title { font-weight: 600; font-size: 1.05rem; }
.badge {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; padding: 0.2rem 0.5rem;
  border-radius: 6px; letter-spacing: 0;
}
.badge-version { background: var(--tint); color: var(--primary-strong); border: 1px solid var(--tint-line); }
.flow-steps { display: grid; gap: 0.7rem; }
.flow-steps li {
  display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.95rem; color: var(--ink);
  padding: 0.55rem 0.65rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
}
.step-n {
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  background: var(--ink); color: #fff;
}
.step-gate { background: var(--tint); border-color: var(--tint-line); align-items: center; flex-wrap: wrap; }
.step-gate .step-n { background: var(--primary); color: var(--on-primary); }
.gate-tag {
  margin-left: auto; font-size: 0.72rem; font-weight: 600; color: var(--primary-strong);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.flow-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: 0.86rem; color: var(--ink-muted);
}
.flow-foot .mono { font-size: 0.78rem; }

/* =========================================================
   4 · WHY DIFFERENT
   ========================================================= */
.section-why { background: var(--bg); }
.why-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 3.5rem); grid-template-columns: 1fr; align-items: start; }
.why-claims { display: grid; gap: 0; }
.why-row {
  display: grid; grid-template-columns: 1fr; gap: 0.6rem; align-items: start;
  padding: 1.5rem 0; border-top: 1px solid var(--border);
}
.why-row:first-child { border-top: 0; padding-top: 0; }
.why-text h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.why-text p { color: var(--ink-muted); max-width: 54ch; }
.why-chip {
  justify-self: start; font-size: 0.82rem; color: var(--ink);
  background: var(--tint); border-left: 2px solid var(--primary);
  padding: 0.45rem 0.7rem; border-radius: 0 7px 7px 0; word-break: break-word;
}
.record-card--why {
  justify-self: start; background: var(--tint); color: var(--ink); font-size: 0.86rem;
  min-height: 2.6rem; max-width: 24rem;
}
.record-card--why .record-check { color: var(--primary-dark); }
.pull-quote {
  margin: 0; background: var(--dark-bg); color: var(--dark-heading); border-radius: var(--radius);
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-family: var(--font-display); font-optical-sizing: auto; font-variation-settings: 'opsz' 144; font-weight: 400;
  font-size: clamp(1.4rem, 1rem + 1.8vw, 1.85rem); line-height: 1.3; letter-spacing: -0.02em;
  position: relative; overflow: hidden; border: 1px solid var(--dark-hair); box-shadow: var(--dark-shadow);
}
.pull-quote cite {
  display: block; margin-top: 1.25rem; font-family: var(--font-body); font-style: normal;
  font-size: 0.92rem; color: var(--dark-body); letter-spacing: 0;
}

/* =========================================================
   5 · USE CASES
   ========================================================= */
.section-uses { background: var(--surface-2); border-block: 1px solid var(--border); }
.scenario-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.scenario {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; border-left: 2px solid var(--primary);
  box-shadow: 0 1px 2px rgba(14,17,22,0.04);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.scenario:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -14px rgba(21,163,90,0.24); }
.scenario-tag {
  font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--primary-strong); display: block; margin-bottom: 0.6rem;
}
.scenario-title { font-size: 1.12rem; margin-bottom: 0.5rem; }
.scenario p { color: var(--ink-muted); font-size: 1rem; line-height: 1.55; }
@media (prefers-reduced-motion: reduce) { .scenario:hover { transform: none; } }

/* =========================================================
   6 · TRUST (dark)
   ========================================================= */
.sec-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; position: relative; z-index: 1; }
.sec-card {
  background: var(--dark-card); border: 1px solid var(--dark-hair); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--dark-shadow);
}
.sec-card h3 { font-size: 1.1rem; color: var(--dark-heading); margin-bottom: 0.55rem; }
.sec-card h3::before {
  content: ""; display: block; width: 22px; height: 2px; background: var(--dark-accent); margin-bottom: 0.9rem;
}
.sec-card p { color: var(--dark-body); font-size: 0.96rem; }
.honest-status {
  position: relative; z-index: 1; margin-top: 1.75rem; padding: 1.25rem 1.4rem;
  border-left: 2px solid var(--dark-accent); background: rgba(61,220,145,0.05); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--dark-body); font-size: 0.96rem; max-width: 60ch; line-height: 1.6;
}
.honest-status em { color: var(--dark-heading); font-style: normal; font-weight: 600; }

.under-hood {
  position: relative; z-index: 1; margin-top: 2.5rem; padding-top: 1.75rem;
  border-top: 1px solid var(--dark-hair); display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
}
.under-hood-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--dark-body); font-weight: 600;
}
.under-hood-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
.under-hood-list li { font-size: 0.82rem; color: var(--dark-mono); position: relative; padding-left: 0.95rem; }
.under-hood-list li::before { content: "·"; position: absolute; left: 0; color: var(--dark-accent); font-weight: 700; }

.trust-bridge {
  position: relative; z-index: 1; margin-top: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-family: var(--font-display); font-optical-sizing: auto; font-variation-settings: 'opsz' 144; font-weight: 400;
  font-size: clamp(1.15rem, 0.9rem + 1.2vw, 1.5rem); letter-spacing: -0.02em;
  line-height: 1.4; color: var(--dark-heading); max-width: 46ch;
}

/* =========================================================
   7 · TEAM (about + team merged)
   ========================================================= */
.section-team { background: var(--bg); }
.about-copy { max-width: 64ch; display: grid; gap: 1.15rem; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3rem); }
.about-copy p { font-size: 1.15rem; color: var(--ink); }
.team-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.team-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: var(--surface);
  box-shadow: 0 1px 2px rgba(14,17,22,0.04);
}
.monogram {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tint); color: var(--primary-strong); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em; margin-bottom: 1.1rem;
}
.team-card h3 { font-size: 1.12rem; margin-bottom: 0.2rem; }
.team-role { color: var(--primary-strong); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.7rem; }
.team-bio { color: var(--ink-muted); font-size: 0.95rem; }

/* =========================================================
   8 · STORY (timeline)
   ========================================================= */
.section-story { background: var(--surface-2); border-block: 1px solid var(--border); }
.timeline { position: relative; display: grid; gap: 0; margin-left: 0.5rem; }
.timeline::before {
  content: ""; position: absolute; left: 0; top: 0.4rem; bottom: 1.5rem; width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--tint-line));
}
.tl-item { position: relative; padding: 0 0 1.9rem 2.2rem; }
.tl-item::before {
  content: ""; position: absolute; left: -5px; top: 0.35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface-2); border: 2px solid var(--tint-line);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.tl-item.is-lit::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px rgba(21,163,90,0.14); }
.tl-time { display: block; font-size: 0.82rem; color: var(--primary-strong); margin-bottom: 0.35rem; }
.tl-body h3 { font-size: 1.12rem; margin-bottom: 0.35rem; }
.tl-body p { color: var(--ink-muted); max-width: 50ch; }
.tl-final .tl-body h3 { color: var(--primary-strong); }
.flow-chip {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 0.9rem;
  background: var(--tint); border: 1px solid var(--tint-line); border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 0.6rem; font-size: 0.92rem;
}

/* =========================================================
   9 · CTA (dark, gradient hairline card)
   ========================================================= */
.section-cta { text-align: center; }
.cta-inner { position: relative; z-index: 1; max-width: 46rem; }
.cta-card {
  position: relative; border-radius: var(--radius);
  background: var(--dark-card); border: 1px solid transparent;
  padding: clamp(2rem, 1.4rem + 3vw, 3.5rem) clamp(1.4rem, 1rem + 3vw, 3rem);
  box-shadow: var(--dark-shadow); overflow: hidden;
}
/* gradient hairline border via mask-composite */
.cta-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(61,220,145,0.65), rgba(255,255,255,0.06) 45%, rgba(61,220,145,0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card .eyebrow { justify-content: center; }
.cta-title {
  font-family: var(--font-display); font-optical-sizing: auto; font-variation-settings: 'opsz' 144; font-weight: 390;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.2rem); line-height: 1.06; letter-spacing: -0.025em;
  color: var(--dark-heading);
}
.cta-sub { margin: 1.1rem auto 0; font-size: 1.15rem; color: var(--dark-body); max-width: 40rem; }
.cta-actions { margin-top: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cta-next { margin: 1.5rem auto 0; font-size: 0.92rem; color: var(--dark-body); max-width: 44ch; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: #090B0E; color: var(--dark-body); padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem) 1.5rem; }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.wordmark-footer .wordmark-eight, .wordmark-footer .wordmark-product { color: var(--dark-heading); }
.wordmark-footer .wordmark-eight b { color: var(--dark-accent); }
.wordmark-footer .wordmark-divider { background: var(--dark-hair); }
.footer-tag { margin-top: 1rem; max-width: 42ch; font-size: 0.95rem; line-height: 1.55; }
.footer-regions { margin-top: 0.9rem; font-size: 0.8rem; letter-spacing: 0.02em; }
.footer-links { display: grid; gap: 0.55rem; align-content: start; }
.footer-links a { color: var(--dark-mono); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--dark-accent); }
.footer-fine {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--dark-hair);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  font-size: 0.8rem; color: #6B747D;
}

/* =========================================================
   SCROLL REVEAL (one easing, staggered by --i)
   ========================================================= */
.reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .audit-row { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 600px) {
  .scenario-grid { grid-template-columns: repeat(3, 1fr); }
  .sec-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .problem-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .footer-inner { grid-template-columns: 1.6fr 1fr; }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
  .mode-panel { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .why-grid { grid-template-columns: 1.3fr 0.7fr; }
  .why-row { grid-template-columns: 1fr auto; gap: 1.5rem 2rem; align-items: center; }
  .why-chip, .record-card--why { justify-self: end; }
  .team-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 899px) {
  .nav-toggle {
    display: inline-grid; place-content: center; gap: 5px; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; padding: 0;
  }
  .nav-toggle-bar { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 20px 40px -24px rgba(14,17,22,0.25);
    padding: 0.5rem var(--gutter) 1.2rem; max-height: 0; overflow: hidden;
    visibility: hidden; transition: max-height 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .primary-nav.is-open .nav-links { max-height: 80vh; visibility: visible; transition: max-height 0.3s var(--ease); }
  .nav-links > li > a:not(.btn) { padding: 0.85rem 0.5rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-cta-item { margin: 0.9rem 0 0; }
  .nav-cta-item .btn { width: 100%; }
  /* No-JS fallback: keep menu reachable */
  html.no-js .nav-links { position: static; max-height: none; visibility: visible; box-shadow: none; flex-direction: row; flex-wrap: wrap; padding: 0 0 0.5rem; }
  html.no-js .nav-toggle { display: none; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
}
