/* ─── Brand tokens ─────────────────────────────────────────────── */
:root {
  --orange: #f49d44;
  --teal:   #009d86;
  --ink:    #1d1d1b;
  --paper:  #fff8ed;

  --font-display: "ClashDisplay", system-ui, "Segoe UI", Helvetica, sans-serif;

  --wave-speed:  60s;
  --wave-speed-slow: 95s;

  /* Tweak these to nudge layout proportions */
  --motif-scale-desktop: 0.78;
  --motif-scale-mobile:  1.05;
}

/* ─── Font ─────────────────────────────────────────────────────── */
@font-face {
  font-family: "ClashDisplay";
  src: url("../assets/fonts/ClashDisplay-Semibold.woff2") format("woff2"),
       url("../assets/fonts/ClashDisplay-Semibold.woff")  format("woff"),
       url("../assets/fonts/ClashDisplay-Semibold.otf")   format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ─── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--orange);
  min-height: 100dvh;
  overflow: hidden;          /* hero takes full viewport */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ─── Background: the designed artwork (arms + waves) ─────────── */
.bg {
  position: fixed; inset: 0; z-index: -2;
  display: block;
  pointer-events: none;
  background: var(--orange); /* matches the artwork's orange so any letterboxing blends */
}
.bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ─── Subtle lighter overlay wave on top of the static artwork ──── */
.overwave {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 28vh;
  z-index: -1;
  pointer-events: none;
  /* Sit in the lower third only, blend gently. */
  opacity: .35;
  mix-blend-mode: screen;
  filter: blur(.4px);
}
.overwave__track {
  fill: #2bd2b4;                          /* lighter than the brand teal */
  animation: overwaveSlide 75s linear infinite;
  transform-origin: 0 0;
  will-change: transform;
}
@keyframes overwaveSlide {
  from { transform: translateX(0); }
  to   { transform: translateX(-1200px); }
}
.overwave { animation: overwaveBreath 11s ease-in-out infinite; }
@keyframes overwaveBreath {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-.8vh); }
}

/* ─── Stage / content layer ─────────────────────────────────────── */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: clamp(1.25rem, 2.5vw, 2.5rem) clamp(1.25rem, 4vw, 4rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1rem, 2vh, 2rem);
}

/* Header / brand — always one row, never wraps */
.brand {
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1rem);
  flex-wrap: nowrap;
  min-width: 0;
}
.brand__logo {
  /* Logo is the flexible element — shrinks first if space gets tight.
     Portrait/mobile uses its own override below. */
  width: clamp(140px, 25vw, 380px);
  flex-shrink: 1;
  min-width: 0;
  height: auto;
  display: block;
}

/* Event info */
.info {
  align-self: center;
  max-width: 100%;
  margin-top: 2vh;
}
/* EP title — sits where 12.6./Nachtasyl used to sit */
.info__title {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: .92;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.info__tagline {
  margin: .55rem 0 1.6rem;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: .85;
}

/* Primary CTA — Vinyl bestellen */
.cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: clamp(.95rem, 1.2vw, 1.05rem);
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .18s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px -8px rgba(29,29,27,.55);
}
.cta:hover     { transform: translateY(-2px); background: #0c0c0a; }
.cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cta__arrow {
  width: 1.05em; height: 1.05em;
  flex-shrink: 0;
  transition: transform .18s ease;
}
.cta:hover .cta__arrow { transform: translateX(3px); }

/* Footer / links row — always one row, never wraps */
.links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: 0;
}

/* Audio teaser ─────────────────────────────────────────────────── */
/* Icon-only round play/pause button. */
.audio-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  flex-shrink: 0;
  transition: transform .18s ease, background .2s ease;
  position: relative;
}
.audio-toggle:hover { transform: translateY(-2px) scale(1.04); }
.audio-toggle:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.audio-toggle .ico {
  width: 1.1rem; height: 1.1rem;
  fill: currentColor;
  position: absolute;
  transition: opacity .2s ease;
}
.ico--play  { opacity: 1; transform: translateX(1px); }
.ico--pause { opacity: 0; }
.audio-toggle[aria-pressed="true"] .ico--play  { opacity: 0; }
.audio-toggle[aria-pressed="true"] .ico--pause { opacity: 1; }

/* The 3-track mini-playlist — its own row, above .links.
   Hidden by default; faded in on play; faded out on stop. */
.audio-queue {
  list-style: none;
  display: flex;
  gap: .4rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  align-self: start;
}
.audio-queue.is-visible { opacity: 1; transform: none; }
.audio-queue[hidden]    { display: none; }

.audio-queue__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .7rem .35rem .55rem;
  background: rgba(255,248,237,.55);
  border: 1.5px solid rgba(29,29,27,.18);
  border-radius: 999px;
  font-size: .85rem;
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}
.audio-queue__num {
  display: inline-grid; place-items: center;
  width: 1.25rem; height: 1.25rem;
  border-radius: 50%;
  background: rgba(29,29,27,.12);
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.audio-queue__title { font-weight: 500; }

/* Progress bar inside the *current* chip */
.audio-queue__bar {
  position: absolute; left: 0; bottom: 0;
  height: 3px; width: 100%;
  background: rgba(29,29,27,.08);
  border-radius: 0 0 999px 999px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .15s ease;
}
.audio-queue__bar-fill {
  display: block; height: 100%; width: 0;
  background: var(--ink);
}

/* States */
.audio-queue__item[data-state="upcoming"] {
  opacity: .7;
}
.audio-queue__item[data-state="current"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  font-weight: 600;
  box-shadow: 0 4px 14px -6px rgba(29,29,27,.45);
}
.audio-queue__item[data-state="current"] .audio-queue__num {
  background: rgba(255,255,255,.18);
  color: var(--paper);
}
.audio-queue__item[data-state="current"] .audio-queue__bar {
  opacity: 1;
  background: rgba(255,255,255,.18);
}
.audio-queue__item[data-state="current"] .audio-queue__bar-fill {
  background: var(--paper);
}
.audio-queue__item[data-state="played"] {
  opacity: .45;
  text-decoration: line-through;
  text-decoration-color: rgba(29,29,27,.35);
}

/* Phone widths — stack chips vertically so the title is never truncated */
@media (max-width: 700px) {
  .audio-queue {
    flex-direction: column;
    gap: .3rem;
  }
  .audio-queue__item { width: 100%; justify-content: flex-start; }
}

/* Small centered legal link, lives on its own row below the icon strip */
.legal-link {
  display: block;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .06em;
  font-weight: 500;
  opacity: .65;
  padding-top: .25rem;
  border-bottom: 1px solid transparent;
  transition: opacity .2s ease, border-color .2s ease;
  align-self: center;
  justify-self: center;
}
.legal-link:hover { opacity: 1; border-bottom-color: currentColor; }

/* Social + streaming icons */
.social {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: nowrap;
}
.social__link {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: transform .18s ease, background .2s ease;
}
.social__link svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.social__link:hover { transform: translateY(-2px) scale(1.04); }
.social__link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Subtle divider between the "listen" icons and the "follow" icons */
.social__divider {
  width: 1px;
  height: 1.4rem;
  background: currentColor;
  opacity: .25;
  margin: 0 .15rem;
  flex-shrink: 0;
}

/* ─── Landscape layout (uses bg-desktop) ────────────────────────
   Background art puts the arms in the right half — text sits in the
   left orange field, right column intentionally empty so the artwork
   breathes. The chip-queue gets its own row directly above .links. */
@media (orientation: landscape) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto auto auto;
    grid-template-areas:
      "brand  ."
      "info   art"
      "queue  queue"
      "links  links"
      "legal  legal";
  }
  .brand       { grid-area: brand; max-width: 100%; }
  .info        { grid-area: info; align-self: center; max-width: 100%; }
  .audio-queue { grid-area: queue; justify-self: start; }
  .links       { grid-area: links; }
  .legal-link  { grid-area: legal; }
}
@media (orientation: landscape) and (min-width: 1200px) {
  /* Slightly favour the left text column so the brand row stays well
     within the orange field on wide displays. */
  .stage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ─── Portrait layout (uses bg-mobile) ───────────────────────────
   Background puts the arms in the upper-third. Logo at the top, a
   clear spacer for the arms, then text in the lower teal wave, the
   chip queue directly above the icon row, and the icon row at the
   bottom. The legal link is a tiny centered line below. */
@media (orientation: portrait) {
  /* Single flexible spacer above the headline keeps the
     "12.6. Nachtasyl" block anchored to the lower-third of the screen
     (over the teal wave, never over the arms). */
  .stage {
    grid-template-rows: auto 1fr auto auto auto auto;
    grid-template-areas:
      "brand"
      "spacer"
      "info"
      "queue"
      "links"
      "legal";
    gap: clamp(.35rem, .8vh, .8rem);
    padding-top:    clamp(1rem, 3vh, 2rem);
    padding-bottom: clamp(.75rem, 2vh, 1.5rem);
  }
  .brand       { grid-area: brand;
                 flex-direction: column;
                 align-items: center;
                 justify-content: center;
                 text-align: center;
               }
  .brand__logo { width: min(60vw, 260px); }    /* bigger logo on mobile */

  .info        { grid-area: info;
                 max-width: none; margin-top: 0;
                 align-self: end;
                 text-align: center;
               }
  .audio-queue { grid-area: queue; flex-direction: column; align-items: stretch; }
  .links       { grid-area: links; }
  .legal-link  { grid-area: legal; }
}

/* Compact phone widths — display type at one consistent scale */
@media (orientation: portrait) and (max-width: 480px) {
  .info__title { font-size: clamp(2.6rem, 11.5vw, 4.6rem); }
}


/* Very small viewports — tighten footer-row spacing */
@media (max-width: 380px) {
  .links { gap: .5rem; }
  .social { gap: .35rem; }
  .social__link { width: 2.15rem; height: 2.15rem; }
  .social__link svg { width: 1.05rem; height: 1.05rem; }
  .social__divider { margin: 0 .1rem; height: 1.2rem; }
}

/* Reduced motion: stop all wave animation */
@media (prefers-reduced-motion: reduce) {
  .overwave, .overwave__track {
    animation: none !important;
  }
}
