/* XD Throwdown: mobile-first. Base styles target phones; min-width queries scale up. */

:root {
  --black: #000;
  --ink: #111;
  --white: #f5f3ee;
  --grey: #9a9a9a;
  /* Sticky-note accents pulled from the event photos */
  --note-yellow: #ffe24a;
  --note-pink: #ff5fa2;
  --note-green: #8be04e;
  --note-blue: #4fc3f7;
  --pad: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 17px/1.55 'Inter', system-ui, sans-serif;
}
img { max-width: 100%; display: block; }
/* The hidden attribute always wins (otherwise rules like .form { display: grid } override it) */
[hidden] { display: none !important; }

/* ---------- Accessibility ---------- */
/* Visible keyboard focus everywhere (mouse clicks don't show it) */
:focus-visible { outline: 3px solid var(--note-yellow); outline-offset: 3px; }
/* Inside the light form card, yellow is too faint: deep pink is 5.3:1 on the card (WCAG needs 3:1) */
.round5-card { --focus-ink: #c2185b; }
.round5-card :focus-visible { outline-color: var(--focus-ink); }
/* Skip link: hidden until focused with Tab */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--note-yellow); color: var(--black);
  font: 700 1rem 'Inter', sans-serif; padding: 12px 16px; text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }
#main:focus { outline: none; }
a { color: inherit; }
h2 { margin: 0 0 16px; }
.muted { color: var(--grey); }

/* Stencil-ish headline voice (jersey / scoreboard type) */
.stencil {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(3.2rem, 15vw, 7rem);
  line-height: .9;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* ---------- Top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px var(--pad);
  padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(rgba(0,0,0,.45), transparent);
  transition: background-color .25s;
  --bar-h: 64px;
}
.bar.solid { background: rgba(0,0,0,.88); }
/* The blur lives on a pseudo-element, not the bar itself: backdrop-filter on the bar would make it
   the containing block for the fixed full-screen menu, shrinking the menu to the bar's height. */
.bar.solid::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.bar-right { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }

/* Anchored sections land below the fixed bar */
/* Anchored sections land just below the fixed bar (measured: 68px on phones, 76px on desktop),
   with a little breathing room. Was 64px, which tucked each section's top under the bar. */
[id] { scroll-margin-top: 80px; }
@media (min-width: 1000px) { [id] { scroll-margin-top: 92px; } }

/* Menu button (mobile): two paint-drip bars (echo the drip logo), white like the rest of the header.
   Open: the bars fade out and a matching X, same rounded bar weight, with drips, rotates in. */
.menu-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; /* comfortable tap target */
  background: none; border: 0; cursor: pointer; color: var(--white);
}
.menu-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.menu-icon { position: relative; display: block; width: 30px; height: 30px; }
.menu-icon svg { display: block; transition: opacity .2s ease, transform .22s ease; }
.menu-icon .icon-x { position: absolute; inset: 0; opacity: 0; transform: rotate(-30deg) scale(.7); }
.menu-open .menu-icon .icon-bars { opacity: 0; transform: scale(.7); }
.menu-open .menu-icon .icon-x { opacity: 1; transform: none; }

/* Menu: full-screen overlay on mobile */
.menu {
  position: fixed; inset: 0; z-index: 1;
  background: #000;
  padding: 96px var(--pad) 40px;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility 0s linear .2s; /* closing: fade, then hide */
}
/* Opening: become visible immediately so focus can move to the first link */
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .2s, visibility 0s; }
.menu-open, .menu-open body { overflow: hidden; } /* lock page scroll while open */
.menu ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid #222;
  font: 400 clamp(2rem, 10vw, 3rem)/1 'Bebas Neue', sans-serif; text-decoration: none; text-transform: uppercase;
}
.menu a span { font: 400 .8rem 'Special Elite', monospace; color: var(--note-yellow); }
.menu-cta-item a { color: var(--note-yellow); }

/* Double-diamond drip mark from the original site, turned white for the dark bar */
.bar-mark { display: block; line-height: 0; position: relative; z-index: 2; }
/* Plain image (works when the page is opened from disk; CSS masks don't). White at rest;
   on hover/focus a filter recolors it to brand yellow. It never moves. */
.bar-mark img {
  width: 46px; height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0,0,0,.6));
  transition: filter .2s ease;
}
.bar-mark:hover img, .bar-mark:focus-visible img {
  filter: brightness(0) invert(84%) sepia(52%) saturate(900%) hue-rotate(354deg) brightness(106%) drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
@media (min-width: 720px) { .bar-mark img { width: 56px; } }
/* Quiet on purpose: XDT is retired (mostly), so the header invite is low-key, not a sales button */
.bar-cta {
  font: 400 .78rem 'Special Elite', monospace; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: #ddd;
  padding: 8px 12px; min-height: 36px; display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,.35); border-radius: 2px;
  transition: color .15s, border-color .15s;
}
.bar-cta:hover { color: var(--note-yellow); border-color: var(--note-yellow); }

/* ---------- Hero ---------- */
/* STL logo centered on a darkened sticky-note wall. The photo is texture only. */
.hero { position: relative; }
.hero-photo {
  position: relative; overflow: hidden; background: #000;
  height: 60svh; min-height: 400px; max-height: 640px;
  /* Mobile: logo sits near the top (just under the bar), clear of the bottom fade */
  display: grid; place-items: start center;
  padding-top: 76px;
}
/* The <picture> must be out of the grid flow too; otherwise it takes an (empty) grid row
   that steals half the free height and pushes the logo down from where it should be. */
.hero-photo picture { position: absolute; inset: 0; }
.hero-photo picture img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  /* Dark tint like the current site. A slight blur (shallow depth of field) separates
     the crisp logo art from the busy sticky notes behind it. */
  filter: grayscale(.9) brightness(.66) contrast(1.15) blur(2.5px); /* a touch brighter so the spotlight falloff reads */
  transform: scale(1.03); /* hides the soft edge the blur creates at the photo's border */
}
/* Spotlight in reverse: darkest right behind the logo (so its white art pops),
   lighter toward the edges so the photo still reads, then fades into the page.
   It's sized and placed from the logo itself (--logo-w), not the photo box, so it
   tracks the logo at every screen size. Breakpoints below override these vars. */
.hero-photo {
  --logo-w: min(94vw, 760px);                    /* phones: logo nearly full width */
  --spot-x-r: 72vw;                              /* horizontal radius */
  --spot-y-r: calc(var(--logo-w) * .62);         /* vertical radius */
  --spot-y: calc(76px + var(--logo-w) * .33);    /* logo sits under the bar (padding-top 76px) */
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(var(--spot-x-r) var(--spot-y-r) at 50% var(--spot-y),
      rgba(0,0,0,.82) 0%, rgba(0,0,0,.62) 50%, rgba(0,0,0,.12) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0) 70%, #000 100%);
  pointer-events: none;
}
/* No z-index on the wrapper: it would isolate the blend and show the logo's black box */
.hero-logo-wrap { margin: 0; width: 100%; display: grid; place-items: center; }
.hero-logo {
  position: relative; z-index: 1;
  width: var(--logo-w);
  height: auto;
  mix-blend-mode: screen; /* drops the logo's black background so only the white art shows */
  clip-path: inset(0 0 8.6% 0); /* hides the tiny baked-in "EST." line; real text below replaces it */
}
/* Larger, real-text version of the logo's date line */
.hero-est {
  position: relative; z-index: 1;
  margin-top: calc(var(--logo-w) * -.05);
  font: 400 .9rem 'Special Elite', monospace; letter-spacing: .35em; text-transform: uppercase;
  color: var(--white); text-shadow: 0 1px 6px rgba(0,0,0,.8);
}
.hero-inner {
  position: relative;
  padding: 0 var(--pad) 24px; /* small: the scoreboard below belongs to this text */
  width: 100%;
}

/* ---------- The crowd (uncovered photo) ---------- */
.crowd { padding: 24px 0 56px; }
.crowd-photo { margin: 0; position: relative; }
.crowd-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 55% 65%;
  filter: grayscale(.85) brightness(.6) contrast(1.2);
}
.crowd-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0) 14%, rgba(0,0,0,0) 86%, #000 100%);
  pointer-events: none;
}
.crowd-line {
  padding: 8px var(--pad) 0; margin: 0;
  font: 400 clamp(2rem, 9vw, 4rem)/1 'Bebas Neue', sans-serif; text-transform: uppercase;
}
.crowd-line span { color: var(--note-yellow); }
/* The page's main plain-language explainer: body font, a step up in size, for readability */
.hero-line {
  font: 400 1.2rem/1.45 'Inter', system-ui, sans-serif;
  margin: 16px 0 10px; max-width: 32ch;
}
.hero-line strong { font-weight: 800; color: var(--note-yellow); }
.hero-sub { margin: 0; color: #cfcfcf; max-width: 34ch; }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .8rem 'Inter', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.5); padding: 5px 10px;
  margin: 0;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--note-pink); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .2; } }


/* ---------- Scoreboard (nod to the venue board in the photos) ---------- */
/* Sits close under the hero text it belongs to, with room before the photo below */
.scoreboard { padding: 4px var(--pad) 56px; }
.board {
  display: grid; grid-template-columns: 1fr 1.3fr 1fr;
  background: #0b0b0b;
  border: 3px solid #2a2a2a; border-radius: 6px;
  box-shadow: inset 0 0 0 2px #000, 0 10px 30px rgba(0,0,0,.6);
}
.cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 6px; text-align: center;
}
.cell + .cell { border-left: 2px solid #222; }
.label { font: 400 .7rem 'Special Elite', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.label.small { color: var(--note-pink); }
.num {
  font-family: 'Bebas Neue', sans-serif; font-size: 3.4rem; line-height: 1;
  color: var(--white);
  text-shadow: 0 0 12px rgba(255,255,255,.25);
}
.clock .num { color: var(--note-yellow); text-shadow: 0 0 12px rgba(255,226,74,.35); font-size: 2.6rem; }
.board-foot { text-align: center; font-family: 'Special Elite', monospace; color: var(--grey); margin: 14px 0 0; }
.board-foot strong { color: var(--white); font-weight: 400; }

/* ---------- Intro ---------- */
.intro { padding: 56px var(--pad) 24px; }
.intro p { max-width: 36ch; margin: 0 0 14px; font-size: 1.1rem; }
.intro h2 { font-size: clamp(2.8rem, 13vw, 6rem); }
/* Highlighter-marker emphasis, in the sticky-note colors */
.hl { padding: 0 .15em; color: var(--black); font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hl-blue { background: var(--note-blue); }
.hl-pink { background: var(--note-pink); }
.hl-green { background: var(--note-green); }

.kicker {
  font: 400 .85rem 'Special Elite', monospace !important; letter-spacing: .16em; text-transform: uppercase;
  color: var(--note-yellow); margin-bottom: 10px !important;
}

/* ---------- Anatomy of a match (scrollytelling) ---------- */
/* Mobile: diagram pinned at top, step cards scroll up underneath it. */
.scrolly { position: relative; }
/* The diagram sits ABOVE the steps (z-index 2 vs 1) on a solid background,
   so cards slide up and disappear behind it instead of covering it. */
.scrolly-graphic {
  position: sticky; top: 68px; z-index: 2; /* just below the fixed bar (68px on phones) */
  display: grid; place-items: center;
  padding: 8px var(--pad) 10px;
  background: #000;
}
.scrolly-graphic::after { /* soft edge where cards slip underneath */
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 28px;
  background: linear-gradient(#000, rgba(0,0,0,0)); pointer-events: none;
}
/* Phones: the pinned diagram is capped by height (not width) so the scrolling cards
   get more of the screen. Was full width, ~280px tall on a typical phone; now ~220px. */
.scrolly-graphic svg { display: block; width: auto; height: min(28svh, 220px); max-width: 100%; overflow: visible; }
/* Smaller diagram, so its labels get a bit larger (in diagram units) to stay readable */
@media (max-width: 719px) {
  #arena text { font-size: 15px; }
  #arena .lbl-screen { font-size: 15px; }
  #arena .lbl-optin { font-size: 13px; }
  #arena .lbl-cause { font-size: 14px; }
}
.scrolly-steps { position: relative; z-index: 1; padding: 0 var(--pad); }
/* Steps are roughly the height of the readable area under the diagram,
   so the next card arrives as the last one slides away (no long empty gaps). */
.step { min-height: 50svh; display: flex; align-items: flex-start; padding-bottom: 6svh; }
.step:first-child { margin-top: 6svh; }
.step:last-child { min-height: 60svh; }
.card {
  background: rgba(10,10,10,.94);
  border: 1px solid #2c2c2c; border-left: 4px solid #444;
  padding: 18px 18px 20px; max-width: 460px;
  transition: border-color .3s;
}
/* Active card is marked by its yellow edge only. (Dimming inactive cards with opacity
   dropped captions below WCAG 4.5:1 contrast, so it was removed.) */
.step.active .card, html:not(.scrolly-on) .card { border-left-color: var(--note-yellow); }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: 12px 0 6px; }
@media (min-width: 1000px) { .card img { aspect-ratio: 3 / 2; } }
/* Phones and tablets: no building diagram. The steps read as a plain stack of cards,
   all with the yellow edge. (Desktop keeps the pinned diagram beside the steps.) */
@media (max-width: 999px) {
  .scrolly-graphic { display: none; }
  .step, .step:last-child { min-height: 0; padding-bottom: 16px; }
  .step:first-child { margin-top: 8px; }
  .scrolly-steps { padding-bottom: 32px; }
  .card { border-left-color: var(--note-yellow); }
}
.step-num { font: 400 .75rem 'Special Elite', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--note-yellow); margin: 0 0 10px; }
.cap { font-size: .8rem; color: var(--grey); }
.cap b { color: #ddd; font-weight: 600; } /* "Match 0X · Cause, date" tag keeps the matches straight */
/* Two small photos side by side inside a step card */
.card-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.card-pair figure { margin: 0; }
.card-pair img { margin: 0 0 4px; aspect-ratio: 1 / 1; }
.card-pair figcaption { font-size: .75rem; line-height: 1.35; color: var(--grey); }

/* Diagram drawing */
#arena .floor { fill: #141414; stroke: #bdbdbd; stroke-width: 2.5; }
#arena .pit { fill: #1d1d1d; stroke: var(--note-yellow); stroke-width: 2; stroke-dasharray: 7 6; }
#arena .clock-box { fill: #000; stroke: var(--note-yellow); stroke-width: 2; }
#arena .cause { fill: #b388ff; }
#arena .pick { fill: none; stroke: #b388ff; stroke-width: 2.5; stroke-dasharray: 5 5; }
#arena .crown { fill: var(--note-yellow); stroke: #000; stroke-width: 1.5; }
#arena .screen { fill: #1a1a1a; stroke: var(--note-blue); stroke-width: 2; }
#arena .board { stroke: var(--white); stroke-width: 5; stroke-linecap: round; }
#arena .table { fill: none; stroke: var(--white); stroke-width: 2; }
#arena .p { stroke: #000; stroke-width: 1.5; }
#arena .team1 { fill: var(--note-pink); }
#arena .team2 { fill: var(--note-blue); }
#arena .mc { fill: var(--note-yellow); }
#arena .judge { fill: var(--white); }
#arena .fan { fill: #8a8a8a; transition: opacity .5s, transform .5s; }
#arena .fan.optin { fill: var(--note-green); stroke: #000; stroke-width: 1; } /* opted-in interviewees */
.neon-dot-text { color: var(--note-green); }
.neon-dot-text::before {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .3em;
  border-radius: 50%; background: var(--note-green); vertical-align: .02em;
}
#arena text { fill: var(--white); font-family: 'Permanent Marker', cursive; font-size: 13px; }
#arena .lbl-big { font-size: 30px; fill: var(--note-yellow); letter-spacing: 2px; }
#arena .lbl-sub { font-family: 'Special Elite', monospace; font-size: 12px; fill: #bbb; letter-spacing: 1px; }
#arena .lbl-clock { font-family: 'Bebas Neue', sans-serif; font-size: 17px; fill: var(--note-yellow); letter-spacing: 1px; }
#arena .lbl-optin { font-size: 11px; fill: var(--note-green); }
#arena .lbl-cause { fill: #b388ff; font-size: 12px; }
#arena .lbl-screen { font-family: 'Special Elite', monospace; font-size: 13px; fill: var(--note-blue); }
#arena .t1 { fill: var(--note-pink); }
#arena .t2 { fill: var(--note-blue); }
#arena .lbl-crowd { fill: #ddd; }

/* Scroll states (only when JS is running; otherwise everything shows) */
.scrolly-on #arena .layer { opacity: 0; transition: opacity .45s ease; }
.scrolly-on #arena .layer.on { opacity: 1; }
#arena .intro-lbl { transition: opacity .4s; }
.scrolly-on #arena .layer[data-layer="0"].on:not(.hot) .intro-lbl { opacity: 0; }
html:not(.scrolly-on) #arena .intro-lbl { opacity: 0; } /* no-JS: full diagram shows, so hide the intro label */
/* Earlier layers dim once you move on, except the floor and the people (neon dots stay bright) */
.scrolly-on #arena .layer.on:not(.hot):not([data-layer="0"]):not([data-layer="4"]):not([data-layer="6"]) { opacity: .55; }
/* Crowd dots pop in one by one */
.scrolly-on #arena .fan { opacity: 0; transform: scale(.2); transform-box: fill-box; transform-origin: center; }
.scrolly-on #arena .layer.on .fan { opacity: 1; transform: none; }

/* ---------- Pull quote + original sketch ---------- */
.pull { padding: 56px var(--pad) 48px; }
.pull-quote {
  margin: 0 0 28px;
  font: 400 clamp(2.4rem, 11vw, 5rem)/.95 'Bebas Neue', sans-serif; text-transform: uppercase;
}
.pull-quote span { color: var(--note-pink); }
.pull-photo { margin: 0 calc(var(--pad) * -1); }
.pull-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 40%; }

/* Round 1 / halftime / round 2 bar inside the clock card */
.rounds { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; margin-top: 14px; }
.round { border: 2px solid var(--note-yellow); padding: 10px; display: grid; gap: 2px; }
.round b { font: 400 .75rem 'Special Elite', monospace; letter-spacing: .12em; text-transform: uppercase; }
.round span { font: 400 1.8rem/1 'Bebas Neue', sans-serif; color: var(--note-yellow); }
.round em { font-style: normal; font-size: .9rem; line-height: 1.35; color: #ddd; }
.half { align-self: center; text-align: center; font: 400 .7rem/1.2 'Special Elite', monospace; text-transform: uppercase; color: var(--grey); }

/* Judging categories */
.chips { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--white); color: var(--black); font: 600 .85rem 'Inter', sans-serif; padding: 6px 10px; transform: rotate(-1deg); }
.chips li:nth-child(2) { background: var(--note-pink); transform: rotate(1deg); }
.chips li:nth-child(3) { background: var(--note-green); }

/* The upset: a quiet aside, not a callout */
.upset { font-size: .9rem; color: var(--grey); font-style: italic; }

/* Original hero photo, high on the page, uncovered */
.wide-photo { margin: 0; position: relative; }
/* Shorter crop + darker tint; edges fade into the black page */
.wide-photo img { width: 100%; aspect-ratio: 7 / 5; object-fit: cover; object-position: 35% 45%; filter: grayscale(.2) brightness(1.3) contrast(1.12); } /* matched by measurement to the site's other dim crowd shots (avg brightness ~99; was 47) */
.wide-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0) 9%, rgba(0,0,0,0) 89%, #000 100%);
}

/* Timeline note (City Museum) */
.tl-note { display: block; margin-top: 6px; font-size: .9rem; color: var(--grey); }
/* Match 04 poster: a tall crop that frames the glowing TV poster, kept small so the timeline stays scannable */
.tl-poster {
  width: min(100%, 220px); aspect-ratio: 3 / 4; object-fit: cover; object-position: center 45%;
  margin-top: 12px; border: 1px solid #2a2a2a;
  filter: var(--grade);
}
.tl-poster-cap { font-size: .8rem; margin-top: 4px; }

/* Match winners on the timeline */
.winner {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font: 600 .9rem/1.3 'Inter', sans-serif; color: var(--white);
}
.winner .crown { color: var(--note-yellow); font-size: 1rem; line-height: 1; }
.upset-tag { color: var(--note-pink); font-weight: 600; }

.special-thanks { margin-top: 20px !important; }
.special-thanks .kicker { display: block; margin-bottom: 4px !important; }

/* The XDT Crew: names as sticky notes */
/* Crew photo sits beside the names; wraps above them on narrow phones */
.crew { margin: 22px 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.crew-photo {
  width: 168px; aspect-ratio: 5 / 4; object-fit: cover; object-position: center 30%;
  border: 3px solid var(--white); box-shadow: 3px 4px 0 rgba(0,0,0,.5);
  transform: rotate(-2deg); filter: var(--grade);
}
.crew-names { flex: 1 1 200px; }
@media (max-width: 420px) { .crew-photo { width: 100%; max-width: 320px; } }
.crew-label { font: 400 .8rem 'Special Elite', monospace !important; letter-spacing: .14em; text-transform: uppercase; color: var(--note-yellow); margin-bottom: 10px !important; }
.crew-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crew-list li {
  padding: 8px 12px; color: var(--black);
  font: 400 1.05rem/1 'Permanent Marker', cursive;
  box-shadow: 2px 3px 0 rgba(0,0,0,.4);
}
.crew-list li:nth-child(1) { background: var(--note-yellow); transform: rotate(-2deg); }
.crew-list li:nth-child(2) { background: var(--note-pink);   transform: rotate(1.5deg); }
.crew-list li:nth-child(3) { background: var(--note-blue);   transform: rotate(-1deg); }
.crew-list li:nth-child(4) { background: var(--note-green);  transform: rotate(2deg); }

/* ---------- Made in St. Louis ---------- */
.stl { padding: 24px 0 56px; }
.stl-photo { margin: 0; }
.stl-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* Large crew photo: desktop only (phones keep the small one beside the names) */
.crew-big { display: none; }
.crew-big img { object-position: center 35%; }
.crew-big figcaption {
  position: absolute; left: 12px; bottom: 12px; z-index: 1;
  font: 400 .8rem 'Special Elite', monospace; letter-spacing: .12em; text-transform: uppercase;
  background: var(--black); color: var(--note-yellow); padding: 5px 9px;
}
.stl-copy { padding: 28px var(--pad) 0; }
.stl-copy p { max-width: 38ch; margin: 0 0 14px; }
.stl-copy .stencil { font-size: clamp(2.8rem, 13vw, 5.5rem); }
/* Body font like the paragraphs around it; the yellow rule (not a font change) sets it apart */
.stl-thanks {
  font: 500 1.05rem/1.5 'Inter', system-ui, sans-serif;
  border-left: 4px solid var(--note-yellow); padding-left: 14px; margin-top: 22px !important;
}

/* Free Skate logo on the sticky note */
/* Logo is a black-on-white graphic: invert so it reads white on the dark page, and keep it small */
.note-logo { width: 96px; height: auto; margin: 12px 0 0; filter: invert(1); mix-blend-mode: screen; opacity: .8; }

/* ---------- Photo story ---------- */
.story { display: grid; gap: 4px; }
.shot { position: relative; margin: 0; overflow: hidden; background: #111; }
.shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.shot.tall img { aspect-ratio: 1 / 1; object-position: center 30%; }
.shot.wide img { aspect-ratio: 16 / 9; object-position: 30% center; } /* keep the presenter in frame on phones */
/* ---------- One photo grade for the whole page ----------
   Slightly muted color + deeper contrast + a touch darker: the darker mids make the
   brightest colors (sticky notes, jerseys, neon) pop, and photos from different
   cameras and years read as one set. Two extra levels correct the weaker phone shots
   (measured: low tonal contrast, or a strong warm/cool color cast). */
:root {
  --grade:      grayscale(.15) contrast(1.1)  brightness(.96);
  --grade-lift: grayscale(.15) contrast(1.24) brightness(.97);  /* flat shots: more contrast, no extra darkening */
  --grade-haze: grayscale(.05) contrast(1.42) brightness(.86) saturate(1.12); /* bright, hazy shots */
  --grade-tame: grayscale(.32) contrast(1.12) brightness(.96);  /* strong orange or blue cast */
}
.shot img, .card img, .strip img, .pull-photo img, .stl-photo img { filter: var(--grade); }
.shot img.lift, .card img.lift, .strip img.lift, .pull-photo img.lift { filter: var(--grade-lift); }
.shot img.haze, .card img.haze, .strip img.haze, .pull-photo img.haze { filter: var(--grade-haze); }
.shot img.tame, .card img.tame, .strip img.tame, .pull-photo img.tame { filter: var(--grade-tame); }
.shot.bw img, .strip img.bw { filter: grayscale(1) contrast(1.1); }

/* Soft dark edge on the big photos: adds drama and hides edge softness on lower-res shots */
.shot::after, .pull-photo::after, .stl-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 90px rgba(0,0,0,.5);
}
.pull-photo, .stl-photo { position: relative; }
.shot figcaption { z-index: 1; } /* keep captions above the edge shading */
.shot figcaption {
  position: absolute; left: 12px; bottom: 12px;
  font: 400 .95rem 'Special Elite', monospace; letter-spacing: .08em; text-transform: uppercase;
  background: var(--black); color: var(--white);
  padding: 6px 10px;
}


/* ---------- Causes as championship banners ---------- */
.causes { padding: 64px var(--pad) 48px; }
/* Vertical timeline: a line down the left, a dot per match. Mobile-first. */
.timeline {
  list-style: none; margin: 32px 0 0; padding: 0 0 0 28px;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: #333;
}
.timeline li { position: relative; padding: 0 0 36px; }
.timeline li:last-child { padding-bottom: 0; }
.tl-match::before, .tl-next::before {
  content: ""; position: absolute; left: -28px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--dot, var(--white)); border: 3px solid #000;
  box-shadow: 0 0 0 2px var(--dot, var(--white));
}
.timeline li:nth-child(1) { --dot: var(--note-green); }
.timeline li:nth-child(2) { --dot: var(--note-blue); }
.timeline li:nth-child(4) { --dot: var(--note-pink); }
.timeline li:nth-child(5) { --dot: var(--note-yellow); }
.timeline time {
  display: block;
  font: 400 .8rem 'Special Elite', monospace; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dot, var(--grey));
}
.timeline .match {
  display: block; margin-top: 2px;
  font: 400 .75rem 'Special Elite', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--grey);
}
.timeline .name {
  display: block; margin-top: 4px;
  font: 400 clamp(2rem, 9vw, 2.8rem)/.95 'Bebas Neue', sans-serif; letter-spacing: .01em;
}
/* COVID break: the sticky note sits on the line, line dashes through it */
.tl-break { margin-left: 0; }
.tl-break .note { margin: 0; }
/* The open slot */
.tl-next { --dot: transparent; }
.tl-next::before { background: #000; box-shadow: 0 0 0 2px var(--white); border-style: dashed; }
.tl-next time { color: var(--white); }
.tl-next .name a { color: var(--note-yellow); text-decoration: none; border-bottom: 3px solid var(--note-yellow); }

/* ---------- Interlude on the timeline (kept quiet so the matches lead) ---------- */
.note {
  border-left: 2px dashed #555;
  padding: 2px 0 2px 16px;
  max-width: 460px;
  color: #b5b5b5;
}
.note p { margin: 0; font-size: .95rem; line-height: 1.5; }
.note strong { color: var(--white); font-weight: 600; }
.marker {
  font: 400 .8rem 'Special Elite', monospace !important;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey); margin-bottom: 6px !important;
}

/* ---------- Swipe strip ---------- */
.strip-wrap { padding: 32px 0 56px; } /* sits right under the photo story: one "Photos" area */
.strip-head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--pad); margin-bottom: 12px; }
.strip-label { margin: 0; font: 400 .9rem 'Special Elite', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.strip-count { color: var(--note-yellow); margin-left: 10px; }
.strip-nav { display: flex; gap: 8px; }
.strip-btn {
  width: 44px; height: 44px; /* comfortable tap target */
  background: none; color: var(--white); border: 1px solid rgba(255,255,255,.5);
  font-size: 1.2rem; cursor: pointer; transition: background .15s, opacity .15s;
}
.strip-btn:hover { background: rgba(255,255,255,.1); }
.strip-btn:disabled { opacity: .3; cursor: default; }
.strip-wrap.no-overflow .strip-nav, .strip-wrap.no-overflow .strip-progress, .strip-wrap.no-overflow .strip-count { display: none; }
.strip-progress { margin: 14px var(--pad) 0; height: 3px; background: #2a2a2a; }
.strip-progress span { display: block; height: 100%; width: 20%; background: var(--note-yellow); transition: width .2s; }
/* One-time nudge hint */
@keyframes strip-nudge { 0%, 100% { transform: none; } 40% { transform: translateX(-36px); } }
.strip.nudge img { animation: strip-nudge .9s ease-in-out 1; }
.strip {
  display: flex; gap: 8px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
  padding: 0 var(--pad);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip img {
  flex: 0 0 74%; aspect-ratio: 4 / 3; object-fit: cover; /* landscape: about half the height of the old portrait cards */
  /* min-width: 0 lets the flex-basis widths apply (otherwise each photo stays at its full file width),
     and align-self keeps every photo at 4:3. Together they fix the strip's height before photos load,
     so it doesn't grow mid-scroll and throw off the jump to the section below. */
  min-width: 0; align-self: flex-start;
  scroll-snap-align: start;
}

/* ---------- Round 5 ---------- */
/* Dark section like the rest of the site; only the form sits on a light card,
   so the ask still stands out without a full-width bright block. */
.round5 {
  position: relative; overflow: hidden;
  background: var(--black); color: var(--white);
  padding: 64px var(--pad) 72px;
}
.round5::before {
  /* Faint white splat watermark (decorative). Phones: smaller, tucked into the top-right corner */
  content: ""; position: absolute; top: -70px; right: -110px;
  width: 260px; height: 245px;
  background: url("assets/photos/splat.png") no-repeat center / contain;
  filter: brightness(0) invert(1);
  opacity: .1; pointer-events: none;
}
/* The card: off-white on black (18.9:1), sticky-note yellow offset shadow */
.round5-card {
  margin-top: 28px; max-width: 560px;
  background: var(--white); color: var(--black);
  padding: 24px 20px;
  box-shadow: 6px 6px 0 var(--note-yellow);
}
.round5-card .form { margin-top: 0; max-width: none; }
.round5-card .form-status { margin-top: 14px; }
.round5-card .form[hidden] + .form-status { margin-top: 0; }
.round5 > * { position: relative; }
.round5-title {
  font-family: 'Bebas Neue', sans-serif; font-weight: 400;
  font-size: clamp(5rem, 30vw, 12rem); line-height: .85;
  margin: 18px 0 18px;
}
.round5-title span { display: block; font-size: .45em; }
/* Body font, a step up in size and weight: reads as the lead without switching typefaces mid-thought.
   (The typewriter face is reserved for small uppercase labels.) */
.round5 .lead { font: 600 1.2rem/1.45 'Inter', system-ui, sans-serif; margin: 0 0 12px; max-width: 34ch; }
.round5 p { max-width: 38ch; }

.form { display: grid; gap: 14px; margin-top: 28px; max-width: 560px; }
/* Form labels are read, not scanned: body font, sentence case */
.form label { display: grid; gap: 6px; font: 600 .95rem 'Inter', system-ui, sans-serif; }
.form input, .form textarea {
  font: 400 16px 'Inter', sans-serif; /* 16px stops iOS zoom on focus */
  color: var(--black); background: #fff;
  border: 2px solid var(--black); border-radius: 0; padding: 13px 12px;
  -webkit-appearance: none; appearance: none;
}
.form input:focus, .form textarea:focus { outline: 3px solid var(--focus-ink, var(--note-pink)); outline-offset: 1px; }
.optional { text-transform: none; letter-spacing: 0; color: #666; }

/* "I'm interested in…" choices: big tappable rows */
.roles { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.roles legend { padding: 0; margin-bottom: 8px; font: 600 .95rem 'Inter', system-ui, sans-serif; }
.form .role {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 12px;
  border: 2px solid var(--black); background: #fff; cursor: pointer;
  font: 500 .95rem/1.3 'Inter', sans-serif; letter-spacing: 0; text-transform: none;
}
.form .role input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 20px; height: 20px; margin: 0; padding: 0;
  border: 2px solid var(--black); border-radius: 50%; background: #fff;
}
.form .role input:checked { background: var(--black); box-shadow: inset 0 0 0 3px #fff; }
.form .role:has(input:checked) { background: var(--note-yellow); }
.form .role input:focus { outline: none; }
.form .role:has(input:focus-visible) { outline: 3px solid var(--focus-ink, var(--note-pink)); outline-offset: 1px; }
.btn {
  font: 400 1.5rem 'Bebas Neue', sans-serif; letter-spacing: .05em;
  background: var(--black); color: var(--white);
  border: 0; padding: 16px 22px; min-height: 52px;
  cursor: pointer; width: 100%;
  box-shadow: 4px 4px 0 var(--note-pink);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--note-pink); }
.btn:disabled { opacity: .6; }
.hp { position: absolute; left: -9999px; }
.form-msg { font-family: 'Permanent Marker', cursive; font-size: 1.5rem; line-height: 1.3; padding: 12px 0; }
.form-status:focus { outline: none; } /* focused by script on success; it's a message, not a control */
.form-status { margin: 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.error { color: #b00020; }

/* ---------- Footer ---------- */
.foot { text-align: center; padding: 40px var(--pad) max(40px, env(safe-area-inset-bottom)); font-size: .9rem; }
.foot img { margin: 0 auto 8px; width: 120px; height: auto; mix-blend-mode: screen; } /* hides the image's own black square */
.foot p { margin: 4px 0; }

/* ================= Larger screens ================= */
@media (min-width: 720px) {
  :root { --pad: 40px; }
  /* Tablet: the phone-sized logo (94vw) was taller than the hero photo and got cropped */
  .hero-photo {
    min-height: 520px;
    --logo-w: min(70vw, 620px);
    --spot-x-r: calc(var(--logo-w) * .95);
    --spot-y-r: calc(var(--logo-w) * .55);
    --spot-y: calc(76px + var(--logo-w) * .33);
  }
  .hero-est { margin-top: calc(var(--logo-w) * -.06); }
  .crowd-photo img { aspect-ratio: 16 / 9; object-position: center 60%; }
  .wide-photo img { aspect-ratio: 2 / 1; }

  .hero-inner { padding-bottom: 28px; }
  .hero-line { font-size: 1.4rem; }
  .num { font-size: 4.6rem; }
  .clock .num { font-size: 3.6rem; }
  .scoreboard { max-width: 760px; margin: 0 auto; padding-bottom: 80px; }
  .strip img { flex-basis: 40%; }
  .round5::before { width: 520px; height: 480px; top: -40px; right: -60px; opacity: .12; }
  .round5-card { padding: 32px; }
}

@media (min-width: 1000px) {
  /* Desktop: menu links sit inline in the bar; no Menu button */
  .menu-btn { display: none; }
  .menu {
    position: static; inset: auto; opacity: 1; visibility: visible;
    background: none; padding: 0; overflow: visible;
    flex: 1; display: flex; justify-content: center;
  }
  .menu ol { display: flex; gap: 26px; }
  .menu a {
    padding: 4px 0; border: 0;
    font: 400 .8rem 'Special Elite', monospace; letter-spacing: .1em; color: #ddd;
  }
  .menu a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
  .menu a span { display: none; }
  .menu-cta-item { display: none; } /* the yellow Round 5? button already covers it */

  /* Hero: back to centered for desktop */
  .hero-photo { place-items: center; padding-top: 0; }
  .hero-photo { height: 70vh; min-height: 480px; max-height: 760px; }
  .hero-est { font-size: 1.05rem; margin-top: calc(var(--logo-w) * -.085); }
  /* Lift the logo above true center. Uses `top` on the img (not a transform on
     the wrapper), because a wrapper transform isolates the blend and shows a black box. */
  /* Logo is centered in the space below the menu bar (so it never touches the links),
     then lifted 3vh. The spotlight follows: half the photo height, plus half the bar, minus the lift. */
  .hero-photo {
    padding-top: 64px;
    --logo-w: min(52vw, 720px);
    --spot-x-r: calc(var(--logo-w) * 1.15);
    --spot-y-r: calc(var(--logo-w) * .55);
    --spot-y: calc(clamp(480px, 70vh, 760px) / 2 + 32px - 3vh);
  }
  .hero-logo { top: -3vh; }
  .hero-est { top: -3vh; }
  /* One centered column under the centered logo: tag → main sentence → supporting line */
  .hero-inner {
    max-width: 820px; margin: 0 auto; padding: 0 var(--pad) 32px;
    text-align: center;
  }
  .hero-line { margin: 18px auto 12px; max-width: 36ch; font-size: 1.55rem; }
  .hero-sub { margin: 0 auto; max-width: 46ch; }
  .crowd-photo img { aspect-ratio: auto; height: 80vh; min-height: 520px; }
  .crowd-line { max-width: 1200px; margin: 0 auto; }
  .intro, .causes { max-width: 1200px; margin: 0 auto; }
  .causes { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 64px; }
  .causes h2, .causes > p { grid-column: 1; }
  .causes .timeline { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .intro { padding-top: 96px; }
  .intro h2 { max-width: 14ch; }

  /* Diagram pinned on the right, steps scroll on the left */
  .scrolly { display: grid; grid-template-columns: minmax(320px, 1fr) 1.3fr; gap: 0 48px; max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
  .scrolly-graphic { order: 2; top: 0; height: 100vh; padding: 0; background: none; align-self: start; }
  .scrolly-graphic::after { display: none; }
  .scrolly-graphic svg { width: 100%; height: auto; max-width: 560px; max-height: 80vh; }
  .scrolly-steps { order: 1; }
  .step { min-height: 90vh; align-items: center; padding-bottom: 0; }
  .step:first-child { margin-top: 0; }
  .card { background: #0b0b0b; }

  .pull { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; }
  .pull-photo { margin: 0; }
  .wide-photo img { aspect-ratio: auto; height: 70vh; min-height: 460px; object-position: center 45%; }
  .stl { max-width: 1200px; margin: 0 auto; padding: 72px var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .stl-media { display: grid; gap: 16px; }
  .crew-big { display: block; }
  .crew .crew-photo { display: none; } /* the large one in the left column replaces the thumbnail */
  .stl-copy { padding: 0; }

  .story { grid-template-columns: repeat(10, 1fr); max-width: 1400px; margin: 0 auto; }
  .shot:nth-child(1) { grid-column: span 6; }
  .shot:nth-child(2) { grid-column: span 4; }
  .shot:nth-child(3) { grid-column: span 10; }  /* 03 The pitch: full-width panorama */
  .shot:nth-child(4) { grid-column: span 4; }
  .shot:nth-child(5) { grid-column: span 6; }
  .shot:nth-child(5) img { object-position: center 35%; }
  .shot img, .shot.tall img, .shot.wide img { aspect-ratio: auto; height: 520px; }
  .shot.wide img { object-position: center; }

  .strip img { flex-basis: 24%; }
  .round5 { padding: 96px max(var(--pad), calc((100vw - 1200px) / 2)); }
  .form { grid-template-columns: 1fr 1fr; }
  .form .roles, .form > label:nth-of-type(n+3), .form .btn { grid-column: 1 / -1; }
  .roles { grid-template-columns: 1fr 1fr; }
  .roles legend { grid-column: 1 / -1; }
  .btn { width: auto; justify-self: start; }
}
/* Wide screens: intro on the left, form card on the right (shorter section, no empty right half) */
@media (min-width: 1200px) {
  .round5 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 0 64px; align-items: start; }
  .round5-card { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
  #arena .layer, #arena .fan, .card { transition: none !important; }
  .strip.nudge img { animation: none; }
  .menu-icon svg { transition: none; }
}
