:root {
  --court: #173f73;
  --court-dark: #0f2c54;
  --court-light: #21508f;
  --outer: #1f5a3c;
  --line: #ffffff;
  --ball: #e4ff3c;
  --text: #ffffff;
  --muted: #c9d6ea;
  --font: Futura, "Futura PT", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--court); color: var(--text); font: 400 1.0625rem/1.6 var(--font); }
[hidden] { display: none !important; }
a { color: var(--ball); text-underline-offset: 0.2em; }
h1, h2, h3 { margin: 0; line-height: 1; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -80px; z-index: 20; background: var(--ball); color: var(--court-dark); padding: 0.6rem 1rem; font-weight: 700; }
.skip:focus { top: 44px; }

.concept-bar { background: var(--ball); color: var(--court-dark); text-align: center; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; padding: 0.45rem 1rem; }
.kicker { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ball); }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
  padding: 14px var(--gutter); background: var(--court-dark); border-bottom: 3px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 800; font-style: italic; font-size: 1.35rem; text-transform: uppercase; }
.brand svg { width: 32px; height: 32px; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; align-items: center; }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.site-header nav a:hover { color: var(--ball); }
.site-header nav .nav-cta { background: var(--ball); color: var(--court-dark); padding: 0.45rem 0.9rem; }
.site-header nav .nav-cta:hover { color: var(--court-dark); background: #fff; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr); gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(40px, 7vw, 96px) var(--gutter);
  background: linear-gradient(115deg, transparent 0 62%, rgba(255, 255, 255, 0.05) 62% 100%), var(--court);
  border-bottom: 3px solid var(--line);
}
.hero h1 { font-size: clamp(3.2rem, 11vw, 8.5rem); line-height: 0.88; margin: 1rem 0 1.5rem; }
.hero h1 span { display: block; }
.hero h1 .hl { color: var(--ball); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0.8rem 1.4rem;
  background: var(--ball); color: var(--court-dark); border: 3px solid var(--ball);
  font: 800 1rem/1 var(--font); font-style: italic; text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); color: var(--court-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-line { background: transparent; color: var(--text); border-color: var(--line); }
.btn-line:hover { color: var(--court-dark); background: var(--line); }
.btn-text { background: none; border: 0; color: var(--muted); font: 700 0.9rem/1 var(--font); text-transform: uppercase; letter-spacing: 0.06em; text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer; padding: 0.6rem 0.2rem; }
.btn-text:hover { color: var(--text); }

.court-art { max-width: 300px; justify-self: center; width: 100%; }
.court { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35)); transform: perspective(900px) rotateX(18deg); }
.ball-fly { animation: rally 3s ease-in-out infinite; }
@keyframes rally {
  0% { transform: translate(0, 0); }
  50% { transform: translate(40px, -154px); }
  100% { transform: translate(-14px, -308px); }
}

/* Sections */
section { padding: clamp(56px, 8vw, 104px) var(--gutter); border-bottom: 3px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head h2, .next h2, .join h2 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0.6rem 0 0.9rem; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 1.1rem; }

/* Game */
.play { background: var(--court-dark); }
.game { max-width: 980px; margin: 0 auto; }
.wallet { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 3px solid var(--line); border-bottom: 0; }
.w-cell { padding: 0.8rem 1rem; border-right: 3px solid var(--line); display: grid; gap: 0.15rem; align-content: start; }
.w-cell:last-child { border-right: 0; }
.w-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ball); }
.w-value { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; font-style: italic; font-variant-numeric: tabular-nums; }
.w-value small { font-size: 0.55em; font-style: normal; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.w-level select { font: 700 1rem/1.2 var(--font); color: var(--text); background: var(--court); border: 2px solid var(--line); padding: 0.4rem 0.5rem; width: 100%; }

.tally { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border: 3px solid var(--line); background: #0b2140; }
.side { display: flex; align-items: baseline; justify-content: center; gap: 0.75rem; padding: 0.5rem 1rem; }
.who { font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pts { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; color: var(--ball); font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: center; }
.state { padding: 0.4rem 1rem; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.08em; border-left: 3px solid var(--line); border-right: 3px solid var(--line); min-width: 9.5rem; text-align: center; }

.arena { position: relative; aspect-ratio: 16 / 10; border: 3px solid var(--line); border-top: 0; background: var(--outer); overflow: hidden; touch-action: none; }
.arena.is-vertical { aspect-ratio: 10 / 15; }
.arena:focus-visible { outline-offset: -6px; }
#court { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: none; }
.overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.8rem; text-align: center; padding: 1.5rem;
  background: rgba(15, 44, 84, 0.82); backdrop-filter: blur(2px);
}
.ov-title { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 800; font-style: italic; text-transform: uppercase; line-height: 1.05; }
.ov-text { color: var(--muted); max-width: 36ch; }
.game-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }
.controls-help { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }

.boxes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 3px solid var(--line); }
.boxes li { padding: 1.4rem 1.25rem 1.6rem; border-right: 3px solid var(--line); }
.boxes li:last-child { border-right: 0; }
.box-n { display: block; font-size: 2.6rem; font-weight: 800; font-style: italic; color: var(--ball); line-height: 1; margin-bottom: 0.75rem; }
.boxes h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.boxes p { color: var(--muted); }

.next { background: var(--outer); }
.next-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.next-lede { color: #e3ece6; font-size: 1.1rem; }
.planned { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.planned li { padding: 1rem 1.1rem 1rem 3rem; border: 3px solid var(--line); position: relative; background: rgba(15, 44, 84, 0.25); }
.planned li::before { content: ""; position: absolute; left: 1rem; top: 1.25rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--ball); }
.planned strong { color: var(--ball); }

.join { background: var(--court); }
.join-inner { max-width: 760px; }
.join-inner > p:not(.kicker) { color: var(--muted); font-size: 1.1rem; }
.join-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.75rem; }
.field label { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin-bottom: 0.4rem; }
.field label span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; font: 400 1.05rem/1.4 var(--font); color: var(--text); background: var(--court-dark); border: 2px solid var(--line); padding: 0.7rem 0.8rem; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 3px solid var(--ball); outline-offset: 0; }
.field-wide { grid-column: 1 / -1; }
.join-form .btn { justify-self: start; }

.site-footer { padding: 1.75rem var(--gutter); background: var(--court-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; color: var(--muted); font-size: 0.95rem; }
.site-footer strong { color: var(--text); font-style: italic; text-transform: uppercase; }

@media (max-width: 900px) {
  .hero, .next-grid { grid-template-columns: 1fr; }
  .court-art { max-width: 200px; }
  .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boxes li:nth-child(2) { border-right: 0; }
  .boxes li:nth-child(-n+2) { border-bottom: 3px solid var(--line); }
}
@media (max-width: 600px) {
  .wallet { grid-template-columns: 1fr 1fr; }
  .w-cell:nth-child(2) { border-right: 0; }
  .w-cell:nth-child(-n+2) { border-bottom: 3px solid var(--line); }
  .state { min-width: 0; padding: 0.4rem 0.5rem; font-size: 0.85rem; }
  .side { flex-direction: column; align-items: center; gap: 0; padding: 0.4rem; }
  .boxes { grid-template-columns: 1fr; }
  .boxes li { border-right: 0; border-bottom: 3px solid var(--line); }
  .boxes li:last-child { border-bottom: 0; }
  .join-form { grid-template-columns: 1fr; }
}

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