/* ════════════════════════════════════════════════════════════════════════════
 * TLG · CINEMATIC SYSTEM
 *
 * Replica el lenguaje visual de Sui / Sedaiio:
 *  · Blob 3D morphing en el hero (signature Sui)
 *  · Light beams atmosféricos (god rays)
 *  · Partículas dorada/cian flotando hacia arriba
 *  · Pulsing rings concéntricos
 *  · Glassmorphism profundo
 *  · Gradient text con reveal cinemático
 *  · Mouse parallax en múltiples capas
 *  · Section transitions con mesh shift
 *
 * Manteniendo paleta TLG: tinta #0E0D0B · arena #F5F1EB · oro #C9A96E
 * ════════════════════════════════════════════════════════════════════════════ */


/* ═══ 1. HERO CINEMATOGRÁFICO con depth multi-capa ════════════════════════ */

#hero {
  background: #0a0805 !important;
  background-image:
    radial-gradient(ellipse at 50% 100%, rgba(201,169,110,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 0%, rgba(26,46,66,.5) 0%, transparent 60%),
    radial-gradient(ellipse at 100% 0%, rgba(123,207,207,.05) 0%, transparent 60%),
    linear-gradient(180deg, #0a0805 0%, #14202F 60%, #0a0805 100%) !important;
  animation: heroMesh 30s ease-in-out infinite alternate;
}
@keyframes heroMesh {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0 0; }
  100% { background-position: 0% 30%, 30% 0%, -30% 0%, 0 0; }
}


/* ═══ 2. LIGHT BEAMS (god rays diagonales filtrando) ══════════════════════ */

.cinematic-beams {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
  overflow: hidden;
}
.cinematic-beams::before, .cinematic-beams::after {
  content: '';
  position: absolute;
  width: 200%; height: 200%;
  top: -50%; left: -50%;
  background: conic-gradient(
    from 220deg at 50% 0%,
    transparent 0deg,
    rgba(201,169,110,.08) 8deg,
    transparent 16deg,
    transparent 24deg,
    rgba(201,169,110,.04) 32deg,
    transparent 40deg,
    transparent 60deg,
    rgba(123,207,207,.03) 68deg,
    transparent 76deg
  );
  animation: beamSweep 25s linear infinite;
  mix-blend-mode: screen;
  filter: blur(20px);
}
.cinematic-beams::after {
  animation-duration: 35s;
  animation-direction: reverse;
  opacity: .6;
  transform: rotate(180deg);
}
@keyframes beamSweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ═══ 3. PARTÍCULAS FLOTANTES (drift hacia arriba) ════════════════════════ */

.cinematic-particles {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
  overflow: hidden;
}
.cinematic-particles::before {
  content: '';
  position: absolute; inset: -10% -10% -10% -10%;
  background-image:
    radial-gradient(circle, rgba(201,169,110,.6) 1px, transparent 2px),
    radial-gradient(circle, rgba(123,207,207,.4) 1px, transparent 2px),
    radial-gradient(circle, rgba(245,241,235,.3) 1px, transparent 2px);
  background-size:
    140px 140px,
    220px 220px,
    320px 320px;
  background-position:
    0 0,
    60px 80px,
    120px 160px;
  animation: particleDrift 35s linear infinite;
  opacity: .5;
}
@keyframes particleDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(20px, -180px, 0); }
}


/* ═══ 4. BLOB MORPHING SIGNATURE (estilo Sui) ═════════════════════════════ */

.cinematic-blob {
  position: absolute;
  z-index: 2;
  width: clamp(360px, 38vw, 580px);
  height: clamp(360px, 38vw, 580px);
  pointer-events: none;
  filter: blur(.5px);
  /* Posicionamiento: lado derecho del hero, centrado vertical */
  right: clamp(-80px, 4vw, 80px);
  top: 50%;
  transform: translateY(-50%);
}
.cinematic-blob svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 60px rgba(201,169,110,.35))
          drop-shadow(0 0 120px rgba(201,169,110,.2));
}
.cinematic-blob .blob-shape {
  fill: url(#blobGradient);
  animation: blobMorph 18s ease-in-out infinite;
  transform-origin: center;
}
.cinematic-blob .blob-shape-2 {
  fill: none;
  stroke: rgba(201,169,110,.4);
  stroke-width: 1.5;
  animation: blobMorph 22s ease-in-out infinite reverse;
  transform-origin: center;
}
.cinematic-blob .blob-shape-3 {
  fill: none;
  stroke: rgba(123,207,207,.25);
  stroke-width: 1;
  animation: blobMorph 26s ease-in-out infinite;
  transform-origin: center;
}
@keyframes blobMorph {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    transform: rotate(90deg) scale(1.05);
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  50% {
    transform: rotate(180deg) scale(.95);
    border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
  }
  75% {
    transform: rotate(270deg) scale(1.02);
    border-radius: 60% 40% 60% 30% / 70% 30% 60% 40%;
  }
}

/* Hero-right pasa a estar oculto/desplazado para dejar el blob respirar */
#hero .hero-right { position: relative; z-index: 3; }


/* ═══ 5. PULSING RINGS concéntricos detrás del blob ═══════════════════════ */

.cinematic-rings {
  position: absolute;
  right: clamp(60px, 12vw, 220px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(440px, 44vw, 700px);
  height: clamp(440px, 44vw, 700px);
  pointer-events: none;
  z-index: 1;
  opacity: .35;
}
.cinematic-rings::before,
.cinematic-rings::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201,169,110,.3);
  border-radius: 50%;
  animation: ringPulse 4s ease-out infinite;
}
.cinematic-rings::after {
  animation-delay: 2s;
}
@keyframes ringPulse {
  0% {
    transform: scale(.6);
    opacity: 0;
    border-color: rgba(201,169,110,.6);
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
    border-color: rgba(201,169,110,0);
  }
}


/* ═══ 6. HERO LAYOUT con espacio para el blob ═════════════════════════════ */

#hero {
  display: grid !important;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 0.45fr) !important;
  align-items: center;
  position: relative;
  overflow: hidden;
}
#hero .hero-left {
  position: relative;
  z-index: 5;
  padding-right: 24px;
}
#hero .hero-right {
  position: relative;
  z-index: 5;
}

@media (max-width: 900px) {
  .cinematic-blob, .cinematic-rings { display: none !important; }
  #hero { grid-template-columns: 1fr !important; }
}


/* ═══ 7. TIPOGRAFÍA con reveal cinemático ══════════════════════════════════ */

#hero .hero-left h1 {
  background: linear-gradient(180deg, #ffffff 0%, #F5F1EB 40%, rgba(245,241,235,.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(201,169,110,.1));
}
#hero .hero-left h1 em {
  background: linear-gradient(135deg, #f5d18e 0%, #C9A96E 50%, #8a6e3a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(201,169,110,.3));
}

#hero .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
#hero .hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--oro);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(201,169,110,.8);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: .5; transform: scale(.85); }
  50%      { opacity: 1; transform: scale(1.1); }
}


/* ═══ 8. CTAs con glow cinemático ══════════════════════════════════════════ */

#hero .btn-main {
  position: relative;
  background: linear-gradient(135deg, #d4b878 0%, #C9A96E 50%, #a98852 100%) !important;
  border: none;
  box-shadow:
    0 0 0 1px rgba(201,169,110,.4),
    0 12px 40px rgba(201,169,110,.3),
    inset 0 1px 0 rgba(255,255,255,.2) !important;
  overflow: hidden;
}
#hero .btn-main::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 4s ease-in-out infinite;
  animation-delay: 1.5s;
}
@keyframes shimmer {
  0%, 80% { left: -100%; }
  100%    { left: 200%; }
}
#hero .btn-ghost {
  background: rgba(245,241,235,.02) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201,169,110,.3) !important;
}


/* ═══ 9. STAGE SECTIONS con atmósfera cinematográfica ═════════════════════ */

section.tlg-stage,
section.reveal[style*="padding:140px 56px"],
section.reveal[style*="padding:120px 56px"] {
  position: relative;
  overflow: hidden;
}
section.tlg-stage::after,
section.reveal[style*="padding:140px 56px"]::after,
section.reveal[style*="padding:120px 56px"]::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(201,169,110,.04) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(123,207,207,.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}
section.tlg-stage > *,
section.reveal[style*="padding:140px 56px"] > *,
section.reveal[style*="padding:120px 56px"] > * { position: relative; z-index: 1; }


/* ═══ 10. PROTOCOL CARDS con depth cinematográfico ════════════════════════ */

.proto-step {
  background: linear-gradient(180deg, rgba(245,241,235,.04) 0%, rgba(245,241,235,.01) 100%) !important;
  border: 1px solid rgba(201,169,110,.2) !important;
  backdrop-filter: blur(24px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 24px 60px rgba(0,0,0,.4) !important;
}
.proto-step:hover {
  border-color: rgba(201,169,110,.5) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 32px rgba(201,169,110,.2),
    0 28px 72px rgba(0,0,0,.5) !important;
}
.proto-num {
  background: linear-gradient(135deg, #C9A96E, #8a6e3a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ═══ 11. PROGRAMAS CARDS Sui-style ═══════════════════════════════════════ */

.pkg, .pkg-card {
  background: linear-gradient(180deg, rgba(245,241,235,.04) 0%, rgba(245,241,235,.01) 100%) !important;
  backdrop-filter: blur(24px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 16px 48px rgba(0,0,0,.3) !important;
}
.pkg.featured, .pkg-card.featured {
  background: linear-gradient(135deg, rgba(201,169,110,.12) 0%, rgba(201,169,110,.02) 100%) !important;
  border: 1px solid rgba(201,169,110,.45) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 0 48px rgba(201,169,110,.25),
    0 24px 72px rgba(0,0,0,.45) !important;
}


/* ═══ 12. SECTION TRANSITIONS cinemáticas ═════════════════════════════════ */

/* Cada sección termina con un fade hacia el siguiente color */
.tlg-stage + section,
section.reveal + section {
  position: relative;
}
.tlg-stage + section::before,
section.reveal + section::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(180deg, var(--tinta), transparent);
  pointer-events: none;
  z-index: 1;
  opacity: .6;
}


/* ═══ 13. ESCONDER el SVG biomarker ring antiguo si el blob lo cubre ══════ */

#hero-stats .biomarker-ring {
  display: none;
}


/* ═══ 14. MOBILE — Mantener feel sin matar perf ═══════════════════════════ */

@media (max-width: 900px) {
  .cinematic-beams,
  .cinematic-particles { opacity: .4; }
  #hero { padding: 110px 24px 80px !important; min-height: 90vh !important; }
}
@media (max-width: 540px) {
  .cinematic-beams { display: none; }
}

/* ═══ 98. FIX DEFINITIVO · hero con espacio vacío gigante ════════════════════
   tlg-futurista.css tiene "#hero > * { position: relative }" que convertía los
   elementos de FONDO (blob, anillos, vídeo, póster, beams...) en items del grid
   → se apilaban como columnas reales y estiraban el hero a ~3000px.
   Restauramos position:absolute en todas las capas decorativas (mayor
   especificidad que #hero > *). El contenido real (hero-left/right) sigue
   siendo grid item. */
#hero > .hero-poster,
#hero > .hero-video,
#hero > .hero-overlay,
#hero > .hero-scan,
#hero > .cinematic-beams,
#hero > .cinematic-particles,
#hero > .cinematic-blob,
#hero > .cinematic-rings,
#hero > .spotlight,
#hero > .hero-spotlight {
  position: absolute !important;
}
/* El hero llena la pantalla pero CRECE si su contenido es más alto (evita recortes) */
#hero {
  min-height: 100vh !important;
  max-height: none !important;
  height: auto !important;
  align-items: center !important;
}
@media (max-width: 900px) {
  #hero {
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
  }
}

/* ═══ 99. FIX DEFINITIVO · evitar "cajas doradas" ════════════════════════════
   El efecto de texto-degradado (background-clip:text) se rompía cuando otra
   regla sobreescribía background-clip a border-box: el degradado llenaba toda
   la caja y el texto quedaba transparente. Forzamos oro sólido y visible en
   TODOS los <em> de títulos. Bulletproof en cualquier navegador. */
section h2 em,
.bio-stats-h2 em,
.sedai-h2 em,
.page-hero h1 em,
h2 em, h3 em, h4 em {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #C9A96E !important;
  color: #C9A96E !important;
  font-style: italic;
}
