/* ============================================================
   THE FIGHTER WHEEL — interactive 3D carousel
   RELOCATED: this now lives at the top of "The Ten" roster
   section as a full-width interactive selector BAND (was the
   hero). All positioning is scoped to `.wheel-band` — no more
   vh-hero assumptions. Loaded AFTER style.css so these rules win.
   ============================================================ */

/* =============================================================
   THE WHEEL BAND — a self-contained, mid-page positioned block
   ============================================================= */
.wheel-band {
  position: relative;
  /* break out of the .wrap padding to run full-width within the section */
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 2.2rem;
  margin-bottom: 3rem;
  height: 80vh;
  min-height: 520px;
  max-height: 860px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-block: 1px solid rgba(233, 230, 221, 0.1);
  background: radial-gradient(120% 90% at 50% 25%, #1c2740 0%, var(--ink) 60%, var(--ink-2) 100%);
  isolation: isolate;
}

/* Per-fighter arena BACKGROUND stack (crossfades on featured change).
   Two layers we ping-pong between so a fade never cuts mid-transition. */
.wheel-band-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* NO Ken Burns — backgrounds now swap per fighter. A gentle static
     over-scale keeps edges off-frame. */
  transform: scale(1.04);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  will-change: opacity;
}
.hero-bg-layer.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  /* instant swap, no crossfade */
  .hero-bg-layer { transition: none; }
}

/* darken the band so the portraits + info plate stay legible over any arena */
.wheel-band-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(18, 22, 30, 0.6) 0%, rgba(18, 22, 30, 0.1) 22% 60%, rgba(18, 22, 30, 0.78) 100%),
    radial-gradient(120% 120% at 50% 42%, rgba(0,0,0,0) 52%, rgba(0,0,0,0.5) 100%);
}

/* inner column: wheel (center) + info plate (bottom) */
.wheel-band-inner {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  padding-block: clamp(1.4rem, 4vh, 3rem);
  display: flex;
  flex-direction: column;
}

/* =============================================================
   THE WHEEL STAGE (3D cylinder)
   ============================================================= */
.wheel-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  /* the cylinder lives inside a perspective viewport */
  perspective: 1200px;
  perspective-origin: 50% 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y; /* let vertical page scroll through, we handle X */
  cursor: grab;
  outline: none;
}
.wheel-stage.is-grabbing { cursor: grabbing; }

/* the rotating cylinder — a single transform: rotateY(var) drives everything */
.wheel {
  position: relative;
  width: var(--card-w, 220px);
  height: var(--card-h, 294px);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--radius, 520px) * -1)) rotateY(var(--rot, 0deg));
  will-change: transform;
}

/* each portrait card, positioned around the cylinder */
.wheel-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid rgba(233, 230, 221, 0.12);
  /* rotateY(i*36) translateZ(R) set inline per card via --a / --radius */
  transform: rotateY(var(--a)) translateZ(var(--radius, 520px));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* dim + desaturate cards away from the front; featured overrides below */
  opacity: 0.42;
  filter: brightness(0.6) saturate(0.65);
  transition: opacity 0.45s var(--ease), filter 0.45s var(--ease),
              box-shadow 0.45s var(--ease);
  cursor: pointer;
  isolation: isolate;
}
.wheel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* scrim so the mini-label at the card foot stays legible */
.wheel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(7, 9, 13, 0.82) 4%, rgba(7, 9, 13, 0.1) 34%, transparent 55%);
  opacity: 0.65;
  transition: opacity 0.45s var(--ease);
}
.wheel-card .wc-tag {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 0.7rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-dim);
  padding-inline: 0.4rem;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

/* the FEATURED (front-facing) card: pop, full colour, orange rim */
.wheel-card.is-featured {
  opacity: 1;
  filter: none;
  box-shadow:
    0 0 0 2px var(--orange),
    0 0 34px -2px rgba(244, 115, 31, 0.65),
    0 30px 60px -22px rgba(0, 0, 0, 0.85);
  z-index: 3;
}
.wheel-card.is-featured::after { opacity: 0; }
.wheel-card.is-featured .wc-tag { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .wheel,
  .wheel-card { transition-duration: 0.001ms; }
}

/* =============================================================
   INFO PLATE — featured fighter's name / epithet / signature
   ============================================================= */
.wheel-info {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  text-align: center;
  margin-top: clamp(0.6rem, 2vh, 1.4rem);
  min-height: clamp(6.5rem, 16vh, 9rem);
}
/* clip-reveal wrapper: text swaps behind this mask on change */
.wi-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2rem, 6.5vw, 5rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: 0;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}
.wi-name .accent { color: var(--orange); }
.wi-meta {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  color: var(--gold);
  margin: 0.7rem 0 0;
}
.wi-meta .origin { color: var(--bone-dim); }
.wi-sig {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
  margin: 0.5rem 0 0;
}
.wi-sig .lbl {
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.58rem;
  margin-right: 0.5rem;
}
.wi-sig .val { color: var(--bone); }

/* clip-reveal animation applied on featured change (JS toggles .is-swapping) */
.wheel-info .wi-line {
  display: block;
  overflow: hidden;
}
.wheel-info .wi-line > span {
  display: block;
  transform: translateY(0);
  transition: transform 0.42s var(--ease), opacity 0.42s var(--ease);
}
.wheel-info.is-swapping .wi-line > span {
  transform: translateY(105%);
  opacity: 0;
  transition-duration: 0.001ms; /* snap out instantly, animate the new one in */
}
@media (prefers-reduced-motion: reduce) {
  .wheel-info .wi-line > span { transition: none; }
}

/* the info plate name is a link-affordance to the roster deep-dive */
.wheel-info[role="button"] { cursor: pointer; }
.wheel-info .wi-cue {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.wheel-stage:hover ~ .wheel-info .wi-cue,
.wheel-info:hover .wi-cue,
.wheel-info:focus-visible .wi-cue { opacity: 1; }

/* short lead line above the band */
.roster-lead {
  position: relative;
  z-index: 1;
  margin: 0.8rem 0 0;
  color: var(--bone-dim);
  max-width: 52ch;
}

/* =============================================================
   RESPONSIVE — shrink radius + cards on tablet/mobile
   ============================================================= */
@media (max-width: 600px) {
  .wheel-band { height: 74vh; min-height: 460px; }
  .wheel-stage { perspective: 900px; }
  .wheel-info { min-height: clamp(6rem, 20vh, 8rem); }
}
