/* ============================================================
   NavigatorLab — marketing site
   Acts: I dark observatory → dawn → II paper editorial
   ============================================================ */

:root {
  /* paper world */
  --paper: #f6f5ef;
  --paper-2: #edece3;
  --ink: #182430;
  --ink-soft: #4b5964;
  --ink-faint: #939ea6;

  /* brand accents */
  --emerald: #0f7a52;
  --emerald-deep: #0a5b3d;
  --emerald-ink: #0a2e22;
  --violet: #6457c8;
  --amber: #c9861f;

  /* dark world */
  --void: #060a0e;
  --star-text: #eef4f0;
  --star-dim: #97a8a0;

  /* animated theme vars (GSAP drives these across the dawn) */
  --bg: var(--void);
  --fg: var(--star-text);
  --fg-soft: var(--star-dim);
  --hairline: rgba(238, 244, 240, 0.14);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --max-w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--emerald); color: #fff; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 2px; }

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- fixed chrome ---------- */

.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
  background: transparent; pointer-events: none;
}
.progress-fill {
  height: 100%; width: 100%; background: var(--emerald);
  transform-origin: 0 50%; transform: scaleX(0);
}

#cosmos {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.grain {
  position: fixed; inset: -50%; z-index: 3; 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='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 2; }

/* ---------- nav ---------- */

.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad-x);
  transition: background 0.45s ease, box-shadow 0.45s ease, backdrop-filter 0.45s ease;
}
.site-nav.is-light {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(24, 36, 48, 0.08);
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.18rem;
  letter-spacing: 0.01em; color: var(--fg);
}
.mark { width: 1.05em; height: 1.05em; color: var(--emerald); flex: none; }
.nav-links { display: flex; gap: clamp(1rem, 3vw, 2.4rem); }
.nav-links a {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-soft);
  padding: 0.35em 0; position: relative; transition: color 0.25s ease;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--emerald); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  padding: 1.02em 1.9em; border-radius: 999px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease, background 0.3s ease,
              color 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}
.btn-primary {
  background: var(--emerald); color: #f6fdf9;
  box-shadow: 0 1px 2px rgba(6, 10, 14, 0.2);
}
.btn-primary:hover {
  background: var(--emerald-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--emerald) 55%, transparent);
}
.btn-ghost {
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-2px); }
.btn-arrow { font-size: 0.85em; transition: transform 0.3s ease; }
.btn:hover .btn-arrow { transform: translateY(2px); }
.btn-ghost:hover .btn-arrow { transform: translateX(3px); }
.btn-small { padding: 0.72em 1.35em; font-size: 0.83rem; }

/* ---------- type utilities ---------- */

.mono { font-family: var(--font-mono); }

/* Text equivalents for the JS-drawn visuals: present for screen readers and
   machines, absent for sighted users. Never use this to hide content that
   contradicts what is on screen - it says exactly what the graphic says. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.kicker {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--emerald); margin-bottom: 1.4rem;
  display: flex; align-items: center; gap: 0.6em;
}
.kicker-mark { font-size: 1.05em; transform: translateY(-0.03em); }

.display {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.04; letter-spacing: -0.015em; color: var(--fg);
  text-wrap: balance;
}
.display em {
  font-style: italic; font-weight: 500; color: var(--emerald);
}

.lede {
  font-size: clamp(1.02rem, 1.4vw, 1.22rem); color: var(--fg-soft);
  max-width: 40em; margin-top: 1.6rem;
}

.chip {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.08em;
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  border-radius: 999px; padding: 0.35em 0.95em; margin-top: 0.5rem;
  color: var(--fg-soft);
}

.section-head {
  max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x);
}

/* ============================================================
   ACT I — HERO
   ============================================================ */

.hero {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  position: relative; text-align: center;
  padding: 7rem var(--pad-x) 5rem;
}
.hero-inner { max-width: 1080px; }

.hero-kicker { justify-content: center; margin-bottom: 2.2rem; }

.hero-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.9rem, 8.2vw, 6.9rem);
  line-height: 1.03; letter-spacing: -0.02em;
  color: var(--fg);
}
.hero-title em {
  font-style: italic; font-weight: 500;
  background: linear-gradient(100deg, #7fd4ae, var(--emerald) 60%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-right: 0.06em; /* keep italic overhang unclipped */
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-title .line-inner { display: inline-block; will-change: transform; }

.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--fg-soft);
  max-width: 42em; margin: 2.2rem auto 0;
}

.hero-ctas {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  margin-top: 3rem;
}

/* ---- hero entrance: CSS, not GSAP ----
   This used to be a GSAP timeline, which meant the headline could not compose
   itself until 130KB of vendor JS had downloaded, parsed and run. On a slow
   connection the title painted at ~300ms, sat visible for 2.5s, then got yanked
   back down and re-animated. Driving it in CSS keeps the exact same motion and
   timing, but it now starts at first paint and owes nothing to the network.
   Timings mirror the old timeline (all +0.2s lead-in):
     kicker fade 0.9s @0.2s | lines rise 1.25s @0.35s/0.45s (0.1s stagger)
     sub 1s @0.95s | ctas 1s @1.15s | cue 1s @1.5s
   power4.out -> cubic-bezier(.22,1,.36,1);  power2.out -> cubic-bezier(.33,1,.68,1) */

.js .hero-title .line-inner {
  transform: translateY(115%);
  animation: heroLine 1.25s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.js .hero-title .line:nth-of-type(2) .line-inner { animation-delay: 0.45s; }

.js .hero-kicker     { opacity: 0; animation: heroFade 0.9s cubic-bezier(0.33, 1, 0.68, 1) 0.2s both; }
/* The sub is the mobile LCP element. It must PAINT on the first frame - an
   opacity:0 start defers LCP by the full delay + fade (~2-3s measured). So it
   waits visibly, offset 18px low, and rises on the original schedule. Same
   choreography beat, but the paint happens immediately. Do not re-gate this
   on opacity. */
.js .hero-sub        { animation: heroRise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.95s both; }
.js .hero .hero-ctas { opacity: 0; animation: heroFade 1s cubic-bezier(0.22, 1, 0.36, 1) 1.15s both; }
.js .scroll-cue      { opacity: 0; animation: heroFade 1s cubic-bezier(0.33, 1, 0.68, 1) 1.5s both; }

@keyframes heroLine { from { transform: translateY(115%); } to { transform: translateY(0); } }
@keyframes heroFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroRise { from { transform: translateY(18px); } to { transform: translateY(0); } }

/* Once the entrance has played, hand these properties back to GSAP (the scroll
   cue fades out on scroll). A finished animation with fill:both keeps asserting
   its end state and would outrank GSAP's inline styles, so drop it. */
.intro-done .hero-title .line-inner,
.intro-done .hero-kicker,
.intro-done .hero-sub,
.intro-done .hero .hero-ctas,
.intro-done .scroll-cue {
  animation: none; opacity: 1;
}
.intro-done .hero-title .line-inner { transform: translateY(0); }
.intro-done .hero-sub { transform: translateY(0); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 2.4rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.scroll-cue-label {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--fg-soft);
}
.scroll-cue-line {
  width: 1px; height: 56px; overflow: hidden; position: relative;
  background: color-mix(in srgb, var(--fg) 15%, transparent);
}
.scroll-cue-line::after {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: var(--emerald);
  animation: cueDrop 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(260%); }
}

/* ============================================================
   ACT I — BLIND (sticky statements)
   ============================================================ */

.blind { height: 150vh; position: relative; }
.blind-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 0 var(--pad-x);
}
.blind-statement {
  position: absolute; max-width: 20ch; text-align: center;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 5.2vw, 4.2rem); line-height: 1.12;
  letter-spacing: -0.01em; color: var(--fg);
  opacity: 0; visibility: hidden;
}
.blind-statement em { font-style: italic; color: #d8695c; }
.blind-statement .dim { color: var(--fg-soft); }
/* the payoff phrase lands last and ignites */
.blind-statement .see {
  font-style: italic; color: #7fd4ae;
  text-shadow: 0 0 26px rgba(111, 208, 165, 0.35);
}
/* char-split spans: words stay unbreakable so line wrap is stable */
.blind-statement .w { display: inline-block; white-space: nowrap; }
.blind-statement .c { display: inline-block; will-change: transform; }
/* guesswork never quite settles - the word itself is unstable */
.blind-statement em .w { animation: unsteady 1.1s ease-in-out infinite; }
@keyframes unsteady {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  22% { transform: translate(1.2px, -1px) rotate(0.55deg); }
  47% { transform: translate(-1px, 0.8px) rotate(-0.5deg); }
  72% { transform: translate(0.8px, 1.1px) rotate(0.35deg); }
  88% { transform: translate(-1.1px, -0.7px) rotate(-0.3deg); }
}

/* ============================================================
   ACT I → II — THE TURN (dawn)
   ============================================================ */

.turn { height: 270vh; position: relative; }
.turn-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 var(--pad-x);
}
.turn-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 5.6rem); line-height: 1.08;
  letter-spacing: -0.018em; color: var(--fg);
}
.turn-l1, .turn-l2 { display: inline-block; }
.turn-l2 em {
  font-style: italic; font-weight: 500; color: var(--emerald);
  padding-right: 0.05em;
}

/* ============================================================
   ACT II — METHOD
   ============================================================ */

.method { padding: clamp(4.5rem, 9vh, 7rem) 0 3rem; }

.dim-row {
  max-width: var(--max-w); margin: clamp(4rem, 8vh, 6.5rem) auto 0;
  padding: 0 var(--pad-x);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.dim-row.is-flipped .dim-media { order: 2; }
.dim-row.is-flipped .dim-copy { order: 1; }

.dim-media { position: relative; }
.wash {
  position: absolute; inset: -18% -14%; border-radius: 50%;
  filter: blur(70px); opacity: 0.34; z-index: 0; pointer-events: none;
}
.wash-violet { background: radial-gradient(closest-side, var(--violet), transparent 72%); }
.wash-amber { background: radial-gradient(closest-side, var(--amber), transparent 72%); }
.wash-emerald { background: radial-gradient(closest-side, var(--emerald), transparent 72%); }

.art-card {
  position: relative; z-index: 1; border-radius: 12px; overflow: hidden;
  background: #fff;
  border: 1px solid rgba(24, 36, 48, 0.09);
  box-shadow:
    0 1px 2px rgba(24, 36, 48, 0.06),
    0 24px 60px -22px rgba(24, 36, 48, 0.28);
  transform: rotate(-1.6deg);
  max-width: 420px; margin-inline: auto;
}
.dim-row.is-flipped .art-card { transform: rotate(1.6deg); }
.art-card img { width: 100%; height: auto; }

.dim-index {
  font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.2em;
  margin-bottom: 0.7rem;
}
.dim-copy .kicker { margin-bottom: 1rem; }
.dim-row[data-accent="violet"] .kicker.accent { color: var(--violet); }
.dim-row[data-accent="amber"] .kicker.accent { color: var(--amber); }
.dim-row[data-accent="emerald"] .kicker.accent { color: var(--emerald); }

.dim-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1;
  letter-spacing: -0.01em; color: var(--fg); margin-bottom: 1.2rem;
}
.dim-copy p:not(.kicker):not(.dim-index) {
  color: var(--fg-soft); max-width: 34em;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
}

/* ============================================================
   ACT II — MATRIX
   ============================================================ */

.matrix { height: 230vh; position: relative; }
.matrix-pin {
  position: sticky; top: 0; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(5rem, 10vh, 7rem) 0 3rem;
}
.matrix-wrap {
  max-width: var(--max-w); margin: clamp(2rem, 5vh, 4rem) auto 0;
  padding: 0 var(--pad-x);
  position: relative; width: 100%;
}

.matrix-flex {
  display: flex; gap: 0.9rem; align-items: stretch;
  max-width: 850px;
}
.mx-axis {
  font-size: 0.6rem; font-weight: 500; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--ink-faint);
}
.mx-axis-y {
  writing-mode: vertical-rl; transform: rotate(180deg);
  align-self: center; flex: none;
  padding-top: 1.5em; /* optical: offset the column-label row */
}
.mx-axis-x {
  grid-column: 2 / -1; text-align: center; padding-bottom: 0.6em;
}
.mx-axis-x::after { content: ' \2192'; color: var(--emerald); }
.mx-axis-y::after { content: ' \2192'; color: var(--emerald); }

.matrix-grid {
  display: grid;
  grid-template-columns: minmax(84px, 130px) repeat(4, minmax(0, 1fr));
  gap: 0;
  flex: 1; min-width: 0;
}
.mx-label {
  font-family: var(--font-mono); font-size: clamp(0.55rem, 0.85vw, 0.68rem);
  letter-spacing: 0.06em; color: var(--ink-faint);
  display: flex; align-items: center;
  line-height: 1.35;
}
.mx-label.mx-col { justify-content: center; text-align: center; align-items: flex-end; padding-bottom: 0.9em; }
.mx-label.mx-row { justify-content: flex-end; text-align: right; padding-right: 1.2em; }

/* charted field: each crossing gets a faint crosshair guide */
.mx-cell {
  position: relative;
  height: clamp(56px, 9.5vh, 86px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
}
.mx-cell::before, .mx-cell::after {
  content: ''; position: absolute; pointer-events: none;
}
.mx-cell::before {
  left: 0; right: 0; top: 50%;
  border-top: 1px dashed rgba(24, 36, 48, 0.09);
}
.mx-cell::after {
  top: 0; bottom: 0; left: 50%;
  border-left: 1px dashed rgba(24, 36, 48, 0.09);
}

/* the bubble: a demand space sized by value - flat, chart-like */
.mx-dot {
  position: relative; z-index: 1;
  width: var(--d); height: var(--d); border-radius: 50%;
  background: color-mix(in srgb, var(--emerald) calc(30% + var(--v) * 0.62%), #e3ede6);
  transition: transform 0.25s ease, opacity 0.4s ease;
  flex: none;
}
.mx-cell:hover .mx-dot { transform: scale(1.12); }
.mx-dot.is-top {
  background:
    linear-gradient(
      color-mix(in srgb, var(--emerald) 80%, transparent),
      color-mix(in srgb, var(--emerald) 80%, transparent)),
    url('../assets/img/card-back-watercolor.webp') center / cover;
}
.mx-cell.is-hot .mx-dot {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--emerald);
}

/* focus beat handled by GSAP: field dims while the callout takes the stage */
.mx-badge {
  position: relative; z-index: 1;
  font-size: clamp(0.55rem, 0.8vw, 0.68rem); font-weight: 600;
  letter-spacing: 0.04em; color: var(--emerald-deep);
  background: color-mix(in srgb, #fff 80%, transparent);
  border-radius: 999px; padding: 0.1em 0.6em;
  flex: none;
}

/* annotation line: hot cell -> card, drawn like a chart callout */
.mx-line {
  position: absolute; height: 2px; z-index: 2;
  background: var(--emerald);
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none; border-radius: 1px;
}
.mx-line::before {
  content: ''; position: absolute; left: -3px; top: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); transform: translateY(-50%);
}

.matrix-card {
  position: absolute; right: var(--pad-x); top: 10%;
  z-index: 6; /* above bubbles (z1) and the annotation line (z2) */
  width: min(320px, 78vw);
  background: #fff;
  border: 1px solid rgba(24, 36, 48, 0.1);
  border-top: 3px solid var(--emerald);
  border-radius: 14px; padding: 1.6rem 1.7rem;
  box-shadow:
    0 8px 20px -8px rgba(24, 36, 48, 0.18),
    0 42px 90px -28px rgba(24, 36, 48, 0.45);
  opacity: 0; visibility: hidden;
}
.matrix-card-kicker {
  font-size: 0.62rem; letter-spacing: 0.22em; color: var(--emerald);
  margin-bottom: 0.6rem;
}
.matrix-card-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.35rem; line-height: 1.2; color: var(--ink);
  margin-bottom: 0.7rem;
}
.matrix-card-needs {
  font-size: 0.82rem; line-height: 1.55; color: var(--ink-soft);
  margin-bottom: 1rem;
}
.matrix-card-stats { display: flex; flex-wrap: wrap; gap: 0.5em 1.4em; font-size: 0.78rem; color: var(--ink-soft); }
.matrix-card-stats b { color: var(--ink); font-weight: 600; }
.matrix-card-stats .up b { color: var(--emerald); }

/* ============================================================
   ACT II — TOUR
   ============================================================ */

.tour { padding-top: clamp(4.5rem, 9vh, 7rem); }
.tour-pin { position: relative; margin-top: clamp(2rem, 5vh, 3.5rem); }
.tour-layout {
  max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x);
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* bottom padding extends the media frame's sticky range so it stays
   pinned through the whole final step instead of getting pushed up */
.tour-steps { display: flex; flex-direction: column; padding-bottom: 30vh; }
.tour-step {
  min-height: 58vh; display: flex; flex-direction: column; justify-content: center;
  opacity: 0.22; transition: opacity 0.45s ease;
  border-left: 2px solid transparent; padding-left: clamp(1rem, 2vw, 1.8rem);
}
.tour-step.is-active { opacity: 1; border-left-color: var(--emerald); }
.tour-step-index {
  font-size: 0.66rem; letter-spacing: 0.22em; color: var(--emerald);
  margin-bottom: 0.9rem;
}
.tour-step h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.14;
  letter-spacing: -0.01em; color: var(--fg); margin-bottom: 0.9rem;
}
.tour-step p:not(.tour-step-index) { color: var(--fg-soft); max-width: 30em; }

.tour-media { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; }
.browser-frame {
  width: 100%; border-radius: 14px; overflow: hidden;
  background: #fff; border: 1px solid rgba(24, 36, 48, 0.1);
  box-shadow: 0 40px 90px -30px rgba(24, 36, 48, 0.4);
}
.browser-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: var(--paper-2); border-bottom: 1px solid rgba(24, 36, 48, 0.07);
}
.browser-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(24, 36, 48, 0.14); }
.browser-url {
  margin-left: 0.8rem; font-size: 0.64rem; letter-spacing: 0.06em;
  /* --ink-faint (#939ea6) only hits 2.73:1 on this white chip - fails WCAG AA.
     #67727a keeps the faint, recessive look at 4.92:1. */
  color: #67727a;
  background: #fff; border: 1px solid rgba(24, 36, 48, 0.07);
  border-radius: 999px; padding: 0.28em 1em;
}
.tour-pips { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.tour-pips i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(24, 36, 48, 0.14); transition: background 0.3s ease, transform 0.3s ease;
}
.tour-pips i.is-on { background: var(--emerald); transform: scale(1.25); }

.tour-dots { display: none; }

.tour-videos { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); }
.tour-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transform: scale(1.025);
  transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.tour-video.is-active { opacity: 1; transform: scale(1); }

/* ============================================================
   ACT II — EVIDENCE (deep emerald panel)
   ============================================================ */

.evidence {
  margin-top: clamp(4.5rem, 9vh, 7rem);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(15, 122, 82, 0.35), transparent 55%),
    var(--emerald-ink);
  color: #eef6f1;
  padding: clamp(4.5rem, 9vh, 7.5rem) 0 0;
}
.evidence-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
.evidence .display { color: #f4faf6; }
.evidence .display em { color: #6fd0a5; }
.kicker-light { color: #6fd0a5; }
.lede-light { color: rgba(238, 246, 241, 0.66); }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(3rem, 7vh, 5rem);
}
.stat { border-top: 1px solid rgba(238, 246, 241, 0.18); padding-top: 1.4rem; }
.stat-num {
  font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 500;
  color: #f4faf6; line-height: 1; letter-spacing: -0.03em;
}
.stat-label {
  margin-top: 0.7rem; font-size: 0.85rem;
  color: rgba(238, 246, 241, 0.6); max-width: 16em;
}

.ticker {
  margin-top: clamp(3rem, 6vh, 5rem);
  border-top: 1px solid rgba(238, 246, 241, 0.14);
  border-bottom: 1px solid rgba(238, 246, 241, 0.14);
  overflow: hidden; padding: 1.05rem 0;
}
.ticker-track {
  display: flex; gap: 3.2rem; width: max-content;
  animation: tick 46s linear infinite;
}
.ticker-track span {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(238, 246, 241, 0.55); white-space: nowrap;
  display: flex; align-items: center; gap: 3.2rem;
}
.ticker-track span::after { content: '\25C7'; color: #6fd0a5; font-size: 0.85em; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ============================================================
   ACT II — AGENT
   ============================================================ */

.agent { padding: clamp(4.5rem, 9vh, 7.5rem) 0 0; }
.agent-layout {
  max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
.agent-options {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.6vw, 1.4rem); margin-top: 2.2rem;
}
.agent-option {
  background: #fff; border: 1px solid rgba(24, 36, 48, 0.08);
  border-radius: 14px; padding: 1.5rem 1.4rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease, border-color 0.35s ease;
}
.agent-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px -18px rgba(24, 36, 48, 0.28);
  border-color: color-mix(in srgb, var(--emerald) 45%, transparent);
}
.agent-option h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); margin-bottom: 0.45rem;
}
.agent-option p { font-size: 0.87rem; color: var(--ink-soft); }

.chat-card {
  background: #fff; border: 1px solid rgba(24, 36, 48, 0.1);
  border-radius: 16px; padding: 1.9rem 1.9rem 2.1rem;
  box-shadow: 0 34px 74px -26px rgba(24, 36, 48, 0.32);
}
.chat-kicker {
  font-size: 0.6rem; font-weight: 500; letter-spacing: 0.22em;
  color: var(--emerald); margin-bottom: 1.3rem;
  display: flex; align-items: center; gap: 0.6em;
}
.chat-q {
  font-size: 0.8rem; line-height: 1.6; color: var(--ink);
  background: var(--paper-2); border-radius: 10px;
  padding: 0.85em 1.1em; margin-bottom: 1.3rem;
}
.chat-a {
  font-size: 0.8rem; line-height: 1.75; color: var(--ink-soft);
  border-left: 2px solid var(--emerald); padding-left: 1.1em;
  min-height: 8.75em; /* reserve the typed height - no layout shift */
}
.chat-a b { color: var(--ink); }
.chat-cursor {
  display: inline-block; width: 0.55em; height: 1.05em;
  background: var(--emerald); vertical-align: text-bottom;
  margin-left: 2px;
  animation: cursorBlink 1.1s steps(2, start) infinite;
}
@keyframes cursorBlink { to { visibility: hidden; } }

/* ============================================================
   ACT II — OUTPUTS
   ============================================================ */

.outputs { padding: clamp(4.5rem, 9vh, 7.5rem) 0 0; }
.output-cards {
  max-width: var(--max-w); margin: clamp(3rem, 7vh, 5rem) auto 0;
  padding: 0 var(--pad-x);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}
.output-card {
  background: #fff; border: 1px solid rgba(24, 36, 48, 0.08);
  border-radius: 16px; padding: 2rem 1.7rem 2.1rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease, border-color 0.35s ease;
}
.output-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 54px -20px rgba(24, 36, 48, 0.3);
}
.output-card svg { width: 34px; height: 34px; margin-bottom: 1.3rem; }
.output-card[data-accent="emerald"] svg { color: var(--emerald); }
.output-card[data-accent="violet"] svg { color: var(--violet); }
.output-card[data-accent="amber"] svg { color: var(--amber); }
.output-card[data-accent="ink"] svg { color: var(--ink); }
.output-card[data-accent="emerald"]:hover { border-color: color-mix(in srgb, var(--emerald) 45%, transparent); }
.output-card[data-accent="violet"]:hover { border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.output-card[data-accent="amber"]:hover { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.output-card[data-accent="ink"]:hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.output-card h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.28rem;
  color: var(--ink); margin-bottom: 0.55rem;
}
.output-card p { font-size: 0.9rem; color: var(--ink-soft); }

/* ============================================================
   ACT II — WHO
   ============================================================ */

.who { padding: clamp(4.5rem, 9vh, 7.5rem) 0 0; }

.faq { padding: clamp(4.5rem, 9vh, 7.5rem) 0 0; }
.faq-list {
  max-width: var(--max-w); margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  padding: 0 var(--pad-x);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 2.8rem);
}
.faq-item h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem); color: var(--fg);
  letter-spacing: -0.01em; margin: 0 0 0.7rem;
  padding-top: 1.4rem; border-top: 1px solid rgba(24, 36, 48, 0.12);
  text-wrap: balance;
}
.faq-item p { color: var(--fg-soft); font-size: clamp(0.92rem, 1.15vw, 1rem); line-height: 1.65; margin: 0; }
@media (max-width: 860px) { .faq-list { grid-template-columns: 1fr; gap: 1.9rem; } }
.who-list {
  max-width: var(--max-w); margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  padding: 0 var(--pad-x); list-style: none;
}
.who-row {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1rem 2rem; align-items: baseline;
  padding: 1.7rem 0.7rem;
  border-top: 1px solid rgba(24, 36, 48, 0.12);
  transition: background 0.3s ease, padding-left 0.3s ease;
}
.who-row:last-child { border-bottom: 1px solid rgba(24, 36, 48, 0.12); }
.who-row:hover { background: color-mix(in srgb, var(--paper-2) 70%, transparent); padding-left: 1.3rem; }
.who-role {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem); color: var(--fg); letter-spacing: -0.01em;
}
.who-need { color: var(--fg-soft); font-size: clamp(0.95rem, 1.2vw, 1.05rem); }

/* ============================================================
   ACT II — CTA + FOOTER
   ============================================================ */

.cta {
  position: relative; overflow: clip;
  min-height: 86vh; display: flex; align-items: center;
  margin-top: clamp(4rem, 8vh, 6rem);
}
.cta-art { position: absolute; inset: 0; z-index: 0; }
.cta-art::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 78%, var(--paper) 99%),
    linear-gradient(180deg, var(--paper) 0%, transparent 14%, transparent 78%, var(--paper) 98%);
}
.cta-art img {
  width: 100%; height: 100%; object-fit: cover; object-position: 72% 40%;
  opacity: 0.95;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 34%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 34%, #000 62%);
}
.cta::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, var(--paper) 30%, color-mix(in srgb, var(--paper) 45%, transparent) 55%, transparent 78%);
}
.cta-inner {
  position: relative; z-index: 2;
  max-width: var(--max-w); width: 100%; margin: 0 auto; padding: 6rem var(--pad-x);
}
.cta-inner .display { max-width: 12em; }
.cta-inner .hero-ctas { justify-content: flex-start; }
.cta-alt { margin-top: 1.1rem; font-size: 0.88rem; color: var(--fg-soft); }
.cta-alt a { color: var(--fg-soft); text-decoration: underline; text-underline-offset: 3px; }
.cta-alt a:hover { color: var(--fg); }

.site-footer {
  border-top: 1px solid rgba(24, 36, 48, 0.12);
  padding: 3.2rem var(--pad-x) 3.6rem; text-align: center;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--fg);
}
.footer-line { margin-top: 0.6rem; color: var(--fg-soft); font-size: 0.9rem; }
.footer-fine { margin-top: 1.4rem; font-size: 0.62rem; letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase; }

/* ---------- film modal ---------- */

.film-modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 10, 14, 0.93);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.film-modal[hidden] { display: none; }
.film-modal video {
  width: min(960px, 100%); border-radius: 12px;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
}
.film-close {
  position: absolute; top: 1.2rem; right: 1.6rem;
  font-size: 2.2rem; line-height: 1; color: #eef4f0;
  padding: 0.3em; transition: color 0.25s ease, transform 0.25s ease;
}
.film-close:hover { color: var(--emerald); transform: rotate(90deg); }

/* ---------- reduced-motion / no-JS: static light page ---------- */

html.reduced {
  --bg: var(--paper);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
}
html.reduced #cosmos { opacity: 0.25; }
html.reduced .mx-line, html.reduced .chat-cursor { display: none; }

/* ---------- nav over the dark evidence panel ---------- */

.site-nav.over-dark {
  --fg: var(--star-text);
  --fg-soft: var(--star-dim);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 980px) {
  .nav-links { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .output-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dim-row { grid-template-columns: 1fr; gap: 2.6rem; }
  /* mobile reading order: description first, then the illustration -
     for every row, regardless of the desktop left/right flip */
  .dim-copy { order: 0; }
  .dim-media { order: 1; }
  .art-card { max-width: 340px; }
  /* tighter act one: the statement arrives sooner and the dawn runs
     shorter - phone screens forgive far less empty scroll */
  .blind { height: 100vh; }
  .turn { height: 185vh; }

  .tour-layout { grid-template-columns: 1fr; }
  /* mobile: the tour becomes a swipeable card carousel - one screen tall,
     video-first cards, the next card peeking in as the swipe affordance */
  .tour-media { display: none; }
  .tour-steps {
    flex-direction: row; overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.9rem; padding: 0.4rem 0.2rem 1.2rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tour-steps::-webkit-scrollbar { display: none; }
  .tour-step {
    flex: 0 0 min(86%, 340px); scroll-snap-align: center;
    display: flex; flex-direction: column;
    min-height: 0; opacity: 1;
    border-left: 0; padding: 1.1rem 1.1rem 1.4rem;
    background: #fff; border: 1px solid rgba(24, 36, 48, 0.09);
    border-radius: 16px;
    box-shadow: 0 14px 34px -16px rgba(24, 36, 48, 0.22);
    transition: border-color 0.3s ease;
  }
  .tour-step.is-active { border-color: color-mix(in srgb, var(--emerald) 45%, transparent); }
  .tour-step h3 { font-size: 1.22rem; }
  .tour-step p:not(.tour-step-index) { font-size: 0.9rem; }
  .tour-step-media { order: -1; margin: 0 0 1rem; }
  .tour-step-media .tour-video {
    position: static; opacity: 1; transform: none;
    width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
    border-radius: 10px; border: 1px solid rgba(24, 36, 48, 0.08);
  }
  .tour-dots {
    display: flex; justify-content: center; gap: 8px;
    padding: 0.2rem 0 0.6rem;
  }
  .tour-dots i {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(24, 36, 48, 0.16);
    transition: background 0.3s ease, transform 0.3s ease;
  }
  .tour-dots i.is-on { background: var(--emerald); transform: scale(1.3); }
  .matrix { height: auto; }
  .matrix-pin { position: static; min-height: 0; }
  /* the callout floats over the dimmed lower field - same focus-beat
     drama as desktop, and no dead block after the grid */
  .matrix-card {
    position: absolute; left: 1rem; right: 1rem; top: auto; bottom: 4%;
    width: auto;
  }
  html.reduced .matrix-card { position: relative; inset: auto; margin-top: 1.4rem; }
  .mx-line { display: none; }
  .mx-axis-y { display: none; }
  .agent-layout { grid-template-columns: 1fr; }
  .agent-options { grid-template-columns: 1fr 1fr; }
  .who-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .cta-art img {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 40%, #000 75%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 40%, #000 75%);
    object-position: 50% 100%;
  }
  .cta::before { background: linear-gradient(180deg, var(--paper) 35%, color-mix(in srgb, var(--paper) 40%, transparent) 60%, transparent 85%); }
}

@media (max-width: 560px) {
  .output-cards { grid-template-columns: 1fr; }
  .agent-options { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .matrix-grid { grid-template-columns: minmax(58px, 84px) repeat(4, minmax(0, 1fr)); }
  .mx-cell { height: clamp(52px, 8vh, 70px); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line::after, .ticker-track,
  .blind-statement em .w { animation: none; }
  /* the hero is simply there - no entrance */
  .js .hero-title .line-inner,
  .js .hero-kicker, .js .hero-sub,
  .js .hero .hero-ctas, .js .scroll-cue {
    animation: none; opacity: 1; transform: none;
  }
  .js .scroll-cue { transform: translateX(-50%); }
  .blind, .turn, .matrix { height: auto; padding: 18vh 0; }
  .blind-pin, .turn-pin, .matrix-pin { position: static; height: auto; min-height: 0; }
  .blind-statement { position: static; opacity: 1; visibility: visible; margin: 2.2rem auto; }
  .matrix-card { opacity: 1; visibility: visible; }
  .tour-step { opacity: 1; min-height: 0; padding-block: 2rem; }
  .tour-media { position: relative; height: auto; }
  * { transition-duration: 0.01ms !important; }
}
