/* ============================================================
   In-App Splash Screen — logo + school name + animation
   ============================================================ */

.splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--accent, #8b5cf6) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    pointer-events: auto;
}

.splash-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Logo wrap (circle container that softly pulses) ---- */
.splash-logo-wrap {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    animation: splashPulse 2s ease-in-out infinite;
    overflow: hidden;
    padding: 16px;
    box-sizing: border-box;
    position: relative;
}

@keyframes splashPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
}

/* ---- Actual logo image ---- */
.splash-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 50%;
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Fallback if image fails to load */
.splash-logo-fallback {
    background: rgba(255, 255, 255, 0.2);
}
.splash-logo-letter {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 52px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

/* ---- School name ---- */
.splash-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin: 0 0 12px;
    max-width: 90vw;
    opacity: 0;
    transform: translateY(20px);
    animation: splashFadeUp 0.8s ease-out 0.4s forwards;
}

/* ---- Tagline ---- */
.splash-tagline {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
    line-height: 1.5;
    margin: 0;
    max-width: 80vw;
    opacity: 0;
    transform: translateY(15px);
    animation: splashFadeUp 0.8s ease-out 0.7s forwards;
}

@keyframes splashFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Loading dots ---- */
.splash-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 36px;
    opacity: 0;
    animation: splashFadeUp 0.6s ease-out 1.1s forwards;
}

.splash-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    animation: splashBounce 1.2s ease-in-out infinite;
}

.splash-dots span:nth-child(2) { animation-delay: 0.15s; }
.splash-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes splashBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%           { transform: translateY(-8px); opacity: 1; }
}

/* ---- Mobile tweaks ---- */
@media (max-width: 480px) {
    .splash-logo-wrap {
        width: 104px;
        height: 104px;
        padding: 12px;
        margin-bottom: 22px;
    }
    .splash-logo-letter { font-size: 42px; }
    .splash-dots { margin-top: 28px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .splash-logo-wrap,
    .splash-name,
    .splash-tagline,
    .splash-dots,
    .splash-dots span {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}