/* ── Splash de la entrada ─────────────────────────────────────────────
   La marca entra y se va: el círculo verde aparece con un aro que se abre,
   las tres barras de la "D" se dibujan una tras otra, y debajo "DASH" letra
   por letra con una barrita de carga. Usa el mismo fondo que la entrada
   (noche con un halo verde y la grilla), así no hay un fogonazo blanco antes
   de una pantalla oscura. Con el tema claro, el claro de la entrada.
   La duración la maneja public/js/splash.js: la animación completa una vez
   por sesión; después, apenas un instante. */
.splash-screen {
    --splash-verde: #0FD186;
    --splash-texto: #F1F5F9;
    --splash-suave: rgba(241, 245, 249, .62);
    --splash-pista: rgba(255, 255, 255, .08);
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(560px circle at 50% 42%, rgba(15, 209, 134, .20), transparent 62%),
        radial-gradient(420px circle at 82% 88%, rgba(99, 102, 241, .14), transparent 65%),
        linear-gradient(160deg, #071a11 0%, #0A0F1E 55%, #0d1326 100%);
    transition: opacity .45s ease, visibility 0s linear .45s;
}
/* La grilla de la entrada, que se apaga hacia los bordes */
.splash-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%);
            mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%);
    pointer-events: none;
}
[data-theme="light"] .splash-screen {
    --splash-texto: #0F172A;
    --splash-suave: #64748B;
    --splash-pista: rgba(15, 23, 42, .08);
    background:
        radial-gradient(560px circle at 50% 42%, rgba(15, 209, 134, .16), transparent 62%),
        linear-gradient(135deg, #dbeafe 0%, #f0fdf4 45%, #fef9c3 100%);
}
[data-theme="light"] .splash-screen::before {
    background-image:
        linear-gradient(rgba(15, 23, 42, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .05) 1px, transparent 1px);
}

.splash-screen.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-screen.fade-out .splash-content { transform: scale(1.05); }

.splash-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

/* La marca */
.splash-marca { width: 128px; height: 128px; overflow: visible; filter: drop-shadow(0 18px 40px rgba(15, 209, 134, .35)); }
.splash-circulo, .splash-aro, .splash-barra { transform-box: fill-box; }
.splash-circulo { transform-origin: 50% 50%; animation: splashCirculo .7s cubic-bezier(.2, 1.4, .3, 1) both; }
.splash-aro {
    fill: none; stroke: var(--splash-verde); stroke-width: 2; opacity: 0;
    transform-origin: 50% 50%; animation: splashAro 1.8s cubic-bezier(.2, .8, .2, 1) .5s infinite;
}
.splash-barra { fill: #fff; transform-origin: 0% 50%; animation: splashBarra .55s cubic-bezier(.2, .9, .2, 1) both; }
.splash-barra.b1 { animation-delay: .38s; }
.splash-barra.b2 { animation-delay: .5s; }
.splash-barra.b3 { animation-delay: .62s; }

/* DASH, letra por letra */
.splash-nombre {
    display: flex; gap: .32em; margin-top: 26px;
    font-family: 'Figtree', 'Inter', -apple-system, sans-serif; font-size: 28px; font-weight: 800;
    letter-spacing: .02em; color: var(--splash-texto);
}
.splash-nombre span { display: inline-block; animation: splashLetra .5s cubic-bezier(.2, .8, .2, 1) both; }
.splash-nombre span:nth-child(1) { animation-delay: .7s; }
.splash-nombre span:nth-child(2) { animation-delay: .76s; }
.splash-nombre span:nth-child(3) { animation-delay: .82s; }
.splash-nombre span:nth-child(4) { animation-delay: .88s; }
.splash-frase {
    margin-top: 6px; font-family: 'Figtree', 'Inter', -apple-system, sans-serif; font-size: 13px; font-weight: 500;
    color: var(--splash-suave); animation: splashSube .6s ease 1s both;
}

/* La barrita de carga */
.splash-carga {
    position: relative; width: 120px; height: 3px; margin-top: 26px; overflow: hidden;
    border-radius: 3px; background: var(--splash-pista); animation: splashSube .4s ease 1.05s both;
}
.splash-carga::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--splash-verde), transparent);
    animation: splashCarga 1.1s ease-in-out infinite;
}

@keyframes splashCirculo { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
@keyframes splashAro { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.55); } }
@keyframes splashBarra { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splashLetra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splashSube { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes splashCarga { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Ya se vio en esta sesión: aparece armado y se va enseguida. */
.splash-screen.splash--rapido .splash-circulo,
.splash-screen.splash--rapido .splash-barra,
.splash-screen.splash--rapido .splash-nombre span,
.splash-screen.splash--rapido .splash-frase,
.splash-screen.splash--rapido .splash-carga { animation: none; }

@media (max-width: 480px) {
    .splash-marca { width: 108px; height: 108px; }
    .splash-nombre { font-size: 24px; }
}

/* Quien pidió menos movimiento: la marca quieta y una salida suave. */
@media (prefers-reduced-motion: reduce) {
    .splash-screen *, .splash-screen *::after { animation: none !important; }
    .splash-screen.fade-out .splash-content { transform: none; }
}
