/* Set in Type: white stock, black ink, vermilion for marks, blue for type not yet OK'd. */

@font-face {
  font-family: 'League Gothic';
  src: url('../fonts/league-gothic-400.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Libre Franklin';
  src: url('../fonts/libre-franklin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Alfa Slab One';
  src: url('../fonts/alfa-slab-one-400.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #111111;
  --paper: #ffffff;
  --red: #d23b1b;
  --blue: #1d46c8;
  --rule: #dcdcdc;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 500 1.0625rem/1.55 'Libre Franklin', system-ui, sans-serif;
  background: var(--paper);
}
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.4rem;
  padding: 0.85rem var(--gutter);
  font: 400 1.3rem/1.1 'League Gothic', sans-serif;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--ink);
}
.topline .wordmark { font-family: 'Alfa Slab One', serif; font-size: 1.05rem; letter-spacing: 0.02em; }
.topline a { text-decoration: none; border-bottom: 2px solid var(--ink); }
.topline .here { color: var(--red); }

/* Opening: a frame. The chase holds the title as if it were set. */
.open {
  min-height: calc(100svh - 3.4rem);
  display: grid;
  place-items: center;
  padding: clamp(16px, 4svh, 48px) var(--gutter);
}
.chase {
  width: min(1120px, 100%);
  border: clamp(8px, 1.1vw, 14px) solid var(--ink);
  padding: clamp(18px, 4.2vw, 64px);
}
.chase h1 {
  margin: 0 0 0.35em;
  font: 400 clamp(2.1rem, min(7vw, 11svh), 6.2rem)/1.02 'Alfa Slab One', serif;
  letter-spacing: 0.005em;
}
.chase p { margin: 0; max-width: 34em; font-size: clamp(1rem, min(1.7vw, 3.2svh), 1.35rem); line-height: 1.45; }

/* Pinned scenes: the stage is sticky inside a tall container that sets its travel. */
.scene { position: relative; }
.scene-set { height: 480svh; }
.scene-runs { height: 230svh; }
.scene-checks { height: 200svh; }
.scene-adds { height: 160svh; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.stage > svg { display: block; width: 100%; height: 100%; }

/* Reduced motion: each scene is a column of stills taken from the score. */
.stills .scene { height: auto; padding: 24px var(--gutter); }
.stills .scene > div { position: static; height: auto; overflow: visible; display: grid; gap: 20px; }
.still { margin: 0; border: 2px solid var(--ink); }
.still svg { display: block; width: 100%; height: auto; }

/* Your turn at the case. */
.try {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 140px) var(--gutter) clamp(48px, 8vw, 110px);
  border-top: 2px solid var(--ink);
}
.try h2, .close h2 {
  margin: 0 0 0.4rem;
  font: 400 clamp(2rem, 4.6vw, 3.6rem)/1.02 'Alfa Slab One', serif;
}
.try .lede { margin: 0 0 clamp(24px, 4vw, 48px); max-width: 38em; font-size: clamp(1.02rem, 1.5vw, 1.2rem); }
.try-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.try-grid .art { border: 10px solid var(--ink); }
.try-grid .mini { display: block; width: 100%; height: auto; }
@media (max-width: 880px) {
  .try-grid { grid-template-columns: minmax(0, 1fr); }
}

.proof { display: grid; gap: 0; }
.line { border-top: 2px solid var(--ink); padding: 14px 0 18px; }
.line .who { font: 400 1.05rem/1 'League Gothic', sans-serif; letter-spacing: 0.05em; color: var(--red); margin-bottom: 8px; }
.words {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em 0.32em;
  font: 400 clamp(1.7rem, 3.1vw, 2.5rem)/1.12 'League Gothic', sans-serif;
  letter-spacing: 0.02em;
  text-shadow: 0 -0.5px 0 rgba(0, 0, 0, 0.18);
}
.slot {
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 0.04em 0.28em 0;
  cursor: pointer;
  min-height: 44px;
}
.slot.blue { color: var(--blue); border-style: solid; border-color: var(--blue); }
.slot:hover { border-color: var(--blue); }
.slot.refuse { animation: refuse 0.36s ease-out; }
@keyframes refuse { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.was { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 3px; }
.set-blue { color: var(--blue); }
.set-ink { color: var(--ink); }
.initials { display: inline-flex; gap: 2px; }
.initial { width: 1.1em; height: 1.4em; }

.case { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.block {
  font: 400 1.25rem/1 'League Gothic', sans-serif;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: inset 0 -4px 0 #d9d9d9;
  padding: 0.5em 0.62em 0.46em;
  min-height: 44px;
  cursor: pointer;
  transition: transform 0.14s ease-out, border-color 0.14s, color 0.14s;
}
.block:hover { border-color: var(--blue); }
.block[aria-pressed='true'] { transform: translateY(-4px); border-color: var(--blue); color: var(--blue); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.stamp {
  font: 400 1.2rem/1 'League Gothic', sans-serif;
  letter-spacing: 0.08em;
  color: var(--red);
  background: var(--paper);
  border: 2px solid var(--red);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4.5px var(--red);
  padding: 0.62em 0.9em 0.55em;
  min-height: 44px;
  cursor: pointer;
}
.stamp:hover { background: #fbe9e4; box-shadow: inset 0 0 0 3px #fbe9e4, inset 0 0 0 4.5px var(--red); }
.stamp:disabled { color: #8a8a8a; border-color: #bdbdbd; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4.5px #bdbdbd; cursor: default; }
.count { font: 400 1.2rem/1 'League Gothic', sans-serif; letter-spacing: 0.05em; }

.struck { display: grid; gap: 4px; margin-top: 6px; }
.struck-line { display: flex; align-items: center; gap: 8px; font: 400 1.35rem/1.1 'League Gothic', sans-serif; letter-spacing: 0.02em; }
.struck-line s { text-decoration-color: var(--red); text-decoration-thickness: 3px; }
.dele { color: var(--red); font: 600 1.3rem/1 'Libre Franklin', sans-serif; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.status { min-height: 3em; margin: 14px 0 6px; font-weight: 600; }
.kept { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--ink); font-size: 0.97rem; }
.kept li { padding: 7px 0 7px 1.4em; border-bottom: 1px solid var(--rule); position: relative; }
.kept li::before { content: ''; position: absolute; left: 0.2em; top: 0.95em; width: 0.6em; height: 2px; background: var(--ink); }
.kept li.printed::before, .kept li.struck::before { background: var(--red); }
.kept li.proof::before, .kept li.waiting::before { background: var(--blue); }
.reset {
  font: 600 0.95rem/1 'Libre Franklin', sans-serif;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 0.7em 1em;
  min-height: 44px;
  cursor: pointer;
}

/* Imprint: the closing note and the film. */
.close {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 140px) var(--gutter) clamp(56px, 8vw, 110px);
}
.close p { max-width: 38em; font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.film { margin: clamp(28px, 5vw, 56px) 0 0; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--paper); border: 10px solid var(--ink); }
.film figcaption { margin-top: 10px; font-size: 0.95rem; }
.back { margin-top: clamp(28px, 5vw, 56px); font-weight: 600; }

/* Film capture: only the stage. */
html[data-capture] body { margin: 0; overflow: hidden; }
.capture-stage { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }

@media (prefers-reduced-motion: reduce) {
  .block, .slot.refuse { transition: none; animation: none; }
}
