/* =========================================================
   NOVA PROJECT · efectos interactivos (fx.css)
   Solo se activan con la clase .fx en <html> (sin "menos movimiento")
   y .fine (ratón de verdad, no móvil) para cursor e inclinación 3D.
   ========================================================= */

/* ---------- pantalla de carga ---------- */
.loader { display: none; }
.fx .loader { display: block; position: fixed; inset: 0; z-index: 9999; pointer-events: none; animation: loaderSafety .01s 3.2s forwards; }
.loader__half { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--black); }
.loader__half--top { top: 0; }
.loader__half--bot { bottom: 0; }
.loader__logo { position: absolute; left: 50%; top: 50%; width: min(56vw, 420px); height: auto; transform: translate(-50%, -50%); opacity: 0; }
@keyframes loaderSafety { to { visibility: hidden; } } /* por si algo falla, nunca se queda tapando */
.loader.is-done { display: none !important; }

/* mientras carga, la portada espera a GSAP */
/* (la pantalla de carga la tapa; GSAP pone el estado inicial y la anima) */
.fx .hero__left > *, .fx .hero__media, .fx .hero__media .player { animation: none; opacity: 1; transform: none; }

/* ---------- barra de progreso ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9000; background: var(--lime); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; box-shadow: 0 0 12px rgba(112,224,0,.6); }

/* ---------- botones magnéticos ---------- */
.fx.fine .magnetic { will-change: transform; }

/* ---------- titulares palabra a palabra ---------- */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.sw > .swi { display: inline-block; will-change: transform; }

/* ---------- grano sutil sobre los fondos negros ---------- */
.hero::after, .dark::after, .footer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.fx .hero::after { animation: grain 1s steps(4) infinite; }
@keyframes grain { 0% { background-position: 0 0; } 25% { background-position: -40px 20px; } 50% { background-position: 30px -30px; } 75% { background-position: -20px -10px; } 100% { background-position: 0 0; } }

/* ---------- episodios: miniatura con zoom, título encima y brillo ---------- */
.ep__media { position: relative; overflow: hidden; }
.ep__media img { display: block; transition: transform .8s var(--ease), filter .5s; }
.ep:hover .ep__media img { transform: scale(1.08); filter: brightness(.8); }
/* solo en el tercio de abajo, para no tapar caras ni bocas */
.ep__cap { position: absolute; left: 0; right: 0; bottom: 0; max-height: 36%; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 10px 16px 12px; background: linear-gradient(0deg, rgba(8,8,8,.95) 0%, rgba(8,8,8,.85) 65%, rgba(8,8,8,0)); opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; }
.ep__cap-num { display: none !important; }
.ep__cap strong { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px !important; }
.ep__cap > * { transform: translateY(14px); transition: transform .5s var(--ease); }
.ep:hover .ep__cap { opacity: 1; }
.ep:hover .ep__cap > * { transform: none; }
.ep__cap-num { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 700; }
.ep__cap strong { font-size: 17px; font-weight: 700; line-height: 1.25; color: #fff; }
.ep__cap-go { font-size: 13px; font-weight: 600; color: var(--lime); }
.ep__shine { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.22), transparent 45%); mix-blend-mode: soft-light; }
.fx.fine .ep:hover .ep__shine { opacity: 1; }
.fx.fine .ep { will-change: transform; }
.fx.fine .ep:hover { transform: none; } /* la inclinación la pone GSAP */
.fx .ep:hover { box-shadow: 0 30px 50px -28px rgba(0,0,0,.7), 0 0 0 1px rgba(112,224,0,.35); }

/* lo que anima GSAP no usa la aparición simple de main.js (si no, se pelean) */
.fx .pillar.reveal, .fx .split__media.reveal, .fx .cta-card.reveal, .fx .host__name.reveal { opacity: 1; transform: none; transition: none; }
.fx .pil .pillar__n { transition: -webkit-text-stroke-color .35s; }
.fx .pil__track { animation: none; }
.fx .host__name { overflow: hidden; padding: 30px 0; }
/* pilares fijados: filas algo más compactas para que quepan las cinco en pantalla */
@media (min-width: 961px) {
  .fx .pil .head-row { margin-bottom: 28px; }
  .fx .pil__title { font-size: clamp(40px, 4.6vw, 72px); }
  .fx .pil .pillar { padding-top: clamp(12px, 1.6vh, 20px); padding-bottom: clamp(12px, 1.6vh, 20px); grid-template-columns: clamp(80px, 9vw, 140px) 1fr minmax(220px, 340px) 56px; }
  .fx .pil .pillar__n { font-size: clamp(52px, min(6.4vw, 9vh), 100px); }
  .fx .pil .pillar h3 { font-size: clamp(24px, min(2.8vw, 4.4vh), 42px); }
  .fx .pil .pillar__go { width: 52px; height: 52px; }
}

/* ---------- portada: foto con parallax ---------- */
.fx .hero__media > img { transform: scale(1.12); will-change: transform; }

/* onda del reproductor algo más viva */
.fx .wave i { animation-duration: .9s; }

@media (prefers-reduced-motion: reduce) {
  .loader { display: none !important; }
  .progress { display: none; }
}
