/* ============================================================
   LAYERROOM · site v4 "The Studio Sheet"
   Identity: a working artboard from a design studio.
   Paper + ink + one red signal + guide blue. The app is the
   dark room; the page is the paper the studio designs on.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JBMono";
  src: url("assets/fonts/jbmono.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: optional; /* labels degrade to system mono rather than repaint late */
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f2eee5;
  --paper-hi: #faf7f0;
  --ink: #17130e;
  --ink-soft: #453f35;
  --ink-faint: #6b6456;
  --line: rgba(23, 19, 14, 0.16);
  --line-soft: rgba(23, 19, 14, 0.09);
  --red: #d92d1a;
  --red-deep: #b52413;
  --blue: #2f6bff;
  --room: #101013;
  --room-2: #17171c;
  --room-line: rgba(242, 238, 229, 0.14);
  --room-dim: rgba(242, 238, 229, 0.55);
  --ivory: #f4eddd;
  --walnut: #2c1a10;
  --espresso: #3a2114;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JBMono", "SF Mono", Menlo, monospace;
  --wrap: 1240px;
  --pad: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  background-image: linear-gradient(rgba(23, 19, 14, 0.03) 1px, transparent 1px);
  background-size: 100% 96px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--red); color: var(--paper-hi); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  font-family: var(--mono); font-size: 13px; text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 640; font-size: 15px;
  letter-spacing: 0.01em; text-decoration: none;
  padding: 13px 22px; border: 1px solid var(--ink);
  border-radius: 3px; transition: transform 0.18s var(--ease), background 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--paper-hi); }
.btn-ink:hover { background: var(--ink-soft); }
.btn-red { background: var(--red); border-color: var(--red-deep); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.btn-red:hover { background: var(--red-deep); box-shadow: 1px 1px 0 var(--ink); transform: translate(2px, 2px); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(242, 238, 229, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 14px; height: 60px; }
.wordmark {
  font-family: var(--sans); font-weight: 800; font-stretch: 112%;
  font-size: 17px; letter-spacing: 0.14em; text-decoration: none;
}
.wordmark span { color: var(--red); }
.topbar-chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--ink-faint); border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 2px; white-space: nowrap;
}
.topbar-cta { margin-left: auto; padding: 10px 16px; font-size: 14px; }
@media (max-width: 560px) { .topbar-chip { display: none; } }

/* ============================================================
   SHEET 01 · HERO
   ============================================================ */
.hero { padding: 44px 0 26px; position: relative; }
.hero-grid {
  display: grid; gap: 26px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "lead" "run" "after";
}
.hero-lead { grid-area: lead; min-width: 0; }
.hero-after { grid-area: after; min-width: 0; }
.run-col { grid-area: run; min-width: 0; }

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--red); flex: none; }

.h1 { margin-top: 18px; font-weight: 850; line-height: 0.92; letter-spacing: -0.005em; }
.h1-line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.h1-serif.h1-line { padding-bottom: 0.16em; }
.h1-in { display: inline-block; }
/* CSS-only entrance: paints without waiting for JS (LCP), dies under reduced motion */
@keyframes h1up { from { transform: translateY(110%); } to { transform: none; } }
.h1-line .h1-in { animation: h1up 0.85s var(--ease) both; }
.h1-line:nth-child(1) .h1-in { animation-delay: 0.1s; }
.h1-line:nth-child(2) .h1-in { animation-delay: 0.22s; }
.h1-line:nth-child(3) .h1-in { animation-delay: 0.36s; }
.h1-line:not(.h1-serif) .h1-in {
  font-stretch: 66%;
  text-transform: uppercase;
  font-size: clamp(46px, 13.2vw, 102px);
}
.h1-dot { font-style: normal; color: var(--red); }
.h1-serif { margin-top: 0.32em; }
.h1-serif .h1-in {
  font-family: var(--serif); font-style: italic; font-weight: 480;
  font-size: clamp(27px, 7.4vw, 46px);
  letter-spacing: 0; line-height: 1.12; color: var(--red);
}

.lede {
  margin-top: 20px; font-size: 17px; line-height: 1.6;
  color: var(--ink-soft); max-width: 46ch;
}

/* ---------- Signup ---------- */
.signup { margin-top: 26px; max-width: 470px; }
.signup-row { display: flex; gap: 10px; }
.signup-input {
  flex: 1; min-width: 0; font: inherit; font-size: 15.5px;
  padding: 13px 14px; border: 1px solid var(--ink);
  border-radius: 3px; background: var(--paper-hi); color: var(--ink);
}
.signup-input::placeholder { color: var(--ink-faint); }
.signup-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.signup-btn { flex: none; }
.signup-msg { margin-top: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.01em; }
.signup.is-error .signup-msg { color: var(--red-deep); }
.signup.is-success .signup-msg { color: var(--ink); }
.signup.is-success .signup-msg::before { content: "✓ "; color: var(--red); }
@media (max-width: 480px) {
  .signup-row { flex-direction: column; }
  .signup-btn { width: 100%; }
}

/* ============================================================
   THE RUN · the staged demo, big and legible
   ============================================================ */
.run-col { margin: 6px calc(-1 * var(--pad)) 0; }
.run {
  background: var(--room);
  background-image: radial-gradient(rgba(242, 238, 229, 0.07) 1px, transparent 1.4px);
  background-size: 22px 22px;
  border: 1px solid var(--ink);
  color: var(--paper);
  overflow: hidden;
  position: relative;
}
@media (min-width: 720px) { .run-col { margin: 6px 0 0; } .run { border-radius: 8px; box-shadow: 6px 6px 0 rgba(23,19,14,0.9); } }

.run-top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--room-line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--room-dim); background: var(--room-2);
}
.run-id { font-weight: 500; color: var(--paper); }
.run-live { display: inline-flex; align-items: center; gap: 6px; color: var(--paper); }
.run-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.run-meta { margin-left: auto; }
@media (max-width: 520px) { .run-meta { display: none; } .run-live { margin-left: auto; } }

.run-stage { position: relative; padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 14px; }

/* Brief bar */
.brief {
  display: flex; align-items: baseline; gap: 10px;
  border: 1px solid var(--room-line); border-radius: 4px;
  padding: 11px 13px; background: rgba(242, 238, 229, 0.04);
  min-height: 44px;
}
.brief-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--red); flex: none; }
.brief-t {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--paper);
  flex: 1; min-width: 0; overflow-wrap: break-word;
  min-height: 4.5em; /* three lines reserved: the typing brief never shifts the board */
}
@media (min-width: 720px) { .brief-t { min-height: 3em; } }
.caret { display: inline-block; width: 7px; height: 13px; background: var(--red); vertical-align: -2px; margin-left: 2px; opacity: 0; }
.caret.blink { opacity: 1; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Cast ticker */
.cast { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.cast li {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--mono); font-size: 12px; line-height: 1.45;
  color: var(--room-dim); opacity: 0.52;
  transition: opacity 0.4s, color 0.4s;
}
.cast li::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  border: 1px solid var(--room-dim); align-self: center;
  transition: background 0.3s, border-color 0.3s;
}
.cast li b { font-weight: 500; color: inherit; flex: none; }
.cast li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast li.on { opacity: 1; color: var(--paper); }
.cast li.on::before { background: var(--red); border-color: var(--red); animation: pulse 1s infinite; }
.cast li.done { opacity: 0.8; color: var(--room-dim); }
.cast li.done::before { background: var(--paper); border-color: var(--paper); animation: none; }

/* Board zone */
.board-zone { position: relative; display: grid; place-items: center; padding: 8px 0 4px; }
.board-zone::before {
  content: "board 1 · 1080 × 1350";
  position: absolute; width: min(74vw, 300px); aspect-ratio: 4 / 5;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  border: 1px dashed rgba(242, 238, 229, 0.25); border-radius: 2px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: rgba(242, 238, 229, 0.35);
  transition: opacity 0.5s;
}
.run.p-board .board-zone::before, .run.p-check .board-zone::before, .run.p-ship .board-zone::before { opacity: 0; }
.board {
  position: relative; width: min(74vw, 300px); aspect-ratio: 4 / 5;
  background: transparent; z-index: 2;
  transform: scale(0.94); opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.run.p-board .board, .run.p-check .board, .run.p-ship .board { transform: scale(1); opacity: 1; }

/* guides */
.bd-guides { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.bd-guides i { position: absolute; background: var(--blue); opacity: 0; transition: opacity 0.4s, transform 0.6s var(--ease); }
.bd-guides .gx { left: 0; right: 0; height: 1px; transform: scaleX(0); }
.bd-guides .gy { top: 0; bottom: 0; width: 1px; transform: scaleY(0); }
.bd-guides .g1 { top: 8%; } .bd-guides .g2 { bottom: 9%; }
.bd-guides .g3 { left: 8%; } .bd-guides .g4 { right: 8%; }
.run.g-on .bd-guides i { opacity: 0.55; transform: none; }

/* layers */
.bd-layer { position: absolute; opacity: 0; transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.bd-layer.in { opacity: 1; transform: none; }
.bd-bg { inset: 0; background: var(--ivory); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); transform: translateY(10px); }
.bd-photo { inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }
.bd-kicker {
  top: 6.5%; left: 8%; right: 8%; transform: translateY(-8px);
  display: flex; flex-direction: column; gap: 3px;
}
.bd-kicker b { font-family: var(--sans); font-weight: 800; font-stretch: 80%; font-size: clamp(11px, 3vw, 15px); letter-spacing: 0.06em; color: var(--walnut); }
.bd-kicker span { font-family: var(--mono); font-size: clamp(6.5px, 1.75vw, 9px); letter-spacing: 0.14em; color: rgba(44, 26, 16, 0.62); }
.bd-head {
  top: 21%; left: 8%; right: 8%;
  font-family: var(--serif); font-weight: 560; line-height: 1.02;
  font-size: clamp(30px, 8.4vw, 46px); color: var(--walnut);
  letter-spacing: -0.01em;
}
.bd-head em { font-style: italic; font-weight: 420; }
.run .bd-head { transform: translateY(20px); } /* enters */
.run .bd-head.in { transform: translateY(9px); } /* lands low on purpose · QA will fix it */
.run.fixed .bd-head.in { transform: translateY(0); }
.bd-foot {
  left: 8%; right: 8%; bottom: 6.5%; transform: translateY(8px);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.bd-foot span { font-family: var(--mono); font-size: clamp(6.5px, 1.8vw, 9px); letter-spacing: 0.05em; color: rgba(44, 26, 16, 0.72); max-width: 55%; }
.bd-badge {
  font-family: var(--sans); font-weight: 700; font-size: clamp(9px, 2.4vw, 12px);
  letter-spacing: 0.03em; color: var(--ivory); background: var(--espresso);
  padding: 0.6em 1.1em; border-radius: 999px; white-space: nowrap;
  transition: background 0.4s, transform 0.4s var(--ease);
}

/* selection outline + handles */
.bd-select { position: absolute; z-index: 7; border: 1.5px solid var(--blue); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.bd-select.show { opacity: 1; }
.bd-select .h { position: absolute; width: 7px; height: 7px; background: #fff; border: 1.5px solid var(--blue); }
.bd-select .h1 { top: -4px; left: -4px; } .bd-select .h2 { top: -4px; right: -4px; }
.bd-select .h3 { bottom: -4px; left: -4px; } .bd-select .h4 { bottom: -4px; right: -4px; }

/* layer tag readout */
.layer-tag {
  position: absolute; z-index: 8; left: 50%; bottom: -6px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  background: var(--ink); color: var(--paper); border: 1px solid var(--room-line);
  padding: 4px 9px; border-radius: 3px; white-space: nowrap;
  opacity: 0; transition: opacity 0.25s;
}
.layer-tag.show { opacity: 1; }

/* QA annotation */
.bd-flag { position: absolute; z-index: 9; top: 40%; left: 4%; display: flex; align-items: center; gap: 7px; opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s var(--ease); }
.bd-flag.show { opacity: 1; transform: none; }
.bd-flag-pin { width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(217, 45, 26, 0.25); flex: none; }
.bd-flag-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  background: var(--red); color: #fff; padding: 4px 8px; border-radius: 3px;
  white-space: nowrap;
}
.bd-ruler {
  position: absolute; z-index: 8; left: 8%; right: 8%; top: 47%;
  border-top: 1.5px dashed var(--red); opacity: 0; transition: opacity 0.35s;
}
.bd-ruler::after {
  content: "safe margin"; position: absolute; right: 0; top: 3px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; color: var(--red);
}
.bd-ruler.show { opacity: 0.9; }

/* PASS stamp */
.bd-stamp {
  position: absolute; z-index: 10; right: 5%; top: 8%;
  font-family: var(--sans); font-weight: 850; font-stretch: 75%;
  font-size: 15px; letter-spacing: 0.12em; color: var(--red);
  border: 2.5px solid var(--red); border-radius: 4px; padding: 7px 10px 6px;
  transform: rotate(-8deg) scale(1.6); opacity: 0;
  display: flex; flex-direction: column; gap: 1px;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(244, 237, 221, 0.82);
}
.bd-stamp b { font-family: var(--mono); font-weight: 500; font-size: 8.5px; letter-spacing: 0.08em; }
.bd-stamp.show { opacity: 1; transform: rotate(-8deg) scale(1); }

/* crop marks */
.bd-crops i { position: absolute; width: 16px; height: 16px; z-index: 5; opacity: 0; transition: opacity 0.4s, transform 0.5s var(--ease); }
.bd-crops i::before, .bd-crops i::after { content: ""; position: absolute; background: var(--paper); }
.bd-crops i::before { width: 100%; height: 1.5px; } .bd-crops i::after { width: 1.5px; height: 100%; }
.bd-crops i:nth-child(1) { top: -22px; left: -22px; } .bd-crops i:nth-child(1)::before { bottom: 0; } .bd-crops i:nth-child(1)::after { right: 0; }
.bd-crops i:nth-child(2) { top: -22px; right: -22px; } .bd-crops i:nth-child(2)::before { bottom: 0; } .bd-crops i:nth-child(2)::after { left: 0; }
.bd-crops i:nth-child(3) { bottom: -22px; left: -22px; } .bd-crops i:nth-child(3)::before { top: 0; } .bd-crops i:nth-child(3)::after { right: 0; }
.bd-crops i:nth-child(4) { bottom: -22px; right: -22px; } .bd-crops i:nth-child(4)::before { top: 0; } .bd-crops i:nth-child(4)::after { left: 0; }
.bd-crops.show i { opacity: 0.9; }

/* ghost boards (the rest of the set) */
.board-ghost {
  position: absolute; width: min(74vw, 300px); aspect-ratio: 4 / 5;
  background: var(--ivory); opacity: 0; z-index: 1;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.run.shipped .bg-1 { opacity: 0.5; transform: rotate(-4deg) translate(-14px, 6px); }
.run.shipped .bg-2 { opacity: 0.28; transform: rotate(4deg) translate(16px, 10px); }

/* export chip */
.ship-chip {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--room-line); border-radius: 4px;
  background: rgba(242, 238, 229, 0.06); padding: 10px 13px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.ship-chip.show { opacity: 1; transform: none; }
.ship-tick { width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; flex: none; }
.ship-body { display: flex; flex-direction: column; }
.ship-body b { font-family: var(--mono); font-size: 12px; color: var(--paper); }
.ship-body em { font-family: var(--mono); font-style: normal; font-size: 10.5px; color: var(--room-dim); }

/* phase rail */
.run-rail {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; border-top: 1px solid var(--room-line);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--room-dim); background: var(--room-2);
}
.run-rail span { position: relative; padding-bottom: 2px; transition: color 0.3s; }
.run-rail span::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.run-rail span.on { color: var(--paper); }
.run-rail span.on::after { transform: scaleX(1); }
.run-replay { margin-left: auto; background: none; border: none; color: var(--room-dim); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; opacity: 0; transition: opacity 0.3s, color 0.2s; pointer-events: none; }
.run.shipped .run-replay { opacity: 1; pointer-events: auto; }
.run-replay:hover { color: var(--paper); }

/* offscreen: every idle CSS animation inside the run pauses */
.run.off, .run.off * { animation-play-state: paused !important; }

.run-caption {
  margin: 12px var(--pad) 0; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.03em; color: var(--ink-faint);
}
@media (min-width: 720px) { .run-caption { margin: 12px 2px 0; } }

/* Hero desktop layout */
@media (min-width: 980px) {
  .hero { padding: 68px 0 40px; }
  .hero-grid {
    grid-template-columns: minmax(400px, 460px) 1fr;
    grid-template-areas: "lead run" "after run";
    gap: 8px 56px; align-items: start; align-content: start;
  }
  .hero-after { align-self: end; padding-bottom: 8px; }
  .h1-line:not(.h1-serif) .h1-in { font-size: clamp(72px, 6.4vw, 92px); }
  .h1-serif .h1-in { font-size: 40px; }
  .run-stage { padding: 20px 22px 22px; display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr auto; gap: 16px 22px; }
  .brief { grid-column: 1 / -1; }
  .cast { grid-row: 2; align-self: start; gap: 10px; }
  .cast li { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 12.5px; padding-left: 14px; position: relative; }
  .cast li::before { position: absolute; left: 0; top: 6px; }
  .cast li span { white-space: normal; }
  .board-zone { grid-row: 2; padding: 10px 0; }
  .board, .board-ghost { width: min(30vw, 380px); }
  .ship-chip { grid-column: 1 / -1; justify-self: start; min-width: 320px; }
}

/* ============================================================
   SHEETS · shared grammar
   ============================================================ */
.sheet { padding: 76px 0 70px; border-top: 1px solid var(--line); position: relative; }
.sheet-no {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-faint);
}
.sheet-no::before { content: ""; width: 9px; height: 9px; background: var(--red); flex: none; }
.sheet-head { margin-bottom: 34px; }
.h2 {
  margin-top: 14px;
  font-weight: 850; font-stretch: 70%; text-transform: uppercase;
  font-size: clamp(37px, 9.2vw, 64px); line-height: 0.95; letter-spacing: 0;
}
.sheet-sub { margin-top: 16px; font-size: 16.5px; line-height: 1.6; color: var(--ink-soft); max-width: 56ch; }

/* ---------- SHEET 02 · phases ---------- */
.phases { margin: 0 calc(-1 * var(--pad)); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.phases::-webkit-scrollbar { display: none; }
.phase-row { list-style: none; display: flex; gap: 12px; padding: 4px var(--pad) 12px; min-width: min-content; }
.phase {
  flex: none; width: 244px; scroll-snap-align: start;
  border: 1px solid var(--ink); background: var(--paper-hi);
  padding: 18px 18px 20px; border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(23, 19, 14, 0.12);
}
.ph-n {
  font-family: var(--sans); font-weight: 850; font-stretch: 66%;
  font-size: 40px; line-height: 1; color: var(--red);
}
.phase h3 { margin-top: 10px; font-weight: 800; font-stretch: 85%; text-transform: uppercase; font-size: 17px; letter-spacing: 0.05em; }
.phase p { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.crew-line { margin-top: 22px; font-size: 15px; line-height: 1.65; color: var(--ink-soft); max-width: 62ch; border-left: 3px solid var(--red); padding-left: 16px; }
@media (min-width: 980px) {
  .phase-row { display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: 4px; }
  .phase { width: auto; }
  .phases { overflow: visible; margin: 0; }
}

/* ---------- SHEET 03 · the work ---------- */
.sheet-work { padding-bottom: 84px; }
.deck-block { margin-top: 8px; }
.deck-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.case-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-faint); }
.deck-count { font-family: var(--sans); font-weight: 850; font-stretch: 66%; font-size: 26px; color: var(--ink); flex: none; }
.deck-wrap { position: relative; }
.deck {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;      /* momentum on iOS */
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab; touch-action: pan-x;
  padding: 6px max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad))) 18px;
}
.deck.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.deck::-webkit-scrollbar { display: none; }
.deck-slide { flex: none; width: min(76vw, 400px); scroll-snap-align: center; position: relative; }
.deck-slide img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border: 1px solid var(--line); box-shadow: 6px 6px 0 rgba(23, 19, 14, 0.14);
  -webkit-user-drag: none; user-select: none;
}
.case-note { margin-top: 6px; font-size: 15px; color: var(--ink-soft); }

/* dark set · same deck mechanics, dark band, square boards */
.strip-block { margin-top: 56px; }
.deck-wrap-dark { background: var(--room); }
.deck-dark { padding-top: 26px; padding-bottom: 26px; }
.deck-dark .deck-slide { width: min(74vw, 380px); }
.deck-dark .deck-slide img {
  aspect-ratio: 1 / 1; border-color: var(--room-line);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
}

/* desktop swipe affordance · injected by JS, hidden where there is no hover (touch) */
.deck-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; z-index: 4; display: none; place-items: center;
  background: rgba(242, 238, 229, 0.92); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 50%;
  font-family: var(--sans); font-size: 22px; line-height: 1; padding-bottom: 3px;
  box-shadow: 2px 2px 0 rgba(23, 19, 14, 0.25);
  transition: transform 0.15s var(--ease), background 0.15s, opacity 0.2s;
}
.deck-prev { left: 14px; }
.deck-next { right: 14px; }
.deck-arrow:hover { background: #fff; }
.deck-arrow:active { transform: translateY(-50%) scale(0.94); }
.deck-arrow:disabled { opacity: 0.26; cursor: default; box-shadow: none; }
.deck-wrap-dark .deck-arrow { background: rgba(23, 19, 14, 0.82); color: var(--paper); border-color: var(--room-line); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); }
.deck-wrap-dark .deck-arrow:hover { background: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .deck-arrow { display: grid; }
}

/* ---------- SHEET 04 · the exploded file (pinned scroll scene) ---------- */
.sheet-file { background: var(--paper-hi); }
.xp { height: 300vh; margin-top: -40px; }
.xp-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.xp-head { width: 100%; margin-bottom: 8px; }
.xp-head .h2 { font-size: clamp(30px, 7.6vw, 54px); }
.xp-stage {
  flex: none; display: grid; place-items: center;
  perspective: 1300px; padding: 26px 0 10px;
}
.xp-board {
  position: relative; width: min(56vw, 300px); aspect-ratio: 4 / 5;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--sep, 0) * 42deg)) rotateZ(calc(var(--sep, 0) * -9deg)) scale(calc(1 - var(--sep, 0) * 0.1));
}
.xp-l {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: translateZ(calc(var(--sep, 0) * (var(--i) * 52px)));
  will-change: transform;
}
.xp-l > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xp-l:nth-child(1) .xpl-bg { position: absolute; inset: 0; background: var(--ivory); box-shadow: 0 24px 60px rgba(23, 19, 14, calc(0.18 + var(--sep, 0) * 0.2)); }
/* each content layer only paints its own element */
.xp-l:not(:nth-child(1)):not(:nth-child(2)) { pointer-events: none; }
.xpl-kicker { position: absolute; top: 6.5%; left: 8%; right: 8%; display: flex; flex-direction: column; gap: 3px; }
.xpl-kicker b { font-weight: 800; font-stretch: 80%; font-size: clamp(11px, 2.4vw, 15px); letter-spacing: 0.06em; color: var(--walnut); }
.xpl-kicker span { font-family: var(--mono); font-size: clamp(6.5px, 1.5vw, 9px); letter-spacing: 0.14em; color: rgba(44, 26, 16, 0.62); }
.xpl-head { position: absolute; top: 21%; left: 8%; right: 8%; font-family: var(--serif); font-weight: 560; line-height: 1.02; font-size: clamp(26px, 6.6vw, 44px); color: var(--walnut); letter-spacing: -0.01em; }
.xpl-head em { font-style: italic; font-weight: 420; }
.xpl-meta { position: absolute; left: 8%; bottom: 8%; max-width: 52%; font-family: var(--mono); font-size: clamp(6.5px, 1.5vw, 9px); letter-spacing: 0.05em; color: rgba(44, 26, 16, 0.72); }
.xpl-badge { position: absolute; right: 8%; bottom: 6.5%; font-weight: 700; font-size: clamp(9px, 2vw, 12px); color: var(--ivory); background: var(--espresso); padding: 0.6em 1.1em; border-radius: 999px; }
.xp-chip {
  position: absolute; right: -12px; top: 50%;
  transform: translate(100%, -50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  background: var(--ink); color: var(--paper); padding: 4px 8px; border-radius: 3px;
  white-space: nowrap;
  opacity: clamp(0, calc((var(--sep, 0) - 0.35 - var(--i) * 0.07) * 7), 1);
}
.xp-chip::before { content: ""; position: absolute; left: -14px; top: 50%; width: 14px; height: 1px; background: var(--ink); }
.xp-chip-l { right: auto; left: -12px; transform: translate(-100%, -50%); }
.xp-chip-l::before { left: auto; right: -14px; }
.xp-l:nth-child(2) .xp-chip { top: 68%; }
.xp-l:nth-child(4) .xp-chip { top: 26%; }
.xp-l:nth-child(6) .xp-chip { top: 88%; }
.xp-l:nth-child(1) .xp-chip { top: 62%; }
.xp-l:nth-child(3) .xp-chip { top: 40%; }
.xp-l:nth-child(5) .xp-chip { top: 88%; }
/* mobile: chips ride the layer edges so nothing leaves the viewport */
@media (max-width: 979px) {
  .xp-chip { right: 5px; transform: translateY(-50%); font-size: 9px; }
  .xp-chip::before { display: none; }
  .xp-chip-l { left: 5px; right: auto; transform: translateY(-50%); }
}
.xp-line {
  margin-top: 22px;
  font-family: var(--serif); font-size: clamp(19px, 4.6vw, 27px); line-height: 1.25;
  color: var(--ink); opacity: var(--line, 0);
  transform: translateY(calc((1 - var(--line, 0)) * 14px));
}
.xp-line em { font-style: italic; color: var(--red); }
@media (min-width: 980px) {
  .xp-sticky { flex-direction: row; align-items: center; justify-content: center; gap: 90px; }
  .xp-head { width: 400px; margin: 0; }
  .xp-board { width: min(30vw, 360px); }
  .xp-l { transform: translateZ(calc(var(--sep, 0) * (var(--i) * 64px))); }
  .xp-line { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .xp { height: auto; }
  .xp-sticky { position: static; height: auto; padding: 20px 0 40px; }
  .xp-board, .xp-l, .xp-chip, .xp-line { --sep: 0.85; --line: 1; }
}

.h3-file { font-weight: 850; font-stretch: 70%; text-transform: uppercase; font-size: clamp(26px, 6.4vw, 40px); line-height: 0.98; }
.file-grid {
  display: grid; gap: 30px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "fcopy" "fboard" "fside";
}
.file-copy { grid-area: fcopy; }
.file-side { grid-area: fside; }
.file-board-wrap { grid-area: fboard; }
.file-actions { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.edit-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; background: var(--paper); border: 1px solid var(--ink);
  border-radius: 4px; padding: 12px 16px; font-weight: 640; font-size: 15px;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.2s;
  box-shadow: 3px 3px 0 rgba(23, 19, 14, 0.16);
}
.edit-btn:hover { background: #fff; }
.edit-btn:active, .edit-btn.live { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(23, 19, 14, 0.16); }
.edit-btn.live { border-color: var(--red); }
.eb-k { font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: 0.12em; color: var(--ink-faint); }
.file-note { margin-top: 20px; font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--ink-faint); max-width: 44ch; }
.file-board-wrap { position: relative; display: grid; place-items: center; padding: 8px 0 20px; }
.board-static { transform: none; opacity: 1; width: min(80vw, 360px); box-shadow: 8px 8px 0 rgba(23, 19, 14, 0.16); }
.board-static .bd-layer { transform: none; }
.board-static .bd-head, .run-less .bd-head { transform: none; }
.board-static .bd-head { transition: opacity 0.4s; }
.board-static .bd-head.swap-out { opacity: 0; }
.board-static.accent-red .bd-badge { background: var(--red); }
.board-static.badge-left .bd-foot { flex-direction: row-reverse; }
.file-tag { bottom: 4px; }
@media (min-width: 980px) {
  .file-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "fcopy fboard" "fside fboard";
    align-items: start; align-content: center; gap: 12px 64px;
  }
  .board-static { width: min(34vw, 420px); }
}

/* ---------- SHEET 05 · inspection ---------- */
.sheet-qa { background: var(--ink); color: var(--paper); border-top: none; }
.sheet-qa .sheet-no { color: rgba(242, 238, 229, 0.55); }
.qa-grid { display: grid; gap: 36px; }
.qa-big { margin-top: 18px; line-height: 0.9; }
.qa-big b { font-family: var(--sans); font-weight: 880; font-stretch: 64%; font-size: clamp(110px, 30vw, 230px); letter-spacing: -0.01em; }
.qa-big i { font-style: normal; font-weight: 880; font-stretch: 64%; font-size: clamp(64px, 17vw, 130px); color: var(--red); vertical-align: 0.35em; }
.qa-big span { display: block; margin-top: 12px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(242, 238, 229, 0.6); max-width: 34ch; line-height: 1.6; }
.sheet-qa .sheet-sub { color: rgba(242, 238, 229, 0.78); }
.qa-receipt { list-style: none; margin-top: 26px; border: 1px solid rgba(242, 238, 229, 0.2); border-radius: 4px; overflow: hidden; }
.qa-receipt li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; font-family: var(--mono); font-size: 12px;
  border-bottom: 1px solid rgba(242, 238, 229, 0.12);
}
.qa-receipt li:last-child { border-bottom: none; }
.qr-flag, .qr-pass { flex: none; font-size: 10px; letter-spacing: 0.12em; padding: 3px 7px; border-radius: 2px; }
.qr-flag { background: var(--red); color: #fff; }
.qr-pass { background: var(--paper); color: var(--ink); }
.qr-what { color: var(--paper); }
.qr-then { color: rgba(242, 238, 229, 0.55); margin-left: auto; }
.qa-fine { margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: rgba(242, 238, 229, 0.45); }
@media (min-width: 980px) {
  .qa-grid { grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
}

/* ---------- SHEET 06 · the room ---------- */
.sheet-room { padding-bottom: 0; }
.room-shot { margin-top: 10px; background: var(--room); padding: clamp(18px, 4vw, 44px) 0; overflow-x: auto; scrollbar-width: none; }
.room-shot::-webkit-scrollbar { display: none; }
.room-shot img { min-width: 880px; width: 100%; max-width: 1360px; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin: 0 auto; padding: 0 var(--pad); }
.room-hint { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-faint); margin-top: 10px; text-align: center; }
@media (min-width: 940px) { .room-hint { display: none; } }
.room-crops { display: grid; gap: 22px; padding-top: 34px; padding-bottom: 70px; }
.crop-label { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 10px; }
.crop-win { position: relative; overflow: hidden; aspect-ratio: 5 / 4; border: 1px solid var(--ink); background: var(--room); box-shadow: 5px 5px 0 rgba(23, 19, 14, 0.14); }
.crop-win img { position: absolute; max-width: none; height: auto; aspect-ratio: 16 / 10; }
.crop-layers img { width: 560%; left: -2%; top: -6%; }
.crop-team img { width: 470%; right: -2%; top: 0; }
@media (min-width: 720px) { .room-crops { grid-template-columns: 1fr 1fr; gap: 28px; max-width: 1020px; } }

/* ---------- power strip ---------- */
.power { border-top: 1px solid var(--line); background: var(--paper); }
.power-in { padding: 26px var(--pad); }
.power p { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink-faint); letter-spacing: 0.02em; }
.power b { color: var(--ink); font-weight: 500; border: 1px solid var(--line); padding: 2px 7px; border-radius: 2px; }

/* ---------- SHEET 07 · cohort ---------- */
.sheet-cohort { background: var(--ink); color: var(--paper); border-top: none; padding: 84px 0 90px; }
.sheet-cohort .sheet-no { color: rgba(242, 238, 229, 0.55); }
.sheet-cohort .sheet-sub { color: rgba(242, 238, 229, 0.78); }
.cohort-grid { display: grid; gap: 48px; }
.signup-dark .signup-input { background: rgba(242, 238, 229, 0.07); border-color: rgba(242, 238, 229, 0.4); color: var(--paper); }
.signup-dark .signup-input::placeholder { color: rgba(242, 238, 229, 0.45); }
.signup-dark .signup-msg { color: rgba(242, 238, 229, 0.55); }
.signup-dark.is-success .signup-msg { color: var(--paper); }
.signup-dark.is-error .signup-msg { color: #ff8a7a; }
.signup-dark .btn-red { box-shadow: 3px 3px 0 rgba(242, 238, 229, 0.35); }
.cohort-sign { border-left: 3px solid var(--red); padding-left: 20px; align-self: center; }
.sign-serif { font-family: var(--serif); font-style: italic; font-weight: 420; font-size: clamp(22px, 5.4vw, 30px); line-height: 1.3; }
.sign-by { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: rgba(242, 238, 229, 0.55); }
@media (min-width: 980px) { .cohort-grid { grid-template-columns: 3fr 2fr; gap: 80px; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--paper); }
.foot-in { padding: 34px var(--pad) 40px; display: flex; flex-direction: column; gap: 18px; }
.wordmark-foot { font-size: 15px; }
.wordmark-foot span { color: var(--red-deep); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-nav a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--red-deep); text-decoration: underline; }
.foot-fine { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
@media (min-width: 720px) {
  .foot-in { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ============================================================
   Motion · reveals
   ============================================================ */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv-line { transform: translateY(110%); transition: transform 0.85s var(--ease); display: inline-block; }
.js .rv-line.in { transform: none; }

/* ============================================================
   Reduced motion · full stop, final states
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js .rv-line { opacity: 1; transform: none; }
  .board, .board-ghost { opacity: 1; transform: none; }
  .run .bd-head, .run .bd-head.in { transform: none; }
}
