/* ============================================================
   DIVINO MESTRE — Splash Screen
   Duração total: 2000ms
   Fonte: Plus Jakarta Sans (já carregada no projeto)
   ============================================================ */

/* ---------- Reset / Overlay ---------- */
#divino-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0037b0;
    overflow: hidden;
    /* Impede scroll do body enquanto splash está ativa */
    will-change: opacity, transform;
}

/* ---------- Círculo de fundo (pulse decorativo) ---------- */
#divino-splash .splash-bg-circle {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, #1d4ed8 0%, #0037b0 70%);
    opacity: 0;
    transform: scale(0.4);
    animation: splashCircleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

/* ---------- Anel decorativo laranja ---------- */
#divino-splash .splash-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 3px solid rgba(253, 118, 26, 0.35);
    opacity: 0;
    transform: scale(0.6);
    animation: splashRingIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s forwards;
}

#divino-splash .splash-ring-outer {
    width: 420px;
    height: 420px;
    border-color: rgba(253, 118, 26, 0.15);
    animation-delay: 0.35s;
}

/* ---------- Conteúdo central ---------- */
#divino-splash .splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

/* ---------- Ícone / Monograma ---------- */
#divino-splash .splash-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    animation: splashIconIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#divino-splash .splash-icon svg {
    width: 44px;
    height: 44px;
    fill: #ffffff;
}

/* ---------- Nome principal ---------- */
#divino-splash .splash-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 2.75rem; /* 44px */
    line-height: 1;
    letter-spacing: -0.03em;
    color: #ffffff;
    opacity: 0;
    transform: translateY(16px);
    animation: splashTextIn 0.45s cubic-bezier(0.25, 1, 0.5, 1) 0.5s forwards;
}

#divino-splash .splash-title span {
    color: #fd761a;
}

/* ---------- Subtítulo ---------- */
#divino-splash .splash-subtitle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 0.875rem; /* 14px */
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    opacity: 0;
    transform: translateY(12px);
    animation: splashTextIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) 0.65s forwards;
}

/* ---------- Barra de progresso ---------- */
#divino-splash .splash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

#divino-splash .splash-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fd761a, #ffb347);
    animation: splashProgress 1.85s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
    border-radius: 0 2px 2px 0;
}

/* ---------- Linha decorativa laranja sob o título ---------- */
#divino-splash .splash-divider {
    width: 0px;
    height: 3px;
    background: #fd761a;
    border-radius: 2px;
    opacity: 0;
    animation: splashDividerIn 0.4s ease-out 0.72s forwards;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

@keyframes splashCircleIn {
    to { opacity: 1; transform: scale(1); }
}

@keyframes splashRingIn {
    to { opacity: 1; transform: scale(1); }
}

@keyframes splashIconIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splashTextIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes splashDividerIn {
    to { opacity: 1; width: 48px; }
}

@keyframes splashProgress {
    0%   { width: 0%; }
    100% { width: 100%; }
}

/* ---------- Saída: fade + scale up leve ---------- */
#divino-splash.splash-exit {
    animation: splashOut 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
    pointer-events: none;
}

@keyframes splashOut {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.04); }
}

/* ============================================================
   RESPONSIVO — Mobile (<768px)
   ============================================================ */
@media (max-width: 767px) {
    #divino-splash .splash-bg-circle {
        width: 380px;
        height: 380px;
    }

    #divino-splash .splash-ring {
        width: 220px;
        height: 220px;
    }

    #divino-splash .splash-ring-outer {
        width: 300px;
        height: 300px;
    }

    #divino-splash .splash-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    #divino-splash .splash-icon svg {
        width: 36px;
        height: 36px;
    }

    #divino-splash .splash-title {
        font-size: 2.1rem; /* 33.6px */
    }

    #divino-splash .splash-subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.14em;
    }

    #divino-splash .splash-progress {
        height: 2px;
    }
}

/* ============================================================
   TEMA: DIVINO MESTRE — azul profundo + laranja
   ============================================================ */
#divino-splash[data-theme="mestre"] {
    background: linear-gradient(135deg, #001551 0%, #0037b0 55%, #1d4ed8 100%);
}
#divino-splash[data-theme="mestre"] .splash-ring {
    border-color: rgba(253, 118, 26, 0.3);
}
#divino-splash[data-theme="mestre"] .splash-ring-outer {
    border-color: rgba(253, 118, 26, 0.12);
}
#divino-splash[data-theme="mestre"] .splash-icon {
    background: rgba(253, 118, 26, 0.15);
    border-color: rgba(253, 118, 26, 0.3);
}
#divino-splash[data-theme="mestre"] .splash-title span { color: #fd761a; }
#divino-splash[data-theme="mestre"] .splash-divider    { background: #fd761a; }
#divino-splash[data-theme="mestre"] .splash-progress-bar {
    background: linear-gradient(90deg, #fd761a, #ffb347);
}

/* ============================================================
   TEMA: DIVINO KIDS — laranja quente + amarelo + animação lúdica
   ============================================================ */
#divino-splash[data-theme="kids"] {
    background: linear-gradient(135deg, #7c2d12 0%, #c2410c 45%, #ea580c 100%);
}
#divino-splash[data-theme="kids"] .splash-bg-circle {
    background: radial-gradient(circle, rgba(253, 186, 116, 0.35) 0%, transparent 70%);
}
#divino-splash[data-theme="kids"] .splash-ring {
    border-color: rgba(255, 255, 255, 0.2);
}
#divino-splash[data-theme="kids"] .splash-ring-outer {
    border-color: rgba(255, 255, 255, 0.08);
}
#divino-splash[data-theme="kids"] .splash-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    animation: splashIconIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards,
               kidsWobble 0.55s ease-in-out 1s 2;
}
#divino-splash[data-theme="kids"] .splash-title span { color: #fde68a; }
#divino-splash[data-theme="kids"] .splash-divider     { background: #fde68a; }
#divino-splash[data-theme="kids"] .splash-progress-bar {
    background: linear-gradient(90deg, #fde68a, #fbbf24);
}

/* Estrelas flutuantes */
.kids-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.kids-star {
    position: absolute;
    bottom: -30px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(253, 230, 138, 0.7);
    opacity: 0;
    animation: kidsStarFloat linear forwards;
}
.kids-star:nth-child(2) { width: 7px;  height: 7px;  background: rgba(255,255,255,0.5); }
.kids-star:nth-child(3) { width: 12px; height: 12px; background: rgba(253, 186, 116, 0.8); }
.kids-star:nth-child(4) { width: 8px;  height: 8px;  background: rgba(253, 230, 138, 0.6); }
.kids-star:nth-child(5) { width: 6px;  height: 6px;  background: rgba(255,255,255,0.4); }

/* ============================================================
   TEMA: NOSSA HISTÓRIA — slate escuro + dourado cinematográfico
   ============================================================ */
#divino-splash[data-theme="historia"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #293548 100%);
}
#divino-splash[data-theme="historia"] .splash-bg-circle {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, transparent 70%);
}
#divino-splash[data-theme="historia"] .splash-ring {
    border-color: rgba(245, 158, 11, 0.22);
    animation: splashRingIn 0.9s cubic-bezier(0.25, 1, 0.5, 1) 0.3s forwards;
}
#divino-splash[data-theme="historia"] .splash-ring-outer {
    border-color: rgba(245, 158, 11, 0.08);
    animation-delay: 0.45s;
}
#divino-splash[data-theme="historia"] .splash-icon {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
}
#divino-splash[data-theme="historia"] .splash-title {
    animation: splashTextIn 0.9s cubic-bezier(0.25, 1, 0.5, 1) 0.5s forwards;
}
#divino-splash[data-theme="historia"] .splash-title span { color: #f59e0b; }
#divino-splash[data-theme="historia"] .splash-subtitle {
    animation: splashTextIn 0.9s cubic-bezier(0.25, 1, 0.5, 1) 0.68s forwards;
}
#divino-splash[data-theme="historia"] .splash-divider {
    background: #f59e0b;
    animation: splashDividerIn 0.6s ease-out 0.8s forwards;
}
#divino-splash[data-theme="historia"] .splash-progress-bar {
    background: linear-gradient(90deg, #92400e, #f59e0b, #fcd34d);
    animation: splashProgress 2s ease-out 0.1s forwards;
}
/* Linha do tempo sutil */
.historia-timeline {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 0;
    background: linear-gradient(to bottom, transparent, rgba(245, 158, 11, 0.25), transparent);
    transform: translateX(-50%);
    animation: historiaTimeline 1.6s ease-out 0.3s forwards;
}

/* ============================================================
   NOVOS KEYFRAMES
   ============================================================ */
@keyframes kidsWobble {
    0%, 100% { transform: rotate(0deg) scale(1); }
    30%       { transform: rotate(-10deg) scale(1.12); }
    70%       { transform: rotate(10deg)  scale(1.12); }
}
@keyframes kidsStarFloat {
    0%   { opacity: 0;   transform: translateY(0)     rotate(0deg); }
    8%   { opacity: 0.9; }
    90%  { opacity: 0.7; }
    100% { opacity: 0;   transform: translateY(-95vh) rotate(540deg); }
}
@keyframes historiaTimeline {
    to { height: 100%; }
}

/* ============================================================
   ACESSIBILIDADE — respeita prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    #divino-splash .splash-bg-circle,
    #divino-splash .splash-ring,
    #divino-splash .splash-icon,
    #divino-splash .splash-title,
    #divino-splash .splash-subtitle,
    #divino-splash .splash-divider,
    #divino-splash .splash-progress-bar {
        animation: none;
        opacity: 1;
        transform: none;
    }

    #divino-splash .splash-progress-bar {
        width: 100%;
    }

    #divino-splash.splash-exit {
        animation: none;
        opacity: 0;
    }
}
