/* ============================================================
   ATHEMA — DIORAMA
   Warm ivory paper · warm graphite ink · one muted clay accent.
   The page is a mat around one living drawing — and below it,
   the same drawn-ink language carries nine narrative frames.
   ============================================================ */

:root {
  --paper:    #f4eee1;
  --paper-2:  #efe8d8;
  --paper-3:  #e9e1ce;
  --ink:      #322f28;
  --ink-2:    #5c564a;
  --ink-3:    #8a8270;
  --ink-4:    #b6ad97;
  --line:     rgba(50, 47, 40, 0.16);
  --line-soft:rgba(50, 47, 40, 0.09);
  --clay:     #a8532e;
  --clay-deep:#8c4526;
  --clay-wash:rgba(168, 83, 46, 0.08);
  --ember:    #e9704b;
  --ember-deep:#cf5732;
  --ember-text:#fff6ea;
  /* R7 — the product-surface layer: porcelain "screens" on the paper, and one
     interface accent (a restrained verdigris ink-teal) used ONLY inside
     product UI — buttons, links, live status, focus. Ember stays reserved
     for human/brand moments; clay stays the illustration accent. */
  --porcelain:      #faf8f1;
  --porcelain-2:    #fdfcf8;
  --teal:           #47756b;
  --teal-deep:      #38625a;
  --teal-wash:      rgba(71, 117, 107, 0.09);
  --teal-line:      rgba(71, 117, 107, 0.38);
  --serif-d:  "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif-b:  "Newsreader", Georgia, serif;
  --mono:     "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad-x:    clamp(20px, 4.5vw, 64px);
  --max:      1280px;
  --nav-h:    66px; /* measured fixed-nav height — snap + anchor offset */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body { background: var(--paper); }

body {
  color: var(--ink);
  font-family: var(--serif-b);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(168, 83, 46, 0.18); }

a { color: inherit; text-decoration: none; }

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

/* -------------------------------------------------- nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: 14px var(--pad-x);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif-d);
  font-weight: 560;
  font-size: 18.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-right: auto;
}
.wordmark svg { display: block; opacity: 0.92; }
.nav nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.nav nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav nav a:hover { color: var(--ink); border-bottom-color: var(--ink-3); }

/* -------------------------------------------------- buttons */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 10px 22px;
  color: var(--ink);
  background: transparent;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-nav { padding: 8px 18px; font-size: 11.5px; }
.btn-primary {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--ember-text);
  box-shadow: 0 10px 26px -14px rgba(233, 112, 75, 0.75);
}
.btn-primary:hover {
  background: var(--ember-deep);
  border-color: var(--ember-deep);
  color: var(--ember-text);
  transform: translateY(-1px);
}
.btn-lg { padding: 14px 32px; font-size: 13.5px; }
.btn-hero { padding: 15px 36px; font-size: 14px; letter-spacing: 0.11em; }

/* -------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}
.stage {
  position: absolute;
  inset: 0;
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: var(--mono);
}

.hero-copy {
  position: relative;
  z-index: 5;
  max-width: 620px;
  padding: 0 var(--pad-x);
  margin-left: clamp(8px, 2.5vw, 40px);
  padding-top: clamp(96px, 14vh, 170px);
  pointer-events: none;
}
@keyframes copyIn {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}
.hero-copy > * { animation: copyIn 0.9s cubic-bezier(0.25, 0.5, 0.25, 1) both; }
.hero-copy > h1 { animation-delay: 0.12s; }
.hero-copy > .lede { animation-delay: 0.3s; }
.hero-copy > .cta-row { animation-delay: 0.48s; }
html.no-motion .hero-copy > * { animation: none; }
.hero-copy .btn, .hero-copy a, .hero-copy .jargon-toggle { pointer-events: auto; }
h1 {
  font-family: var(--serif-d);
  font-weight: 480;
  font-variation-settings: "opsz" 100;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.016em;
  color: var(--ink);
  margin-bottom: 22px;
}
.lede {
  font-size: clamp(16.5px, 1.35vw, 18.5px);
  line-height: 1.62;
  color: var(--ink-2);
  margin-bottom: 30px;
  max-width: 46ch;
}
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-note {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.legend {
  position: absolute;
  z-index: 6;
  left: var(--pad-x);
  bottom: clamp(52px, 8vh, 76px);
  display: flex;
  gap: clamp(12px, 1.8vw, 26px);
  font-family: var(--mono);
}
.leg {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  transition: color 0.5s ease;
}
.leg i { font-style: normal; font-size: 9.5px; letter-spacing: 0.08em; opacity: 0.75; }
.leg::after {
  content: "";
  width: clamp(10px, 1.4vw, 22px);
  height: 1px;
  background: var(--line);
  align-self: center;
  margin-left: clamp(5px, 0.9vw, 12px);
}
.leg:last-child::after { display: none; }
.leg.on { color: var(--clay-deep); }
.leg.done { color: var(--ink-2); }

.scene-note {
  position: absolute;
  z-index: 6;
  right: var(--pad-x);
  bottom: clamp(52px, 8vh, 76px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  color: var(--ink-4);
  max-width: 320px;
  text-align: right;
}

/* ---- R6 · the story rail — five ink-hairline segments, one per pairing.
   The active pairing's segment fills in real time; completed ones read
   filled-quiet; each is a click target that jumps the scene to its pairing.
   Wide layouts: positioned under the drawing by scene.js. Stacked: static. */
.story-rail {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
}
.story-rail[hidden] { display: none; }
.rail-note {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
  transition: opacity 1.4s ease;
}
.rail-note.gone { opacity: 0; }
.rail-seg {
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 9px 0;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.rail-seg:disabled { cursor: default; }
.rail-seg:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 5px; }
.rail-g { display: flex; gap: 3px; flex: 0 0 auto; }
.rail-g svg {
  width: 15px;
  height: 15px;
  display: block;
}
.rail-g svg path {
  fill: none;
  stroke: var(--ink-3);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.5s ease;
}
.rail-line {
  position: relative;
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}
.rail-line i {
  position: absolute;
  left: 0; right: 0;
  top: -0.5px; bottom: -0.5px;
  background: var(--clay-deep);
  transform: scaleX(0);
  transform-origin: left center;
}
.rail-seg.active .rail-g svg path { stroke: var(--clay-deep); }
.rail-seg.done .rail-g svg path { stroke: var(--ink-2); }
.rail-seg.done .rail-line i {
  transform: scaleX(1);
  background: var(--ink-4);
  transition: background 0.7s ease;
}
.rail-seg:hover:not(:disabled):not(.active) .rail-g svg path { stroke: var(--ink); }

/* ---- overlay chips (created by scene.js) ---- */
.src-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.6s ease;
}
.src-chip.hot { color: var(--clay-deep); }

.sig-chip {
  position: absolute;
  transform: translate(-50%, -110%);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s ease;
  box-shadow: 0 8px 24px -14px rgba(50, 47, 40, 0.4);
}
.sig-chip.show { opacity: 1; }
.sig-chip .s { color: var(--clay-deep); letter-spacing: 0.1em; text-transform: uppercase; font-size: 9.5px; display: block; margin-bottom: 2px; }

/* the change — a small pinned card that rides the track */
.work-chip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--paper);
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  padding: 9px 13px 9px;
  font-size: 11.5px;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.5s ease, translate 0.6s ease;
  box-shadow: 0 3px 0 -1.5px rgba(50, 47, 40, 0.14), 0 18px 40px -18px rgba(50, 47, 40, 0.55);
  pointer-events: none;
}
.work-chip.show { opacity: 1; translate: 0 0; }
.work-chip.shipped { translate: 0 -6px; border-color: var(--clay); }
.work-chip.away { opacity: 0; translate: 0 -34px; }
/* the pin — ties the raised card to its carriage on the rail */
.work-chip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: var(--pin, 0px);
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--ink-3) 85%, transparent),
    color-mix(in srgb, var(--ink-3) 40%, transparent)
  );
}
.work-chip::before {
  content: "";
  position: absolute;
  top: calc(100% + var(--pin, 0px) - 2px);
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  rotate: 45deg;
  border-radius: 1px;
  background: var(--ink-3);
}
.work-chip .wc-title { font-weight: 500; letter-spacing: 0.02em; display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 11px; }
.work-chip .wc-meta { color: var(--ink-3); font-size: 10.5px; letter-spacing: 0.04em; display: block; }
.work-chip .wc-stamps { display: flex; gap: 5px; }
.work-chip .wc-stamps:not(:empty) { margin-top: 7px; }
.work-chip .stamp {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--ink-2);
  opacity: 0;
  translate: 0 4px;
  transition: opacity 0.4s ease, translate 0.4s ease;
}
.work-chip .stamp.in { opacity: 1; translate: 0 0; }
.work-chip .stamp.human { color: var(--clay-deep); border-color: color-mix(in srgb, var(--clay) 42%, transparent); }
.work-chip .stamp.you { color: var(--ember-deep); border-color: color-mix(in srgb, var(--ember) 55%, transparent); background: rgba(233, 112, 75, 0.07); }
.work-chip .stamp.ship { color: var(--clay-deep); border-color: var(--clay); background: var(--clay-wash); }

/* the harness learning — a quiet tick beside the gear */
.adapt-blip {
  position: absolute;
  transform: translate(-50%, -100%);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--clay-deep);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--clay) 38%, transparent);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.45s ease, translate 0.45s ease;
}
.adapt-blip.show { opacity: 1; translate: 0 0; }

/* the "adaptation" tag — rides the feedback comet back into the harness
   (opacity driven per-frame from scene.js; no transition) */
.adapt-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-deep);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border: 1px solid color-mix(in srgb, var(--clay) 34%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.lvl-label {
  position: absolute;
  transform: translate(0, -50%);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  padding: 1px 4px;
  border-radius: 3px;
  transition: opacity 0.6s ease;
}
.lvl-label.rt { transform: translate(-100%, -50%); }
.lvl-label.ct { transform: translate(-50%, -50%); }
.lvl-label.ml { white-space: pre-line; text-align: right; line-height: 1.6; }
.lvl-label.dim { opacity: 0.38; }
.lvl-label.you { color: var(--clay-deep); letter-spacing: 0.2em; }

/* compact overlay (tall / mobile layout) */
.stage.compact .src-chip { font-size: 11px; letter-spacing: 0.09em; }
.stage.compact .lvl-label { font-size: 9.5px; letter-spacing: 0.1em; }
.stage.compact .sig-chip { font-size: 9.5px; padding: 5px 8px; }
.stage.compact .work-chip { font-size: 9px; padding: 6px 8px 6px; border-radius: 6px; }
.stage.compact .work-chip .wc-title { font-size: 9px; }
.stage.compact .work-chip .wc-meta { font-size: 8px; }
.stage.compact .work-chip .stamp { font-size: 7.5px; padding: 1px 5px; }
.stage.compact .work-chip .wc-stamps:not(:empty) { margin-top: 5px; }
.stage.compact .adapt-blip { font-size: 8.5px; }
.stage.compact .adapt-tag { font-size: 8.5px; padding: 1px 6px; letter-spacing: 0.11em; }

/* -------------------------------------------------- ink figures (the drawn frames) */
.ink-fig { display: block; width: 100%; height: auto; }
.ink-fig path { stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.ink-fig path:not(.wash) { fill: none; }
.ink-fig .s2 { stroke: var(--ink-2); }
.ink-fig .s3 { stroke: var(--ink-3); }
.ink-fig .s4 { stroke: var(--ink-4); }
.ink-fig .cl { stroke: var(--clay); }
.ink-fig .cd { stroke: var(--clay-deep); }
.ink-fig .tl { stroke: var(--teal); }
.ink-fig .em { stroke: var(--ember); }
.ink-fig .wash { stroke: none; }

@keyframes figspin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.fig-turn { animation: figspin 44s linear infinite; transform-box: view-box; }
.fig-orbit { animation: figspin 110s linear infinite; transform-box: view-box; transform-origin: 280px 280px; }
.fig-counter { animation: figspin 110s linear infinite reverse; transform-box: fill-box; transform-origin: center; }
html.no-motion .fig-turn, html.no-motion .fig-orbit, html.no-motion .fig-counter { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .fig-turn, .fig-orbit, .fig-counter { animation: none; }
}

/* labels drawn onto figures — the hero's lifted-contrast standard */
.fig-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  text-align: center;
  line-height: 1.65;
}
.fig-label.ad {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--clay-deep);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--clay) 34%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
}

/* -------------------------------------------------- sections shared */
main > section:not(.hero) {
  position: relative;
  padding: clamp(78px, 10vw, 140px) var(--pad-x);
  max-width: calc(var(--max) + 2 * var(--pad-x));
  margin: 0 auto;
}
.sec-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin-bottom: 18px;
}
h2 {
  font-family: var(--serif-d);
  font-weight: 470;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 14px;
}
.sub { color: var(--ink-2); font-size: 17px; max-width: 60ch; }
.sec-head.center .sub { margin-inline: auto; }

/* split frames: copy beside a figure or a product panel */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.split-40 { grid-template-columns: 2fr 3fr; }
.split-60 { grid-template-columns: 3fr 2fr; }
.split .sec-head, .split h2 { margin-bottom: 14px; }
.split .kicker { margin-bottom: 16px; }
.split-copy .sub { font-size: 16.5px; }
.split-fig { position: relative; }
.split-panel { min-width: 0; }

/* -------------------------------------------------- F1 · the day-two graveyard */
.grave { border-top: 1px solid var(--line-soft); overflow: hidden; }
.grave-band {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(46px, 6vw, 88px);
  opacity: 0.55;
  pointer-events: none;
}
.grave-inner { position: relative; }
.grave-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  align-items: stretch;
}
.stone {
  position: relative;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.stone-head { display: flex; }
.stone-glyph { width: 24px; height: 24px; opacity: 0.9; }
.stone-glyph .ink-fig { width: 24px; height: 24px; }
.stone blockquote {
  font-style: italic;
  font-size: 15px;
  line-height: 1.52;
  color: var(--ink);
}
.stone .stone-stat {
  font-family: var(--mono);
  font-style: normal;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.55;
}
.stone figcaption {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.7;
  margin-top: auto;
}
.stone cite { font-style: normal; }
.stone-before {
  align-self: flex-start;
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--clay-deep);
  border: 1px solid color-mix(in srgb, var(--clay) 30%, transparent);
  border-radius: 10px;
  padding: 4px 10px;
}

/* -------------------------------------------------- F2 · the five failure modes */
.mode-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.mode { border-top: 1px solid var(--line); padding-top: 16px; min-width: 0; }
.mode-fig { max-width: 150px; margin-bottom: 4px; }
.mode h3 {
  font-family: var(--serif-d);
  font-weight: 520;
  font-size: 16.5px;
  letter-spacing: -0.004em;
  margin-bottom: 8px;
}
.mode p { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

/* -------------------------------------------------- F2·5 · the discipline */
.disc-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  max-width: 880px;
}
.discipline .mode-fig { max-width: 190px; }
.discipline .mode p { max-width: 46ch; }

/* -------------------------------------------------- F3 · the install */
.fig-install { max-width: 660px; margin-inline: auto; width: 100%; }

/* -------------------------------------------------- panels (product previews)
   R7 · porcelain-on-paper: the product panels read as screens set on the
   paper — slightly whiter and cooler than the page, with a soft lift. */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--porcelain-2), var(--porcelain));
  border-radius: 12px;
  padding: 24px 24px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 2px 6px -3px rgba(50, 47, 40, 0.14),
    0 22px 44px -30px rgba(50, 47, 40, 0.30);
  transition: translate 0.35s ease, box-shadow 0.35s ease;
}
.panel:hover {
  translate: 0 -3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 3px 8px -4px rgba(50, 47, 40, 0.16),
    0 28px 52px -30px rgba(50, 47, 40, 0.36);
}
/* the interface accent scopes to product panels only */
.panel :focus-visible { outline-color: var(--teal); }
html.no-motion .panel:hover { translate: 0 0; }
.panel-lg { padding: 26px 28px 20px; }
.panel svg.draw-border, .stone svg.draw-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.panel svg.draw-border rect, .stone svg.draw-border rect {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.panel-head h3 {
  font-family: var(--serif-d);
  font-weight: 520;
  font-size: 21px;
  letter-spacing: -0.005em;
}
.demo-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 8px;
}
.panel-cap {
  font-style: italic;
  color: var(--ink-3);
  font-size: 14.5px;
  margin-bottom: 18px;
}
.panel-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---- F4 · signal inbox ---- */
.inbox { display: flex; flex-direction: column; }
.sig {
  display: grid;
  grid-template-columns: 24px 58px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.sig:first-child { border-top: none; }
.sig-g { width: 22px; padding-top: 2px; opacity: 0.9; }
.sig-g .ink-fig { width: 22px; height: 22px; }
.sig-t { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); padding-top: 4px; white-space: nowrap; }
.sig-body { font-size: 14px; line-height: 1.45; }
.sig-body strong { font-weight: 500; display: block; color: var(--ink); }
.sig-body em { font-style: italic; color: var(--ink-3); font-size: 12.5px; }
.sig[data-kind="you"] .sig-body em { color: var(--clay-deep); }
.sig[data-kind="you"] .sig-g path { stroke: var(--clay-deep); }

/* ---- F5 · run board ---- */
.run-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  row-gap: 8px;
}
.step {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
}
.step::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1.3px solid var(--ink-4);
  margin-right: 5px;
}
.step.done { color: var(--ink-2); }
.step.done::before { background: var(--ink-2); border-color: var(--ink-2); }
.step.now { color: var(--teal-deep); }
/* the final gate on the stepper — the owner's seal (ember, always ahead) */
.step.gate { color: var(--ember-deep); }
.step.gate::before { border-color: var(--ember); }
.step.now::before { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
.step:not(:last-child)::after {
  content: "";
  width: 9px;
  height: 1px;
  background: var(--line);
  margin: 0 4px 0 7px;
}
.events p {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}
.events p:first-child { border-top: none; }
.events p span { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); padding-top: 3px; }
.events .ev-now { color: var(--ink); }
.events .ev-now span { color: var(--teal-deep); }
.cost { color: var(--ink); font-size: 13px; }
.cost.ticking { color: var(--teal-deep); }

/* ---- F6 · owned outcomes (PR review + the leaning reviewers) ---- */
.owned-stack { position: relative; margin-top: 92px; }
.reviewers {
  position: absolute;
  left: 7%;
  width: 74%;
  bottom: calc(100% - 30px);
  z-index: 2;
  pointer-events: none;
}
.pr-plain p {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink);
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
.pr-plain p:first-child { border-top: none; }
.pr-plain i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--clay-deep);
}
.proof-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 20px; }
.chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  color: var(--ink-2);
}
.chip.never { color: var(--clay-deep); border-color: color-mix(in srgb, var(--clay) 36%, transparent); }
.chip.roll { display: inline-flex; align-items: center; gap: 6px; }
.roll-glyph, .roll-glyph .ink-fig { width: 14px; height: 14px; display: inline-block; }
.chip.wait { color: var(--ember-deep); border-color: color-mix(in srgb, var(--ember) 50%, transparent); background: rgba(233, 112, 75, 0.06); }
.seal-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.seal-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-text);
  background: var(--ember);
  border: 1px solid var(--ember);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(207, 87, 50, 0.55);
  transition: background 0.22s ease, border-color 0.22s ease;
}
.seal-btn:hover { background: var(--ember-deep); border-color: var(--ember-deep); }
.seal-btn.sealed { background: transparent; color: var(--clay-deep); border-color: var(--clay); cursor: default; }
.seal-note { font-size: 12.5px; font-style: italic; color: var(--ink-3); }
.risk-low { color: var(--ink-2); text-transform: none; letter-spacing: 0.03em; }

/* ==================================================================
   R7 · the product plays itself — looping scripted vignettes on the
   three product panels. All states are additive classes driven by
   js/vignettes.js; without JS (and under reduced motion) the panels
   ship in their complete final state.
   ================================================================== */

/* ---- shared: per-panel loop progress dots ---- */
.vg-dots { display: inline-flex; align-items: center; gap: 5px; }
.vg-dots i {
  width: 4.5px; height: 4.5px;
  border-radius: 50%;
  border: 1px solid var(--ink-4);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.vg-dots i.on { background: var(--teal); border-color: var(--teal); }
html.no-motion .vg-dots { visibility: hidden; }

/* ---- F4 · signal inbox ---- */
.sig { position: relative; }
.sig::after {
  content: "";
  position: absolute;
  inset: 3px -9px;
  border-radius: 8px;
  background: var(--teal-wash);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.sig.vg-scan::after { opacity: 1; }
.hears .vg-live .sig { opacity: 0; translate: 0 10px; transition: opacity 0.5s ease, translate 0.5s ease; }
.hears .vg-live .sig.vg-in { opacity: 1; translate: 0 0; }
.sig-act {
  position: absolute;
  z-index: 2;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 2px 8px 44px;
  background: linear-gradient(90deg, transparent, var(--porcelain) 34%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  opacity: 0;
  translate: 6px 0;
  transition: opacity 0.4s ease, translate 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}
.sig.vg-act-on .sig-act { opacity: 1; translate: 0 0; }
.sig-act i { font-style: normal; color: var(--ink-4); }
.sig-act .act { color: var(--teal-deep); border-bottom: 1px solid transparent; }
.sig-act .act-run { border-bottom-color: var(--teal-line); }
.sig-act .act.vg-pressed {
  background: var(--teal);
  color: var(--porcelain-2);
  border-radius: 999px;
  padding: 3px 9px;
  margin: -3px -9px;
  border-bottom-color: transparent;
}
.vg-toast {
  position: absolute;
  z-index: 4;
  right: 20px;
  bottom: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--porcelain-2);
  border: 1px solid var(--teal-line);
  border-radius: 10px;
  padding: 9px 15px 9px 12px;
  box-shadow: 0 18px 36px -18px rgba(50, 47, 40, 0.45);
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.4s ease, translate 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  pointer-events: none;
}
.vg-toast.show { opacity: 1; translate: 0 0; }
.toast-g svg { width: 17px; height: 17px; display: block; }
.toast-g path { fill: none; stroke: var(--teal); stroke-linecap: round; stroke-linejoin: round; }
.toast-t { display: flex; flex-direction: column; line-height: 1.45; }
.toast-t strong {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.toast-t em { font-style: italic; font-size: 12px; color: var(--ink-3); }

/* ---- F5 · run board (kickoff → plan → the live board) ---- */
.vg-run { position: relative; }
.vg-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.vg-view.on { opacity: 1; }
.vg-board { transition: opacity 0.45s ease; }
.vg-run.hideboard .vg-board { opacity: 0; }
.kick-label {
  font-family: var(--serif-d);
  font-weight: 520;
  font-size: 19px;
  margin-bottom: 14px;
}
.kick-field {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 460px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--porcelain-2);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 18px;
  box-shadow: inset 0 1px 3px rgba(50, 47, 40, 0.05);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.vg-kickoff.on .kick-field {
  border-color: var(--teal-line);
  box-shadow: inset 0 1px 3px rgba(50, 47, 40, 0.05), 0 0 0 3px var(--teal-wash);
}
.kick-caret {
  width: 1.5px;
  height: 16px;
  background: var(--teal);
  margin-left: 2px;
  animation: caretBlink 1.05s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.kick-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--porcelain-2);
  background: var(--teal);
  border-radius: 999px;
  padding: 10px 20px;
  transition: transform 0.16s ease, background 0.16s ease;
}
.kick-btn .kick-g { width: 12px; height: 12px; display: block; }
.kick-btn .kick-g path { fill: none; stroke: var(--porcelain-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kick-btn.vg-pressed { transform: scale(0.94); background: var(--teal-deep); }
.kick-hint { font-size: 12.5px; font-style: italic; color: var(--ink-3); }
.vg-plan { gap: 7px; }
.plan-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.4s ease, translate 0.4s ease;
}
.plan-line::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  border: 1.2px solid var(--teal);
}
.vg-plan .plan-line.vg-in { opacity: 1; translate: 0 0; }
.run-prog {
  height: 3px;
  border-radius: 999px;
  background: var(--paper-3);
  margin: -6px 0 16px;
  overflow: hidden;
}
.run-prog i {
  display: block;
  height: 100%;
  width: var(--p, 88%);
  background: linear-gradient(90deg, var(--teal), var(--teal-deep));
  border-radius: 999px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.board-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(178px, 36%, 236px);
  gap: 18px;
  align-items: start;
}
.panel-run.vg-live .events p { opacity: 0; translate: 0 8px; transition: opacity 0.5s ease, translate 0.5s ease; }
.panel-run.vg-live .events p.vg-in { opacity: 1; translate: 0 0; }
.shotbox {
  margin: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--porcelain-2);
  box-shadow: 0 16px 32px -24px rgba(50, 47, 40, 0.5);
}
.shot-chrome {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-bottom: 1px solid var(--line-soft);
}
.shot-chrome i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); opacity: 0.55; }
.shot-url {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-left: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-live {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--teal);
  margin-left: auto;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2.5px var(--teal-wash);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse { 50% { opacity: 0.35; } }
.shot-video { display: block; width: 100%; height: auto; background: #f3efe6; }
.shot-cap {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 6px 9px;
  border-top: 1px solid var(--line-soft);
}

/* ---- F6 · pr review (chips check → stamps land → the seal breathes) ---- */
.chip { transition: color 0.4s ease, border-color 0.4s ease, background 0.4s ease; }
.chip.ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-deep);
  border-color: var(--teal-line);
}
.chip-check { width: 11px; height: 11px; flex: 0 0 auto; }
.chip-check path {
  fill: none;
  stroke: var(--teal-deep);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s ease 0.08s;
}
.owned .vg-live .chip.vg-off {
  color: var(--ink-4);
  border-color: var(--line-soft);
  background: transparent;
}
.owned .vg-live .chip.vg-off .chip-check path { stroke-dashoffset: 12; }
.owned .vg-live .chip.vg-off .roll-glyph { opacity: 0.35; }
.roll-glyph { transition: opacity 0.4s ease; }
.vg-stamp {
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.28s ease, transform 0.4s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.vg-stamp.vg-hide { opacity: 0; transform: scale(1.55) rotate(-8deg); transition: none; }
.vg-stamp.vg-fade { opacity: 0; }
@keyframes sealBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.024); box-shadow: 0 8px 20px -10px rgba(50, 47, 40, 0.45); }
}
.seal-btn.vg-breathe { animation: sealBreathe 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .kick-caret, .shot-live, .seal-btn.vg-breathe { animation: none; }
}
html.no-motion .kick-caret, html.no-motion .shot-live, html.no-motion .seal-btn { animation: none; }

/* -------------------------------------------------- F7 · adaptation + the ladder */
.adapt-band {
  position: relative;
  margin-top: clamp(26px, 4vw, 50px);
}
/* labels are %-anchored to the drawing itself, not the whole band
   (the gauge joins the flow below it on small screens) */
.band-fig { position: relative; }
.gauge {
  position: absolute;
  right: clamp(6px, 2.5vw, 36px);
  bottom: 4%;
  width: min(300px, 42vw);
  background: var(--paper-2);
  border-radius: 12px;
  padding: 16px 18px 14px;
  box-shadow: 0 24px 48px -30px rgba(50, 47, 40, 0.45);
}
.gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.gauge-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--paper-3);
  margin-bottom: 8px;
}
.gauge-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink-4), var(--clay));
  transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge-dot {
  position: absolute;
  top: 50%; left: 40%;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-wash);
  transition: left 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge.tick .gauge-fill { width: 60%; }
.gauge.tick .gauge-dot { left: 60%; }
.gauge-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.gauge-ticks .g-next { transition: color 0.5s ease 1s; }
.gauge.tick .g-next { color: var(--clay-deep); font-weight: 600; }
.gauge-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* -------------------------------------------------- F8 · pricing */
.pricing { border-top: 1px solid var(--line-soft); }
.price-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(24px, 4vw, 60px);
  align-items: end;
}
.price-vignette { width: 220px; opacity: 0.9; margin-bottom: clamp(40px, 5vw, 64px); }
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tier {
  padding: 30px clamp(18px, 2vw, 30px) 30px;
  border-left: 1px solid var(--line-soft);
  min-width: 0;
}
.tier:first-child { border-left: none; }
.tier h3 {
  font-family: var(--serif-d);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tier-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-deep);
  border: 1px solid color-mix(in srgb, var(--clay) 40%, transparent);
  border-radius: 999px;
  padding: 3px 9px;
}
.tier-mid { background: var(--paper-2); }
.price {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.price span { font-size: 13px; color: var(--ink-3); letter-spacing: 0; }
.tier-line { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.price-foot {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* -------------------------------------------------- F9 · the close */
.final { text-align: center; }
.close-fig {
  width: min(480px, 84vw);
  margin: 0 auto;
}
.close-copy { position: relative; margin-top: clamp(-26px, -1.8vw, -14px); }
.close-copy h2 { margin-bottom: 12px; }
.close-copy p { color: var(--ink-2); margin-bottom: 30px; }
/* the provenance strip — who's making the promise, under the ask */
.cred-strip {
  margin-top: clamp(36px, 4.5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cred-line { font-size: 16px; color: var(--ink-2); }
.cred-logos { display: flex; align-items: center; gap: clamp(28px, 3.5vw, 48px); }
.cred-logo { fill: var(--ink-2); opacity: 0.75; width: auto; flex: none; }
.lg-google { height: 30px; }
.lg-meta { height: 24px; }
.lg-nvidia { height: 18px; }

/* -------------------------------------------------- footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  padding: 26px var(--pad-x) 34px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* -------------------------------------------------- reveals */
[data-rv] { opacity: 0; translate: 0 18px; transition: opacity 0.8s ease, translate 0.8s ease; }
[data-rv].rv-in { opacity: 1; translate: 0 0; }

.panel .panel-inner-rv, .stone .panel-inner-rv { opacity: 0; transition: opacity 0.7s ease 0.35s; }
.panel.drawn .panel-inner-rv, .stone.drawn .panel-inner-rv { opacity: 1; }

html.no-motion [data-rv] { opacity: 1; translate: 0 0; transition: none; }
html.no-motion .panel .panel-inner-rv, html.no-motion .stone .panel-inner-rv { opacity: 1; transition: none; }

/* -------------------------------------------------- one-frame-at-a-time snap (desktop) */
/* Native CSS scroll snap on the document scroller — no wheel-hijacking.
   Guarded: only when the window is wide enough for the drawn frames AND tall
   enough that a frame can fit (below either bound the page flows freely,
   exactly as before). Frames use min-height (never height), so on shorter
   desktop windows an oversized frame simply grows and stays fully scrollable
   via the snap "covering" rule — nothing can be trapped between stops. */
@media (min-width: 900px) and (min-height: 640px) {
  html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: var(--nav-h);
    /* the macOS rubber-band fights mandatory snap at the top boundary
       (the viewport settles pulled-down, exposing growing whitespace);
       no boundary overscroll where snap is active */
    overscroll-behavior-y: none;
  }
  body { overscroll-behavior-y: none; }
  main > section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .foot {
    /* page-bottom stays a valid rest — the close frame and the colophon
       share the final stop, so the footer is always reachable */
    scroll-snap-align: end;
    scroll-snap-stop: always;
  }
  /* frame normalization: each frame fills the viewport below the fixed nav,
     content balanced on the vertical center */
  main > section:not(.hero) {
    min-height: calc(100svh - var(--nav-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: clamp(24px, 5svh, 64px);
    padding-bottom: clamp(24px, 5svh, 64px);
  }
  .sec-head { margin-bottom: clamp(28px, 5svh, 56px); }
  /* F7: the band drawing scales with window height so the whole frame —
     head + band + gauge — dwells inside one snap stop (full width ≥ ~1050px
     tall; label anchors are %-based so they ride the scale) */
  .adapt-band {
    width: min(100%, max(640px, 242svh - 980px));
    margin-inline: auto;
  }
  /* F9: the seal shrinks before the close copy ever leaves the frame
     (budget includes the provenance strip under the CTA) */
  .close-fig { width: min(480px, 84vw, calc(100svh - 420px)); }
}
/* short-window desktop: once the band scales below ~1040px the gauge's inset
   corner no longer exists — move the gauge beside the drawing instead of over it */
@media (min-width: 1160px) and (min-height: 640px) and (max-height: 855px) {
  .adapt-band {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 4vw, 56px);
  }
  .adapt-band .band-fig {
    flex: 0 1 auto;
    width: min(100%, max(640px, 242svh - 980px));
  }
  .adapt-band .gauge {
    position: static;
    flex: 0 0 min(300px, 30vw);
    width: auto;
  }
}
/* narrow short desktop: no room beside the drawing — gauge tucks under it */
@media (min-width: 900px) and (max-width: 1159px) and (min-height: 640px) and (max-height: 855px) {
  .adapt-band {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
  .adapt-band .band-fig { width: min(100%, max(560px, 256svh - 1285px)); }
  .adapt-band .gauge { position: static; width: min(300px, 42vw); }
  .adapt-band .fig-label { font-size: 9.5px; letter-spacing: 0.12em; }
  .adapt-band .fig-label.ad { font-size: 8.5px; }
}
/* short-window desktop: the scaled-down band keeps the hero's compact label size */
@media (min-width: 900px) and (min-height: 640px) and (max-height: 760px) {
  .adapt-band .fig-label { font-size: 9.5px; letter-spacing: 0.12em; }
  .adapt-band .fig-label.ad { font-size: 8.5px; }
}

/* -------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .grave-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier { border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 1159px) {
  /* stacked hero (matches the scene renderer's tall layout breakpoint) */
  .hero { min-height: unset; padding-bottom: 0; display: flex; flex-direction: column; }
  .stage { position: relative; order: 2; height: clamp(420px, 118vw, 600px); margin-top: 4px; }
  .hero-copy { order: 1; padding-top: 104px; max-width: 560px; }
  /* the story rail lives directly under the scene on the stacked layout */
  .story-rail { position: static; order: 3; margin: 6px var(--pad-x) 0; }
  .legend { position: static; order: 4; padding: 14px var(--pad-x) 0; }
  .scene-note { position: static; order: 5; text-align: left; padding: 10px var(--pad-x) 26px; max-width: none; }
}
@media (max-width: 980px) {
  .split, .split-40, .split-60, .split-show { grid-template-columns: 1fr; gap: 34px; }
  .screen-frame { height: clamp(340px, 62svh, 560px); }
  .split .split-copy { order: -1; }
  .owned-stack { margin-top: 96px; }
  .price-head { grid-template-columns: 1fr; }
  .price-vignette { display: none; }
  .gauge {
    position: static;
    width: min(360px, 100%);
    margin: 22px auto 0;
  }
}
@media (max-width: 700px) {
  .grave-row { grid-template-columns: 1fr; }
  .mode-row { grid-template-columns: 1fr; }
  .disc-row { grid-template-columns: 1fr; gap: 28px; }
  /* run-board vignette simplifies: the e2e capture stacks under the events */
  .board-cols { grid-template-columns: 1fr; }
  .shotbox { max-width: 340px; }
  .mode { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 4px 18px; }
  .mode .mode-fig { grid-row: 1 / span 2; margin: 0; }
  .price-grid { grid-template-columns: 1fr; border: none; border-top: 1px solid var(--line); }
  .tier { border-left: none; border-bottom: 1px solid var(--line-soft); }
  /* the band shrinks hard at phone width — thin the labels so the ones that
     remain stay readable and collision-free */
  .adapt-band .fig-label { font-size: 8px; letter-spacing: 0.08em; }
  .adapt-band .fig-label.ad { font-size: 7.5px; padding: 1px 5px; }
  .adapt-band .lb-thin { display: none; }
  .adapt-band .lb-agent { left: 40% !important; top: 4% !important; }
  .adapt-band .lb-human { left: 80% !important; top: 18% !important; }
  .adapt-band .lb-signals { left: 72% !important; top: 100% !important; }
  .adapt-band .lb-stamp { left: 42% !important; top: 100% !important; }
  .band-fig { margin-bottom: 14px; }
  .reviewers { left: 4%; width: 88%; }
  .close-copy { margin-top: -34px; }
}
@media (max-width: 620px) {
  .nav nav { display: none; }
  h1 { font-size: clamp(38px, 11vw, 48px); }
  .legend { gap: 8px; flex-wrap: wrap; }
  .leg { font-size: 10px; letter-spacing: 0.1em; }
  .leg::after { width: 8px; margin-left: 4px; }
  .sig { grid-template-columns: 22px minmax(0, 1fr); }
  .sig-t { display: none; }
  .fig-install .fig-label { font-size: 8.5px; letter-spacing: 0.1em; }
  /* the story rail wraps: microcopy on its own line, five compact segments */
  .story-rail { flex-wrap: wrap; gap: 4px 8px; }
  .rail-note { flex: 1 0 100%; font-size: 8.5px; }
  .rail-seg { gap: 5px; padding: 7px 0; }
  .rail-g svg { width: 13px; height: 13px; }
  /* inbox actions join the flow (no overlay room on a phone) */
  .sig-act {
    position: static;
    transform: none;
    grid-column: 2;
    background: none;
    padding: 2px 0 0;
    translate: 0 4px;
  }
  .vg-toast { right: 12px; bottom: 52px; }
}

/* ---- F6 · the Athema human-review seal: the drawn check-circle (the same
   glyph the reviewers stamp with), teal, landing on the proof chip ---- */
.chip-ahr { position: relative; }
.ahr-seal {
  position: absolute;
  top: -13px;
  right: -11px;
  width: 25px;
  height: 25px;
  pointer-events: none;
  opacity: 1;
  transform: scale(1) rotate(-10deg);
  transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.2, 1.4, 0.35, 1);
}
.ahr-seal svg { width: 100%; height: 100%; display: block; }
.ahr-seal path { stroke: var(--teal); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ahr-seal.vg-hide { opacity: 0; transform: scale(1.6) rotate(0deg); transition: none; }
.ahr-seal.vg-fade { opacity: 0; transition: opacity 0.6s ease; }

/* ---- F4 · triage chips (the app inbox's language) ---- */
.sig { grid-template-columns: 24px 58px minmax(0, 1fr) auto; }
.sig-tri {
  align-self: start;
  justify-self: end;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--ink-3);
  white-space: nowrap;
  margin-top: 2px;
  transition: opacity 0.25s ease;
}
.sig-tri.done { color: var(--teal-deep); border-color: var(--teal-line); }
.sig-tri.you { color: var(--ember-deep); border-color: color-mix(in srgb, var(--ember) 50%, transparent); background: rgba(233, 112, 75, 0.06); }
.sig.vg-act-on .sig-tri { opacity: 0; } /* the revealed actions take the chip's place */
.sig-you { background: linear-gradient(90deg, rgba(233, 112, 75, 0.05), transparent 65%); border-radius: 8px; }

/* ---- F5 · the Now line + the harness strip ---- */
.board-narr {
  font-family: var(--serif-b);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
  margin: -8px 0 12px;
}
.board-narr strong { font-style: normal; font-weight: 500; color: var(--ink); }
.f5-harness { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.f5-gear { width: 19px; height: 19px; flex: none; transition: transform 1.1s cubic-bezier(0.3, 0.7, 0.2, 1); }
.f5-hcap { font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.f5-blip { font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--clay-deep); opacity: 0; transition: opacity 0.4s ease; }
.f5-blip.on { opacity: 1; }
@media (max-width: 640px) { .sig-tri { display: none; } }

/* ==================================================================
   Product screens — the F4/F5/F6 showcases ARE the app-surface
   prototype pages, embedded in ?showcase mode and scaled to fit
   (vignettes.js sizes them). The frame crops with a porcelain fade.
   ================================================================== */
.frame-stack { display: flex; flex-direction: column; gap: clamp(14px, 2.4svh, 24px); width: 100%; }
.frame-stack .sec-head { max-width: 780px; margin: 0 auto; }
.frame-stack .sec-head h2 { font-size: clamp(24px, 2.7vw, 34px); }
.frame-stack .sec-head .sub { margin-top: 10px; font-size: 15.5px; }
.frame-stack .owned-stack { margin-top: 58px; }
.frame-stack .owned-stack .reviewers { width: 58%; left: 16%; }
.screen-frame {
  /* the stage fills its split column; height-first, the camera fits the page */
  position: relative;
  height: clamp(420px, calc(100svh - 240px), 720px);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--porcelain-2), var(--porcelain));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 3px 8px -4px rgba(50, 47, 40, 0.16),
    0 30px 60px -34px rgba(50, 47, 40, 0.38);
  overflow: hidden;
}
.screen-cam {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.screen-cam.on { opacity: 1; }
.screen-frame iframe {
  display: block;
  border: 0;
  pointer-events: none;
  background: var(--paper);
}
.screen-spot {
  /* the focus vignette — fades in while the camera holds a close-up */
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(62% 56% at 50% 47%, rgba(244, 238, 225, 0) 58%, rgba(244, 238, 225, 0.42) 100%);
}
.screen-tag {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 9px;
  background: color-mix(in srgb, var(--porcelain) 82%, transparent);
}
.owned-stack .screen-frame { margin-top: 0; }


/* the reviewers' approval stamps — filled green (the system teal), paper check */
.reviewers .vg-stamp .stamp-fill { fill: var(--teal); stroke: var(--teal-deep); }
.reviewers .vg-stamp .stamp-check { stroke: var(--porcelain-2); fill: none; }

/* showcase splits: copy beside the stage, stage gets the width */
.split-show { grid-template-columns: minmax(0, 10fr) minmax(0, 19fr); }
.split-show.rev { grid-template-columns: minmax(0, 19fr) minmax(0, 10fr); }

/* the Outcome vignette: two reviewers stamping the PR sheet, under the copy */
.reviewers-doc { margin-top: 26px; max-width: 330px; }
.reviewers-doc svg { display: block; width: 100%; height: auto; }
.reviewers-doc .doc-sheet { fill: var(--porcelain-2); stroke: var(--ink-3); }
.reviewers-doc .vg-stamp .stamp-fill { fill: var(--teal); stroke: var(--teal-deep); }
.reviewers-doc .vg-stamp .stamp-check { stroke: var(--porcelain-2); fill: none; }

/* the owner's special stamp on the PR-sheet vignette */
.reviewers-doc .you-stamp .stamp-fill-you { fill: var(--ember); stroke: var(--ember-deep); }
.reviewers-doc .you-stamp .stamp-check { stroke: var(--porcelain-2); fill: none; }

/* the jargon toggle — a drawn checkbox beside the CTA */
.jargon-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.jargon-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.jt-box {
  width: 19px;
  height: 19px;
  flex: none;
  border: 1.4px solid var(--ink-3);
  border-radius: 5px 4px 5px 4px;
  background: var(--porcelain-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.jt-box svg { width: 12px; height: 12px; }
.jt-box svg path {
  stroke: var(--teal-deep);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
}
.jargon-toggle input:checked + .jt-box { border-color: var(--teal); background: var(--teal-wash); }
.jargon-toggle input:checked + .jt-box svg path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.35s ease-out; }
.jargon-toggle input:focus-visible + .jt-box { outline: 2px solid var(--teal); outline-offset: 2px; }
.jt-copy { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.jt-copy strong { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.jt-copy em { font-family: var(--serif-b); font-style: italic; font-size: 12.5px; color: var(--ink-3); }

/* jargon/plain copy pairs — html.plain flips every pair (copy only) */
.jp { display: none; }
html.plain .jt { display: none; }
html.plain .jp { display: inline; }

/* the pinned CTA — rides top-center once the second frame is passed */
.cta-pinned {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  left: 50%;
  z-index: 39;
  transform: translate(-50%, -12px);
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 14px 30px -14px rgba(207, 87, 50, 0.6);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.3, 0.7, 0.2, 1), visibility 0s 0.35s;
}
.cta-pinned.on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.3, 0.7, 0.2, 1);
}
@media (max-width: 899px) { .cta-pinned { display: none; } }
