/* ═══════════════════════════════════════════════
   HoneyBee Learning — Welcome Splash Screen
   Shows once per browser session
   ═══════════════════════════════════════════════ */

/* ─── OVERLAY ─── */
.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(160deg,
            #fff8e1 0%,
            #fffde7 30%,
            #f9fbe7 60%,
            #e8f5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    /* Fade-out class added by JS */
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.splash.hiding {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

.splash.gone {
    display: none;
}

/* ─── FLOATING HEXAGONS ─── */
.splash-hexagons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hex {
    position: absolute;
    font-size: 5rem;
    color: #ffb300;
    opacity: 0.12;
    animation: hexFloat 6s ease-in-out infinite;
    user-select: none;
}

.hex1 {
    top: 5%;
    left: 3%;
    font-size: 7rem;
    animation-duration: 7s;
    animation-delay: 0s;
}

.hex2 {
    top: 15%;
    right: 6%;
    font-size: 5rem;
    animation-duration: 9s;
    animation-delay: 1s;
}

.hex3 {
    top: 50%;
    left: 7%;
    font-size: 9rem;
    animation-duration: 8s;
    animation-delay: 0.5s;
}

.hex4 {
    bottom: 10%;
    right: 5%;
    font-size: 6rem;
    animation-duration: 10s;
    animation-delay: 1.5s;
}

.hex5 {
    bottom: 20%;
    left: 15%;
    font-size: 4rem;
    animation-duration: 6s;
    animation-delay: 0.3s;
}

.hex6 {
    top: 30%;
    right: 20%;
    font-size: 8rem;
    animation-duration: 11s;
    animation-delay: 2s;
}

@keyframes hexFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* ─── CONFETTI EMOJIS ─── */
.splash-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.splash-confetti span {
    position: absolute;
    top: -60px;
    left: var(--x);
    font-size: 1.6rem;
    animation: floatDown 3.5s ease-in forwards;
    animation-delay: var(--d);
    opacity: 0;
}

@keyframes floatDown {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* ─── MAIN CONTENT ─── */
.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px;
}

/* ─── FLYING BEE ─── */
.splash-bee {
    font-size: 3.5rem;
    animation: beeEntry 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        beeHover 2s ease-in-out 1s infinite;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(255, 179, 0, 0.4));
}

@keyframes beeEntry {
    0% {
        opacity: 0;
        transform: translateX(-120px) translateY(-40px) rotate(-20deg) scale(0.3);
    }

    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    }
}

@keyframes beeHover {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

/* ─── LOGO ─── */
.splash-logo {
    animation: popIn 0.6s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.splash-logo img {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 179, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    background: white;
}

/* ─── BRAND NAME ─── */
.splash-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    animation: popIn 0.6s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.splash-honey {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2.8rem, 8vw, 4.2rem);
    color: #3d6b24;
    letter-spacing: 1px;
    text-shadow: 2px 3px 0 rgba(61, 107, 36, 0.12);
}

.splash-learning {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: #ff8f00;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ─── TAGLINE ─── */
.splash-tagline {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.92rem, 2.5vw, 1.08rem);
    color: #6b3a1f;
    font-weight: 600;
    line-height: 1.6;
    max-width: 320px;
    animation: fadeUp 0.6s 0.9s ease both;
    opacity: 0;
}

.splash-tagline strong {
    color: #3d6b24;
    font-weight: 800;
}

/* ─── PROGRESS BAR ─── */
.splash-bar-wrap {
    width: 200px;
    height: 5px;
    background: rgba(61, 107, 36, 0.12);
    border-radius: 10px;
    overflow: hidden;
    animation: fadeUp 0.5s 1.1s ease both;
    opacity: 0;
}

.splash-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3d6b24, #ffb300);
    border-radius: 10px;
    animation: fillBar 2.6s 0.2s linear forwards;
}

@keyframes fillBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* ─── SKIP HINT ─── */
.splash-skip {
    font-size: 0.76rem;
    color: #aaa;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: fadeUp 0.5s 1.3s ease both;
    opacity: 0;
    font-family: 'Nunito', sans-serif;
}

/* ─── SHARED ANIMATION KEYFRAMES ─── */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── PREVENT SCROLL WHILE SPLASH IS VISIBLE ─── */
body.splash-open {
    overflow: hidden;
}