/* Werte aus packages/ui-tokens (Riso, dunkel). */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #12161f;
  --surface: #1c2230;
  --text: #f4eedf;
  --muted: #b9b2a0;
  --pink: #ff6fa5;
  --blue: #6f9bff;
  --yellow: #ffd23f;
  --ink: #12161f;
  --beat: 0.469s; /* 128 BPM */
  --level: 0;
  --display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  overflow-x: hidden;
}

/* Druckpapier: Rasterpunkte in Pink und Blau, leicht gegeneinander verschoben */
.paper {
  position: fixed;
  inset: -20px;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 38%, transparent 0 18%, var(--bg) 70%),
    radial-gradient(rgb(255 111 165 / 0.28) 1.2px, transparent 1.7px) 0 0 / 9px 9px,
    radial-gradient(rgb(111 155 255 / 0.2) 1.2px, transparent 1.7px) 3px 4px / 9px 9px,
    var(--bg);
}

.top {
  display: flex;
  justify-content: center;
  padding: clamp(20px, 5vw, 40px) 20px 0;
}
.logo {
  width: min(78vw, 420px);
  height: auto;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 20px 24px;
}

/* Kopfhörer mit versetztem Zweifarbdruck */
.phones-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(68vw, 300px);
  aspect-ratio: 1;
  margin-top: clamp(8px, 3vh, 28px);
}
.phones {
  position: relative;
  width: 88%;
  overflow: visible;
  animation: pulse var(--beat) ease-out infinite;
  transform: scale(calc(1 + var(--level) * 0.12));
}
.print {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  mix-blend-mode: screen;
}
.print-pink {
  stroke: var(--pink);
}
.print-blue {
  stroke: var(--blue);
  transform: translate(5px, 4px);
  animation: misprint calc(var(--beat) * 2) steps(2) infinite;
}
.print .inner {
  stroke-width: 4;
  opacity: 0.7;
}
.print .cup circle {
  fill: currentColor;
  stroke: none;
}
.print-pink .cup circle {
  color: var(--pink);
}
.print-blue .cup circle {
  color: var(--blue);
}
.cup {
  transform-box: fill-box;
  transform-origin: center;
  animation: thump var(--beat) ease-out infinite;
}

.ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 3px solid var(--pink);
  opacity: 0;
  animation: ring calc(var(--beat) * 4) linear infinite;
}
.ring-2 {
  border-color: var(--blue);
  animation-delay: calc(var(--beat) * 1.33);
}
.ring-3 {
  border-color: var(--yellow);
  border-style: dashed;
  animation-delay: calc(var(--beat) * 2.66);
}

.stamp {
  margin: 4px 0 10px;
  padding: 6px 14px 4px;
  background: var(--yellow);
  color: var(--ink);
  font: 600 clamp(14px, 3.6vw, 18px) / 1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  box-shadow: 4px 4px 0 var(--pink);
}
h1 {
  max-width: 14ch;
  margin: 10px 0 12px;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(38px, 11vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-shadow:
    3px 3px 0 var(--pink),
    -2px -1px 0 rgb(111 155 255 / 0.8);
}
.lead {
  max-width: 34rem;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(16px, 4vw, 19px);
  line-height: 1.45;
}

.eq {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 46px;
  margin-bottom: 22px;
}
.eq span {
  width: 6px;
  height: 100%;
  border-radius: 1px;
  background: var(--pink);
  transform-origin: bottom;
  transform: scaleY(0.15);
  animation: bar calc(var(--beat) * var(--n, 1)) ease-in-out infinite alternate;
}
.eq span:nth-child(3n) {
  background: var(--blue);
}
.eq span:nth-child(5n) {
  background: var(--yellow);
}
.eq.live span {
  animation: none;
  transition: transform 80ms linear;
}

.sound {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--text);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: 600 16px var(--mono);
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--blue);
}
.sound[hidden] {
  display: none;
}
.sound:hover {
  box-shadow: 5px 5px 0 var(--pink);
}
.sound:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* Link zum DJ-Controller (eigene Seite, dadurch nie zwei Tonquellen gleichzeitig) */
.dj-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 18px;
  padding: 0 22px;
  border: 2px solid var(--text);
  border-radius: 4px;
  background: var(--yellow);
  color: var(--ink);
  font: 600 16px var(--mono);
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--pink);
}
.dj-link:hover {
  box-shadow: 5px 5px 0 var(--blue);
}
.dj-link:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.sound-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
}
.sound[aria-pressed='true'] .sound-dot {
  background: var(--pink);
  box-shadow: 0 0 0 4px rgb(255 111 165 / 0.3);
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  border-top: 2px dashed #343c52;
}
.mono {
  color: var(--muted);
  font: 400 14px var(--mono);
}
.bottom a {
  color: var(--text);
  text-underline-offset: 4px;
}
.bottom a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

@keyframes pulse {
  0% {
    scale: 1.06;
  }
  100% {
    scale: 1;
  }
}
@keyframes thump {
  0% {
    scale: 1.12;
  }
  60% {
    scale: 1;
  }
}
@keyframes misprint {
  0% {
    transform: translate(5px, 4px);
  }
  100% {
    transform: translate(-4px, 5px);
  }
}
@keyframes ring {
  0% {
    opacity: 0.9;
    scale: 0.7;
  }
  100% {
    opacity: 0;
    scale: 1.5;
  }
}
@keyframes bar {
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .eq span {
    transform: scaleY(0.4);
  }
}
