/* ════════════════════════════════════════════════════════════════════
   DREADFULS: THE TEST GROUP PAGE
   Tokens copied from the app (~/dreadfuls/src/styles/_tokens.scss).
   Change a colour there first, then here.

   House rules this file keeps:
   - No uppercase anywhere. Nothing sets text-transform.
   - Aquamarine means pressable. Buttons and links only.
     The rebuilt app pieces and the calendar are pictures, not controls,
     so their "on" state is bone (--on), not the accent.
   - Amber (--warn) is only for the form's error line.
   - Tap targets clear 44px.
   ════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --surface: #141418;
  --primary: #1A1F2E;
  --secondary: #243B39;
  --accent: #7FFFD4;
  --text: #E8E8E0;
  --muted: #9AA0A9;
  --warn: #E8B14C;
  --on: var(--text);
  --edge: color-mix(in srgb, #9AA0A9 26%, transparent);
  --hair: color-mix(in srgb, #9AA0A9 18%, transparent);
  --ink: #050506;

  --f-display: "IM Fell English", Georgia, serif;
  --f-text: "EB Garamond", Georgia, serif;
  --f-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --settle: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--surface);
  /* clip, not hidden: it keeps position: sticky working, and stops the
     tear's sideways slip from ever making the page scroll sideways. */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 19px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* The app's film grain, over everything, touching nothing. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .16 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 180px 180px;
}

img { display: block; max-width: 100%; }

[hidden] { display: none !important; }

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Layout ─────────────────────────────────────────────────────────── */

.layout {
  max-width: 560px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

.sec { padding-block: 56px; }
.sec.hero { padding-block: 0; position: relative; }

.sec > p,
.sec-body > p,
.sec-head > p:not(.tag),
.step-text p { max-width: 34em; }

p { margin: 0 0 14px; }
.sec > p:last-child,
.sec-body > p:last-child { margin-bottom: 0; }

/* The calendar lives in the hero. On a phone it sits under the button. */
.hero-cal { margin-top: 36px; }

/* The dim poster wall behind the desktop hero; main.js builds it on desktop only. */
.wall { display: none; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: 46px; line-height: 1.02; margin: 0 0 14px; letter-spacing: -0.01em; }
h2 { font-size: 34px; line-height: 1.08; margin: 0 0 16px; }
h3 { font-size: 24px; line-height: 1.15; margin: 0 0 6px; }

/* ── Hero ───────────────────────────────────────────────────────────── */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 40px;
  font-family: var(--f-display);
  font-size: 24px;
  line-height: 1;
}
.brand img { width: 40px; height: 40px; }

.kicker,
.tag {
  font-family: var(--f-data);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 12px;
}
.tag b { font-weight: 500; color: var(--text); }

.lede {
  font-size: 22px;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--primary);
  font-family: var(--f-text);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.22s var(--settle), transform 0.22s var(--settle);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ── The calendar: the page's spine ─────────────────────────────────── */

.cal-card {
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--primary) 55%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--hair);
}

.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 2px 12px;
}
.cal-month { font-family: var(--f-display); font-size: 22px; }
.cal-count {
  font-family: var(--f-data);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dow, .cal, .posters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.dow { margin-bottom: 6px; }
.dow li {
  font-family: var(--f-data);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.cal li {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  color: var(--muted);
}
.cal li.blank { background: none; }
/* The nine unset nights read as open before and after they fill. */
.cal li.open { background: none; box-shadow: inset 0 0 0 1px var(--edge); }
.cal li b {
  font-family: var(--f-data);
  font-weight: 400;
  font-size: 11px;
}
.cal li svg {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  display: none;
}
.cal li svg .c { fill: currentColor; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; paint-order: stroke fill; }
.cal li svg .f { fill: var(--surface); }
.cal li.on { background: none; box-shadow: none; color: var(--on); }
.cal li.on b { display: none; }
.cal li.on svg { display: block; }
/* An open night fills as an outline: it happened, but nothing is set. */
.cal li.open.on { color: var(--muted); }
.cal li.open.on svg .c { fill: none; stroke-width: 1.6; }
.cal li.open.on svg .f { fill: currentColor; }
.cal li.now::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 10px;
  box-shadow: 0 0 0 1.5px var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  .cal li.pop svg { animation: skullIn 0.33s var(--settle) both; }
}
@keyframes skullIn {
  from { opacity: 0; transform: scale(0.55); }
  to { opacity: 1; transform: none; }
}

.tonight {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 12px;
  background: var(--secondary);
  min-height: 72px;
}
.tonight img { flex: none; width: 34px; height: 51px; object-fit: cover; border-radius: 4px; }
.tonight p { margin: 0; min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .tonight.flip img, .tonight.flip p { animation: flip 0.4s var(--settle); }
}
@keyframes flip { from { opacity: 0; transform: translateY(6px); } }
.tonight p span {
  display: block;
  font-family: var(--f-data);
  font-size: 12px;
  color: var(--muted);
}
.tonight p b {
  display: block;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tonight b.is-open { color: var(--muted); font-style: italic; }

/* The grain never quite sits still. */
@media (prefers-reduced-motion: no-preference) {
  body::after { animation: grain 0.9s steps(1, end) infinite; }
}
@keyframes grain {
  0% { background-position: 0 0; }
  25% { background-position: -40px 60px; }
  50% { background-position: 70px -30px; }
  75% { background-position: 20px 110px; }
}

/* A minor action: plain text, no underline. */
.plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: var(--f-text);
  font-size: 17px;
  cursor: pointer;
}
.plain:hover { filter: brightness(1.12); }
.plain:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.big { font-size: 22px; line-height: 1.4; }

/* ── Why I made it ──────────────────────────────────────────────────── */

#why .why-words p { max-width: 32em; }

/* The sheet we kept: real rows, and three questions nobody could answer in
   it. The first empty cell holds a blinking cursor. */
.sheet {
  margin: 30px 0 0;
  border-radius: 12px;
  background: #1b1d22;
  box-shadow: inset 0 0 0 1px var(--hair), 0 24px 60px rgb(0 0 0 / 0.4);
  overflow: hidden;
}
.sheet-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hair);
}
.sheet-bar i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 35%, transparent); }
.sheet-bar span { margin-left: 8px; font-family: var(--f-data); font-size: 11px; color: var(--muted); }
.sheet-scroll { overflow-x: auto; }
.sheet table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-data);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.sheet th, .sheet td {
  padding: 9px 10px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  text-align: left;
  white-space: nowrap;
}
.sheet thead th { font-weight: 500; color: var(--muted); background: rgb(255 255 255 / 0.02); }
.sheet tbody th { font-weight: 400; color: var(--text); white-space: normal; line-height: 1.35; }
.sheet td { color: var(--text); }
.sheet .dt { color: var(--muted); }
/* the questions: headed in the accent's quiet tone, never answered */
.sheet thead .q { color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); white-space: normal; line-height: 1.3; width: 84px; vertical-align: bottom; }
.sheet tbody .q { background: color-mix(in srgb, var(--accent) 3%, transparent); min-width: 70px; }
.sheet tbody tr:first-child .q:not(.q2):not(.q3) { position: relative; box-shadow: inset 0 0 0 2px var(--accent); }
.sheet tbody tr:first-child .q:not(.q2):not(.q3)::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 1.5px;
  background: var(--text);
}
@media (prefers-reduced-motion: no-preference) {
  .sheet tbody tr:first-child .q:not(.q2):not(.q3)::after { animation: caret 1.05s steps(1, end) infinite; }
}
@keyframes caret { 50% { opacity: 0; } }
/* A phone gets the first question; the other two need a desktop's width. */
.sheet .q2, .sheet .q3, .sheet .dt { display: none; }

/* ── How rating works: the prototype ────────────────────────────────── */

.rate-words .big { margin-bottom: 26px; }

.steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 18px;
}
.step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 12px;
  color: var(--text);
}
.step h3 { color: inherit; font-size: 22px; transition: color 0.3s var(--settle); }
.step p { margin: 0; font-size: 17px; line-height: 1.45; }
.step-n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--f-data);
  font-size: 12px;
  color: var(--muted);
  transition: background 0.3s var(--settle), color 0.3s var(--settle);
}

.device { display: flex; flex-direction: column; align-items: center; }
.device-note {
  margin: 14px 0 0;
  font-family: var(--f-data);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.proto {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 720px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair), 0 30px 70px rgb(0 0 0 / 0.45);
  overflow: hidden;
}
.proto iframe { display: block; width: 100%; height: 100%; border: 0; }
/* A phone around the phone on a phone, too (Daniel, 29 Sep). Desktop sets
   its own, bigger bezel below. */
@media (max-width: 1023px) {
  .device { padding: 10px; }
  .proto {
    max-width: 370px;
    height: 700px;
    border-radius: 40px;
    box-shadow: 0 0 0 8px #0c0c0f, 0 0 0 9px var(--edge), 0 30px 70px rgb(0 0 0 / 0.5);
  }
}

/* ── The marathon: posters on the real calendar ─────────────────────── */

.sched { margin: 0; }
.sched > .sec-head > p:last-child { margin-bottom: 22px; }
.posters { gap: 5px; }
.posters li {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  background: var(--primary);
}
.posters li.blank { background: none; }
.pb {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s var(--settle);
}
.pb:hover, .pb:focus-visible { transform: translateY(-3px) scale(1.03); z-index: 2; }
.pb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}
.pb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px var(--edge);
  pointer-events: none;
}
.posters .d {
  position: absolute;
  left: 3px;
  top: 3px;
  min-width: 16px;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgb(10 10 14 / 78%);
  font-family: var(--f-data);
  font-size: 9.5px;
  line-height: 1.3;
  text-align: center;
  color: var(--text);
}
.posters li.open { background: none; }
.posters li.open .d { background: none; color: var(--muted); }
.posters .o {
  position: absolute;
  inset: auto 0 8px;
  text-align: center;
  font-family: var(--f-data);
  font-size: 10px;
  color: var(--muted);
}

/* The reason a film is on the schedule. */
.why-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  width: min(300px, calc(100vw - 24px));
  padding: 14px 16px 15px;
  border-radius: 14px;
  background: var(--secondary);
  box-shadow: inset 0 0 0 1px var(--edge), 0 18px 40px rgb(0 0 0 / 0.55);
  pointer-events: none;
}
.why-tip b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 21px; line-height: 1.15; }
.why-tip span { display: block; margin-top: 2px; font-family: var(--f-data); font-size: 12px; color: var(--muted); }
.why-tip p { margin: 8px 0 0; font-size: 17px; line-height: 1.4; }
@media (prefers-reduced-motion: no-preference) {
  .why-tip:not([hidden]) { animation: tipIn 0.18s var(--settle); }
}
@keyframes tipIn { from { opacity: 0; } }

/* ── It isn't finished: the case file, one entry at a time ──────────── */

.file {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hair);
}
.file li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
}
.file .no { font-family: var(--f-data); font-size: 12px; color: var(--muted); }
.file .line { display: block; font-size: 22px; line-height: 1.4; }

/* The bar is the line's own background, cloned onto every wrapped
   fragment, so a sentence that wraps on a phone is redacted line by line.
   It only exists when the script is running, and never for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .redacted .line > span {
    background-image: linear-gradient(var(--ink), var(--ink));
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 100% 100%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    color: var(--ink);
    border-radius: 2px;
    padding: 0 2px;
    margin: 0 -2px;
    transition:
      background-size 0.6s cubic-bezier(0.6, 0, 0.3, 1),
      color 0.2s linear;
  }
  .js .redacted.open .line > span {
    background-size: 0% 100%;
    color: var(--text);
  }
  .js .redacted.open li:nth-child(1) .line > span { transition-delay: 0s, 0.1s; }
  .js .redacted.open li:nth-child(2) .line > span { transition-delay: 0.45s, 0.55s; }
  .js .redacted.open li:nth-child(3) .line > span { transition-delay: 0.9s, 1s; }
  .js .redacted.open li:nth-child(4) .line > span { transition-delay: 1.35s, 1.45s; }
}

/* ── What joining means: three cards, each a small scene ────────────── */

.asks {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.asks li {
  padding: 18px 18px 20px;
  border-radius: 18px;
  background: var(--primary);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.asks b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.2; margin-bottom: 6px; }
.asks span { color: var(--muted); }

.mini {
  position: relative;
  height: 170px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* 1. A poster, then its score lands. */
.mini-rate img { width: 84px; height: 126px; object-fit: cover; border-radius: 6px; rotate: -3deg; }
.mini-stamp {
  position: absolute;
  left: calc(50% + 20px);
  top: 50%;
  padding: 4px 10px 6px;
  border-radius: 10px;
  border: 2px solid var(--text);
  background: var(--primary);
  font-family: var(--f-data);
  font-style: normal;
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  rotate: -8deg;
}

/* 2. A home screen, and the coin drops into the last slot. */
.home-grid { display: grid; grid-template-columns: repeat(4, 34px); gap: 12px 14px; }
.home-grid i { width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--muted) 18%, transparent); }
.home-grid i.slot { background: none; box-shadow: inset 0 0 0 1px var(--edge); }
.home-grid img { width: 34px; height: 34px; }

/* 3. A text thread: a bug, then the fix. */
.mini-text { place-items: stretch; align-content: center; gap: 8px; padding: 0 16px; }
.bub { margin: 0; max-width: 78%; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.3; }
.bub.them { justify-self: start; background: color-mix(in srgb, var(--muted) 22%, transparent); border-bottom-left-radius: 5px; }
.bub.me { justify-self: end; background: var(--accent); color: var(--primary); border-bottom-right-radius: 5px; }
.bub.typing { display: flex; gap: 4px; padding: 11px 12px; }
.bub.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: 0.5; }

/* Without motion, and on every phone (Daniel, 29 Sep: stills on mobile),
   each scene shows its end state. The scenes only play on a desktop. */
.mini-text .typing { display: none; }

@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
  .js .mini-stamp, .js .home-grid .slot img, .js .mini-text .bub { opacity: 0; }
  .js .mini-text .typing { display: flex; }

  .asks.live .mini-rate img { animation: miniPoster 4.8s var(--settle) infinite; }
  .asks.live .mini-stamp { animation: miniStamp 4.8s infinite; }
  .asks.live .home-grid .slot img { animation: miniDrop 4.8s infinite 0.4s; }
  .asks.live .bub.them { animation: miniThem 6s infinite 0.8s; }
  .asks.live .bub.typing { animation: miniTyping 6s infinite 0.8s; }
  .asks.live .bub.said { animation: miniSaid 6s infinite 0.8s; }
  .asks.live .bub.typing i { animation: dot 0.9s infinite; }
  .asks.live .bub.typing i:nth-child(2) { animation-delay: 0.15s; }
  .asks.live .bub.typing i:nth-child(3) { animation-delay: 0.3s; }
  .asks.live li:nth-child(2) .mini { animation-delay: 0.4s; }
}
@keyframes miniPoster { 0% { transform: translateY(14px); opacity: 0; } 12%, 88% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes miniStamp {
  0%, 30% { opacity: 0; transform: translateY(-50%) scale(1.9); animation-timing-function: cubic-bezier(0.3, 1.5, 0.5, 1); }
  38%, 88% { opacity: 1; transform: translateY(-50%) scale(1); }
  100% { opacity: 0; transform: translateY(-50%) scale(1); }
}
@keyframes miniDrop {
  0%, 20% { opacity: 0; transform: translateY(-60px) scale(0.6); animation-timing-function: cubic-bezier(0.3, 1.5, 0.5, 1); }
  34%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes miniThem { 0%, 4% { opacity: 0; transform: translateY(8px); } 12%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes miniTyping { 0%, 22% { opacity: 0; } 26%, 48% { opacity: 1; } 52%, 100% { opacity: 0; display: none; } }
@keyframes miniSaid { 0%, 50% { opacity: 0; transform: translateY(8px); } 56%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes dot { 50% { opacity: 1; transform: translateY(-2px); } }

/* ── The last night ─────────────────────────────────────────────────── */

.join { padding-bottom: 64px; }

.lead-in { padding: 4vh 0 8vh; }
.lead-in p {
  margin: 0 0 14vh;
  font-family: var(--f-display);
  font-size: 30px;
  line-height: 1.15;
}
.lead-in p:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .lead-in p { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--settle), transform 0.8s var(--settle); }
  .js .lead-in p.in { opacity: 1; transform: none; }
}

/* The ticket: a stub with the night's poster, torn along a dotted line.
   The notches are cut out of the two halves with masks, and the shadow is
   a filter on the wrapper, so it follows the cut edge instead of showing
   a painted circle over it. */
.ticket-shadow { filter: drop-shadow(0 22px 34px rgb(0 0 0 / 0.5)); }
.card { position: relative; --notch: 12px; }
.stub, .ticket-main { background: var(--secondary); }
.stub {
  border-radius: 20px 20px 0 0;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 100%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 100%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 100%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 100%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket-main {
  border-radius: 0 0 20px 20px;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 0, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 0, transparent 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 0, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 0, transparent 98%, #000) right / 51% 100% no-repeat;
}
.stub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 2px dashed color-mix(in srgb, var(--surface) 70%, transparent);
}
.stub img { width: 54px; height: 81px; object-fit: cover; border-radius: 6px; }
.stub span { font-family: var(--f-data); font-size: 12px; line-height: 1.5; color: var(--text); }

.ticket-main { position: relative; padding: 26px 22px 24px; }
.card h2 { margin-right: 92px; }
.card-words > p { color: var(--text); }

/* The app's score stamp, from the Saved screen: late, hard, tilted. */
.stamp {
  position: absolute;
  top: 22px;
  right: 18px;
  min-width: 76px;
  padding: 6px 12px 8px;
  border-radius: 12px;
  background: var(--primary);
  border: 2px solid var(--on);
  color: var(--on);
  font-family: var(--f-data);
  font-style: normal;
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  rotate: -6deg;
  box-shadow: 0 8px 20px rgb(0 0 0 / 50%);
}
.stamp small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .js .stamp { opacity: 0; }
  .js .card.stamped .stamp { animation: stamp 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) 0.2s both; }
  .js .card { transition: transform 0.6s var(--settle), opacity 0.6s var(--settle); }
  .js .card:not(.stamped) { opacity: 0.35; transform: translateY(24px) scale(0.98); }
}
@keyframes stamp {
  from { opacity: 0; transform: scale(1.8); }
  to { opacity: 1; transform: none; }
}

form { margin-top: 22px; display: grid; gap: 8px; }

/* The hero's own way in: the email right above the button. */
.hero-form { margin-top: 0; max-width: 420px; }
.hero-form .btn { margin-top: 6px; }
.hero-done { margin-top: 0; }
.field-label {
  font-family: var(--f-data);
  font-size: 13px;
  color: var(--text);
}
input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  background: var(--primary);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 19px;
  outline: none;
  transition: border-color 0.22s var(--settle);
}
input[type="email"]:focus-visible,
input[type="email"]:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input[aria-invalid="true"] { border-color: var(--warn); }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.err {
  min-height: 0;
  margin: 0;
  font-family: var(--f-data);
  font-size: 13px;
  line-height: 1.4;
  color: var(--warn);
}
.err:empty { display: none; }

form .btn { margin-top: 8px; width: 100%; }

.done { margin-top: 22px; outline: none; }
.done-h {
  font-family: var(--f-display);
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 4px;
}
.done p:last-child { margin: 0; color: var(--text); }

/* ── The scare: one skull, half a second ────────────────────────────── */

.scare {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  background: var(--ink);
  pointer-events: none;
}
.scare svg { width: min(96vw, 96vh); height: min(96vw, 96vh); overflow: visible; }
.scare .c { fill: var(--text); }
.scare .f { fill: var(--ink); }
/* red, and the only red on the page: it's there for half a second */
.scare .eye { fill: #ff2d45; filter: drop-shadow(0 0 6px #ff2d45) drop-shadow(0 0 18px rgb(255 45 69 / 0.8)); }
.scare.go { display: grid; animation: scareBg 0.52s steps(1, end) both; }
.scare.go svg { animation: lunge 0.52s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
/* In from the right, jaw first, then a lurch at you. */
@keyframes lunge {
  0% { transform: translateX(40vw) scale(0.5) rotate(8deg); filter: drop-shadow(14px 0 0 rgb(255 60 90 / 0.8)) drop-shadow(-14px 0 0 rgb(127 255 212 / 0.6)); }
  26% { transform: translateX(-2vw) scale(1.08) rotate(-4deg); }
  40% { transform: translateX(1vw) scale(1.02) rotate(2deg); filter: none; }
  58% { transform: translateX(-1vw) scale(1.12) rotate(-1deg); }
  100% { transform: scale(1.45); opacity: 0; }
}
@keyframes scareBg {
  0% { opacity: 1; background: #2a0006; }
  12% { background: var(--ink); }
  30% { background: #1c0004; }
  45% { background: var(--ink); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.foot {
  padding: 28px 0 max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--hair);
  display: grid;
  gap: 8px;
  justify-items: start;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--f-display);
  font-size: 20px;
}
.foot-brand img { width: 28px; height: 28px; }

/* A minor action: plain text, no underline, in the accent because it's pressable. */
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  text-decoration: none;
  font-size: 18px;
}
.text-link:hover { filter: brightness(1.12); }
.text-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.tmdb {
  margin: 6px 0 0;
  font-family: var(--f-data);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 44em;
}
.tmdb img { width: 92px; height: auto; margin-bottom: 8px; }

/* ── The broadcast cut: static ──────────────────────────────────────── */

.static {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background-size: 160px 280px;
  image-rendering: pixelated;
}

/* ── Desktop (1024 and up): a real website, not a phone column ─────────
   The phone layout above is untouched; everything here only applies on a
   wide screen. */

@media (min-width: 1024px) {
  body { font-size: 20px; }

  :root {
    --side: clamp(40px, 5vw, 80px);
    --wide: min(1320px, 100vw - 2 * var(--side));
  }

  .layout {
    max-width: none;
    padding: 0;
  }
  .layout > .sec:not(.hero),
  .foot {
    width: var(--wide);
    margin-inline: auto;
  }

  .sec { padding-block: 110px; }

  h2 { font-size: clamp(40px, 3.4vw, 54px); margin-bottom: 0; }
  .big { font-size: 24px; line-height: 1.45; }

  /* ── Hero: full bleed, the posters in the dark behind it ── */
  .sec.hero {
    min-height: clamp(720px, 100svh, 1000px);
    padding: 40px max(var(--side), calc(50vw - 700px)) 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(420px, 34vw, 540px);
    grid-template-rows: auto 1fr auto auto auto auto 1fr;
    column-gap: clamp(48px, 6vw, 120px);
    overflow: hidden;
    isolation: isolate;
  }
  .hero > * { grid-column: 1; position: relative; z-index: 1; }
  .hero > .brand { grid-row: 1; margin: 0; }
  .hero > .kicker { grid-row: 3; font-size: 15px; margin-bottom: 18px; }
  .hero > h1 { grid-row: 4; font-size: clamp(76px, 7.4vw, 120px); line-height: 0.98; margin-bottom: 24px; }
  .hero > .lede { grid-row: 5; font-size: clamp(24px, 1.9vw, 30px); max-width: 22em; margin-bottom: 36px; }
  .hero > .hero-form, .hero > .hero-done { grid-row: 6; justify-self: start; width: 100%; max-width: 440px; }
  .hero-form .btn { width: auto; justify-self: start; min-height: 56px; padding: 0 32px; font-size: 20px; }
  .hero > .hero-cal { grid-column: 2; grid-row: 2 / 8; align-self: center; margin: 0; }
  .brand img { width: 44px; height: 44px; }

  .hero-cal .cal-card {
    padding: 26px 24px 24px;
    border-radius: 22px;
    background: rgb(22 25 34 / 0.9);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px var(--hair), 0 30px 80px rgb(0 0 0 / 0.55);
  }
  .cal-month { font-size: 26px; }
  .cal-count { font-size: 14px; }
  .cal, .dow { gap: 8px; }
  .cal li { border-radius: 9px; }
  .cal li b { font-size: 13px; }
  .tonight { margin-top: 16px; padding: 14px 16px; }
  .tonight p span { font-size: 13px; }
  .tonight p b { font-size: 26px; }

  .hero > .wall {
    grid-column: auto;
    grid-row: auto;
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .wall-grid {
    position: absolute;
    inset: -14% -8%;
    display: flex;
    gap: 14px;
    rotate: -5deg;
  }
  .wall-col { flex: 1 0 150px; overflow: hidden; }
  .wall-run { display: grid; gap: 14px; }
  .wall-run img {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    filter: grayscale(0.35) contrast(1.05);
  }
  /* Darkened hard, heaviest behind the words, so the headline reads first. */
  .wall::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgb(20 20 24 / 0.95) 0%, rgb(20 20 24 / 0.9) 42%, rgb(20 20 24 / 0.8) 100%),
      linear-gradient(180deg, rgb(20 20 24 / 0.2) 0%, rgb(20 20 24 / 0) 60%, var(--surface) 100%);
  }

  /* ── Why I made it: heading left, the story right ── */
  #why {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }
  #why { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
  #why h2 { margin-bottom: 22px; }
  #why .why-words p { font-size: 21px; line-height: 1.5; }
  #why .why-words .big { font-size: 27px; line-height: 1.3; font-family: var(--f-display); }
  .sheet { margin: 0; }
  .sheet table { font-size: 13px; }
  .sheet th, .sheet td { padding: 12px 14px; }
  .sheet tbody th { min-width: 150px; }
  .sheet thead .q { width: 96px; }
  .sheet .q2, .sheet .q3, .sheet .dt { display: table-cell; }

  /* ── How rating works: the words and the steps, then the phone ── */
  #rating {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: clamp(48px, 6vw, 112px);
    align-items: center;
  }
  .rate-words h2 { margin-bottom: 18px; }
  .steps { gap: 26px; margin: 0; }
  .step { grid-template-columns: 34px minmax(0, 1fr); gap: 6px 16px; }
  .step-n { width: 30px; height: 30px; font-size: 13px; }
  .step h3 { font-size: 27px; }
  .step p { font-size: 19px; max-width: 28em; }
  .device { align-items: flex-end; }
  .device-note { width: 410px; margin-top: 22px; font-size: 13px; }
  .proto { max-width: 410px; height: 760px; border-radius: 44px; box-shadow: 0 0 0 10px #0c0c0f, 0 0 0 11px var(--edge), 0 40px 90px rgb(0 0 0 / 0.55); }
  .sk svg { width: 72px; height: 72px; }

  /* ── The marathon: the posters take the whole width ── */
  .sched { position: relative; }
  .dow { margin-bottom: 10px; }
  .dow li { font-size: 12px; }
  /* the heading sits in the empty Sun to Wed cells before Oct 1, so the
     weekday letters over those four would float above it */
  .sched .dow li:nth-child(-n + 4) { visibility: hidden; }
  .posters { gap: clamp(8px, 0.9vw, 14px); }
  .posters li, .posters img, .pb, .pb::after { border-radius: 8px; }
  .posters .d { font-size: 12px; left: 6px; top: 6px; padding: 2px 5px; border-radius: 5px; }
  .posters .o { font-size: 12px; bottom: 12px; }
  .sched > .sec-head {
    position: absolute;
    left: 0;
    top: 30px;
    width: calc((100% - 6 * clamp(8px, 0.9vw, 14px)) * 4 / 7 + 3 * clamp(8px, 0.9vw, 14px));
    padding-right: 24px;
  }
  .sched > .sec-head > p:last-child { margin: 16px 0 0; font-size: 22px; line-height: 1.4; max-width: 22em; }

  /* ── It isn't finished: heading left, the file right ── */
  #unfinished {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }
  .file li { grid-template-columns: 56px minmax(0, 1fr); padding: 24px 0; }
  .file .no { font-size: 14px; }
  .file .line { font-family: var(--f-display); font-size: clamp(30px, 2.6vw, 40px); line-height: 1.2; }

  /* ── What joining means: three cards ── */
  #joining .sec-head { margin-bottom: 40px; }
  .asks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2vw, 32px); }
  .asks li { padding: 22px 22px 26px; border-radius: 22px; }
  .mini { height: 210px; margin-bottom: 22px; }
  .asks b { font-size: 28px; }
  .asks span { font-size: 19px; }

  /* ── The last night: big lines, then the ticket ── */
  .lead-in p { font-size: clamp(48px, 4.6vw, 76px); line-height: 1.08; max-width: 16em; }
  .lead-in p:nth-child(2) { margin-left: 8%; }
  /* the last line never breaks: it sets its own size to fit */
  .lead-in p:nth-child(3) { margin-left: 16%; white-space: nowrap; font-size: clamp(40px, 3.7vw, 64px); }
  .join { padding-bottom: 120px; }
  .card { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .stub {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 36px 30px;
    border-bottom: 0;
    border-right: 2px dashed color-mix(in srgb, var(--surface) 70%, transparent);
  }
  .stub img { width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 10px; }
  .stub span { font-size: 13px; }
  .stub {
    border-radius: 24px 0 0 24px;
    -webkit-mask:
      radial-gradient(circle var(--notch) at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat,
      radial-gradient(circle var(--notch) at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
    mask:
      radial-gradient(circle var(--notch) at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat,
      radial-gradient(circle var(--notch) at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  }
  .ticket-main {
    border-radius: 0 24px 24px 0;
    -webkit-mask:
      radial-gradient(circle var(--notch) at 0 0, transparent 98%, #000) top / 100% 51% no-repeat,
      radial-gradient(circle var(--notch) at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
    mask:
      radial-gradient(circle var(--notch) at 0 0, transparent 98%, #000) top / 100% 51% no-repeat,
      radial-gradient(circle var(--notch) at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  }
  .ticket-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(40px, 4vw, 80px);
    align-items: center;
    padding: clamp(40px, 4vw, 64px);
  }
  .card h2 { font-size: clamp(44px, 4vw, 64px); margin-top: 0; margin-bottom: 18px; margin-right: 0; }
  .card-words { padding-top: 70px; }
  .card-words > p { font-size: 22px; line-height: 1.45; margin: 0; max-width: 26em; }
  .stamp { top: clamp(36px, 3.4vw, 56px); right: auto; left: clamp(40px, 4vw, 64px); }
  #form, #done { grid-column: 2; grid-row: 1; margin: 0; }
  .done-h { font-size: 36px; }
  .done p:last-child { font-size: 22px; }

  /* ── Footer, in a row ── */
  .foot {
    grid-template-columns: auto auto 1fr;
    align-items: center;
    column-gap: 40px;
    padding-bottom: 56px;
  }
  .tmdb { margin: 0; justify-self: end; text-align: right; display: flex; align-items: center; gap: 16px; max-width: none; }
  .tmdb img { margin: 0; }
}

/* A short desktop window: the hero still has to fit, button and all. */
@media (min-width: 1024px) and (max-height: 820px) {
  .tonight { display: none; }
  .hero > h1 { font-size: clamp(64px, 6.4vw, 100px); }
  .proto { height: 660px; }
}
