@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800;
  font-display: swap; src: url("/fonts/bricolage-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/fonts/public-sans-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/fonts/public-sans-latin-600.woff2") format("woff2");
}
/* JUBILEE STADIUM SYSTEM — source of truth: /DESIGN.md. Do not add colors, shadows, or eases not defined there. */
:root {
  --paper: #FBF6EC; --paper-shade: #F2EADA;
  --ink: #1C1814; --ink-soft: #4A443C;
  --gold: #F0A202; --gold-hi: #FFC94D; --gold-deep: #B97D00;
  --green: #1F6F50; --green-tint: #DCEFE3;
  --red: #D6432C; --red-tint: #FBE7E1;
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --dur-micro: 120ms; --dur-std: 220ms; --dur-page: 280ms;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.25, 1);
}
.stadium, .stadium body { background: var(--paper); color: var(--ink); }
.stadium { font-family: var(--font-body); font-weight: 400; line-height: 1.55; }
.stadium h1, .stadium h2, .stadium h3, .std-display {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
}
.std-hero-h { font-size: clamp(2.6rem, 8vw, 5.5rem); text-transform: uppercase; }
.std-eyebrow {
  font-family: var(--font-body); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--green); font-size: 0.9rem;
}
.std-measure { max-width: 65ch; }
.std-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .std-wrap { padding: 0 40px; } }
.std-rule { border: 0; border-top: 3px solid var(--ink); margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .stadium *, .stadium *::before, .stadium *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 150ms !important; scroll-behavior: auto !important;
  }
}
.stadium { background-image: url("/img/paper-grain.svg"); background-size: 256px 256px; }
/* Legacy app header (navy, sticky, lives outside the screens) stays hidden while
   the stadium landing is visible — the landing brings its own header. Ported from
   the retired marketing.js nav toggling; app screens (no .stadium on body) keep it. */
.stadium header.header { display: none; }
.std-bunting { height: 36px; background: url("/img/bunting.svg") repeat-x left center; border: 0; margin: 0; }
.std-band { background: var(--paper-shade); }
.std-band-ink { background: var(--ink); color: var(--paper); }

/* Buttons — physical press per §9 */
.std-btn {
  display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 10px;
  padding: 12px 24px; min-height: 44px; box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer; text-decoration: none;
  transition: transform var(--dur-micro) var(--ease-pop), box-shadow var(--dur-micro) var(--ease-pop), background-color var(--dur-micro) var(--ease-pop);
}
.std-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); background: var(--gold-hi); }
.std-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); background: var(--gold-deep); }
.std-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.std-btn--secondary { background: var(--paper); }
.std-btn--secondary:hover { background: var(--paper-shade); }
.std-btn--secondary:active { background: var(--paper-shade); }

/* Cards */
.std-card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink); padding: 24px;
}
.std-card--shade { background: var(--paper-shade); }
.std-card--ink {
  background: var(--ink); color: var(--paper); position: relative; overflow: hidden;
}

/* Ticket stub / green card — §8.4 */
.std-stub {
  background: var(--green-tint); border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink); padding: 16px 20px; position: relative;
}
/* Perforation: hard-stop radial = punch-hole geometry, not gradient-as-decoration (ruling 2026-06-11; DESIGN.md §1 bans color-blend decoration) */
.std-stub::before {
  content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 12px;
  background-image: radial-gradient(circle at 0 50%, var(--paper) 5px, transparent 5.5px);
  background-size: 12px 16px; background-repeat: repeat-y;
}
.std-stamp {
  display: inline-block; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.8rem; color: var(--green); border: 2px solid var(--green);
  border-radius: 4px; padding: 3px 10px; transform: rotate(-2deg);
}
.std-stamp--red { color: var(--red); border-color: var(--red); }

/* Scoreboard tiles — §8.2 shell (flip logic in splitflap.mjs) */
.std-board { display: inline-flex; gap: 6px; }
.std-board-digit {
  position: relative; width: 1.6em; height: 2.2em; background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem;
  font-variant-numeric: tabular-nums; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.std-board-digit::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px;
  background: var(--paper); opacity: 0.25;
}

.std-ball-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.std-ball {
  position: absolute; left: 0; top: 0; width: 112px; height: 112px;
  pointer-events: auto; cursor: grab; will-change: transform; touch-action: none;
}
.std-cash {
  width: 100%; height: 100%; display: block;
  /* Treatment intentionally bare — ball-polish pass is parked (Loki, 2026-06-11: stacked ring+shadow read ugly). */
}
.std-ball:active { cursor: grabbing; }
.std-ball--idle { animation: std-bob 2.4s ease-in-out infinite; }
@keyframes std-bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.std-ball--static { position: static; animation: none; }

.std-board-digit--flip { animation: std-flip 60ms linear; }
@keyframes std-flip { 0% { transform: scaleY(1); } 50% { transform: scaleY(0.62); } 100% { transform: scaleY(1); } }

.std-envelope {
  position: absolute; bottom: 8px; width: 120px; height: 76px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink); display: flex; align-items: center; justify-content: center;
}
.std-envelope::before {
  content: ""; position: absolute; inset: 6px 6px auto 6px; height: 26px;
  border: 2px solid var(--ink); border-bottom: 0; border-radius: 4px 4px 0 0;
  background: var(--red-tint); clip-path: polygon(0 0, 50% 100%, 100% 0);
}
.std-envelope span {
  font-weight: 600; font-size: 0.7rem; letter-spacing: 0.08em; color: var(--red);
  border: 2px solid var(--red); padding: 2px 6px; border-radius: 3px; transform: rotate(-4deg);
  background: var(--paper);
}
.std-confetti-settled {
  position: absolute; left: 30%; right: 30%; bottom: 0; height: 10px;
  background-image:
    radial-gradient(circle, #F0A202 3px, transparent 3.5px),
    radial-gradient(circle, #1F6F50 3px, transparent 3.5px),
    radial-gradient(circle, #D6432C 3px, transparent 3.5px);
  background-size: 47px 10px, 61px 10px, 53px 10px;
  background-position: 0 2px, 14px 5px, 31px 1px; background-repeat: repeat-x;
}

#knockdownStage[data-state="falling"] .std-envelope {
  transition: transform 600ms var(--ease-pop), left 600ms var(--ease-pop), bottom 600ms var(--ease-pop), opacity 600ms;
}
#knockdownStage .std-confetti-settled { transition: opacity 400ms; }
.std-stamp-in { animation: std-stamp-in 280ms var(--ease-pop); }
@keyframes std-stamp-in {
  0% { transform: scale(1.6); opacity: 0; }
  80% { transform: scale(0.98); opacity: 1; }
  100% { transform: scale(1); }
}

/* App screens must never show the landing's fixed play layers (ball, confetti
   canvas persist in the DOM after navigating away from the landing). */
body:not(.stadium) .std-ball-layer, body:not(.stadium) .std-confetti-canvas { display: none; }

/* Landing nav text links collapse on mobile (logo + Sign in + Start free stay). */
@media (max-width: 768px) { .std-nav-links { display: none !important; } }

/* Upload card feedback — legacy listeners toggle these classes; the stadium
   card doesn't use the legacy .upload-box skin, so give them visible effect. */
#uploadBox.drag-over { background: var(--paper-shade); }
#uploadBox.has-file { border-style: solid; background: var(--green-tint); }

/* Cash Ball impact reactions — §E2 (appended 2026-06-11). Transform-only, re-armable both directions. */
.std-react-squash { animation: std-squash 320ms var(--ease-pop); }
@keyframes std-squash { 0% { transform: scale(1); } 35% { transform: scale(1.05, 0.91); } 70% { transform: scale(0.98, 1.02); } 100% { transform: scale(1); } }
.std-react-jolt { animation: std-jolt 300ms var(--ease-pop); }
@keyframes std-jolt { 0% { transform: translate(0, 0) rotate(0deg); } 30% { transform: translate(-4px, 2px) rotate(-0.8deg); } 60% { transform: translate(3px, -1px) rotate(0.5deg); } 100% { transform: translate(0, 0) rotate(0deg); } }
.std-react-rattle { animation: std-rattle 360ms linear; }
@keyframes std-rattle { 0%, 100% { transform: rotate(0deg); } 20% { transform: rotate(-1.4deg); } 40% { transform: rotate(1.2deg); } 60% { transform: rotate(-0.8deg); } 80% { transform: rotate(0.5deg); } }

/* Print texture pass — §E4 (appended 2026-06-11). Riso misregistration on display type (stadium tier only). */
.std-hero-h, .stadium #screen-landing h2 { text-shadow: 3px 3px 0 rgba(240, 162, 2, 0.5); }

/* Halftone overlay on ink cards (bottom 40%) — §E4. */
.std-card--ink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: url(/img/halftone.svg);
  pointer-events: none;
}

/* §E3 characters — clean cutouts, no added shadows or filters (illustration layer). */
/* Flank figures hide below 600px. */
@media (max-width: 600px) { .std-character-flank { display: none; } }

/* §E8-2 — Three-layer diorama (paper depth behind the hero copy).
   Parallax multipliers are module-owned (letter-strike.mjs, E8-3) — never in CSS —
   so reduced-motion gets a completely static composition by default.
   Below 600px the module sets all multipliers to 1.0 (no layer shift). */
.std-diorama {
  /* viewport positioning handled inline for clarity; overflow:visible lets flanks bleed */
  pointer-events: none;
  user-select: none;
}
.std-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.std-layer--back  { z-index: 1; }
.std-layer--mid   { z-index: 2; }
.std-layer--front { z-index: 3; }

/* Debt wall — paper chunks.
   Base style; aftermath transforms are inline on each .std-chunk (E8-3 overrides live). */
.std-chunk {
  position: absolute;
  background: var(--paper-shade);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: 4px;
  padding: 10px 12px;
  transform-origin: center bottom;
  will-change: transform;
}
/* Skeleton / fine-print lines inside each chunk */
.std-chunk .std-line {
  display: block;
  height: 6px;
  background: var(--ink);
  border-radius: 2px;
  opacity: 0.18;
  margin-top: 6px;
}

/* §E8-2 envelope rules RETIRED by Letter Strike — kept for git archaeology, remove at legacy cleanup */
/* (original rules preserved below; no new selector references them in the landing block) */
/* Side celebrant hides below 900px per spec. */
@media (max-width: 900px) { .std-character-side { display: none; } }

/* §E5 — Giant numerals: float behind/above SKU card content, boundary-crossing. */
.std-numeral {
  position: absolute; top: -44px; right: 12px;
  font-family: var(--font-display); font-weight: 800; font-size: 8rem;
  color: transparent; -webkit-text-stroke: 2.5px var(--ink);
  opacity: 0.16; line-height: 1; pointer-events: none; user-select: none;
}

/* §E5 — Colossal footer wordmark: full-width block above the nav row. */
.std-footer-wordmark {
  display: block;
  font-size: clamp(3.5rem, 10vw, 8rem);
  letter-spacing: -0.02em;
  line-height: 0.9;
}

/* §E5 — Name-story ink band: the celebrant (cream/gold/green) reads fine on ink.
   The gold misregistration text-shadow carries over from E4 — ghost reads as print on dark.
   EYEBALL FLAG for controller: gold-on-ink text-shadow on #name-story h2 (line 184 above). */
/* No additional rule needed — .stadium #screen-landing h2 rule from E4 already applies. */
