/* ===========================================================================
   /compete — the arena.

   The page used to open on three paragraphs of explanation. What it is
   actually selling is a prize paid every week, so the prize leads and the
   explanation follows it.

   One rule governs everything here: no content depends on an animation
   completing. The prize is written into the HTML and the counter animates TO
   it; the opening date is printed and the countdown replaces it only once the
   server confirms the hour; every entrance keyframe fills `both` from load,
   so a reader who never scrolls, has JavaScript off, or asks for reduced
   motion still sees every word.
   =========================================================================== */

/* -------------------------------------------------------------- the band */
/* Full bleed, using the pattern the rest of the site already uses. 100vw
   counts the scrollbar; body{overflow-x:clip} in system.css absorbs it. */
.arena{
  position:relative;isolation:isolate;overflow:hidden;
  margin-inline:calc(50% - 50vw);width:100vw;max-width:100vw;
  margin-block:calc(var(--sec) * .6) 0;
  padding:clamp(46px,8vw,92px) 22px clamp(42px,6vw,74px);
  text-align:center;
  background:
    radial-gradient(120% 86% at 50% 42%,
      color-mix(in srgb,var(--gold) 9%,transparent) 0%,
      transparent 62%),
    var(--sunk);
  border-block:1px solid var(--hair-soft);
}
.arena-sky{
  position:absolute;inset:0;z-index:-1;
  width:100%;height:100%;display:block;pointer-events:none;
}
.arena-in{position:relative;max-width:720px;margin-inline:auto}

.arena-kick{
  margin:0;font-size:var(--lbl);letter-spacing:.2em;text-transform:uppercase;
  color:var(--gold-dim);
}

/* ------------------------------------------------------------- the money */
.arena-prize{
  margin:10px 0 0;line-height:.96;
  display:flex;align-items:baseline;justify-content:center;
  gap:.3em;flex-wrap:wrap;
}
.arena-least{
  font-family:var(--display);font-size:clamp(1rem,2.6vw,1.5rem);
  color:var(--muted);
}
.arena-num{
  font-family:var(--display);font-weight:400;
  font-size:clamp(3.1rem,13vw,7.4rem);
  color:var(--gold);font-variant-numeric:tabular-nums;
  text-shadow:0 0 38px color-mix(in srgb,var(--gold) 26%,transparent);
}
.arena-ccy{
  font-family:var(--display);font-size:clamp(1rem,2.8vw,1.7rem);
  color:var(--gold-dim);letter-spacing:.04em;
}
.arena-say{
  margin:18px auto 0;max-width:40rem;color:var(--muted);
  font-size:1.02rem;line-height:1.62;
}

/* ------------------------------------------------------------- the clock */
/* A chip rather than a headline: the date is the fact, the ticking is the
   pull. Tabular figures so the seconds do not jitter the width. */
.arena-when{
  margin:24px auto 0;display:inline-flex;align-items:baseline;gap:12px;
  padding:11px 18px;border:1px solid var(--hair);
  background:color-mix(in srgb,var(--bg) 62%,transparent);
}
.arena-when b{
  font-weight:500;color:var(--fg);font-size:1.02rem;
  font-variant-numeric:tabular-nums;
}
.arena-when span{
  font-size:var(--lbl);letter-spacing:.16em;text-transform:uppercase;
  color:var(--faint);
}

/* --------------------------------------------------------------- the way in */
.arena-cta{margin:24px 0 0;display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.arena-cta a{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:0 22px;
  font-size:var(--lbl);letter-spacing:.16em;text-transform:uppercase;
  text-decoration:none;border:1px solid var(--hair);
}
.arena-cta .ar-go{background:var(--gold);color:var(--on-accent);border-color:var(--gold)}
.arena-cta .ar-alt{color:var(--fg)}
.arena-cta a:hover{border-color:var(--gold)}
.arena-foot{
  margin:20px auto 0;max-width:36rem;color:var(--faint);
  font-size:.9rem;line-height:1.6;
}

/* ------------------------------------------------------- rounds and leagues */
/* .wrap is a flex column. An auto inline margin on a flex item absorbs the
   free space instead of stretching, so these would be sized to their own
   content: the rounds reached 1000px and the leagues, whose boxes hold two
   short words each, shrank to 568. Stretch instead, so both sit on the same
   measure the pager and footer already use rather than a third one. */
.rounds,.leagues{width:100%;margin:var(--sec) 0 0}
.rounds h2,.leagues h2{
  font-family:var(--display);font-weight:400;font-size:clamp(1.6rem,3.4vw,2.1rem);
  text-align:center;margin:0;color:var(--fg);
}
.rounds .sub,.leagues .sub{
  text-align:center;color:var(--muted);margin:0 auto 26px;max-width:34rem;
  font-size:.98rem;line-height:1.6;
}

.rgrid{display:grid;gap:1px;background:var(--hair-soft)}
@media (min-width:760px){ .rgrid{grid-template-columns:repeat(3,1fr)} }
.rnd{background:var(--raise);padding:26px 24px 28px;min-width:0}
.rnd .n{
  margin:0;font-family:var(--display);font-size:1.9rem;color:var(--gold-dim);
  line-height:1;font-variant-numeric:tabular-nums;
}
.rnd h3{margin:14px 0 0;font-family:var(--display);font-weight:400;font-size:1.22rem;color:var(--fg)}
.rnd p{margin:10px 0 0;color:var(--muted);font-size:.94rem;line-height:1.6}

.lgrid{display:grid;gap:1px;background:var(--hair-soft)}
/* Stacked, the 1px gaps draw the rules between the boxes. Side by side the
   boxes are different heights, so that same backdrop paints a slab in the
   empty space above the shorter two: drop it and rule the columns instead. */
@media (min-width:760px){
  .lgrid{grid-template-columns:repeat(3,1fr);gap:0;background:none;align-items:end}
  .lg + .lg{box-shadow:inset 1px 0 var(--hair-soft)}
}
.lg{background:var(--raise);padding:24px;text-align:center;min-width:0}
.lg .code{margin:0;font-family:var(--display);font-size:1.9rem;color:var(--gold);line-height:1}
.lg .name{margin:6px 0 0;font-size:var(--lbl);letter-spacing:.18em;
  text-transform:uppercase;color:var(--faint)}
.lg .share{margin:14px 0 0;font-family:var(--display);font-size:2.1rem;color:var(--fg);
  font-variant-numeric:tabular-nums}
.lg .of{margin:2px 0 0;font-size:.85rem;color:var(--muted)}
/* Each box stands taller than the one before it, so the three read as a rising
   podium rather than three equal boxes — C1 takes the largest share of the
   prize and should look like it. align-items:end holds the shared baseline. */
@media (min-width:760px){
  .lg.b2{padding-block:34px}
  .lg.c1{padding-block:44px}
}

/* ------------------------------------------------------------- the motion */
@keyframes arRise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.js .arena-in>*{animation:arRise .8s cubic-bezier(.2,.7,.2,1) both}
.js .arena-in>*:nth-child(2){animation-delay:.07s}
.js .arena-in>*:nth-child(3){animation-delay:.14s}
.js .arena-in>*:nth-child(4){animation-delay:.21s}
.js .arena-in>*:nth-child(5){animation-delay:.28s}
.js .arena-in>*:nth-child(6){animation-delay:.35s}
.js .rnd,.js .lg{animation:arRise .7s cubic-bezier(.2,.7,.2,1) both}
.js .rnd:nth-child(2),.js .lg:nth-child(2){animation-delay:.08s}
.js .rnd:nth-child(3),.js .lg:nth-child(3){animation-delay:.16s}
/* reveal.js marks what it has shown; that mark always wins over the entrance
   animation, because a reader who never scrolls must still see the words */
.js .arena-in>.in,.js .rnd.in,.js .lg.in{opacity:1;transform:none;animation:none}

@media (prefers-reduced-motion:reduce){
  .js .arena-in>*,.js .rnd,.js .lg{animation:none;opacity:1;transform:none}
  .arena-sky{display:none}
}

/* The hero clock and the gate card's clock count to the same moment. When the
   hero one is live, the page should not state it twice; if it never renders,
   this never applies and the gate keeps its own. */
html[data-arena-clock] .card.gate .clock{display:none}
