/* ============================================================
   VR SONG — solo lo específico de una landing de canción.
   Depende de vr-core.css. Compartido por todas las canciones.
   ============================================================ */

/* ---------- 1. HERO ----------
   La miniatura de YouTube lleva el título quemado en la imagen.
   Para que no choque con el <h1>, aquí se usa DESENFOCADA y
   ampliada: funciona como atmósfera, no como cartel. La versión
   nítida se ve más abajo, dentro del reproductor.               */
.song-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg);
}

.song-hero__bg {
  position: absolute;
  inset: -8%;
  z-index: 0;
}
.song-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(26px) saturate(.85) brightness(.46) contrast(1.06);
  transform: scale(1.14);
}
.song-hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 22% 62%, rgba(123,30,43,.30) 0%, rgba(123,30,43,0) 70%),
    linear-gradient(180deg, rgba(10,7,8,.78) 0%, rgba(10,7,8,.34) 34%, rgba(10,7,8,.90) 100%);
}

.song-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(56px, 8vw, 96px);
}

.song-hero .crumbs { margin-bottom: 26px; }

.song-hero h1 {
  font-size: clamp(38px, 7.4vw, 84px);
  line-height: 1.02;
  letter-spacing: .01em;
  color: var(--ink);
  max-width: 15ch;
  text-shadow: 0 2px 30px rgba(0,0,0,.66);
  margin-bottom: 20px;
}

.song-hero .hook {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.9vw, 23px);
  line-height: 1.5;
  color: var(--silver);
  max-width: 30ch;
  margin-bottom: 26px;
}

.song-meta-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--silver-dim);
}
.song-meta-line .dot { opacity: .4; }

/* ---------- 2. VÍDEO (facade) ----------
   No se carga el iframe hasta que se pulsa: evita ~800 KB y
   las cookies de terceros antes de que el visitante decida.   */
.song-video { background: var(--bg-2); }
.song-video .wrap { max-width: var(--maxw); }

/* Contenedor: reserva la caja 16:9 y recorta. No es interactivo. */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid rgba(207,205,211,.08);
  width: 100%;
}

/* Disparador: ocupa el contenedor entero y se sustituye por el iframe. */
.video-trigger {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  border: 0;
  background: transparent;
  font: inherit; color: inherit;
  cursor: pointer;
}

.video-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.82) contrast(1.04);
  transition: transform 1.1s var(--ease), filter .8s;
}
.video-trigger:hover img,
.video-trigger:focus-visible img { transform: scale(1.03); filter: brightness(.95); }

/* El iframe sustituye al botón: mismo hueco, sin salto de diseño. */
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-frame .pbtn {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.video-frame .pbtn i {
  width: clamp(64px, 8vw, 88px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(243,239,236,.5);
  background: rgba(10,7,8,.36);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  transition: transform .5s var(--ease), background .5s, border-color .5s;
}
.video-trigger:hover .pbtn i,
.video-trigger:focus-visible .pbtn i {
  transform: scale(1.07);
  background: rgba(123,30,43,.5);
  border-color: var(--garnet-glow);
}
.video-frame .pbtn i::after {
  content: '';
  border-left: 15px solid var(--ink);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 5px;
}
.video-caption {
  margin-top: 14px;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver-dim);
}

/* ---------- 3. ESCÚCHALA ---------- */
.song-listen .wrap { padding-top: clamp(48px, 6vw, 76px); padding-bottom: clamp(48px, 6vw, 76px); }
.listen-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 4. LETRA ----------
   El bloque que más tiempo va a tener el ojo encima.
   Tipografía subida, interlineado abierto, grano al mínimo.   */
.song-lyrics { background: var(--bg-2); }
.song-lyrics .wrap { max-width: 720px; }

.lyrics {
  font-size: clamp(16.5px, 1.35vw, 18px);
  line-height: 1.85;
  color: var(--ink);
  max-width: 34ch;
}
.lyrics .stanza { margin-bottom: 1.6em; }
.lyrics .stanza:last-child { margin-bottom: 0; }
.lyrics .stanza p { margin: 0; }
.lyrics .stanza--tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--silver);
}

/* Marcador de contenido pendiente. Se elimina al pegar la letra. */
.pending {
  border: 1px dashed rgba(177,49,65,.45);
  border-radius: 4px;
  padding: 26px 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 46ch;
}
.pending strong { color: var(--garnet-glow); font-weight: 600; }

/* ---------- 5. DETRÁS DE LA CANCIÓN ---------- */
.song-story .quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.3vw, 28px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 24ch;
  margin: 40px 0 0;
  padding-left: 26px;
  border-left: 1px solid var(--garnet);
}

/* ---------- 6. FICHA ---------- */
.song-facts { background: var(--bg-2); }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: rgba(207,205,211,.08);
  border: 1px solid rgba(207,205,211,.08);
  border-radius: 4px;
  overflow: hidden;
}
.facts div { background: var(--bg-2); padding: 20px 22px; }
.facts dt {
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--garnet-glow); margin-bottom: 8px;
}
.facts dd { font-size: 14.5px; color: var(--text); }

.credits {
  margin-top: 30px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--silver-dim);
  max-width: 44ch;
}

/* ---------- 7. SIGUE ESCUCHANDO ---------- */
.song-related .wrap { max-width: var(--maxw); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
}

/* ---------- 8. BARRA MÓVIL ----------
   Escuchar + Compartir. El reenvío por WhatsApp a un toque.  */
.song-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 8600;
  display: none;
  gap: 10px;
  padding: 10px var(--pad-x) calc(10px + env(safe-area-inset-bottom));
  background: rgba(8, 5, 6, .97);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(207, 205, 211, .08);
  transform: translateY(105%);
  transition: transform .5s var(--ease);
}
.song-bar.show { transform: none; }
.song-bar .pill { flex: 1; min-height: 48px; }

/* ============================================================
   MÓVIL
   ============================================================ */
@media (max-width: 860px) {
  /* El hero no ocupa la pantalla entera: hay que ver que sigue habiendo página */
  .song-hero { min-height: 62vh; }
  .song-hero__bg img { filter: blur(20px) saturate(.85) brightness(.44) contrast(1.06); }
  .song-hero h1 { max-width: 13ch; }

  .listen-row { flex-direction: column; }
  .listen-row .pill { width: 100%; min-height: 48px; }

  .song-lyrics .wrap { max-width: none; }
  .lyrics { max-width: none; }

  .song-story .quote { margin-top: 32px; padding-left: 20px; }

  .facts { grid-template-columns: 1fr 1fr; }

  /* Carrusel en vez de rejilla apretada: se recorre con el pulgar */
  .related-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad-x) * -1);
    padding-inline: var(--pad-x);
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .related-grid::-webkit-scrollbar { display: none; }
  .related-grid .card { flex: 0 0 78%; scroll-snap-align: start; }

  .song-bar { display: flex; }
  body { padding-bottom: 68px; }
}

@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .related-grid .card { flex: 0 0 86%; }
}

@media (prefers-reduced-motion: reduce) {
  .song-bar { transition: none; }
  .video-frame img { transition: none; }
  .video-trigger:hover img { transform: none; }
}
