/* ═══════════════════════════════════════════════════════════════════════════
   OFFLYKART Splash Screen — Premium Cinematic Animation
   GPU-accelerated • 60fps • Responsive • Accessible
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────────────────── */
#okSplash {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: opacity;
    pointer-events: all;
}

#okSplash.splash-hidden {
    pointer-events: none;
}

/* ── Particle Canvas ─────────────────────────────────────────────────────── */
#okSplashCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ── Logo Container ──────────────────────────────────────────────────────── */
.splash-logo-wrap {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
}

.splash-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
    will-change: transform, opacity, filter;
    filter: drop-shadow(0 0 0px transparent);
    border-radius: 12px;
}

/* ── Logo Glow Ring (pulsed on each icon emergence) ──────────────────────── */
.splash-logo-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0) 70%);
    opacity: 0;
    will-change: transform, opacity;
    pointer-events: none;
    z-index: 2;
}

/* ── Category Icon Wrapper ───────────────────────────────────────────────── */
.splash-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.splash-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Icons that pass "behind" the logo */
.splash-icon.behind-logo {
    z-index: 2;
}

/* ── Sparkle Particles (DOM-based micro sparkles) ────────────────────────── */
.splash-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.7);
    box-shadow: 0 0 6px 2px rgba(34, 197, 94, 0.4);
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 5;
}

/* ── Icon Glow Trail ─────────────────────────────────────────────────────── */
.splash-trail {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 3;
    opacity: 0;
}

/* ── Responsive Logo Sizing ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .splash-logo {
        width: 120px;
        height: 120px;
    }
    .splash-logo-glow {
        inset: -14px;
    }
    .splash-icon {
        width: 36px;
        height: 36px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .splash-logo {
        width: 150px;
        height: 150px;
    }
    .splash-logo-glow {
        inset: -16px;
    }
    .splash-icon {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .splash-logo {
        width: 170px;
        height: 170px;
    }
}

@media (min-width: 1441px) {
    .splash-logo {
        width: 200px;
        height: 200px;
    }
    .splash-icon {
        width: 54px;
        height: 54px;
    }
    .splash-logo-glow {
        inset: -24px;
    }
}

/* ── Accessibility: Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    #okSplash,
    .splash-logo,
    .splash-icon,
    .splash-logo-glow,
    .splash-sparkle,
    .splash-trail {
        animation: none !important;
        transition: opacity 0.4s ease !important;
        will-change: auto !important;
    }
    #okSplashCanvas {
        display: none !important;
    }
}


