/* ---- PAGE-WIDE NEON HAZE ----
   Fixed so it stays put while the page scrolls, giving every section the same
   ambient wash. The hero video is opaque and sits on top, so it is unaffected. */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(34% 40% at 14% 22%, rgba(255, 46, 151, 0.20), transparent 70%),
    radial-gradient(32% 38% at 86% 58%, rgba(0, 229, 255, 0.15), transparent 70%),
    radial-gradient(30% 36% at 46% 88%, rgba(124, 77, 255, 0.18), transparent 70%);
  animation: neon-drift 24s ease-in-out infinite alternate;
}

@keyframes neon-drift {
  from { transform: translate3d(-2%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.12); }
}

/* ---- HERO ----
   Deliberately kept as it was. The opaque background keeps the page-wide haze
   out of the hero even while the video is still loading. */
.dj-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.dj-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.dj-hero-overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 40px 60px;
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

.dj-hero-overlay h1 {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 4px;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.dj-hero-overlay p {
  font-size: 18px;
  opacity: 0.75;
  margin: 0;
  letter-spacing: 1px;
}

/* ---- NAV ---- */
nav {
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  padding: 14px 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 105, 180, 0.18);
}

nav a:hover {
  color: #ff69b4;
}

/* ---- SECTION LABELS ----
   One neon treatment shared by every heading on the page. */
.section-label {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 20px 30px;
}

.section-label h2 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: 5px;
  margin: 0 0 12px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff2e97, #ff69b4 30%, #7c4dff 62%, #00e5ff 82%, #ff2e97);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: neon-sweep 7s linear infinite;
}

@keyframes neon-sweep {
  from { background-position: 0% 50%; }
  to   { background-position: 250% 50%; }
}

.section-label p {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 0;
}

/* ---- VIDEO GRID ---- */
/* Fixed 2 columns rather than auto-fit: with 4 cards + 1 full-width feature
   (and 2 in the Roskilde grid) every row fills exactly, leaving no empty cells. */
.gig-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.gig-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(24, 24, 29, 0.92), rgba(12, 12, 15, 0.92));
  border: 1px solid #24242c;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.gig-card:hover {
  border-color: #3c3c48;
  transform: translateY(-3px);
}

.gig-card.revealed {
  border-color: rgba(255, 105, 180, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 105, 180, 0.22),
              0 16px 48px -16px rgba(255, 46, 151, 0.6);
}

.gig-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  filter: blur(14px);
  transform: scale(1.08);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.gig-card.revealed video {
  filter: blur(0);
  transform: scale(1);
}

/* ---- CLUB STROBE ----
   js/dj-gigs.js fires .strobing on one unrevealed card at a time: two flashes,
   then the card goes dark and a pause follows before a different card is
   picked. The two flashes are 0.36s apart (~2.8 per second), under the
   3-per-second photosensitivity threshold (WCAG 2.3.1). */
/* A single flash is a fast transition rather than a keyframe animation: that
   is what lets js/dj-gigs.js randomise the gap between flashes per burst,
   which fixed keyframe percentages cannot do. CSS owns how a flash looks,
   the script owns the rhythm — it adds .lit for a moment, then removes it. */
.gig-card:not(.revealed) video.strobing {
  transition: filter 35ms linear;
}

.gig-card:not(.revealed) video.strobing.lit {
  filter: blur(2px) brightness(2.15) saturate(1.5);
}

/* Card rim catches the flash too, so it reads as light hitting the booth. */
.gig-card.strobing {
  transition: border-color 35ms linear, box-shadow 35ms linear;
}

.gig-card.strobing.lit {
  border-color: rgba(255, 105, 180, 0.85);
  box-shadow: 0 0 26px -4px rgba(255, 46, 151, 0.75);
}

/* Every other flash in a burst goes cyan instead of pink. */
.gig-card.strobing.lit.cool {
  border-color: rgba(0, 229, 255, 0.8);
  box-shadow: 0 0 26px -4px rgba(0, 229, 255, 0.6);
}

.gig-reveal-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.gig-reveal-hint svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(255, 46, 151, 0.75));
}

/* Override the inline stroke="white" / fill="white" on the play glyph. */
.gig-reveal-hint svg circle  { stroke: #ff69b4; }
.gig-reveal-hint svg polygon { fill: #ff69b4; }

.gig-reveal-hint span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ff69b4;
  text-shadow: 0 0 14px rgba(255, 46, 151, 0.6);
}

/* Slow breathe so an unopened card reads as waiting to be clicked. */
.gig-card:not(.revealed) .gig-reveal-hint {
  animation: hint-breathe 2.6s ease-in-out infinite;
}

@keyframes hint-breathe {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

.gig-card.revealed .gig-reveal-hint {
  opacity: 0;
}

.gig-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ff69b4;
  text-shadow: 0 0 14px rgba(255, 46, 151, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gig-card.revealed:hover .gig-card-label {
  opacity: 1;
}

/* Spans both columns edge to edge. The wider crop keeps it from towering
   over the viewport at full page width. */
.gig-card.full-width {
  grid-column: 1 / -1;
  width: auto;
  max-width: none;
  margin: 0;
}

.gig-card.full-width video {
  aspect-ratio: 21 / 9;
}

/* ---- PHOTO SCROLL ---- */
.photo-scroll {
  position: relative;
  z-index: 1;
  overflow: hidden;
  /* Sits directly under the hero now, so it carries its own top spacing. */
  padding: 60px 0 10px;
  /* Fade both ends so the strip bleeds into the page instead of hard-stopping. */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}

.photo-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: photo-scroll-loop 45s linear infinite;
}

.photo-track img {
  height: 260px;
  width: 260px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 105, 180, 0.18);
  filter: saturate(1.12) contrast(1.04);
}

@keyframes photo-scroll-loop {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- AUDIO SECTION ---- */
.audio-section {
  position: relative;
  z-index: 1;
  /* Slightly translucent so the page-wide haze carries through this panel too. */
  background: rgba(6, 6, 8, 0.86);
  border-top: 1px solid rgba(255, 105, 180, 0.16);
  padding: 60px 24px 90px;
  overflow: hidden;
}

/* Slow drifting neon haze behind the cards; brightens while a mix plays. */
.audio-section::before {
  content: "";
  position: absolute;
  inset: -25% -12%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity 0.9s ease;
  background:
    radial-gradient(38% 45% at 18% 28%, rgba(255, 46, 151, 0.24), transparent 70%),
    radial-gradient(36% 42% at 82% 68%, rgba(0, 229, 255, 0.18), transparent 70%),
    radial-gradient(32% 40% at 50% 104%, rgba(124, 77, 255, 0.20), transparent 70%);
  animation: mix-haze 19s ease-in-out infinite alternate;
}

.audio-section.mixes-live::before {
  opacity: 1;
}

@keyframes mix-haze {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.14); }
}

/* ---- MIXES HEADING ---- */
/* Heading styling is inherited from .section-label — see SECTION LABELS above. */

/* ---- MIX CARDS ---- */
.audio-grid {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mix-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(145deg, rgba(24, 24, 29, 0.92), rgba(12, 12, 15, 0.92));
  border: 1px solid #24242c;
  border-radius: 16px;
  padding: 20px 24px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* The dancing crowd, drawn by js/dj-gigs.js onto a canvas the size of the
   whole card. pointer-events:none keeps every click going through to the
   waveform underneath, so the scrub bar still works where they overlap it,
   and the card's overflow:hidden clips them to the rounded corners. */
.mix-crowd {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Content sits above the crowd, so a dancer can never obscure a label. */
.player-ready .mix-card .mix-index,
.player-ready .mix-card .mix-play,
.player-ready .mix-card .mix-body {
  position: relative;
  z-index: 1;
}

.mix-card:hover {
  border-color: #3c3c48;
  transform: translateY(-2px);
}

.mix-card.playing {
  border-color: rgba(255, 105, 180, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 105, 180, 0.22),
              0 14px 44px -14px rgba(255, 46, 151, 0.6);
}

/* The native <audio> is a no-JS fallback: swapped out once the custom
   player initialises (js/dj-gigs.js adds .player-ready). */
.mix-card .mix-index,
.mix-card .mix-play,
.mix-card .mix-body { display: none; }
.mix-card audio { width: 100%; accent-color: #ff69b4; }

.player-ready .mix-card .mix-index { display: block; }
.player-ready .mix-card .mix-play  { display: flex; }
.player-ready .mix-card .mix-body  { display: block; }
.player-ready .mix-card audio      { display: none; }

.mix-index {
  flex-shrink: 0;
  width: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #4a4a57;
  transition: color 0.25s ease;
}

.mix-card.playing .mix-index {
  color: #ff69b4;
}

/* ---- TRANSPORT BUTTON ---- */
.mix-play {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ff2e97, #7c4dff);
  box-shadow: 0 6px 20px -6px rgba(255, 46, 151, 0.85);
  transition: transform 0.2s ease;
}

.mix-play:hover  { transform: scale(1.08); }
.mix-play:active { transform: scale(0.95); }

.mix-play:focus-visible {
  outline: 2px solid #00e5ff;
  outline-offset: 3px;
}

.mix-card.playing .mix-play {
  animation: mix-pulse 1.7s ease-out infinite;
}

@keyframes mix-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 46, 151, 0.5), 0 6px 20px -6px rgba(255, 46, 151, 0.85); }
  70%  { box-shadow: 0 0 0 16px rgba(255, 46, 151, 0), 0 6px 20px -6px rgba(255, 46, 151, 0.85); }
  100% { box-shadow: 0 0 0 0 rgba(255, 46, 151, 0), 0 6px 20px -6px rgba(255, 46, 151, 0.85); }
}

.mix-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mix-icon-pause { display: none; }
.mix-card.playing .mix-icon-play  { display: none; }
.mix-card.playing .mix-icon-pause { display: inline; }

/* ---- TRACK BODY ---- */
.mix-body {
  flex: 1;
  min-width: 0;
}

.mix-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.mix-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mix-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ff69b4;
  border: 1px solid rgba(255, 105, 180, 0.35);
  background: rgba(255, 105, 180, 0.08);
  border-radius: 980px;
  padding: 3px 10px;
}

/* Canvas doubles as the scrub bar — touch-action keeps a drag from scrolling. */
.mix-viz {
  display: block;
  width: 100%;
  height: 54px;
  cursor: pointer;
  touch-action: none;
}

.mix-card.playing .mix-viz {
  filter: drop-shadow(0 0 7px rgba(255, 46, 151, 0.45));
}

.mix-times {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: #6a6a78;
}

.mix-card.playing .mix-cur {
  color: #ff69b4;
}

/* Respect users who ask for less motion: kill the ambient loops.
   The visualiser itself only runs while audio is deliberately playing. */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .audio-section::before { animation: none; }
  .section-label h2 { animation: none; }
  .gig-card:not(.revealed) .gig-reveal-hint { animation: none; opacity: 0.9; }
  .photo-track { animation: none; }
  /* The strobe is gated in JS as well; neutralise it here too in case the
     setting is changed after the page has loaded. */
  .gig-card:not(.revealed) video.strobing.lit {
    filter: blur(14px) brightness(1) saturate(1);
  }
  .gig-card.strobing.lit {
    border-color: #24242c;
    box-shadow: none;
  }
  .mix-card.playing .mix-play { animation: none; }
  .mix-card:hover,
  .gig-card:hover { transform: none; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .dj-hero-overlay h1 { font-size: 38px; }
  .dj-hero-overlay { padding: 28px 30px; }
  .photo-track img { height: 190px; width: 190px; }
  .gig-grid { grid-template-columns: 1fr; }
  .gig-card.full-width video { aspect-ratio: 16 / 9; }

  .mix-card { gap: 14px; padding: 16px 18px; }
  .player-ready .mix-card .mix-index { display: none; }
  .mix-play { width: 48px; height: 48px; }
  .mix-icon { width: 19px; height: 19px; }
  .mix-head h3 { font-size: 16px; }
  .mix-viz { height: 44px; }
}
