/* ── Custom properties ── */
:root {
  --color-primary: #094769;
  --color-accent: #DF1E2F;
  --color-cream: #E0D7AE;
  --color-bg: #F5F2EA;
  --color-text-muted: #3a5a6e;
  --color-torso: #0d5a82;

  --hero-width: min(100%, 22.5rem);

  --font-display: "Bebas Neue", sans-serif;
  --font-body: "DM Sans", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset & base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg);
  font-family: var(--font-body);
  color: var(--color-primary);
  overflow-x: hidden;
  position: relative;
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Background badge ── */
.bg-badge {
  position: fixed;
  bottom: -40px;
  right: -40px;
  width: clamp(160px, 30vw, 240px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
  animation: badge-spin 60s linear infinite;
}

.bg-badge img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0) brightness(0.3);
}

/* ── Page layout ── */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 640px;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1.25rem, 5vw, 2rem);
  gap: clamp(1.25rem, 3.5vw, 2rem);
}

.hero {
  width: var(--hero-width);
  display: flex;
  justify-content: center;
  animation: fade-up 0.8s var(--ease-out) 0s both;
}

.hero__logo-wrap {
  width: 100%;
  line-height: 0;
}

.hero__logo {
  width: 100%;
  height: auto;
  display: block;
  margin-inline: auto;
}

.headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--hero-width);
}

/* ── Entrance animations ── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dj-scene {
  animation: fade-up 0.9s var(--ease-out) 0.55s both;
}

.site-footer {
  animation: fade-up 0.8s var(--ease-out) 0.75s both;
}

/* ── Headline ── */
.headline__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9.5vw, 4.25rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  width: 100%;
  animation: fade-up 0.8s var(--ease-out) 0.3s both;
}

.headline__line {
  display: block;
}

.headline__line:first-child {
  font-size: 0.55em;
  letter-spacing: 0.16em;
  opacity: 0.82;
  margin-bottom: 0.05em;
}

.headline__accent {
  position: relative;
  display: block;
  width: fit-content;
  margin-inline: auto;
}

.headline__accent::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.04em;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  transform-origin: center center;
  animation: underline-grow 0.7s var(--ease-out) 0.6s both;
}

@keyframes underline-grow {
  from { transform: translateX(-50%) scaleX(0); }
  to   { transform: translateX(-50%) scaleX(1); }
}

.headline__sub {
  margin-top: clamp(0.65rem, 2vw, 0.9rem);
  font-weight: 300;
  font-size: clamp(0.875rem, 2.2vw, 1rem);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  max-width: 26ch;
  line-height: 1.55;
  animation: fade-up 0.8s var(--ease-out) 0.4s both;
}

/* ── DJ scene container ── */
.dj-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

/* ── Sound wave bars ── */
.sound-waves {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 28px;
  margin-bottom: 4px;
}

.wave-bar {
  display: block;
  width: 5px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 2px;
  opacity: 0.55;
  animation: wave-pulse 1.1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

.wave-bar--accent {
  background-color: var(--color-accent);
  opacity: 0.75;
}

@keyframes wave-pulse {
  0%, 100% { height: 8px; }
  50%      { height: 24px; }
}

/* ── DJ character ── */
.dj-character {
  position: relative;
  width: 52px;
  height: 62px;
  animation: dj-bob 2.4s ease-in-out infinite;
  z-index: 2;
  margin-bottom: -8px;
}

@keyframes dj-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.dj-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background-color: var(--color-primary);
  border-radius: 50%;
}

.dj-headphones {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 18px;
  border: 3px solid var(--color-cream);
  border-bottom: none;
  border-radius: 17px 17px 0 0;
}

.dj-headphones::before,
.dj-headphones::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 8px;
  height: 10px;
  background-color: var(--color-cream);
  border-radius: 2px;
}

.dj-headphones::before { left: -2px; }
.dj-headphones::after  { right: -2px; }

.dj-body {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 20px;
  background-color: var(--color-torso);
  border-radius: 4px 4px 2px 2px;
}

.dj-arm {
  position: absolute;
  bottom: 26px;
  width: 16px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transform-origin: left center;
}

.dj-arm--left {
  left: 2px;
  animation: arm-left 1.6s ease-in-out infinite;
}

.dj-arm--right {
  right: 2px;
  transform-origin: right center;
  animation: arm-right 1.6s ease-in-out infinite;
}

@keyframes arm-left {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(18deg); }
}

@keyframes arm-right {
  0%, 100% { transform: rotate(8deg); }
  50%      { transform: rotate(-18deg); }
}

/* ── DJ booth ── */
.dj-booth {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: clamp(6px, 2vw, 12px);
  width: min(100%, 340px);
  padding: 10px 12px 0;
  background: linear-gradient(180deg, #0a3d5c 0%, var(--color-primary) 100%);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 6px 20px rgba(9, 71, 105, 0.25);
}

/* ── Turntables ── */
.turntable__platter {
  position: relative;
  width: clamp(72px, 22vw, 96px);
  height: clamp(72px, 22vw, 96px);
}

.record {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    #1a1a1a 0%,
    #111 30%,
    #222 50%,
    #0a0a0a 70%,
    #1a1a1a 100%
  );
  animation: spin-cw 3s linear infinite;
  position: relative;
}

.record--reverse {
  animation: spin-ccw 2.4s linear infinite;
}

@keyframes spin-cw {
  to { transform: rotate(360deg); }
}

@keyframes spin-ccw {
  to { transform: rotate(-360deg); }
}

.record__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background-color: var(--color-accent);
  border: 2px solid #111;
}

.tonearm {
  position: absolute;
  top: 8%;
  right: -4%;
  width: 50%;
  height: 3px;
  background-color: var(--color-cream);
  border-radius: 2px;
  transform-origin: 95% center;
  animation: tonearm-swing 4s ease-in-out infinite;
  z-index: 2;
}

.tonearm::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -2px;
  width: 7px;
  height: 7px;
  background-color: var(--color-cream);
  border-radius: 50%;
}

.tonearm--right {
  left: -4%;
  right: auto;
  transform-origin: 5% center;
  animation: tonearm-swing-right 4.5s ease-in-out infinite;
}

.tonearm--right::after {
  right: auto;
  left: -3px;
}

@keyframes tonearm-swing {
  0%, 100% { transform: rotate(-12deg); }
  50%      { transform: rotate(18deg); }
}

@keyframes tonearm-swing-right {
  0%, 100% { transform: rotate(12deg); }
  50%      { transform: rotate(-16deg); }
}

/* ── Mixer ── */
.mixer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  min-width: 80px;
}

.mixer__faders {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 36px;
}

.fader-track {
  position: relative;
  width: 6px;
  height: 100%;
  background-color: rgba(224, 215, 174, 0.25);
  border-radius: 3px;
}

.fader-knob {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 8px;
  background-color: var(--color-cream);
  border-radius: 2px;
  animation: fader-slide 2s ease-in-out infinite;
}

.fader-knob--1 { animation-delay: 0s; }
.fader-knob--2 { animation-delay: 0.4s; }
.fader-knob--3 { animation-delay: 0.8s; }

@keyframes fader-slide {
  0%, 100% { top: 60%; }
  50%      { top: 15%; }
}

.mixer__knobs {
  display: flex;
  gap: 6px;
}

.mixer-knob {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4a8ab0, var(--color-primary));
  border: 1px solid rgba(224, 215, 174, 0.4);
}

.mixer-knob--1 { animation: knob-spin 3s linear infinite; }
.mixer-knob--2 { animation: knob-spin-rev 2.2s linear infinite; }
.mixer-knob--3 { animation: knob-spin 4s linear infinite; }
.mixer-knob--4 { animation: knob-spin-rev 1.8s linear infinite; }

@keyframes knob-spin {
  to { transform: rotate(360deg); }
}

@keyframes knob-spin-rev {
  to { transform: rotate(-360deg); }
}

.crossfader {
  position: relative;
  width: 100%;
  height: 10px;
  margin-top: 2px;
}

.crossfader__track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  transform: translateY(-50%);
  background-color: rgba(224, 215, 174, 0.3);
  border-radius: 2px;
}

.crossfader__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 10px;
  transform: translateY(-50%);
  background-color: var(--color-accent);
  border-radius: 2px;
  animation: crossfader-slide 3s ease-in-out infinite;
}

@keyframes crossfader-slide {
  0%, 100% { left: 0; }
  50%      { left: calc(100% - 14px); }
}

.vu-meter {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  margin-top: 2px;
}

.vu-bar {
  display: block;
  width: 4px;
  height: 6px;
  background-color: var(--color-cream);
  border-radius: 1px;
  opacity: 0.6;
  animation: vu-pulse 0.8s ease-in-out infinite;
}

.vu-bar:nth-child(1) { animation-delay: 0s; }
.vu-bar:nth-child(2) { animation-delay: 0.1s; }
.vu-bar:nth-child(3) { animation-delay: 0.2s; }
.vu-bar:nth-child(4) { animation-delay: 0.3s; }
.vu-bar:nth-child(5) { animation-delay: 0.15s; }
.vu-bar:nth-child(6) { animation-delay: 0.25s; }

.vu-bar--accent {
  background-color: var(--color-accent);
  opacity: 0.85;
}

@keyframes vu-pulse {
  0%, 100% { height: 6px; }
  50%      { height: 16px; }
}

/* ── Booth edge stripe ── */
.booth-edge {
  grid-column: 1 / -1;
  position: relative;
  height: 10px;
  background: linear-gradient(180deg, #073550, #052a3f);
  border-radius: 0 0 4px 4px;
  margin: 0 -12px;
  display: flex;
  align-items: flex-end;
}

.booth-edge__stripe {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    var(--color-torso) 8.333%,
    var(--color-cream) 16.667%,
    var(--color-accent) 25%,
    var(--color-cream) 33.333%,
    var(--color-torso) 41.667%,
    var(--color-primary) 50%,
    var(--color-torso) 58.333%,
    var(--color-cream) 66.667%,
    var(--color-accent) 75%,
    var(--color-cream) 83.333%,
    var(--color-torso) 91.667%,
    var(--color-primary) 100%
  );
  background-size: 200% 100%;
  animation: led-strip 5s linear infinite;
}

@keyframes led-strip {
  from { background-position: 0% 0; }
  to   { background-position: 100% 0; }
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem) clamp(1.25rem, 5vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.site-footer__times {
  color: var(--color-accent);
}

.site-footer__meta {
  margin-top: 0.35rem;
  font-weight: 300;
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  opacity: 0.75;
}

/* ── Background badge spin ── */
@keyframes badge-spin {
  to { transform: rotate(360deg); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero,
  .headline__title,
  .headline__sub,
  .dj-scene,
  .site-footer {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .headline__accent::after {
    animation: none;
    transform: translateX(-50%) scaleX(1);
  }

  #particles {
    display: none;
  }
}
