/* Loading Titanes: estilos aislados, sin cambiar escenas ni layout 3D. */
html.titan-cargando { background:#07030d; overflow:hidden !important; }
html.titan-cargando body { overflow:hidden !important; background:#07030d !important; margin:0 !important; }
/* Se conserva hasta terminar el fade; no fijar el body, pues cambia el pin de GSAP. */
html.titan-inicio, html.titan-inicio body {
  scroll-behavior:auto !important; overflow-anchor:none; overscroll-behavior:none;
}
html.titan-inicio #home { opacity:1 !important; }
/* visibility conserva las dimensiones que necesitan las camaras. */
html.titan-cargando body > :not(#titan-loading):not(script):not(style):not(noscript) { visibility:hidden; }
html.titan-sin-3d #home .titan-3d-container { visibility:hidden !important; }
#titan-loading {
  --tl-rosa:#ff2aab;
  position:fixed !important; inset:0 !important; z-index:2147483000;
  margin:0 !important; padding:0; transform:none !important;
  width:100%; height:100vh; height:100dvh; min-height:0; max-width:none;
  display:grid; place-items:center;
  overflow:auto; isolation:isolate; background:#07030d; color:#fff;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  opacity:1; transition:opacity 700ms ease; overscroll-behavior:contain;
}
#titan-loading, #titan-loading * { box-sizing:border-box; }
#titan-loading [hidden] { display:none !important; }
#titan-loading .tl-ambiente { position:absolute; inset:0; overflow:hidden; z-index:-2; pointer-events:none; }
#titan-loading .tl-luz { position:absolute; width:85vmax; height:85vmax; border-radius:50%; opacity:.7; }
#titan-loading .tl-luz--uno {
  top:-54vmax; left:-20vmax;
  background:radial-gradient(ellipse,#7636a5 0%,rgba(96,38,145,.66) 26%,transparent 68%);
  animation:tl-deriva-uno 18s ease-in-out infinite alternate;
}
#titan-loading .tl-luz--dos {
  bottom:-52vmax; right:-24vmax;
  background:radial-gradient(ellipse,#ab79e7 0%,rgba(100,45,150,.65) 26%,transparent 68%);
  animation:tl-deriva-dos 22s ease-in-out infinite alternate;
}
#titan-loading .tl-luz--tres {
  top:-8vmax; right:-60vmax;
  background:radial-gradient(ellipse,rgba(255,42,171,.38),rgba(90,25,120,.22) 32%,transparent 66%);
  animation:tl-deriva-tres 15s ease-in-out infinite alternate;
}
#titan-loading .tl-velo { position:absolute; inset:0; z-index:-1; pointer-events:none; background:radial-gradient(ellipse at 50% 48%,transparent 10%,rgba(3,1,9,.32) 100%); }
#titan-loading .tl-contenido { width:min(100%,440px); padding:38px 24px; display:flex; flex-direction:column; align-items:center; text-align:center; margin:auto; }
#titan-loading .tl-logo { display:block; width:clamp(158px,19vw,208px); height:88px; object-fit:contain; margin:0 0 34px; filter:drop-shadow(0 0 15px rgba(255,42,171,.12)); }
#titan-loading .tl-logo-texto { font-size:26px; font-weight:950; letter-spacing:-.05em; margin-bottom:36px; }
#titan-loading .tl-circulo { position:relative; width:clamp(196px,25vw,240px); aspect-ratio:1; flex:0 0 auto; }
#titan-loading .tl-circulo::before { content:""; position:absolute; inset:8%; border-radius:50%; background:radial-gradient(circle,rgba(255,42,171,.045),transparent 68%); box-shadow:0 0 72px rgba(255,42,171,.06); }
#titan-loading .tl-svg { display:block; width:100%; height:100%; overflow:visible; }
#titan-loading .tl-pista { fill:none; stroke:rgba(206,159,247,.16); stroke-width:1.5; }
#titan-loading .tl-pista-interior { fill:none; stroke:rgba(206,159,247,.04); stroke-width:.7; }
#titan-loading .tl-arco { fill:none; stroke:var(--tl-rosa); stroke-width:3.2; stroke-linecap:round; stroke-dasharray:100; stroke-dashoffset:100; filter:drop-shadow(0 0 3px #ff2aab) drop-shadow(0 0 11px rgba(255,42,171,.65)); }
#titan-loading .tl-punto { fill:#fff1fc; filter:drop-shadow(0 0 4px #fff) drop-shadow(0 0 12px #ff2aab); }
#titan-loading .tl-porcentaje { position:absolute; inset:0; display:flex; justify-content:center; align-items:center; font-variant-numeric:tabular-nums; letter-spacing:-.065em; text-shadow:0 0 32px rgba(236,192,255,.20); }
#titan-loading .tl-numero { font-size:clamp(53px,6vw,66px); font-weight:720; line-height:1; }
#titan-loading .tl-simbolo { color:#e0c8ee; font-size:20px; letter-spacing:-.02em; margin:10px 0 0 5px; font-weight:500; }
#titan-loading .tl-titulo { margin:30px 0 0; max-width:300px; font-size:clamp(16px,2.2vw,19px); line-height:1.5; font-weight:500; letter-spacing:-.02em; text-wrap:balance; }
#titan-loading .tl-estado { margin:10px 0 0; max-width:340px; min-height:42px; color:#b29cc5; font-size:12px; line-height:1.6; }
#titan-loading .tl-acciones { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:8px; }
#titan-loading .tl-boton { appearance:none; border:1px solid rgba(255,104,198,.50); border-radius:999px; padding:11px 20px; background:rgba(255,42,171,.13); color:#fff; font:600 13px/1.3 system-ui,sans-serif; cursor:pointer; text-decoration:none; }
#titan-loading .tl-boton:hover { background:rgba(255,42,171,.25); }
#titan-loading .tl-boton--secundario { border-color:rgba(196,167,220,.25); background:transparent; color:#d6c0e4; }
#titan-loading .tl-boton:focus-visible { outline:2px solid #fff; outline-offset:5px; }
#titan-loading.tl-listo .tl-circulo { animation:tl-pulso 650ms ease-out both; }
#titan-loading.tl-saliendo { opacity:0; pointer-events:auto; }
#titan-loading.tl-error .tl-estado { color:#ffd4ee; }
#titan-loading.tl-error .tl-luz { animation-play-state:paused; }
@keyframes tl-deriva-uno { to { transform:translate(22vw,18vh) scale(1.12); } }
@keyframes tl-deriva-dos { to { transform:translate(-20vw,-17vh) scale(1.08); } }
@keyframes tl-deriva-tres { to { transform:translate(-22vw,9vh); opacity:.5; } }
@keyframes tl-pulso { 0% { filter:brightness(1); } 35% { filter:brightness(1.65); } 100% { filter:brightness(1); } }
@media (max-height:580px) {
  #titan-loading .tl-contenido { padding:20px; }
  #titan-loading .tl-logo { height:60px; margin-bottom:12px; }
  #titan-loading .tl-circulo { width:170px; }
  #titan-loading .tl-numero { font-size:48px; }
  #titan-loading .tl-titulo { margin-top:14px; }
}
@media (prefers-reduced-motion:reduce) {
  #titan-loading { transition-duration:120ms; }
  #titan-loading .tl-luz, #titan-loading.tl-listo .tl-circulo { animation:none; }
}
