/* ============================================================
   DJ JAGZ — cinematic stage
   Truss, moving heads, PAR cans, lasers, decks, crowd.
   Pure CSS lighting rig. No audio.
   ============================================================ */

.stage {
  --rig-top: clamp(56px, 7.5vh, 88px);
  position: relative;
  height: 100svh;
  min-height: 620px;
  max-height: 1080px;
  margin-top: calc(var(--header-height) * -1);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 78% at 50% 108%, #1a1024 0%, transparent 58%),
    radial-gradient(90% 60% at 50% -8%, #10121f 0%, transparent 60%),
    linear-gradient(180deg, #04040a 0%, #06060e 42%, #09070f 72%, #05050a 100%);
}

/* Everything fades up as the rig powers on */
.stage-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------
   1. ATMOSPHERE — haze is what makes beams visible
   ------------------------------------------------------------ */

.stage-atmos { z-index: 1; }

.haze {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
}

.haze-1 {
  top: 12%; left: -12%;
  width: 62%; height: 66%;
  background: radial-gradient(circle, rgba(90, 120, 255, 0.13), transparent 68%);
  animation: hazeDrift 26s ease-in-out infinite,
             hazeIn 2.4s ease-out 1.9s forwards;
}
.haze-2 {
  top: 4%; right: -14%;
  width: 66%; height: 72%;
  background: radial-gradient(circle, rgba(255, 70, 170, 0.1), transparent 68%);
  animation: hazeDrift 32s ease-in-out -8s infinite reverse,
             hazeIn 2.4s ease-out 2.2s forwards;
}
.haze-3 {
  bottom: -12%; left: 22%;
  width: 60%; height: 56%;
  background: radial-gradient(circle, rgba(224, 184, 114, 0.1), transparent 66%);
  animation: hazeDrift 38s ease-in-out -16s infinite,
             hazeIn 2.4s ease-out 2.6s forwards;
}

@keyframes hazeIn { to { opacity: 1; } }

@keyframes hazeDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(6%, -4%, 0) scale(1.12); }
  66%      { transform: translate3d(-5%, 5%, 0) scale(0.94); }
}

/* Fine atmospheric grain — sells the "air in the room" */
.stage-grain {
  z-index: 12;
  opacity: 0;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: grainIn 2s ease-out 2.4s forwards;
}
@keyframes grainIn { to { opacity: 0.035; } }
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-3px, 2px); }
  66%  { transform: translate(2px, -3px); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------
   2. LED WALL behind the DJ
   ------------------------------------------------------------ */

.ledwall {
  position: absolute;
  left: 50%;
  bottom: 27%;
  z-index: 2;
  width: min(70vw, 880px);
  height: min(19vh, 165px);
  transform: translateX(-50%);
  overflow: visible;
  opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  animation: wallBoot 1.4s ease-out 0.5s forwards;
}

@keyframes wallBoot {
  0%   { opacity: 0; }
  18%  { opacity: 0.9; }
  24%  { opacity: 0.15; }   /* power flicker */
  34%  { opacity: 0.85; }
  42%  { opacity: 0.3; }
  100% { opacity: 0.72; }
}

/* pixel grid of the LED panel */
/* faint scanline texture across the bars */
.ledwall::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.ledwall-eq {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.55%;
  height: 100%;
  padding: 0 2%;
}

.ledwall-eq span {
  flex: 1 1 0;
  min-width: 0;
  height: 15%;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--eqc, #3ad9ff) 0%, color-mix(in srgb, var(--eqc, #3ad9ff) 30%, transparent) 70%, transparent 100%);
  box-shadow: 0 0 10px -2px var(--eqc, #3ad9ff);
  transform-origin: bottom;
  will-change: transform;
  animation: eqBar var(--eqd, 0.86s) ease-in-out var(--eqdelay, 0s) infinite;
}

@keyframes eqBar {
  0%, 100% { transform: scaleY(0.5); }
  20%      { transform: scaleY(3.9); }
  45%      { transform: scaleY(1.3); }
  70%      { transform: scaleY(2.9); }
}

.ledwall-logo { display: none; }

/* ------------------------------------------------------------
   3. TRUSS + MOVING HEADS
   ------------------------------------------------------------ */

.rig { z-index: 5; }

.truss {
  position: absolute;
  top: var(--rig-top);
  left: -2%;
  width: 104%;
  height: 34px;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.25s forwards;
}

.truss::before,
.truss::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4a4a55, #23232c 45%, #101016);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.09) inset;
}
.truss::before { top: 2px; }
.truss::after  { bottom: 2px; }

/* diagonal lattice bracing */
.truss-lattice {
  position: absolute;
  inset: 5px 0;
  background-image:
    repeating-linear-gradient(58deg,  transparent 0 26px, rgba(120, 120, 135, 0.5) 26px 29px),
    repeating-linear-gradient(-58deg, transparent 0 26px, rgba(120, 120, 135, 0.5) 26px 29px);
  opacity: 0.65;
}

/* --- fixture --- */

.mover {
  position: absolute;
  top: calc(var(--rig-top) + 26px);
  left: var(--x);
  width: 0;
  height: 0;
  --c: 58, 217, 255;
  --swing: 26deg;
}

.mover-clamp {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(180deg, #55555f, #1c1c24);
}

/* the arm carries yoke + beam, and does the pan/tilt swing.
   It needs real bounds, otherwise the compositor can't promote the subtree
   and every sweep frame repaints the whole stage. */
.mover-arm {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform-origin: 50% 4px;
  will-change: transform;
}

/* yoke: the U-bracket */
.mover-yoke {
  position: absolute;
  top: 0;
  left: -13px;
  width: 26px;
  height: 22px;
}
.mover-yoke::before,
.mover-yoke::after {
  content: "";
  position: absolute;
  top: 0;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4c4c57, #202028);
}
.mover-yoke::before { left: 0; }
.mover-yoke::after  { right: 0; }

/* head: the lamp housing */
.mover-head {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 19px;
  height: 21px;
  transform: translateX(-50%);
  border-radius: 4px 4px 7px 7px;
  background: linear-gradient(180deg, #3c3c46 0%, #23232c 55%, #14141a 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

/* the lens — where light comes out */
.mover-lens {
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 15px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(var(--c), 0.95) 42%, rgba(var(--c), 0) 76%);
  opacity: 0;
  will-change: opacity;
  animation: lampStrike 1.5s ease-out var(--strike, 2.4s) forwards,
             lampFlicker 5s steps(1, end) calc(var(--strike, 2.4s) + 1.5s) infinite;
}

/* arc lamps don't fade in — they strike, stutter, then hold */
@keyframes lampStrike {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  11%  { opacity: 0.08; }
  17%  { opacity: 0.95; }
  23%  { opacity: 0.15; }
  31%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes lampFlicker {
  0%, 46%   { opacity: 1; }
  47%, 48%  { opacity: 0.55; }
  49%, 100% { opacity: 1; }
}

/* the light itself is drawn on one canvas — see .stage-beams below */

/* --- sweep patterns: each fixture moves differently --- */

@keyframes sweepA {
  0%, 100% { transform: rotate(calc(var(--swing) * -1)); }
  50%      { transform: rotate(var(--swing)); }
}

@keyframes sweepB {
  0%   { transform: rotate(calc(var(--swing) * 0.85)); }
  28%  { transform: rotate(calc(var(--swing) * -0.6)); }
  52%  { transform: rotate(calc(var(--swing) * -0.95)); }
  74%  { transform: rotate(calc(var(--swing) * 0.35)); }
  100% { transform: rotate(calc(var(--swing) * 0.85)); }
}

/* hold, snap, hold — the classic "position preset" look */
@keyframes sweepC {
  0%, 16%   { transform: rotate(calc(var(--swing) * -0.9)); }
  24%, 44%  { transform: rotate(calc(var(--swing) * 0.15)); }
  52%, 72%  { transform: rotate(calc(var(--swing) * 0.95)); }
  80%, 100% { transform: rotate(calc(var(--swing) * -0.9)); }
}

@keyframes sweepD {
  0%, 100% { transform: rotate(calc(var(--swing) * 0.55)); }
  25%      { transform: rotate(calc(var(--swing) * -0.85)); }
  50%      { transform: rotate(calc(var(--swing) * 0.9)); }
  75%      { transform: rotate(calc(var(--swing) * -0.3)); }
}

/* ------------------------------------------------------------
   3b. THE LIGHT — one canvas, additively blended
   ------------------------------------------------------------ */

.stage-beams {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease-out;
}
.stage-beams.is-on { opacity: 1; }

/* ------------------------------------------------------------
   4. PAR CANS — the fixtures on the truss
   ------------------------------------------------------------ */

.pars { z-index: 4; }

.par {
  position: absolute;
  top: calc(var(--rig-top) + 30px);
  left: var(--x);
  width: 26px;
  transform: translateX(-50%);
  --c: 255, 63, 164;
}

.par-body {
  display: block;
  width: 22px;
  height: 17px;
  margin: 0 auto;
  border-radius: 3px 3px 5px 5px;
  background: linear-gradient(180deg, #43434e, #1d1d25);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.par-lens {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 20px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(var(--c), 0.9) 45%, rgba(var(--c), 0) 78%);
  opacity: 0;
  animation: parPulse var(--pardur, 1.72s) ease-in-out var(--pardelay, 0s) infinite;
}

/* PARs stay dark until their chase begins */
.par-lens { animation-play-state: paused; }
.stage.is-lit .par-lens { animation-play-state: running; }

@keyframes parPulse {
  0%, 100% { opacity: 0.04; }
  14%      { opacity: 0.9; }
  40%      { opacity: 0.24; }
  62%      { opacity: 0.66; }
}

/* ------------------------------------------------------------
   5. BLINDERS — warm white punch on the drop
   ------------------------------------------------------------ */

.blinder {
  position: absolute;
  top: calc(var(--rig-top) + 30px);
  left: var(--x);
  display: grid;
  grid-template-columns: repeat(2, 15px);
  gap: 2px;
  padding: 3px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: #1a1a22;
}
.blinder i {
  display: block;
  width: 15px;
  height: 12px;
  border-radius: 2px;
  background: radial-gradient(circle, #fff4d8, #6b5a34 70%, #22201a);
  opacity: 0.12;
  animation: blind 8s ease-in-out var(--bdelay, 0s) infinite;
  animation-play-state: paused;
}
.stage.is-lit .blinder i { animation-play-state: running; }

.blinder::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 50%;
  width: 240px;
  height: 46vh;
  transform: translateX(-50%);
  background-image: var(--cone-warm);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0;
  will-change: opacity;
  animation: blind 8s ease-in-out var(--bdelay, 0s) infinite;
  animation-play-state: paused;
}
.stage.is-lit .blinder::after { animation-play-state: running; }

@keyframes blind {
  0%, 62%, 100% { opacity: 0.1; }
  64%           { opacity: 1; }
  66%           { opacity: 0.15; }
  68%           { opacity: 1; }
  72%           { opacity: 0.1; }
}

/* ------------------------------------------------------------
   6. LASERS
   ------------------------------------------------------------ */

.lasers {
  z-index: 6;
  top: auto;
  bottom: 22%;
  height: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  animation: fadeIn 1.4s ease-out 3.4s forwards;
}

.laser-fan {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0;
  transform-origin: 50% 100%;
  animation: fanScan var(--fandur, 11s) ease-in-out var(--fandelay, 0s) infinite;
}

.laser-fan i {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2px;
  height: 70vh;
  transform-origin: 50% 100%;
  transform: rotate(var(--a));
  background: linear-gradient(0deg, rgba(var(--lc), 0.9) 0%, rgba(var(--lc), 0.42) 34%, rgba(var(--lc), 0) 88%);
  box-shadow: 0 0 6px rgba(var(--lc), 0.6);
  animation: laserBlink 3.6s steps(1, end) var(--ldelay, 0s) infinite;
}

@keyframes fanScan {
  0%, 100% { transform: rotate(-16deg); }
  50%      { transform: rotate(16deg); }
}

@keyframes laserBlink {
  0%, 44%  { opacity: 0.95; }
  46%, 54% { opacity: 0.15; }
  56%, 100% { opacity: 0.8; }
}

/* ------------------------------------------------------------
   7. FLOOR — light pools + reflection
   ------------------------------------------------------------ */

.floor {
  z-index: 3;
  top: auto;
  bottom: 0;
  height: 46%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 26%, #000 84%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 26%, #000 84%, transparent);
}


/* wet-floor reflection of the booth */
.floor-sheen {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.028) 60%, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

/* ------------------------------------------------------------
   8. DJ BOOTH — decks + mixer
   ------------------------------------------------------------ */

.booth {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 7;
  width: min(96vw, 1020px);
  transform: translateX(-50%) translateY(6%);
  opacity: 0;
  font-size: clamp(5px, 0.72vw, 8.6px);   /* everything inside scales from this */
  animation: boothRise 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes boothRise {
  0%   { opacity: 0; transform: translateX(-50%) translateY(calc(6% + 46px)); }
  100% { opacity: 1; transform: translateX(-50%) translateY(6%); }
}

.booth-gear {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.2em;
  padding: 0 2em;
}

/* --- CDJ deck --- */

.deck {
  position: relative;
  width: 26em;
  height: 21em;
  padding: 1.2em;
  border-radius: 1.4em 1.4em 0.5em 0.5em;
  background: linear-gradient(170deg, #26262f 0%, #17171e 42%, #0d0d12 100%);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.11) inset,
    0 1.6em 3em rgba(0, 0, 0, 0.65);
}

.deck-left  { transform: perspective(90em) rotateY(11deg) rotateX(6deg); }
.deck-right { transform: perspective(90em) rotateY(-11deg) rotateX(6deg); }

/* the jog wheel / platter */
.platter {
  position: absolute;
  left: 50%;
  bottom: 1.4em;
  width: 15.4em;
  height: 15.4em;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #2c2c36 0 12%, transparent 12%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 3px),
    conic-gradient(from 0deg, #34343f, #1d1d25 22%, #3a3a46 48%, #1a1a22 72%, #34343f 100%);
  box-shadow:
    0 0 0 0.32em #14141a,
    0 0 0 0.5em rgba(255, 255, 255, 0.07),
    inset 0 0 1.6em rgba(0, 0, 0, 0.85);
}

.platter-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  will-change: transform;
  animation: spinUp 2.6s cubic-bezier(0.32, 0, 0.4, 1) 0.9s forwards;
}

/* the marker dot that tells you it's spinning */
.platter-disc::before {
  content: "";
  position: absolute;
  top: 6%;
  left: 50%;
  width: 1.1em;
  height: 1.1em;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--gold, #e0b872) 60%, transparent 72%);
  box-shadow: 0 0 0.9em rgba(224, 184, 114, 0.9);
}

/* the ring of light around the jog wheel */
.platter::after {
  content: "";
  position: absolute;
  inset: -0.5em;
  border-radius: 50%;
  border: 0.16em solid rgba(58, 217, 255, 0.9);
  box-shadow: 0 0 2em rgba(58, 217, 255, 0.75), inset 0 0 1.2em rgba(58, 217, 255, 0.34);
  opacity: 0;
  will-change: opacity;
  animation: ringOn 0.8s ease-out 1.1s forwards, ringPulse 1.72s ease-in-out 1.9s infinite;
}

@keyframes ringOn  { to { opacity: 1; } }
@keyframes ringPulse {
  0%, 100% { opacity: 0.68; }
  50%      { opacity: 1; }
}

/* platter accelerates from a standstill — like hitting play */
@keyframes spinUp {
  0%   { transform: rotate(0deg);   animation-timing-function: cubic-bezier(0.3, 0, 0.5, 1); }
  100% { transform: rotate(1080deg); }
}
.stage.is-lit .platter-disc { animation: spin 1.85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* deck screen */
.deck-screen {
  position: relative;
  height: 4.6em;
  padding: 0.5em 0.7em;
  border-radius: 0.4em;
  background: #05070c;
  box-shadow: inset 0 0 0.9em rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  opacity: 0;
  animation: screenBoot 1.1s ease-out 0.75s forwards;
}

@keyframes screenBoot {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  38%  { opacity: 0.2; }
  52%  { opacity: 1; }
  100% { opacity: 1; }
}

.deck-screen b {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 0.92em;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #3ad9ff;
  text-shadow: 0 0 0.6em rgba(58, 217, 255, 0.8);
}

.deck-screen i {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 0.8em;
  font-style: normal;
  color: rgba(224, 184, 114, 0.85);
}

/* scrolling waveform */
.waveform {
  position: absolute;
  inset: auto 0 0.35em 0;
  height: 1.9em;
  display: flex;
  align-items: center;
  gap: 0.12em;
  padding: 0 0.6em;
  overflow: hidden;
}
.waveform span {
  flex: 0 0 0.22em;
  height: var(--h, 40%);
  border-radius: 0.1em;
  background: linear-gradient(180deg, #3ad9ff, #1e6fa8);
  opacity: 0.85;
}
.waveform::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ff3fa4;
  box-shadow: 0 0 0.5em #ff3fa4;
}

/* transport buttons */
.deck-transport {
  position: absolute;
  left: 1.2em;
  bottom: 1.6em;
  display: grid;
  gap: 0.5em;
}
.deck-transport i {
  display: block;
  width: 2.6em;
  height: 1.7em;
  border-radius: 0.25em;
  background: #22222b;
  box-shadow: inset 0 0.1em 0 rgba(255, 255, 255, 0.07);
}
.deck-transport i:first-child {
  background: rgba(74, 222, 128, 0.9);
  box-shadow: 0 0 1em rgba(74, 222, 128, 0.7);
  animation: btnBlink 1.85s steps(1, end) infinite;
}
.deck-transport i:last-child {
  background: rgba(255, 176, 58, 0.85);
  box-shadow: 0 0 0.8em rgba(255, 176, 58, 0.55);
}
@keyframes btnBlink {
  0%, 60%  { opacity: 1; }
  61%, 100% { opacity: 0.55; }
}

/* pitch fader */
.pitch {
  position: absolute;
  right: 1.2em;
  bottom: 1.6em;
  width: 1.5em;
  height: 8.4em;
  border-radius: 0.3em;
  background: #0e0e13;
  box-shadow: inset 0 0 0.6em rgba(0, 0, 0, 0.9);
}
.pitch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.4em;
  bottom: 0.4em;
  width: 2px;
  transform: translateX(-50%);
  background: #2b2b35;
}
.pitch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 2.1em;
  height: 1em;
  border-radius: 0.18em;
  background: linear-gradient(180deg, #55555f, #2a2a33);
  box-shadow: 0 0.15em 0.3em rgba(0, 0, 0, 0.7);
  will-change: transform;
  animation: pitchDrift 7s ease-in-out infinite;
}
@keyframes pitchDrift {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(0.55em); }
}

/* --- MIXER --- */

.mixer {
  position: relative;
  width: 21em;
  height: 24em;
  padding: 1.1em 1em;
  border-radius: 1.2em 1.2em 0.4em 0.4em;
  background: linear-gradient(170deg, #2a2a34 0%, #191921 44%, #0e0e13 100%);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.12) inset,
    0 1.8em 3.4em rgba(0, 0, 0, 0.7);
  transform: perspective(100em) rotateX(7deg);
}

/* VU meters */
.vu-wrap {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  height: 6.4em;
  margin-bottom: 0.9em;
}
.vu {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.16em;
  width: 1.5em;
  padding: 0.24em;
  border-radius: 0.24em;
  background: #07070b;
  box-shadow: inset 0 0 0.5em rgba(0, 0, 0, 0.9);
}
.vu i {
  display: block;
  height: 0.42em;
  border-radius: 0.08em;
  background: #14361f;
}
.vu i.on            { background: #37e07a; box-shadow: 0 0 0.5em rgba(55, 224, 122, 0.85); }
.vu i.on.warn       { background: #ffc23a; box-shadow: 0 0 0.5em rgba(255, 194, 58, 0.85); }
.vu i.on.peak       { background: #ff4d4d; box-shadow: 0 0 0.6em rgba(255, 77, 77, 0.9); }

/* EQ knobs */
.knobs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6em;
  margin-bottom: 1em;
}
.knob {
  position: relative;
  width: 2.9em;
  height: 2.9em;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #3a3a45, #1e1e26 55%, #3a3a45);
  box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.7), inset 0 0 0.5em rgba(0, 0, 0, 0.6);
}
.knob::after {
  content: "";
  position: absolute;
  top: 0.35em;
  left: 50%;
  width: 0.2em;
  height: 0.95em;
  transform-origin: 50% 1.1em;
  transform: translateX(-50%) rotate(var(--r, 0deg));
  border-radius: 0.1em;
  background: var(--gold, #e0b872);
  box-shadow: 0 0 0.5em rgba(224, 184, 114, 0.8);
}

/* channel faders */
.faders {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6em;
  height: 7.2em;
  margin-bottom: 1em;
}
.fader {
  position: relative;
  width: 1.4em;
  margin: 0 auto;
  height: 100%;
  border-radius: 0.24em;
  background: #0b0b10;
  box-shadow: inset 0 0 0.5em rgba(0, 0, 0, 0.9);
}
.fader::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.3em;
  bottom: 0.3em;
  width: 2px;
  transform: translateX(-50%);
  background: #292933;
}
.fader b {
  position: absolute;
  left: 50%;
  bottom: 0.3em;
  width: 2em;
  height: 0.9em;
  border-radius: 0.16em;
  background: linear-gradient(180deg, #5a5a66, #2b2b35);
  box-shadow: 0 0.14em 0.3em rgba(0, 0, 0, 0.75);
  will-change: transform;
  /* --v is 0..1 of the track; 5.7em is the usable travel */
  transform: translateX(-50%) translateY(calc(var(--v, 0.5) * -5.7em));
  transition: transform 140ms ease-out;
}

/* crossfader */
.crossfader {
  position: relative;
  height: 1.5em;
  border-radius: 0.24em;
  background: #0b0b10;
  box-shadow: inset 0 0 0.5em rgba(0, 0, 0, 0.9);
}
.crossfader::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.4em;
  right: 0.4em;
  height: 2px;
  transform: translateY(-50%);
  background: #292933;
}
.crossfader b {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1em;
  height: 2.2em;
  border-radius: 0.16em;
  background: linear-gradient(180deg, #5f5f6c, #2d2d38);
  box-shadow: 0 0 0.4em rgba(0, 0, 0, 0.8);
  will-change: transform;
  animation: xfade 5.6s ease-in-out infinite;
}
@keyframes xfade {
  0%, 100% { transform: translate(-320%, -50%); }
  50%      { transform: translate(220%, -50%); }
}

/* --- booth facade with the logo --- */

.booth-face {
  position: relative;
  z-index: 1;
  height: clamp(58px, 9vh, 104px);
  margin-top: -0.4em;
  border-radius: 0.6em 0.6em 0 0;
  background:
    linear-gradient(180deg, #16161e 0%, #0c0c12 60%, #08080d 100%);
  box-shadow: 0 -0.2em 2.4em rgba(0, 0, 0, 0.8);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* LED trim strip along the top of the booth */
.booth-face::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    rgba(58, 217, 255, 0) 0%,
    rgba(58, 217, 255, 0.95) 18%,
    rgba(224, 184, 114, 0.95) 50%,
    rgba(255, 63, 164, 0.95) 82%,
    rgba(255, 63, 164, 0) 100%);
  box-shadow: 0 0 1.6em rgba(224, 184, 114, 0.7);
  opacity: 0;
  animation: trimOn 0.9s ease-out 0.15s forwards, trimShift 7.2s steps(6, end) 1.1s infinite;
}
@keyframes trimOn {
  0%   { opacity: 0; }
  22%  { opacity: 1; }
  32%  { opacity: 0.1; }
  46%  { opacity: 1; }
  58%  { opacity: 0.25; }
  100% { opacity: 1; }
}
@keyframes trimShift {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.booth-face img {
  width: min(230px, 34%);
  opacity: 0;
  filter: drop-shadow(0 0 14px rgba(224, 184, 114, 0.75));
  animation: faceLogoOn 1.3s ease-out 0.6s forwards;
}
@keyframes faceLogoOn {
  0%   { opacity: 0; }
  25%  { opacity: 0.9; }
  33%  { opacity: 0.15; }
  48%  { opacity: 0.85; }
  100% { opacity: 0.72; }
}

/* ------------------------------------------------------------
   9. CROWD
   ------------------------------------------------------------ */

.crowd {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  height: clamp(84px, 15vh, 162px);
  opacity: 0;
  animation: fadeIn 1.6s ease-out 2.8s forwards;
  pointer-events: none;
}

.crowd svg { width: 100%; height: 100%; display: block; }
.crowd-back { fill: #04040a; opacity: 0.82; }
.crowd-front { fill: #010104; }

.crowd-bob {
  transform-origin: 50% 100%;
  animation: crowdBob 1.85s ease-in-out infinite;
}
@keyframes crowdBob {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50%      { transform: translateY(-4px) scaleY(1.015); }
}

/* rim light along the tops of heads */
.crowd::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 34px;
  background: linear-gradient(180deg, rgba(224, 184, 114, 0.16), transparent);
  filter: blur(9px);
}

/* ------------------------------------------------------------
   10. STROBE + VIGNETTE
   ------------------------------------------------------------ */

.strobe {
  z-index: 11;
  background: #fff;
  opacity: 0;
  mix-blend-mode: screen;
}
.stage.is-lit .strobe { animation: strobeHit 13s steps(1, end) 1s infinite; }

@keyframes strobeHit {
  0%, 100%      { opacity: 0; }
  40%, 40.6%    { opacity: 0.34; }
  40.3%         { opacity: 0; }
  41%           { opacity: 0.26; }
  41.4%         { opacity: 0; }
  41.8%         { opacity: 0.3; }
  42.2%         { opacity: 0; }
}

.stage-vignette {
  z-index: 13;
  background:
    radial-gradient(112% 88% at 50% 46%, transparent 26%, rgba(2, 2, 6, 0.42) 62%, rgba(2, 2, 6, 0.92) 100%),
    linear-gradient(180deg, rgba(2, 2, 6, 0.7) 0%, transparent 18%);
}

/* ------------------------------------------------------------
   11. HERO COPY
   ------------------------------------------------------------ */

.stage-copy::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(1100px, 96vw);
  height: 78%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 62% 58% at 50% 48%, rgba(3, 3, 8, 0.72), rgba(3, 3, 8, 0.34) 52%, transparent 76%);
  pointer-events: none;
}

.stage-copy {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: calc(var(--header-height) + clamp(34px, 6vh, 72px));
  padding-bottom: clamp(198px, 31vh, 300px);
}

.stage-logo {
  width: min(258px, 37vw);
  margin-bottom: clamp(12px, 2vh, 22px);
  opacity: 0;
  filter: drop-shadow(0 0 26px rgba(224, 184, 114, 0.55))
          drop-shadow(0 0 70px rgba(224, 184, 114, 0.28));
  animation: heroLogo 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards;
}

@keyframes heroLogo {
  0%   { opacity: 0; transform: translateY(20px) scale(0.94); filter: drop-shadow(0 0 0 rgba(224, 184, 114, 0)) blur(6px); }
  38%  { opacity: 1; transform: translateY(0) scale(1.02); filter: drop-shadow(0 0 60px rgba(255, 255, 255, 0.9)) blur(0); }
  46%  { opacity: 0.55; }
  56%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1);
         filter: drop-shadow(0 0 26px rgba(224, 184, 114, 0.55)) drop-shadow(0 0 70px rgba(224, 184, 114, 0.28)); }
}

.stage-copy .eyebrow {
  justify-content: center;
  margin-bottom: 12px;
  font-size: 0.68rem;
  opacity: 0;
  animation: riseIn 0.9s ease-out 2.5s forwards;
}
.stage-copy .eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.stage-copy h1 {
  max-width: 22ch;
  margin-bottom: 16px;
  font-size: clamp(1.85rem, 4.2vw, 3.35rem);
  line-height: 1.05;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.7);
  opacity: 0;
  animation: riseIn 1s ease-out 2.7s forwards;
}

.stage-lead {
  max-width: 68ch;
  margin: 0 auto;
  font-size: clamp(0.96rem, 1.3vw, 1.1rem);
  line-height: 1.6;
  color: rgba(240, 236, 230, 0.82);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: riseIn 1s ease-out 2.9s forwards;
}

.stage-actions {
  justify-content: center;
  margin-top: 24px;
  opacity: 0;
  animation: riseIn 1s ease-out 3.1s forwards;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn { to { opacity: 1; } }

/* scroll cue */
.stage-scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 12;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  opacity: 0;
  animation: fadeIn 1s ease-out 3.8s forwards;
}
.stage-scroll span {
  display: block;
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollCue 2s ease-in-out infinite;
}
@keyframes scrollCue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50%      { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ------------------------------------------------------------
   12. RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 900px) {
  .booth { width: 118vw; }
  .deck { width: 22em; height: 18em; }
  .mixer { width: 17em; height: 20em; }
  .ledwall { width: 92vw; bottom: 19%; }
}

@media (max-width: 680px) {
  .stage { min-height: 580px; }

  /* thin the rig out so phones stay smooth */
  .mover[data-optional],
  .par[data-optional],
  .blinder { display: none; }

  .stage-copy { padding-bottom: clamp(158px, 26vh, 260px); }
  .stage-logo { width: 60vw; }
  .stage-copy .eyebrow { font-size: 0.6rem; letter-spacing: 0.16em; }
  .stage-actions { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
  .stage-actions .button { width: 100%; }
  .stage-scroll { display: none; }

  /* the bar wall is a backdrop on a small screen, not the subject */
  .ledwall { opacity: 0.42 !important; height: 15vh; bottom: 30%; }

  .booth { width: 150vw; font-size: 6px; }
  .deck-left  { transform: perspective(90em) rotateY(14deg) rotateX(5deg); }
  .deck-right { transform: perspective(90em) rotateY(-14deg) rotateX(5deg); }

  .ledwall { height: 26vh; bottom: 22%; }
  .lasers { bottom: 13%; }
  .laser-fan i { height: 46vh; }
  .mover-arm { height: 76vh; }
}

@media (max-width: 420px) {
  .booth { width: 178vw; }
}

/* ------------------------------------------------------------
   13. REDUCED MOTION — a lit stage, held still
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .stage *,
  .stage *::before,
  .stage *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Animations normally fade these in, so with animation off they need
     their end-state opacity. Transforms are left alone — several of these
     use translateX(-50%) to position themselves. */
  .haze, .stage-beams, .par-lens, .mover-lens,
  .crowd, .lasers, .booth, .ledwall,
  .deck-screen, .stage-logo, .stage-copy h1,
  .stage-lead, .stage-actions, .stage-copy .eyebrow,
  .stage-scroll, .booth-face img, .booth-face::before,
  .platter::after, .truss, .blinder i {
    opacity: 1 !important;
  }

  .booth-face img { opacity: 0.72 !important; }
  .ledwall { opacity: 0.6 !important; }
  .haze { opacity: 0.85 !important; }
  .ledwall-eq span { height: 46%; }
  .strobe, .stage-grain { display: none; }
}

/* ------------------------------------------------------------
   14. OFF-SCREEN — stop painting the rig once it scrolls away
   ------------------------------------------------------------ */

.stage.is-offscreen *,
.stage.is-offscreen *::before,
.stage.is-offscreen *::after {
  animation-play-state: paused !important;
}

/* ------------------------------------------------------------
   15. SHORT VIEWPORTS — keep the whole composition on screen
   ------------------------------------------------------------ */

@media (max-height: 780px) and (min-width: 681px) {
  .stage-logo { width: min(250px, 34vw); }
  .stage-copy { padding-bottom: clamp(168px, 26vh, 240px); }
  .booth { font-size: clamp(4.6px, 0.62vw, 7.4px); }
  .stage-copy h1 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
}

@media (max-height: 640px) {
  .stage-logo { width: min(210px, 30vw); margin-bottom: 10px; }
  .stage-lead { display: none; }
  .stage-scroll { display: none; }
}

/* thinned-out rig for devices that can't hold frame rate */
.stage.is-lite .laser-fan:nth-child(2),
.stage.is-lite .stage-grain,
.stage.is-lite .blinder,
.stage.is-lite .haze-2 { display: none; }
