/* ==========================================================================
   TorqueCraft — Blitz Studios Animated Startup Splash Screen
   ========================================================================== */

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#splash-screen.splash-hidden {
    opacity: 0;
    pointer-events: none;
}

#splash-screen.splash-removed {
    display: none !important;
}

.splash-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.splash-logo {
    max-width: min(85vw, 640px);
    max-height: min(70vh, 400px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0;
    transform: scale(0.97);
    will-change: opacity, transform;
}

/* Phase 1 — Fade in: smooth ~1.2s ease-out */
.splash-logo.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Phase 3 — Fade out: smooth ~1.0s ease-out */
.splash-logo.fade-out {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1.0s cubic-bezier(0.4, 0, 0.2, 1), transform 1.0s cubic-bezier(0.4, 0, 0.2, 1);
}
