/* Hero, concept A: the card as a scroll-driven stack of bouts; each bout is two fighter cards turned toward each other
   (after aexlab.com's leadership block). Palette and fonts follow the main site. */
:root {
  --ink: #000; --ink-2: #0e0f0f; --paper: #f1eee9; --mute: rgba(241,238,233,.62); --line: rgba(241,238,233,.2);
  --sage: #9cada6; --lime: #c0ff00;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gut: clamp(18px, 4vw, 56px);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 14px/1.5 var(--mono); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Header: one frosted pill of links, centred; the active link gets a lime bar ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; justify-content: center; padding: 16px var(--gut); pointer-events: none; }
.nav { display: flex; gap: clamp(28px, 3.6vw, 56px); padding: 18px clamp(24px, 3vw, 44px); border-radius: 10px; pointer-events: auto;
  background: rgba(150,150,140,.28); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  font-size: 13px; line-height: 1; letter-spacing: .14em; text-transform: uppercase; }
.nav a { position: relative; color: rgba(241,238,233,.72); transition: color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--paper); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 3px; background: var(--lime); }

/* ---------- Hero: a tall track with a sticky stage; scroll position picks the front bout ---------- */
html { scroll-snap-type: y mandatory; }
.hero { position: relative; height: calc(100svh + (var(--n) - 1) * 70svh); }
.hero__stick { position: sticky; top: 0; height: 100svh; min-height: 640px; isolation: isolate; overflow: clip; display: grid; place-items: center; padding: 96px var(--gut); } /* equal top and bottom so the bout sits dead centre */
/* Snap points every 70svh, one per bout; snap-stop so a single flick moves one bout, not several */
.hero__snaps i { position: absolute; left: 0; top: calc(var(--i) * 70svh); width: 1px; height: 100svh; scroll-snap-align: start; scroll-snap-stop: always; }
.hero__gl, .hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
/* GONGSIDE as a faint room around the viewer: each letter sits on the inside of a cylinder (radius --r), so GONG bends away
   to the right and SIDE to the left, toward a vanishing point behind the cards. main.js sets --r and each letter's --a
   (degrees, positive = left wall) from the measured letter widths, so the spacing stays even. */
.hero__word { position: absolute; inset: 0; z-index: -1; perspective: 900px; overflow: hidden; pointer-events: none; }
.hero__word span { position: absolute; left: 50%; top: 50%; font: 400 min(36vh, 24vw)/1 var(--display); color: rgba(241,238,233,.12);
  transform: translate(-50%, -50%) rotateY(calc(var(--a, 90) * 1deg)) translateZ(calc(var(--r, 62vw) * -1)) scaleY(1.4); }
.hero__shade { background: radial-gradient(circle, rgba(241,238,233,.12) 1px, transparent 1.6px) 0 0 / 56px 56px, linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.6) 45%, rgba(0,0,0,.82)); }

/* Stack: --o is the bout's place in the queue (0 = front). The next two pairs peek out below and outward, each card on its own diagonal. */
.bouts { --step-x: 40px; --step-y: 30px; list-style: none; margin: 0; padding: 0; display: grid; width: 100%; }
.bout { --k: min(var(--o, 0), 3); grid-area: 1 / 1; z-index: calc(10 - var(--o, 0)); text-align: center; }
.bout__title { margin: 0 0 2rem; font: 400 clamp(30px, 3.2vw, 48px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.bout__inner { display: flex; align-items: center; justify-content: center; perspective: 1000px;
  filter: brightness(calc(1 - var(--k) * .32)); opacity: clamp(0, 3 - var(--o, 0), 1); transition: opacity .5s, filter .6s; }
.bout.is-shuffling { z-index: 11; } /* pulled out sideways above the stack before it tucks in */
/* Only the front bout's text shows; it swaps instantly and main.js morphs it from the old text through random characters */
.bout:not(.is-front) :is(.bout__title, .bout__when, .bout__v) { visibility: hidden; }
.bout__v { margin: 0 1.75rem; font: 400 clamp(40px, 4vw, 64px)/1 var(--display); color: var(--sage); }
.bout__when { max-width: 43.625rem; margin: 3.75rem auto 0; font-size: 13.5px; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; }

/* Card: turned toward the V; hover, tap or focus flattens it, fades the photo and the name, and shows the tape behind.
   :focus (not :focus-visible) so a tap on touch screens counts. */
.fighter { --ease: cubic-bezier(.24,1,.36,1); --dir: -1; --ry: 10deg; --sx: 0px; --rz: 0deg;
  position: relative; isolation: isolate; flex: none; width: 21.1875rem; height: 25.8125rem; border: 1px solid rgba(255,255,255,.2); border-radius: .375rem; background: var(--ink); cursor: pointer;
  transform: translate(calc(var(--dir) * var(--k) * var(--step-x) + var(--sx)), calc(var(--k) * var(--step-y))) rotate(var(--rz)) scale(calc(1 - var(--k) * .07)) rotateY(var(--ry));
  transition: transform .5s var(--ease), border-color .4s var(--ease), --shine 0s; }
.fighter--blue { --dir: 1; --ry: -10deg; }
.fighter:is(:hover, :focus) { --ry: 0deg; border-color: rgba(158,174,167,.2); }
/* Hover, tap or focus: a white light runs round the card's edge. A conic gradient spun via --spin, masked down to a 1.5px ring. */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
.fighter::before { content: ""; position: absolute; inset: -1px; z-index: 2; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--spin), transparent 0 60%, rgba(255,255,255,.85) 88%, #fff 93%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s; animation: spin 6s linear infinite paused; }
.fighter:is(:hover, :focus)::before { opacity: 1; animation-play-state: running; }
/* Shuffle: the leaving pair slides out to its own side and turns a little, then tucks in at the back */
.bout.is-shuffling .fighter { --sx: calc(var(--dir) * 70%); --rz: calc(var(--dir) * 7deg); }
/* Gloss on hover: a diagonal shine sweeps across once (--shine runs -30% -> 130%), then snaps back unseen on leave */
@property --shine { syntax: "<percentage>"; inherits: true; initial-value: -30%; }
.fighter:is(:hover, :focus) { --shine: 130%; transition: transform .5s var(--ease), border-color .4s var(--ease), --shine .9s cubic-bezier(.4,0,.2,1); }
/* Shine on top, then the vignette: an oval falloff, extra side shade left and right, and a deeper aexlab bottom fade */
.fighter::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(115deg, transparent calc(var(--shine) - 14%), rgba(255,255,255,.08) calc(var(--shine) - 5%), rgba(255,255,255,.26) var(--shine), rgba(255,255,255,.08) calc(var(--shine) + 5%), transparent calc(var(--shine) + 14%)),
    radial-gradient(120% 90% at 50% 18%, transparent 38%, rgba(0,0,0,.92) 100%),
    linear-gradient(90deg, rgba(0,0,0,.6), transparent 24%, transparent 76%, rgba(0,0,0,.6)),
    linear-gradient(0deg, rgba(0,0,0,.8) 12%, rgba(0,0,0,.65) 22%, transparent 62%); }
.fighter__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; border-radius: inherit; background: radial-gradient(circle at 50% 35%, #1b1c1c, #000 70%); }
.fighter__img, .fighter__name { transition: opacity .4s var(--ease); }
.fighter:is(:hover, :focus) :is(.fighter__img, .fighter__name) { opacity: 0; }
.fighter__back { position: absolute; inset: 3.5rem 0 6.375rem; z-index: -1; display: flex; flex-direction: column; align-items: center; }
.fighter__title, .fighter__name { margin: 0; font: 400 44px/.88 var(--display); text-transform: uppercase; white-space: nowrap; }
.fighter__stats { display: grid; grid-template-columns: auto auto; gap: 7px 24px; width: min(100% - 4rem, 16rem); margin: 1.75rem 0 0; font-size: 13.5px; line-height: 1.2; text-transform: uppercase; }
.fighter__stats dt { text-align: left; color: var(--mute); }
.fighter__stats dd { margin: 0; text-align: right; }
.fighter__info { position: absolute; left: 50%; bottom: 2rem; z-index: 1; translate: -50% 0; display: flex; flex-direction: column; align-items: center; }
.fighter__name { margin-bottom: 1rem; }
.fighter__weight { display: flex; align-items: center; gap: 1rem; margin: 0; font-size: 13.5px; line-height: 1.2; text-transform: uppercase; }
.fighter__weight::before, .fighter__weight::after { content: ""; width: 3px; height: 10px; background: var(--paper); clip-path: polygon(100% 27%, 0 0, 0 100%, 100% 73%); }
.fighter__weight::after { clip-path: polygon(0 27%, 100% 0, 100% 100%, 0 73%); }

@media (prefers-reduced-motion: reduce) {
  .bout__inner, .fighter, .fighter__img, .fighter__name { transition-duration: .01s; }
  .fighter::before { animation: none; background: rgba(255,255,255,.8); } /* still outline, no motion */
}

@media (max-width: 1024px) {
  .bouts { --step-x: 14px; --step-y: 12px; }
  .bout__title { margin-bottom: 1.25rem; }
  .bout__inner { flex-direction: column; }
  .bout__v { margin: .5rem 0; font-size: 36px; }
  .bout__when { margin-top: 2rem; font-size: 11px; }
  .fighter { width: min(100%, 26rem); height: min(13.5rem, 30svh); }
  .fighter, .fighter--blue { --ry: 0deg; }
  .fighter__info { bottom: 1.375rem; }
  .fighter__name { margin-bottom: .625rem; }
  .fighter__back { inset: 0; padding-top: 1rem; }
  .fighter__title, .fighter__name { font-size: 28px; }
  .fighter__stats { gap: 3px 20px; margin-top: .75rem; font-size: 11px; }
}

@media (max-width: 900px) {
  .nav { gap: 18px; padding: 13px 18px; font-size: 10px; }
  .nav a[aria-current]::after { bottom: -7px; height: 2px; }
  .hero__stick { padding: 72px var(--gut); }
}
