/* 
 * SPARK SPLASH SCREEN - SIMPLIFIED FOR PERFORMANCE
 * Clean zoom-through animation without heavy effects
 */

:root {
    --splash-bg: #05070d;
    --splash-duration: 1.4s;
    --splash-zoom-scale: 32;
}

/* Base overlay - simple solid background */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    background: var(--splash-bg);
    z-index: 99999;
    display: none; /* Changed from flex; JS will enable if needed */
    justify-content: center;
    align-items: center;
    opacity: 1;
    pointer-events: none;
}

.splash-overlay.splash-active {
    pointer-events: auto;
}

/* Logo container */
.splash-logo-container {
    position: relative;
    width: clamp(220px, 28vw, 360px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* Logo element - simple zoom animation */
.splash-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.8);
}

/* Activate animation */
.splash-active .splash-logo {
    animation: logoZoomThrough var(--splash-duration) cubic-bezier(0.87, 0, 0.13, 1) forwards;
}

.splash-active {
    animation: fadeOutSplash 0.3s ease-out 1.1s forwards;
}

/* Animations */
@keyframes logoZoomThrough {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.8);
    }
    
    18% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1.03);
    }
    
    52% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    
    100% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(var(--splash-zoom-scale));
    }
}

@keyframes fadeOutSplash {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Utility classes for instant hide */
.splash-hidden,
.splash-force-hide {
    display: none !important;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .splash-logo-container {
        width: clamp(200px, 68vw, 300px);
    }
    
    :root {
        --splash-zoom-scale: 48;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .splash-overlay {
        animation: fadeOutSplash 0.3s ease-out 0.5s forwards;
    }
    
    .splash-active .splash-logo {
        animation: logoFadeOnly 0.8s ease-out forwards;
    }
    
    @keyframes logoFadeOnly {
        0% {
            opacity: 0;
        }
        30% {
            opacity: 1;
        }
        70% {
            opacity: 1;
        }
        100% {
            opacity: 0;
        }
    }
}
