/* v08 Fight Night: tokens, base, buttons, ropes, the stage. Red / black / gold, a boxing poster under a spotlight. */
:root {
  --ink: #0b0708;
  --ink-2: #160d0f;
  --ink-3: #24161a;
  --red: #d7192a;
  --red-hi: #ff3346;
  --red-deep: #7a0b14;
  --gold: #f3c14b;
  --gold-hi: #fff0b8;
  --gold-lo: #a8741d;
  --cream: #f6ead2;
  --mute: #b9a99a;
  --win: #f3c14b;
  --gold-grad: linear-gradient(180deg, #fff6d0 0%, #f6cd5c 42%, #c48a22 78%, #8a5d14 100%);
  --red-grad: linear-gradient(180deg, #ff4657 0%, #d7192a 55%, #8e0d18 100%);
  /* local fonts only (no outside request): a fight-poster wood type, a condensed label face, the system text face */
  --display: Impact, Haettenschweiler, 'Anton', 'Futura Condensed ExtraBold', 'Arial Narrow Bold', 'sans-serif-condensed', sans-serif;
  --cond: 'Avenir Next Condensed', 'Roboto Condensed', 'Arial Narrow', 'sans-serif-condensed', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pad: 16px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --ease-punch: cubic-bezier(.2, 1.4, .4, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0; min-height: 100%; background: var(--ink); color: var(--cream);
  font: 500 16px/1.4 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body[data-phase="play"], body[data-phase="reveal"] { overflow: hidden; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
b, strong { font-weight: 700; }

/* the 3D pitch: always full-bleed behind everything */
.stage { position: fixed; inset: 0; z-index: 0; background: #05070d; }

/* every screen sits over the stage, in the normal page flow (so long pages scroll like a page) */
.screen { position: relative; z-index: 10; min-height: 100vh; min-height: 100dvh; display: grid; overflow-x: hidden; overflow-x: clip; }
.screen:empty { display: none; }

/* ---- buttons ---- */
.btn {
  position: relative; display: grid; place-items: center; gap: 2px; width: 100%; min-height: 60px; padding: 14px 22px;
  border: 0; border-radius: 6px; cursor: pointer; text-align: center;
  font: 400 22px/1 var(--display); letter-spacing: .04em; text-transform: uppercase;
  transition: transform .18s var(--ease-punch), box-shadow .2s, filter .2s, opacity .2s;
  touch-action: manipulation;
}
.btn--gold {
  color: #1a0d0f; background: var(--gold-grad);
  box-shadow: 0 1px 0 #fff8 inset, 0 -3px 0 #0003 inset, 0 10px 30px rgba(243, 193, 75, .28), 0 0 0 2px #1a0d0f, 0 0 0 4px var(--gold-lo);
}
.btn--gold::after { /* a light sweep, the poster's foil */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 48%, transparent 60%);
  background-size: 250% 100%; background-position: 130% 0; animation: sweep 3.2s ease-in-out infinite 1s;
}
.btn--gold:disabled { filter: grayscale(.7) brightness(.7); cursor: progress; }
.btn--gold:disabled::after { animation-duration: 1.2s; }
.btn:active:not(:disabled), .btn.is-hit { transform: scale(.95) translateY(2px); }
.btn.is-ready { animation: ready .6s var(--ease-punch); }
.btn--ghost { color: var(--cream); background: transparent; box-shadow: 0 0 0 2px var(--cream) inset; }
.btn small { font: 700 13px/1.1 var(--cond); letter-spacing: .08em; opacity: .8; }
.btn.is-shake { animation: shake .4s; }
/* a new screen's button arms for a moment (a double tap never skips a screen): it looks live, a fuse fills under it */
.btn--gold.is-arming:disabled { filter: none; cursor: default; }
.btn.is-arming::before { content: ''; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 3px; border-radius: 2px; background: rgba(26, 13, 15, .45);
  transform-origin: left; animation: fuse var(--arm, 700ms) linear both; }
@keyframes fuse { from { transform: scaleX(0); } }
.btn:focus-visible, .rate__n:focus-visible, .mute:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes sweep { 0% { background-position: 130% 0; } 45%, 100% { background-position: -30% 0; } }
@keyframes ready { 0% { transform: scale(.9); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* ---- ring ropes: red, cream, red ---- */
.ropes { display: grid; gap: 7px; pointer-events: none; }
.ropes i { display: block; height: 5px; border-radius: 3px; background: var(--red-grad); box-shadow: 0 2px 3px #0008; }
.ropes i:nth-child(2) { background: linear-gradient(180deg, #fff, #d9c9a8); }

/* ---- the mute toggle (not a forward button) ---- */
.mute {
  position: fixed; z-index: 40; top: calc(10px + var(--sat)); right: 10px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; border: 1px solid #fff3; background: rgba(11, 7, 8, .78); color: var(--cream);
  cursor: pointer; transition: transform .15s;
}
.mute svg { width: 22px; height: 22px; }
.mute:active { transform: scale(.9); }
.mute.is-muted { color: var(--mute); }
body[data-phase="play"] .mute { top: auto; bottom: calc(12px + var(--sab)); right: 12px; }
body[data-phase="reveal"] .mute { top: calc(var(--hud-h, 90px) + var(--clip-h, 220px) - 54px); }
body[data-phase="results"] .mute, body[data-phase="gate"] .mute { position: absolute; }

/* ---- shared bits ---- */
.kicker { font: 700 13px/1 var(--cond); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.halftone {
  background-image: radial-gradient(circle at center, rgba(215, 25, 42, .35) 1.2px, transparent 1.6px);
  background-size: 7px 7px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
