/* Sport bands on the one screen, three treatments of the same words. All decorative
   (aria-hidden), all behind the copy, all low contrast. The base state is a still frame; bands.mjs
   fills each [data-row] to the screen and runs it (transform only), never under reduced motion. */

.bands {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.row {
  display: flex;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.track {
  display: flex;
  flex: none;
}
.run {
  display: flex;
  flex: none;
  align-items: center;
}
.w {
  padding-inline: 0.06em;
  text-box: trim-both cap alphabetic;
}
.sep {
  flex: none;
  width: 0.09em;
  height: 0.5em;
  margin-inline: 0.22em;
  background: var(--sep);
  transform: skewX(var(--skew));
}

/* ------------------------------------------------------------------ A: perimeter boards */

/* Two boards frame the screen, top and bottom, tilted a little against each other like
   advertising boards seen from the stand. Filled and outline words, yellow slashes. */
.bands--boards .board {
  position: absolute;
  left: -15%;
  width: 130%;
  padding-block: var(--board-pad);
  background: var(--band-ground);
  border-block: 1px solid var(--band-edge);
  font-size: var(--fs-row);
}
.bands--boards {
  --board-pad: clamp(0.625rem, 1.4svh, 1rem);
  --board-h: calc(var(--fs-row) * 0.66 + var(--board-pad) * 2 + 2px);
}
.board--top {
  top: calc(var(--board-h) * 0.35);
  rotate: -2deg;
}
.board--bottom {
  bottom: calc(var(--board-h) * 0.35);
  rotate: -2deg;
}
.bands--boards .row {
  color: var(--row-ink);
}
.bands--boards .w--o {
  color: transparent;
  -webkit-text-stroke: max(1.5px, 0.014em) var(--row-line);
}
.hero--boards {
  --copy-top: calc(var(--fs-row) * 0.66 + 3rem);
  --copy-bottom: calc(var(--fs-row) * 0.66 + 3.5rem);
}

/* ------------------------------------------------------------------ B: giant outline row */

/* One enormous outline row runs slowly behind the number, slanted at the page's -12 deg:
   the words turn into texture, the slashes are dim yellow. */
.bands--giant .row {
  position: absolute;
  top: 46%;
  left: -30%;
  width: 160%;
  translate: 0 -50%;
  rotate: -12deg;
  font-size: var(--fs-giant);
  color: var(--giant-fill);
  -webkit-text-stroke: 2px var(--giant-line);
}
.bands--giant {
  --fs-giant: min(92svh, 150vw);
}
/* at this size a filled slash would be a yellow wall: an outline one instead */
.bands--giant .sep {
  width: 0.06em;
  height: 0.6em;
  margin-inline: 0.12em;
  background: none;
  border: 2px solid var(--sep-dim);
}

/* ------------------------------------------------------------------ C: arena floor */

/* The floor of the arena in perspective: mown stripes with a sport painted across each, side
   lines, and the whole floor flows toward the viewer, under the copy. */
.bands--floor .floor {
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: 0;
  height: var(--floor-h);
  perspective: var(--floor-persp);
  perspective-origin: 50% 0%;
  mask-image: linear-gradient(180deg, transparent 0%, var(--black) 60%);
}
.hero--floor {
  --vignette: var(--vignette-floor);
}
.bands--floor {
  --floor-h: 54%;
  --floor-persp: 34rem;
  --stripe: clamp(5.5rem, 13svh, 9rem);
}
.plane {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 340%;
  transform-origin: 50% 100%;
  rotate: x 68deg;
  overflow: clip;
}
/* side lines of the pitch, fixed while the stripes flow */
.plane::before,
.plane::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 4px;
  background: var(--floor-line);
}
.plane::before {
  left: 28%;
}
.plane::after {
  right: 28%;
}
/* anchored to the near edge, so the still frame is full where the eye is */
.bands--floor .row {
  position: absolute;
  inset: 0;
  flex-direction: column;
  justify-content: flex-end;
}
.bands--floor .track,
.bands--floor .run {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}
.stripe {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--stripe);
  background: var(--floor-a);
  color: var(--floor-ink);
  font-size: calc(var(--stripe) * 0.62);
}
.stripe:nth-child(even) {
  background: var(--floor-b);
}
.stripe .w--o {
  color: transparent;
  -webkit-text-stroke: max(2px, 0.02em) var(--floor-line);
}
.stripe .sep {
  background: var(--sep-dim);
}

@media (max-aspect-ratio: 1 / 1) {
  .bands--floor {
    --floor-h: 46%;
    --floor-persp: 22rem;
    --stripe: clamp(4.5rem, 9svh, 7rem);
  }
  .bands--giant {
    --fs-giant: min(40svh, 100vw);
  }
  /* the number fills the width here, so the row runs lower, behind the ticket and the button */
  .bands--giant .row {
    top: 66%;
  }
  /* the top board takes the first strip of the screen: the top objects step down under it */
  .hero--boards .s2 {
    --y: 14%;
  }
  .hero--boards .m2 {
    --y: 12%;
  }
  .hero--boards .m5 {
    --y: 10%;
  }
}
/* landscape: the far ball above the number would sit on the top board */
@media (min-aspect-ratio: 1 / 1) {
  .hero--boards .f2 {
    display: none;
  }
}
