/* AICuevana · Intro de carga de la HOME (solo la primera carga o cuando su caché de datos venció).
   Desk (>900px): A · Armado y luz (4 s).  Mobile (≤900px): B · Arranque de app (3 s).
   Todo vive bajo #aicIntro y html.aic-intro (los pone aic-intro.js); sin intro, este CSS no afecta nada. */
html.aic-intro, html.aic-intro body { overflow: hidden !important; background: #050508; }
#aicIntro { --H: min(120px, calc((100vw - 48px) / 3.9)); position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center;
  background: #050508; overflow: hidden; contain: strict; transition: opacity .45s ease; -webkit-tap-highlight-color: transparent; }
#aicIntro.out { opacity: 0; pointer-events: none; }
/* Desk y mobile: al terminar, la home aparece suave (de desenfocada a enfocada): en desk mientras se pierden las últimas
   partículas; en mobile tras el destello de la C */
#aicIntro.m-a, #aicIntro.m-b { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: opacity .45s ease, background-color .9s cubic-bezier(.2, .7, .2, 1), -webkit-backdrop-filter .9s cubic-bezier(.2, .7, .2, 1), backdrop-filter .9s cubic-bezier(.2, .7, .2, 1); }
#aicIntro.reveal { background-color: rgba(5, 5, 8, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); pointer-events: none; }
#aicIntro.reveal .lk, #aicIntro.reveal .hd { opacity: 0; transition: opacity .3s; }
#aicIntro canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; opacity: 0; pointer-events: none; }
#aicIntro .lk { position: relative; display: flex; align-items: center; gap: calc(var(--H) * .2); will-change: transform; }
#aicIntro .mk { position: relative; height: var(--H); aspect-ratio: 600 / 713; flex: none; transform: translateX(var(--sh, 0px)); }
#aicIntro .pt { position: absolute; inset: 0; }
#aicIntro .sp { clip-path: polygon(0 0, 25.6% 0, 25.6% 100%, 0 100%); }
#aicIntro .tp { clip-path: polygon(25.6% 0, 100% 0, 100% 47%, 25.6% 47%); }
#aicIntro .bt { clip-path: polygon(25.6% 47%, 100% 47%, 100% 100%, 25.6% 100%); }
#aicIntro .fl, #aicIntro .wh { position: absolute; inset: 0; -webkit-mask: url("/static/img/aic-intro-c.png?v=1") center / contain no-repeat; mask: url("/static/img/aic-intro-c.png?v=1") center / contain no-repeat; }
#aicIntro .fl { background: linear-gradient(135deg, #ff5ad6 0%, #8b5cf6 48%, #22e3ff 100%); opacity: 0; }
#aicIntro .wh { background: linear-gradient(115deg, #fff 0%, #fff 40%, #cfe9ff 50%, #fff 60%, #fff 100%); background-size: 300% 100%; opacity: 0; }
#aicIntro .gl { position: absolute; inset: -35%; border-radius: 50%; background: radial-gradient(closest-side, rgba(139, 92, 246, .55), rgba(34, 227, 255, .18) 55%, transparent); filter: blur(18px); opacity: 0; }
#aicIntro .wd { position: relative; height: calc(var(--H) * .15); aspect-ratio: 1048 / 89; flex: none; opacity: 0; }
#aicIntro .wd i { position: absolute; inset: 0; background: #fff;
  -webkit-mask: url("/static/img/aic-intro-word.png?v=1") left center / 100% 100% no-repeat; mask: url("/static/img/aic-intro-word.png?v=1") left center / 100% 100% no-repeat; }
/* línea de tiempo · 4.0 s */
#aicIntro.go.m-a .sp .fl { animation: aicSp .45s cubic-bezier(.2, .8, .2, 1) .12s both, aicOff .4s ease 1.05s forwards; }
#aicIntro.go.m-a .tp .fl { animation: aicTp .5s cubic-bezier(.2, .8, .2, 1) .32s both, aicOff .4s ease 1.05s forwards; }
#aicIntro.go.m-a .bt .fl { animation: aicBt .5s cubic-bezier(.2, .8, .2, 1) .44s both, aicOff .4s ease 1.05s forwards; }
#aicIntro.go.m-a .wh { animation: aicOn .35s ease-out .9s both, aicSheen .6s ease-in-out .95s both; }
#aicIntro.go.m-a .gl { animation: aicGlow 1.1s ease-out .55s both; }
#aicIntro.go.m-a .mk { animation: aicSlide .55s cubic-bezier(.65, 0, .25, 1) .98s both, aicBack .3s cubic-bezier(.4, 0, .2, 1) 1.6s forwards, aicDissolve .5s ease-in 1.98s forwards; }
#aicIntro.go.m-a .wd { animation: aicWipe .5s cubic-bezier(.3, .7, .2, 1) 1.08s both, aicOff .2s linear 1.6s forwards; }
#aicIntro.go.m-a .lk { transform-origin: 50% 50%; animation: aicZoom 1.05s cubic-bezier(.7, 0, .9, .25) 1.82s both; }   /* la C vuelve al centro y entra recta hacia la cámara */
/* ── B · Arranque de app (mobile, 3.0 s): la C aparece como el ícono de la app, AICUEVANA se construye letra por letra ── */
#aicIntro.go.m-b .wh { animation: aicIcon .42s cubic-bezier(.2, .8, .2, 1) .05s both, aicSheen .7s ease-in-out 1.55s both; }
#aicIntro.go.m-b .gl { animation: aicBreathe 1.6s ease-in-out .1s both, aicBloom .7s cubic-bezier(.2, .7, .2, 1) 2.28s forwards; }   /* al final la C suelta un destello de luz que abre paso a la home */
#aicIntro.go.m-b .mk { animation: aicSlide .6s cubic-bezier(.65, 0, .25, 1) .6s both; }
#aicIntro.go.m-b .wd { opacity: 1; }
#aicIntro.go.m-b .wd i { animation: aicLetter .34s cubic-bezier(.2, .8, .2, 1) calc(1s + var(--i) * .07s) both; }
#aicIntro.go.m-b .lk { animation: aicLeave .55s cubic-bezier(.4, 0, .2, 1) 2.38s both; }
@keyframes aicIcon { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes aicBreathe { 0% { opacity: 0; transform: scale(.7); } 40% { opacity: .85; } 100% { opacity: .18; transform: scale(1.05); } }
@keyframes aicLetter { from { opacity: 0; transform: translateY(38%); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes aicBloom { 0% { opacity: .2; transform: scale(1.05); } 35% { opacity: .9; } 100% { opacity: 0; transform: scale(7); } }
@keyframes aicLeave { to { opacity: 0; transform: scale(1.06); filter: blur(3px); } }
/* si la página aún no termina de armarse al llegar a 4 s: la C queda respirando hasta que esté lista */
#aicIntro .hd { position: absolute; z-index: 3; height: calc(var(--H) * .55); aspect-ratio: 600 / 713; background: #fff; opacity: 0;
  -webkit-mask: url("/static/img/aic-intro-c.png?v=1") center / contain no-repeat; mask: url("/static/img/aic-intro-c.png?v=1") center / contain no-repeat; }
#aicIntro.hold .hd { animation: aicOn .35s ease both, aicBreath 1.4s ease-in-out .35s infinite; }
@keyframes aicSp { from { transform: translateY(55%) scaleY(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aicTp { from { transform: translate(28%, -26%) rotate(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aicBt { from { transform: translate(28%, 26%) rotate(10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aicOn { to { opacity: 1; } }
@keyframes aicOff { to { opacity: 0; } }
@keyframes aicSheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes aicGlow { 0% { opacity: 0; transform: scale(.6); } 35% { opacity: 1; } 100% { opacity: .25; transform: scale(1.1); } }
@keyframes aicSlide { from { transform: translateX(var(--sh, 0px)); } to { transform: none; } }
@keyframes aicWipe { from { clip-path: inset(0 100% 0 0); opacity: 0; filter: blur(6px); } to { clip-path: inset(0 0 0 0); opacity: 1; filter: none; } }
@keyframes aicBack { to { transform: translateX(var(--sh, 0px)); } }
@keyframes aicDissolve { to { opacity: 0; filter: blur(8px); } }
@keyframes aicZoom { from { transform: scale(1); } to { transform: scale(34); } }
@keyframes aicBreath { 50% { opacity: .45; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  #aicIntro.go .fl, #aicIntro.go .mk, #aicIntro.go .lk, #aicIntro.go .wd, #aicIntro.go .wd i { animation: none !important; }
  #aicIntro.go .wh, #aicIntro.go .wd { animation: aicOn .5s ease .1s both !important; }
}

/* ── Umbral de entrada: la puerta a la experiencia (toda la pantalla). Un gesto abre la intro con sonido. ── */
#aicIntro .gt { position: absolute; inset: 0; z-index: 5; display: none; place-items: center; background: #050508; cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent; transition: opacity .45s ease; }
#aicIntro.gate .gt { display: grid; }
#aicIntro .gt::before { content: ""; position: absolute; left: 50%; top: 48%; width: 120vmax; height: 120vmax; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(139, 92, 246, .13), rgba(139, 92, 246, .05) 35%, transparent 70%); animation: aicHaze 6s ease-in-out infinite; }
#aicIntro .gi { position: relative; display: grid; justify-items: center; gap: 48px; }   /* el texto queda fuera del anillo de 132px que gira alrededor de la C */
#aicIntro .gc { position: relative; width: 46px; aspect-ratio: 600 / 713; }
#aicIntro .gc i { position: absolute; inset: 0; background: #fff; opacity: .92;
  -webkit-mask: url("/static/img/aic-intro-c.png?v=1") center / contain no-repeat; mask: url("/static/img/aic-intro-c.png?v=1") center / contain no-repeat; }
#aicIntro .gc::before { content: ""; position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%;
  background: conic-gradient(from var(--aga, 0deg), transparent 0 62%, rgba(255, 90, 214, .55) 74%, rgba(139, 92, 246, .75) 84%, rgba(34, 227, 255, .9) 92%, transparent 100%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px)); mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  animation: aicOrbit 3.2s linear infinite; opacity: .9; }
#aicIntro .gc::after { content: ""; position: absolute; inset: -60%; border-radius: 50%; background: radial-gradient(closest-side, rgba(139, 92, 246, .35), transparent); filter: blur(10px); animation: aicBreath 3.2s ease-in-out infinite; }
#aicIntro .gx { margin: 0; font: 500 11px/1 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .42em; text-transform: uppercase; color: #c9cbe0; padding-left: .42em; opacity: 0; animation: aicRise 1.2s ease .5s forwards; }
#aicIntro .gx b { font-weight: 500; color: #fff; }
#aicIntro.gate.entering .gc { animation: aicPulse .45s cubic-bezier(.2, .8, .2, 1) forwards; }
#aicIntro.gate.entering .gx { animation: none; opacity: 0; transition: opacity .2s; }
#aicIntro.gate.entering .gt { opacity: 0; transition-delay: .2s; }
@property --aga { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes aicOrbit { to { --aga: 360deg; } }
@keyframes aicHaze { 50% { opacity: .6; } }
@keyframes aicRise { from { opacity: 0; transform: translateY(6px); letter-spacing: .6em; } to { opacity: 1; transform: none; letter-spacing: .42em; } }
@keyframes aicPulse { 40% { transform: scale(1.18); filter: drop-shadow(0 0 24px rgba(34, 227, 255, .9)); } 100% { transform: scale(.6); opacity: 0; } }

/* Aviso de instalación de la app (pwa.js) oculto mientras dura la puerta/intro */
html.aic-intro .pwa-prompt, html.aic-intro #pwaInstallPrompt { visibility: hidden !important; }
