/* ==========================================================================
   MOVIMIENTO · cuatro momentos puntuales, cada uno con sentido conceptual.
   Todos se frenan con «Pausar movimiento» y con el movimiento reducido.
   ========================================================================== */

/* 1 · Entrada del título: las palabras suben como el volumen */
.hero h1 .w { display: inline-block; }
html.entrance-playing .hero h1 .w {
  opacity: .08; filter: blur(10px); transform: scale(.92);
  animation: word-up .9s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i) * 140ms + 150ms);
}
html.entrance-playing :is(.hero .eyebrow, .hero-actions, .hero-cue) {
  opacity: 0; animation: fade-in .8s ease forwards; animation-delay: 1.5s;
}
@keyframes word-up { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes fade-in { to { opacity: 1; } }
html.paused.entrance-playing .hero h1 .w,
html.paused.entrance-playing :is(.hero .eyebrow, .hero-actions, .hero-cue) { animation: none; opacity: 1; filter: none; transform: none; }

/* 2 · Footer vivo: despedida, wordmark que reacciona al cursor y salida a Spotify */
.footer-live { flex-direction: column; gap: 28px; padding-block: 64px 48px; }
.footer-signoff { margin: 0; text-align: center; font-family: var(--hand); font-size: 18px; line-height: 1.5; color: var(--muted); }
.footer-signoff span { color: var(--cream); }
.footer-live .footer-wordmark { font-size: clamp(96px, 16vw, 230px); line-height: .9; }
.footer-listen { display: inline-flex; gap: 12px; margin-top: 4px; }
.footer-listen .ui-icon { width: 22px; height: 22px; }
@media (max-width: 760px) { .footer-signoff { font-size: 16px; max-width: 28ch; } }

/* 3 · Brillo en los álbumes: una luz de su color sigue al cursor */
.music .album { position: relative; overflow: hidden; --glow: var(--purple); }
.music .album:nth-child(2) { --glow: var(--pink); }
.music .album:nth-child(3) { --glow: var(--blue); }
.music .album::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--glow) 55%, transparent), transparent 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .35s;
}
.music .album.lit::after { opacity: 1; }
.music .album .cover { transition: box-shadow .35s; }
.music .album.lit .cover { box-shadow: 0 0 60px color-mix(in srgb, var(--glow) 60%, transparent); }

/* 4 · Contador de frases en Liberación */
.release-count { margin: 10px auto 0; text-align: center; font-family: var(--heading); font-size: 20px; color: var(--cream); }
.release-count strong { color: var(--yellow); font-weight: 400; font-variant-numeric: tabular-nums; display: inline-block; }
.release-count span { font-family: var(--hand); font-size: 13px; color: var(--faint); }
.release-count strong.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }



/* 5 · De este lado del escenario: cambio de momento con entrada en movimiento.
   La silueta entra deslizándose desde el lado del cambio y el recuadro sube
   en capas (etiqueta, play, texto). Solo se dispara al tocar el selector. */
.encounters.is-switching .encounter-silhouettes img { animation: pose-in .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pose-in { from { opacity: 0; translate: calc(var(--dir, 1) * 9vw) 2vw; scale: .92; } }
@keyframes panel-in { from { opacity: 0; translate: calc(var(--dir, 1) * 40px) 18px; scale: .97; filter: blur(6px); } }
@keyframes layer-in { from { opacity: 0; translate: 0 16px; } }
html.paused .encounters.is-switching :is(.encounter-silhouettes img, [role=tabpanel], [role=tabpanel] > *) { animation: none; }

/* La tarjeta de fechas acompaña el ancho del recuadro del video en escritorio */
@media (min-width: 761px) {
  .encounters .next-show { width: min(100%, 980px); margin-inline: auto; box-sizing: border-box; }
}


/* ==========================================================================
   7 · Selector con píldora que se desliza (De este lado del escenario)
   ========================================================================== */
.segmented.has-pill { position: relative; isolation: isolate; }
.seg-pill { display: none; }
.segmented.has-pill .seg-pill {
  display: block; position: absolute; z-index: -1; top: 5px; bottom: 5px;
  left: var(--pill-x, 5px); width: var(--pill-w, 50%); border-radius: 100px;
  background: var(--moment, var(--accent));
  transition: left .4s cubic-bezier(.65, 0, .35, 1), width .4s cubic-bezier(.65, 0, .35, 1), background-color .4s ease;
}
.segmented.has-pill.no-anim .seg-pill { transition: none; }
.encounters .segmented.has-pill button[aria-selected] { background: transparent; transition: color .25s ease .15s; }
.encounters .segmented.has-pill button[aria-selected="true"] { color: var(--cream); }
.encounters .segmented.has-pill button[aria-selected="false"] { color: var(--muted); transition-delay: 0s; }

/* ==========================================================================
   8 · Tarjeta que gira en 3D: frente «Arriba del escenario», dorso «Detrás del ruido»
   ========================================================================== */
.flip-card { perspective: 1800px; }
.flip-inner {
  display: grid; transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.55, .05, .25, 1.25);
}
.flip-inner > .stage { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; margin: 0; width: 100%; }
.flip-inner > .stage + .stage { transform: rotateY(180deg); }
.flip-inner.is-flipped { transform: rotateY(180deg); }
.flip-inner > .stage { cursor: pointer; }
.flip-inner > .stage .play-button { cursor: pointer; }
html.paused .flip-inner { transition: none; }

/* ==========================================================================
   9 · Confeti (se crea por JS en la capa .confetti)
   ========================================================================== */
.confetti { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 60; }
.confetti i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 2px; will-change: transform, opacity; }

/* ==========================================================================
   11 · Ecualizador de CURITAS: una barra por capa, en su color
   ========================================================================== */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 26px; flex: 0 0 auto; }
.eq i {
  width: 5px; height: 100%; border-radius: 3px; background: var(--stem, var(--accent));
  transform-origin: 50% 100%; transform: scaleY(.18); opacity: .35;
  transition: transform .3s ease, opacity .3s ease;
}
.eq.is-playing i.on { opacity: 1; animation: eq-pump 1s ease-in-out infinite alternate; }
.eq i:nth-child(1) { animation-delay: -.2s; }
.eq i:nth-child(2) { animation-delay: -.65s; }
.eq i:nth-child(3) { animation-delay: -.4s; }
.eq i:nth-child(4) { animation-delay: -.85s; }
@keyframes eq-pump { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* 7b · Píldora del header */
@media (min-width: 761px) { .site-header nav.has-pill { position: relative; isolation: isolate; } }
@media (max-width: 760px) { .site-header nav.has-pill { isolation: isolate; } }
.nav-pill {
  position: absolute; z-index: -1; left: 0; top: 0; border-radius: 999px; pointer-events: none;
  translate: var(--np-x, 0) var(--np-y, 0); width: var(--np-w, 0); height: var(--np-h, 0);
  background: rgb(var(--np-rgb, var(--cream-rgb)) / .16);
  transition: translate .45s cubic-bezier(.65, 0, .35, 1), width .45s cubic-bezier(.65, 0, .35, 1),
              height .45s cubic-bezier(.65, 0, .35, 1), background-color .45s ease, opacity .2s;
  will-change: translate, width;
}
.site-header nav.has-pill.no-anim .nav-pill { transition: none; }
.site-header nav.has-pill a.active, .site-header nav.has-pill a.active:hover, .site-header nav.has-pill a.active:focus-visible { background: transparent; }
.site-header nav a[href="#quien"] { --nav-accent-rgb: var(--blue-rgb); }
@media (max-width: 760px) { .nav-pill { border-radius: 12px; } }

/* «Pausar movimiento»: se detienen las animaciones en bucle; las transiciones cortas de la interfaz quedan. */
html.paused-user *, html.paused-user *::before, html.paused-user *::after { animation-play-state: paused !important; }

/* Lluvia de confeti a pantalla completa */
.confetti-rain { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.confetti-rain i { position: absolute; border-radius: 2px; will-change: transform, opacity; }
