/* ==========================================================
   SPLASH SCREEN / PAGE LOADER
   ──────────────────────────────────────────────────────────
   #clena-splash          Full-viewport white overlay.
   .clena-splash--loader  Loader mode (no scale-in anim).
   .clena-splash--hidden  Fade-out triggered by JS.
   ========================================================== */

#clena-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    opacity: 1;
    /* Smooth fade-out */
    transition: opacity 0.5s ease;
    pointer-events: all;
}

#clena-splash.clena-splash--hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Logo ── */
.clena-splash__inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clena-splash__logo {
    width: 220px;
    max-width: 60vw;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: contain;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ── FIRST VISIT: scale-in animation ── */
#clena-splash:not(.clena-splash--loader) .clena-splash__logo {
    animation: splashLogoIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── PAGE LOADER: subtle pulse so the screen feels alive ── */
#clena-splash.clena-splash--loader .clena-splash__logo {
    animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes splashLogoIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes loaderPulse {
    0%, 100% { opacity: 1;    transform: scale(1);    }
    50%       { opacity: 0.6; transform: scale(0.96); }
}
