/* ============================================================
   FUJIKO — Splash / Intro Loading Screen
   Always plays when home.php loads.
   Pure CSS-driven — no sessionStorage, no flags.
   ============================================================ */

/* ── Overlay ── */
#fujiko-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    pointer-events: all;

    /* Step 1: stay fully visible for 2s, then fade out over 0.7s */
    animation: splashOverlayOut 0.7s ease 2s forwards;
}

/* After the fade-out animation ends, remove from interaction */
#fujiko-splash.splash-done {
    display: none;
}

/* ── Logo + tagline wrapper ── */
.splash-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;

    /* Fade + scale in on load */
    opacity: 0;
    transform: scale(0.8);
    animation: splashLogoIn 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

/* Logo image — large and centered */
.splash-logo-wrap img {
    width: clamp(200px, 42vw, 360px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 36px rgba(20, 57, 95, 0.16));
}

/* Splash logo: icon + text side by side (matches navbar logo) */
.splash-logo-icon-text {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 28px);
}

.splash-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(72px, 12vw, 110px);
    height: clamp(72px, 12vw, 110px);
    min-width: 72px;
    border-radius: 20px;
    background: #1e3a6e;
    box-shadow: 0 8px 30px rgba(30, 58, 110, 0.3);
}

.splash-logo-icon i {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.splash-logo-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1;
}

.splash-logo-title {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    white-space: nowrap;
}

.splash-navy {
    color: #1e3a6e;
    -webkit-text-fill-color: #1e3a6e;
}

.splash-gold {
    color: #e8a020;
    -webkit-text-fill-color: #e8a020;
}

.splash-logo-sub {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: clamp(0.7rem, 1.6vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #4a9ab5;
    -webkit-text-fill-color: #4a9ab5;
    white-space: nowrap;
}

/* Tagline */
.splash-tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.75rem, 1.8vw, 0.92rem);
    font-weight: 600;
    color: #63768a;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    animation: splashTagIn 0.5s ease 0.65s forwards;
}

/* ── Progress bar ── */
.splash-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(70, 123, 181, 0.1);
    overflow: hidden;
}

.splash-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e8a020, #467bb5);
    border-radius: 0 999px 999px 0;
    /* Fill to 100% over 1.9s, matching the 2s hold time */
    animation: splashBar 1.9s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

/* ── Keyframes ── */

/* Logo springs in */
@keyframes splashLogoIn {
    0%   { opacity: 0; transform: scale(0.8);  }
    65%  { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1);    }
}

/* Tagline slides up */
@keyframes splashTagIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Progress bar fills */
@keyframes splashBar {
    0%   { width: 0%;   }
    50%  { width: 60%;  }
    80%  { width: 85%;  }
    100% { width: 100%; }
}

/* Overlay fades out */
@keyframes splashOverlayOut {
    from { opacity: 1; pointer-events: all;  }
    to   { opacity: 0; pointer-events: none; }
}

/* ── Prevent scroll while splash is visible ── */
body.splash-active {
    overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .splash-logo-icon-text {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .splash-logo-text {
        align-items: center;
    }
}
