/* ============================================================
   splash.css — Animação de Abertura
   Portal ADC Embraer Botucatu
   ============================================================ */

/* ── SPLASH OVERLAY ───────────────────────────────────────── */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: var(--z-splash);
    background: #070F1C;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Partículas de background */
#splash-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0,212,255,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(123,97,255,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0,212,255,0.05) 0%, transparent 50%);
    animation: splashBgPulse 3s ease-in-out infinite;
}

@keyframes splashBgPulse {
    0%, 100% { opacity: 0.7; }
    50%       { opacity: 1; }
}

/* Grid de pontos decorativos */
#splash-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0,212,255,0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
    animation: gridFadeIn 0.5s ease 0.2s both;
}

@keyframes gridFadeIn {
    from { opacity: 0; }
    to   { opacity: 0.4; }
}

/* ── LOGO CONTAINER ───────────────────────────────────────── */
.splash-logo-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Anel de brilho externo */
.splash-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(0,212,255,0.2);
    animation: ringExpand 2s ease-out 0.3s both,
               ringPulse 2s ease-in-out 2.3s infinite;
}

.splash-ring:nth-child(2) {
    width: 240px;
    height: 240px;
    border-color: rgba(0,212,255,0.1);
    animation-delay: 0.5s, 2.5s;
}

.splash-ring:nth-child(3) {
    width: 320px;
    height: 320px;
    border-color: rgba(0,212,255,0.06);
    animation-delay: 0.7s, 2.7s;
}

@keyframes ringExpand {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes ringPulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50%       { opacity: 0.5; transform: translate(-50%, -50%) scale(1.05); }
}

/* ── LOGO ICON ────────────────────────────────────────────── */
.splash-icon {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 0 60px rgba(0,212,255,0.32),
        0 0 120px rgba(0,212,255,0.16),
        inset 0 1px 0 rgba(255,255,255,0.22);

    /* Animação de montagem */
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
    animation: iconMount 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

@keyframes iconMount {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
}

.splash-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ── LOGO TEXTO (MONTAGEM LETRA A LETRA) ─────────────────── */
.splash-title {
    position: relative;
    z-index: 1;
    text-align: center;
    overflow: hidden;
}

.splash-title-main {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    color: #fff;
    letter-spacing: -0.01em;
    display: flex;
    gap: 0;
    justify-content: center;
    opacity: 0;
    animation: titleReveal 0.6s ease 0.9s both;
}

.splash-title-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(0,212,255,0.9);
    margin-top: 6px;
    opacity: 0;
    animation: titleReveal 0.6s ease 1.1s both;
}

@keyframes titleReveal {
    from { opacity: 0; transform: translateY(12px) blur(4px); filter: blur(4px); }
    to   { opacity: 1; transform: translateY(0) blur(0); filter: blur(0); }
}

/* ── BARRA DE PROGRESSO ───────────────────────────────────── */
.splash-progress {
    position: absolute;
    bottom: var(--space-12);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    opacity: 0;
    animation: fadeIn 0.5s ease 1.3s both;
}

.splash-progress-track {
    width: 160px;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
}

.splash-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00D4FF, #7B61FF);
    border-radius: 999px;
    width: 0%;
    animation: progressFill 1.8s ease 1.3s both;
}

@keyframes progressFill {
    0%   { width: 0%; }
    60%  { width: 80%; }
    100% { width: 100%; }
}

.splash-progress-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(0,212,255,0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── SAÍDA DO SPLASH ──────────────────────────────────────── */
#splash-screen.exit {
    animation: splashExit 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes splashExit {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.05);
        pointer-events: none;
    }
}

/* Partículas animadas */
.splash-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat var(--duration, 4s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes particleFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0); }
    20%  { opacity: 0.8; transform: translateY(-20px) scale(1); }
    80%  { opacity: 0.4; transform: translateY(-80px) scale(0.8); }
    100% { opacity: 0; transform: translateY(-120px) scale(0); }
}
