/**
 * StoreEdge — Mobile PWA Splash Screen
 * Shown on app launch before content loads.
 * Auto-dismisses after DOM ready + 600ms fade.
 */

/* ===========================
   SPLASH SCREEN OVERLAY
   =========================== */
.se-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0D1F45 0%, #173269 35%, #1F4699 70%, #2A5CC8 100%);
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
}

.se-splash.se-splash--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Decorative background shapes */
.se-splash::before,
.se-splash::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    pointer-events: none;
}
.se-splash::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7ACEFF 0%, transparent 70%);
    top: -150px;
    right: -100px;
}
.se-splash::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7ACEFF 0%, transparent 70%);
    bottom: -120px;
    left: -80px;
}

/* ===========================
   LOGO + BRAND
   =========================== */
.se-splash__logo {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 28px;
    animation: splashLogoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.se-splash__logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 32px rgba(122, 206, 255, 0.25));
}

.se-splash__brand {
    text-align: center;
    animation: splashTextIn 0.7s ease both 0.15s;
}

.se-splash__name {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 3px;
    margin: 0;
    line-height: 1.2;
}

.se-splash__name-store {
    color: #ffffff;
}

.se-splash__name-edge {
    color: #7ACEFF;
}

.se-splash__tagline {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 10px;
}

/* ===========================
   LOADING INDICATOR
   =========================== */
.se-splash__loader {
    margin-top: 48px;
    display: flex;
    gap: 8px;
    animation: splashTextIn 0.5s ease both 0.35s;
}

.se-splash__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7ACEFF;
    opacity: 0.3;
    animation: splashDotPulse 1.2s ease-in-out infinite;
}

.se-splash__dot:nth-child(2) { animation-delay: 0.2s; }
.se-splash__dot:nth-child(3) { animation-delay: 0.4s; }

/* ===========================
   BOTTOM BRANDING
   =========================== */
.se-splash__footer {
    position: absolute;
    bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 1px;
    animation: splashTextIn 0.5s ease both 0.5s;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes splashLogoIn {
    from {
        opacity: 0;
        transform: scale(0.6) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes splashDotPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ===========================
   REDUCED MOTION
   =========================== */
@media (prefers-reduced-motion: reduce) {
    .se-splash__logo,
    .se-splash__brand,
    .se-splash__loader,
    .se-splash__footer {
        animation: none;
        opacity: 1;
    }
    .se-splash__dot {
        animation: none;
        opacity: 0.6;
    }
    .se-splash {
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
}
