@font-face {
  font-family: "Gosh Poster";
  src: url("/assets/poster-font.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f3edcf;
  --ink: #292c1d;
  --red: #cc2d22;
  --olive: #dfe1b5;
  --olive-line: #bec392;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgb(41 44 29 / 0.22) 0 0.55px, transparent 0.75px),
    radial-gradient(circle at 70% 60%, rgb(41 44 29 / 0.14) 0 0.45px, transparent 0.75px);
  background-size: 9px 11px, 13px 15px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-x: hidden;
}

.poster {
  width: min(100%, 1600px);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 58px) clamp(22px, 3.7vw, 64px) clamp(16px, 2vw, 34px);
  display: grid;
  grid-template-rows: auto auto minmax(330px, 1fr) auto;
}

.masthead,
footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  border-bottom: 2px solid var(--ink);
  min-height: 44px;
}

.masthead p, footer p { margin: 0; }

.motto {
  font-size: clamp(10px, 0.94vw, 15px);
  letter-spacing: 0.08em;
  padding-block: 12px;
  touch-action: manipulation;
  user-select: none;
}

h1 {
  position: relative;
  z-index: 2;
  margin: clamp(18px, 2vw, 34px) 0 -0.03em;
  color: var(--red);
  font-family: "Gosh Poster", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(95px, 17.2vw, 275px);
  font-stretch: condensed;
  font-weight: 900;
  letter-spacing: 0.015em;
  line-height: 0.8;
  text-align: center;
  white-space: nowrap;
  transform: scaleX(1.5);
  touch-action: manipulation;
  user-select: none;
}

.pit {
  position: relative;
  min-height: 330px;
  isolation: isolate;
}

.arena {
  position: absolute;
  inset: 5% 0 0;
}

.arena::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10% 4% 8%;
  border-radius: 50%;
  background: var(--olive);
  box-shadow:
    inset 0 0 0 1px var(--olive-line),
    inset 0 0 0 12px var(--olive),
    inset 0 0 0 13px var(--olive-line),
    inset 0 0 0 24px var(--olive),
    inset 0 0 0 25px var(--olive-line),
    inset 0 0 0 36px var(--olive),
    inset 0 0 0 37px var(--olive-line);
}

#pit-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: grab;
  touch-action: none;
  outline: none;
}

#pit-canvas:active { cursor: grabbing; }
#pit-canvas:focus-visible { box-shadow: 0 0 0 4px var(--red); }

footer {
  min-height: 75px;
  border-top: 2px solid var(--ink);
  border-bottom: 0;
}

#sound-toggle {
  min-width: 242px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

#sound-toggle:hover { background: #3d402b; }
#sound-toggle:focus-visible { outline: 4px solid var(--red); outline-offset: 3px; }

.speaker {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 16px;
  margin-right: 15px;
  vertical-align: -3px;
  background: currentColor;
  clip-path: polygon(0 32%, 35% 32%, 100% 0, 100% 100%, 35% 68%, 0 68%);
}

#sound-toggle[aria-pressed="false"] .speaker::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 11px;
  height: 2px;
  background: var(--red);
  transform: rotate(-45deg);
}

@media (max-width: 700px) {
  .poster {
    min-height: 100svh;
    padding: 14px 16px 12px;
    grid-template-rows: auto auto minmax(380px, 1fr) auto;
  }

  .masthead { min-height: 38px; }
  .motto { font-size: 8px; }
  h1 { margin-top: 18px; font-size: clamp(68px, 23vw, 150px); line-height: 0.85; transform: scaleX(1.1); }
  .pit { min-height: 380px; }
  .arena { inset: 4% 0 0; }
  footer { min-height: 67px; }
  #sound-toggle { min-width: 164px; min-height: 45px; padding: 0 17px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
