/* style.css - Animações Globais e Splash de Transformação */

/* --- 1. TELA DE INÍCIO (TRANSFORMAÇÃO NOME -> LOGO) --- */
#splashScreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #f8fafc; /* Fundo Claro */
    display: flex;
    align-items: center;
    justify-content: center;
    /* O splash inteiro desaparece após 4 segundos */
    animation: splashContainerFadeOut 0.5s ease-in-out forwards 3.5s;
}

.dark #splashScreen {
    background-color: #020617; /* Fundo Escuro */
}

/* Container para centralizar e sobrepor */
.splash-content-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px; /* Largura máxima da logo */
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* O Texto Inicial "Maria Odília Teixeira" */
#splashInitialText {
    position: absolute;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: #475569; /* Slate-600 */
    text-align: center;
    white-space: nowrap;
    opacity: 1;
    /* Texto desaparece aos 1.5s */
    animation: fadeOutText 1s ease-in-out forwards 1.5s;
}

.dark #splashInitialText {
    color: #e2e8f0; /* Slate-200 */
}

/* A Logo Final (Sua Imagem) */
#splashFinalLogo {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0; /* Começa invisível */
    transform: scale(1.1);
    /* Logo aparece aos 1.5s */
    animation: fadeInLogo 1s ease-in-out forwards 1.5s;
}

#splashFinalLogo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* KEYFRAMES DA TRANSIÇÃO */
@keyframes fadeOutText {
    to { opacity: 0; transform: scale(0.9); filter: blur(2px); }
}

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

@keyframes splashContainerFadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* --- 2. ANIMAÇÃO DE RESPIRAÇÃO (SOS) - MANTIDA IGUAL --- */
.box-breathing-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.box-shape { position: relative; width: 240px; height: 240px; border: 4px solid #e2e8f0; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.5); }
.dark .box-shape { border-color: #334155; background: rgba(15, 23, 42, 0.3); }
.breathing-dot { position: absolute; width: 20px; height: 20px; background-color: #6366f1; border-radius: 50%; box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); top: -12px; left: -12px; animation: moveBox 16s linear infinite; }
.breathing-text { font-size: 1.5rem; font-weight: 800; color: #475569; text-transform: uppercase; letter-spacing: 0.1em; animation: textChange 16s linear infinite; text-align: center; }
.dark .breathing-text { color: #e2e8f0; }
@keyframes moveBox { 0% { top: -12px; left: -12px; } 25% { top: -12px; left: calc(100% - 12px); } 50% { top: calc(100% - 12px); left: calc(100% - 12px); } 75% { top: calc(100% - 12px); left: -12px; } 100% { top: -12px; left: -12px; } }
@keyframes textChange { 0%, 24% { content: "Inspirar"; opacity: 1; transform: scale(1); } 25%, 49% { content: "Segurar"; opacity: 0.8; transform: scale(0.95); } 50%, 74% { content: "Expirar"; opacity: 1; transform: scale(1); } 75%, 99% { content: "Segurar"; opacity: 0.8; transform: scale(0.95); } 100% { content: "Inspirar"; } }
.breathing-text::after { content: "Preparar..."; animation: textContent 16s steps(1) infinite; display: block; }
@keyframes textContent { 0% { content: "Inspirar (4s)"; } 25% { content: "Segurar (4s)"; } 50% { content: "Expirar (4s)"; } 75% { content: "Segurar (4s)"; } }