/**
 * Grit jukebox (grit/jukebox) — savethefae.com/jukebox
 *
 * The now-playing chip's home. Loads on top of grit-brand.css (extends
 * website/grit/base.html). Hero + featured track on the brand gradient,
 * the release grid on cloud, the Spotify embed, then the waitlist capture.
 * Page-scoped: every selector is jb-* (the np-bars equalizer is shared with
 * the homepage chip and restated here because that chip's CSS is inline).
 */

.jb-hero {
  background: linear-gradient(160deg, var(--color-blue) 0%, var(--color-purple) 100%);
  color: #fff;
  padding: clamp(1.75rem, 4vw, 3.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.jb-hero-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.jb-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.jb-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 0.6rem;
  text-wrap: balance;
}

.jb-lead {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 1.1rem;
  max-width: 34rem;
}

/* ---- Buttons: one pill per platform, icon tinted by platform ---- */
.jb-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.jb-artist-links {
  justify-content: center;
}

.jb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.35);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.jb-btn:hover,
.jb-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(8, 12, 18, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.jb-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(154, 213, 202, 0.6);
}

.jb-btn i { font-size: 1rem; }
.jb-btn[data-platform="spotify"] i { color: #1db954; }
.jb-btn[data-platform="apple_music"] i { color: #fc3c44; }
.jb-btn[data-platform="youtube_music"] i,
.jb-btn[data-platform="youtube"] i { color: #ff3d3d; }

.jb-btn-primary {
  background: var(--color-sage);
  border-color: var(--color-sage);
  color: #10231f;
}

.jb-btn-primary:hover,
.jb-btn-primary:focus-visible {
  background: #b3e2d9;
  border-color: #b3e2d9;
  color: #10231f;
}

.jb-btn-primary i { color: #10231f; }

/* ---- Featured track: art left, copy right; stacks on phones ---- */
.jb-featured {
  display: grid;
  grid-template-columns: minmax(160px, 260px) 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  max-width: 820px;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg, 18px);
  background: rgba(8, 12, 18, 0.35);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55);
}

.jb-featured-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.jb-featured-body h2 {
  text-transform: none; /* song titles keep their case; section heads stay lowercase */
  color: #fff;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin: 0.2rem 0 0.25rem;
  text-wrap: balance;
}

.jb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-sage);
}

.np-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.np-bars i {
  width: 3px;
  background: var(--color-sage);
  border-radius: 1px;
  animation: jb-bounce 1.1s ease-in-out infinite;
}
.np-bars i:nth-child(1) { height: 60%; animation-delay: 0s; }
.np-bars i:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.np-bars i:nth-child(3) { height: 45%; animation-delay: 0.4s; }
@keyframes jb-bounce { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }

.jb-feat,
.jb-note,
.jb-date {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.85);
}

.jb-feat { font-weight: 600; }
.jb-date { font-size: 0.85rem; letter-spacing: 0.02em; }
.jb-featured-body .jb-buttons { margin-top: 0.9rem; }

/* ---- Release grid on cloud ---- */
.jb-releases {
  background: var(--color-neutral);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.jb-section-title {
  text-align: center;
  color: var(--slate-darkest);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.jb-player .jb-section-title { color: var(--slate-darkest); }

.jb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  max-width: 980px;
  margin: 0 auto;
}

.jb-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: var(--radius-lg, 18px);
  background: #fff;
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.45);
}

.jb-art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.jb-card h3 {
  text-transform: none;
  color: var(--slate-darkest);
  font-size: 1.15rem;
  margin: 0;
  text-wrap: balance;
}

.jb-card .jb-feat,
.jb-card .jb-date { color: var(--slate-medium); }

.jb-card .jb-buttons { margin-top: auto; padding-top: 0.5rem; }

.jb-card .jb-btn {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.18);
  color: var(--slate-darkest);
}

.jb-card .jb-btn:hover,
.jb-card .jb-btn:focus-visible {
  background: var(--color-neutral);
  border-color: rgba(15, 23, 42, 0.35);
  color: var(--slate-darkest);
}

/* ---- Spotify embed ---- */
.jb-player {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  background: #fff;
}

.jb-embed {
  max-width: 720px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.jb-embed iframe { display: block; border: 0; }

/* ---- Capture ---- */
.jb-capture-band {
  background: linear-gradient(160deg, var(--color-purple) 0%, var(--color-blue) 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.jb-capture {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.jb-capture h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin-bottom: 0.5rem;
}

.jb-capture-lead {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.jb-capture .launch-list-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.jb-capture .launch-list-row input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.8rem 1.1rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  color: #1a1a2e;
}

.jb-capture .launch-list-error { margin-top: 0.6rem; color: #ffd7d7; }
.jb-capture .launch-list-thanks { margin-top: 0.75rem; }
.jb-fineprint { margin-top: 0.6rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); }

@media (max-width: 575.98px) {
  .jb-featured {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .jb-featured-art { max-width: 240px; margin: 0 auto; }
  .jb-featured-body .jb-buttons { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .np-bars i { animation: none; }
  .jb-btn { transition: none; }
}
