/* ==========================================================
   Entrada de la portada (components/portada/Entrada.astro + js/entrada.js)
   Segundos desde que empieza: 0,2 círculos · 1,2 las palabras · 2,4 la chica · 3,9 las estrellas ·
   5 brillo violeta · 7,6 se abre la portada. Si cambian, revisar BRILLO y SALIDA en js/entrada.js.
   ========================================================== */
.entrada { display: none; }

/* Cortina que tapa la portada desde el primer fotograma mientras se prepara la entrada */
html.entrada-activa::before { content: ""; position: fixed; inset: 0; z-index: 999; background: #110d18; }

html.entrada-activa .entrada, .entrada.en-saliendo { display: grid; position: fixed; inset: 0; z-index: 1000; place-items: center; background: #110d18; transition: opacity .75s ease; }
.entrada.en-saliendo { opacity: 0; pointer-events: none; }
.entrada.en-rapida { transition-duration: .25s; }
.en-logo { position: relative; width: min(23rem, 62svh, 76vw); aspect-ratio: 1; color: #f4f1fa; transition: filter .9s ease, scale .9s ease; }
.en-logo svg { display: block; position: relative; width: 100%; height: 100%; overflow: visible; }
/* La chica ocupa el interior del círculo pequeño (800 de las 1120 unidades del dibujo) y aparece suavemente, sin cambiar de tamaño (Mireia, 03-12-2026) */
.en-chica { position: absolute; left: 14.286%; top: 14.286%; width: 71.428%; height: 71.428%; opacity: 0; }
.en-dibujando .en-chica { animation: en-aparece 1.4s ease-in-out 2.4s forwards; }
.entrada.en-brillo .en-logo { filter: drop-shadow(0 0 2px rgba(235, 220, 255, .9)) drop-shadow(0 0 9px rgba(176, 120, 255, .85)) drop-shadow(0 0 26px rgba(140, 80, 220, .65)); }
.entrada.en-saliendo .en-logo { scale: 1.06; }
.en-texto text { font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif; font-size: 62px; }
.en-texto .en-punto { font-size: 32px; }

/* Estado inicial: todo sin dibujar */
.en-aro { stroke-dasharray: 1; stroke-dashoffset: 1; }
.en-texto text, .en-estrellas path { opacity: 0; }

.en-dibujando .en-aro { animation: en-trazo 1.8s ease-in-out .2s forwards; }
.en-dibujando .en-aro2 { animation-delay: .6s; }
.en-dibujando .en-texto text { animation: en-aparece .5s ease forwards; animation-delay: calc(1.2s + var(--n, 0) * .09s); }
.en-dibujando .en-estrellas path { animation: en-aparece .5s ease 3.9s forwards; }
.en-dibujando .en-estrellas path:nth-child(2) { animation-delay: 4.1s; }
.en-dibujando .en-estrellas path:nth-child(3) { animation-delay: 4.3s; }
.en-dibujando .en-estrellas path:nth-child(4) { animation-delay: 4.5s; }

@keyframes en-trazo { to { stroke-dashoffset: 0; } }
@keyframes en-aparece { to { opacity: 1; } }
