/* ─────────────────────────────────────────────────────────────────────────────
   Site layout: the stage, the chrome over it, and the sections below.

   The hero is a fixed full-viewport canvas with the UI floating over it. Each
   sport "experience" is a run of scroll-driven beats against that one canvas
   rather than three separate pages, which is what lets the camera move
   between scenes instead of cutting.
   ──────────────────────────────────────────────────────────────────────────── */

/* ── The stage ────────────────────────────────────────────────────────────
   The illustrated ballpark: one fixed, full-bleed SVG behind everything.
   `slice` on the viewBox means it always fills the frame and crops, the way
   a camera does, instead of letter-boxing on an odd aspect ratio. */
.stage-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #2E6BE6;
  overflow: hidden;
}
.stage-wrap #stage, .stage-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* On a tall screen the 16:9 picture slices down to a strip of crowd and the
   batter falls out of frame. Reframing on him is better than redrawing a
   portrait composition: the art is vector, so a transform costs nothing and
   stays sharp. */
@media (max-width: 960px) and (orientation: portrait) {
  .stage-wrap svg {
    transform: scale(1.12) translate(4%, -12%);
    transform-origin: 60% 30%;
  }
}
/* No scrim. Dimming a flat illustration to make text legible turns a poster
   into mud — the copy gets a solid card instead, which is also what the art
   direction would do on paper. */

/* ── Sound door ───────────────────────────────────────────────────────────── */
.door {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 80% at 50% 45%, rgba(10, 16, 26, 0.86), rgba(3, 5, 9, 0.97));
  backdrop-filter: blur(3px);
  text-align: center;
  padding: var(--gut);
  transition: opacity var(--t-3) var(--e-out), visibility var(--t-3);
}
/* `backdrop-filter` has to come off with the door, not just the opacity: a
   hidden element that still declares one keeps its compositing layer alive,
   and on some GPUs the blurred copy stays on screen as a ghost after the
   fade. Dropping the filter retires the layer. */
.door.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: none;
}
.door-in { max-width: 44ch; }
.door h1 {
  /* NOT --t-mega. That is the scene headline scale (up to 13rem) and it is
     sized to be the picture; in a 44ch modal it overflowed the viewport and
     pushed the door's own buttons off-screen, so the page could not be
     entered at all. A modal headline is --t-xl. */
  font-size: var(--t-xl);
  line-height: 0.86;
  margin-bottom: 0.4em;
}
.door h1 em {
  display: block;
  font-style: normal;
  color: var(--hot);
}
.door p { color: var(--ink-2); font-size: var(--t-sm); margin-bottom: 1.6em; }
.door-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--g-0);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: 0.01em;
  transition: transform var(--t-1) var(--e-out), box-shadow var(--t-2);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
}
.door-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(255, 255, 255, 0.14); }
.door-btn:active { transform: translateY(0) scale(0.98); }
.door-skip {
  display: block;
  margin: 18px auto 0;
  color: var(--ink-3);
  font-size: var(--t-xs);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.door-note { margin-top: 26px; font-size: var(--t-xs); color: var(--ink-3); }

/* The pulsing speaker rings on the door button. */
.door-rings { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.door-rings i {
  width: 3px; border-radius: 2px; background: currentColor;
  animation: bar 1.1s var(--e-io) infinite;
}
.door-rings i:nth-child(1) { height: 40%; animation-delay: 0s; }
.door-rings i:nth-child(2) { height: 75%; animation-delay: 0.12s; }
.door-rings i:nth-child(3) { height: 100%; animation-delay: 0.24s; }
.door-rings i:nth-child(4) { height: 60%; animation-delay: 0.36s; }
@keyframes bar { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--gut);
  background: linear-gradient(to bottom, rgba(4, 6, 11, 0.8), transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.topbar-sp { flex: 1; }

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--t-xs);
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.sound-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.sound-toggle svg { width: 15px; height: 15px; }
.sound-toggle input { display: none; }

.get-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--g-0);
  font-weight: 700;
  font-size: var(--t-xs);
  text-decoration: none;
  transition: transform var(--t-1);
}
.get-btn:hover { transform: translateY(-1px); }
@media (max-width: 680px) { .get-btn span { display: none; } }

/* ── Sport switch ─────────────────────────────────────────────────────────── */
.sportbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(8, 11, 17, 0.72);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
}
.sportbar button {
  padding: 9px 20px;
  border-radius: 999px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color var(--t-1), background var(--t-2);
}
.sportbar button.is-on { color: var(--g-0); background: var(--hot); }
@media (max-width: 520px) {
  .sportbar { bottom: 14px; }
  .sportbar button { padding: 8px 14px; font-size: 13.5px; }
}

/* ── The experience panels over the stage ─────────────────────────────────── */
.experience { position: relative; z-index: 10; }
.beat {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 92px var(--gut) 110px;
}
.beat-in {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.beat.is-reverse .beat-in { grid-template-columns: auto minmax(0, 1fr); }
.beat.is-reverse .beat-copy { order: 2; }
.beat.is-centered .beat-in { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }

.beat-copy { max-width: 46ch; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.beat-copy h2 { font-size: var(--t-xl); margin-bottom: 0.45em; }
.beat-copy h2 em { font-style: normal; color: var(--hot); display: block; }
.beat-copy p {
  color: var(--ink-2);
  font-size: var(--t-md);
  line-height: 1.5;
  margin-bottom: 0.9em;
}
.beat-copy p.small { font-size: var(--t-sm); color: var(--ink-3); }

/* The panel the copy sits on, so text stays legible over a bright field. */
/* A flat cream card, hard-edged, sitting on the illustration like a pasted
   shape. Solid colour and real contrast — no blur, no translucency. */
.panel {
  background: #FFF4E2;
  color: #241F33;
  border-radius: 10px;
  padding: clamp(24px, 3vw, 40px);
  box-shadow: 14px 14px 0 rgba(29, 75, 180, 0.55);
}
.panel .kicker { color: #E8402A; }
.panel .kicker::before { background: #E8402A; }
.panel h2 { color: #241F33; }
.panel h2 em { color: #2E6BE6; }
.panel p { color: #4A4460; }
.panel p.small { color: #6E6880; }
.panel .try {
  background: #241F33;
  color: #FFF4E2;
  box-shadow: none;
}
.panel .try svg { color: #FFC93C; }

/* A "do this" hint pointing at the phone. */
.try {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hot) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 45%, transparent);
  font-size: var(--t-xs);
  font-weight: 650;
  color: var(--ink);
}
.try svg { width: 15px; height: 15px; color: var(--hot); }
.try.is-pulsing { animation: tryPulse 2.4s var(--e-io) infinite; }
@keyframes tryPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 45%, transparent), 0 0 0 0 color-mix(in srgb, var(--hot) 30%, transparent); }
  50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 70%, transparent), 0 0 0 10px transparent; }
}

.phone-slot { display: flex; justify-content: center; }

/* ── Sections below the experience ───────────────────────────────────────── */
/* Solid ground, with the hand-off to the stage as a short band on top.
   A long gradient here let the stadium show through the whole first
   section, so the scrubber floated over a scoreboard. */
.sections {
  position: relative;
  z-index: 12;
  background: var(--g-1);
}
.sections::before {
  content: "";
  position: absolute;
  top: -120px; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--g-1));
  pointer-events: none;
}
.sec { padding: clamp(64px, 9vh, 120px) var(--gut); }
.sec-in { max-width: 1240px; margin: 0 auto; }
.sec-head { max-width: 54ch; margin-bottom: clamp(26px, 4vw, 48px); }
.sec-head h2 { font-size: var(--t-xl); margin-bottom: 0.4em; }
.sec-head p { color: var(--ink-2); font-size: var(--t-md); }

.grid-2 { display: grid; gap: clamp(18px, 3vw, 34px); grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--g-2);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.6vw, 30px);
}
.card h3 { font-size: var(--t-lg); margin-bottom: 0.4em; }
.card p { color: var(--ink-2); font-size: var(--t-sm); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.foot {
  position: relative;
  z-index: 12;
  background: var(--g-0);
  padding: clamp(44px, 6vh, 80px) var(--gut) 40px;
  box-shadow: inset 0 1px 0 var(--line);
}
.foot-in { max-width: 1240px; margin: 0 auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 22px 0; }
.foot-links a { color: var(--ink-3); font-size: var(--t-xs); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot small { color: var(--ink-3); font-size: 12px; }

/* ── Store badges ─────────────────────────────────────────────────────────── */
.badges { display: flex; flex-wrap: wrap; gap: 11px; }
.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 19px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--g-0);
  text-decoration: none;
  font-weight: 650;
  transition: transform var(--t-1);
}
.badge-link.is-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.badge-link:hover { transform: translateY(-2px); }
.badge-link svg { width: 20px; height: 20px; }
.badge-link small { display: block; font-size: 9.5px; font-weight: 500; opacity: 0.7; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-link b { display: block; font-size: 14px; line-height: 1.1; }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .beat-in,
  .beat.is-reverse .beat-in { grid-template-columns: minmax(0, 1fr); }
  .beat.is-reverse .beat-copy { order: 0; }
  .beat { padding: 80px var(--gut) 120px; align-items: flex-start; }
  .beat-in { align-content: start; padding-top: 4vh; }
  .beat-copy { max-width: none; }
  .phone-slot { margin-top: 4px; }
  /* On a phone the copy is short and the device is the point, so the panel
     tightens and the phone gets the room. */
  .panel { padding: 18px; }
  .beat-copy p { font-size: var(--t-sm); }
}

/* No sticky phone on mobile.
   Sticking it to the bottom kept it in reach, but a 268x554 device over a
   375-wide viewport simply covers the copy it is supposed to illustrate —
   the headline sat behind the screen. Stacked and in flow, the copy is read
   first and the phone is the next thing under your thumb, which is the
   order the beat is written in anyway. */
@media (max-width: 960px) {
  .beat {
    min-height: 0;
    padding: 64px var(--gut) 26px;
  }
  .beat:first-child { padding-top: 232px; }
  .beat:last-child { padding-bottom: 120px; }
  .beat-in { gap: 18px; padding-top: 0; }
  .beat-copy h2 { font-size: var(--t-lg); }
  .beat-copy p { margin-bottom: 0.6em; }
  .phone { --w: 252px; }
  .try { margin-top: 2px; padding: 9px 14px; }
  /* The poster card is the design at every width — this used to override it
     with a near-black panel left over from the old dark scene, which put
     dark ink on a dark card and made the copy unreadable. */
  .panel {
    background: #FFF4E2;
    box-shadow: 8px 8px 0 rgba(29, 75, 180, 0.5);
  }

  /* The bar wrapped onto three lines at 375px: the wordmark broke in two and
     "Get the app" with it, which pushed the bar to 89px and ate the top of
     the scene. */
  .topbar { padding: 10px 14px; gap: 8px; }
  .brand { font-size: 16px; white-space: nowrap; gap: 7px; }
  .brand img { width: 22px; height: 22px; }
  .sound-toggle { padding: 7px 11px; }
  .sound-toggle span:not(#soundIcon) { display: none; }
  .get-btn { padding: 8px 14px; white-space: nowrap; }
}

/* Very small phones: the device is still the point, so the copy gives way. */
@media (max-width: 400px) {
  .phone { --w: 232px; }
  .panel { padding: 15px; }
}
