/* ---------------- release popup ---------------- */

.popup {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  border: 0;
  background: transparent;
  overscroll-behavior: contain;
}

.popup::backdrop { background: rgba(28, 8, 30, .55); backdrop-filter: blur(3px); }
.popup:not([open]) { display: none; }
.popup[hidden] { display: none; }

.popup__panel {
  position: relative;
  width: clamp(300px, 26vw, 520px);
  max-height: min(88vh, 780px);
  overflow: visible;
  padding: 14px 14px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(168deg, rgba(196, 108, 205, .93), rgba(148, 56, 156, .95));
  box-shadow: var(--shadow-float);
  transform-origin: center;
  animation: popup-in 280ms cubic-bezier(.2, .9, .3, 1.15);
}

/* whisper-level grain so the large flat panel keeps some depth */
.popup__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes popup-in {
  from { opacity: 0; transform: translateY(10px) scale(.965); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .popup__panel { animation-duration: 1ms; }
}

.popup__banner {
  display: block;
  width: 100%;
  aspect-ratio: 2.85 / 1;
  object-fit: cover;
  object-position: center 16%;
  border-radius: 6px;
  background: var(--violet-800);
}

.popup__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--radius-pill);
  background: rgba(88, 84, 92, .88);
  color: #fff;
  font-size: 22px; line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-cover);
  transition: transform 180ms cubic-bezier(.2, .9, .3, 1.2), background-color 180ms ease;
}
.popup__close:hover  { background: rgba(120, 114, 126, .95); transform: scale(1.06); }
.popup__close:active { transform: scale(.94); }
.popup__close:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--petal-200); }

.popup__title {
  margin: var(--sp-4) 0 0;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  letter-spacing: -0.01em;
}
.popup__date {
  margin: 2px 0 0;
  text-align: center;
  font-size: 14px;
  opacity: .85;
}

.popup__section-label {
  margin: var(--sp-4) 0 var(--sp-2);
  text-align: center;
  font-size: 15px;
  opacity: .95;
}

/* "about" text - clamped to three lines until expanded */
.popup__about {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .95);
  white-space: pre-wrap;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.popup__about.is-expanded {
  -webkit-line-clamp: unset;
  display: block;
  max-height: 34vh;
  overflow-y: auto;
}
.popup__about:empty::after {
  content: 'No description yet.';
  opacity: .6;
  font-style: italic;
}

.popup__more {
  display: block;
  margin: var(--sp-2) auto 0;
  padding: 4px 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(255, 255, 255, .95);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}
.popup__more:hover  { background: rgba(255, 255, 255, .14); }
.popup__more:active { transform: scale(.97); }
.popup__more:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--petal-200); }
.popup__more[hidden] { display: none; }

/* platform buttons: four per row, centred, wrapping.
   The .platform button itself now lives in site.css - the home panel uses the
   same control, and only the music page loads this file. */
.popup__platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 320px;
  margin: var(--sp-6) auto 0;
}

.popup__no-links {
  margin: var(--sp-5) 0 0;
  text-align: center;
  font-size: 13px;
  opacity: .72;
  font-style: italic;
}
