/* =========================================================
 * LUMIUM SPLASH SCREEN — PREMIUM SVG LAMP EDITION
 * =========================================================
 * Timeline Sequence:
 * 0.0s : Background and ambient glow fade in
 * 0.2s : Ring elastically scales into existence
 * 0.4s : Lamp class outline draws itself (SVG stroke animation)
 * 0.7s : Lamp base & filaments draw themselves
 * 1.1s : Core light ignites (bloom + scale effect)
 * 1.4s : Text container fluidly wipes in via clip-path
 * 1.6s : Tagline smoothly glides up, spacing expands
 * 1.8s : Text shine animation begins looping
 * ========================================================= */

:root {
    --lumium-cyan: #00d4ff;
    --lumium-cyan-deep: #0055ff;
}

/* --- Fullscreen Overlay & Background --- */
.lumium-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: default;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: radial-gradient(circle at 50% 50%, #0a1122 0%, #000000 85%);
}

/* Deep Ambient Breathing Light */
.splash-ambient-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.03) 0%, rgba(0, 0, 0, 0) 65%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: breatheGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

/* --- Lockup Flex Container --- */
.splash-lockup-container {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.4s ease-out 0.1s forwards;
    z-index: 2;
}

/* --- Logo Ring Wrapper --- */
.splash-logo-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5);
    animation: popInElastic 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.splash-ring {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.2);
    z-index: 10;
    box-shadow:
        0 0 15px rgba(0, 212, 255, 0.1),
        inset 0 0 10px rgba(0, 212, 255, 0.05);
    animation: pulseRing 3s ease-in-out 1s infinite alternate;
    box-sizing: border-box;
    backdrop-filter: blur(2px);
}

/* --- Premium Lamp SVG Elements --- */
.splash-lamp {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.splash-lamp svg {
    width: 75%;
    height: 75%;
    overflow: visible;
}

/* SVG Desk Lamp Animations */
.svg-lamp-base {
    opacity: 0;
    transform: translateY(5px);
    animation: fadeInBase 0.4s ease-out 0.4s forwards;
}

.svg-arm-lower {
    stroke-dasharray: 45;
    stroke-dashoffset: 45;
    animation: drawStroke 0.4s ease-out 0.6s forwards;
}

.svg-arm-upper {
    stroke-dasharray: 45;
    stroke-dashoffset: 45;
    animation: drawStroke 0.4s ease-out 0.8s forwards;
}

.svg-joint {
    opacity: 0;
    animation: fadeIn 0.3s ease-out 0.8s forwards;
}

.svg-head-group {
    opacity: 0;
    transform-origin: 48px 28px;
    animation: popInHead 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.0s forwards;
}

.svg-beam,
.svg-floor-glow {
    opacity: 0;
    animation: fadeBeam 0.8s ease-out 1.2s forwards;
}

/* --- Text Reveal Wrapper --- */
.splash-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    /* God-level smooth wipe effect */
    clip-path: inset(0 100% 0 0);
    animation: wipeReveal 1s cubic-bezier(0.77, 0, 0.175, 1) 1.3s forwards;
}

.splash-text-content {
    padding-left: 28px;
    padding-right: 20px;
    white-space: nowrap;
    box-sizing: border-box;
}

/* --- Typography & Shimmer --- */
.splash-title {
    font-family: 'Pacifico', 'Brush Script MT', cursive;
    font-size: 4.2rem;
    line-height: 1;
    margin: 0;
    padding-bottom: 5px;
    /* Prevent descender clipping */
    /* Premium gradient text with animated shine */
    background: linear-gradient(110deg, #ffffff 0%, #ffffff 30%, #aae8ff 50%, #ffffff 70%, #ffffff 100%);
    background-size: 250% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    /* Reduced glow */
    animation: textShine 4s linear infinite 1.8s;
}

.splash-tagline {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0em;
    margin: 0 0 0 6px;
    color: rgba(0, 212, 255, 0.85);
    opacity: 0;
    transform: translateY(12px);
    animation: slideUpTagline 0.8s cubic-bezier(0.25, 1, 0.5, 1) 1.6s forwards;
}

/* =========================================================
 * KEYFRAMES
 * ========================================================= */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes popInElastic {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    40% {
        opacity: 1;
        transform: scale(1.03);
    }

    70% {
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawStroke {
    to {
        stroke-dashoffset: 0;
    }
}

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

@keyframes popInHead {
    0% {
        opacity: 0;
        transform: rotate(10deg) scale(0.5);
    }

    50% {
        opacity: 1;
        transform: rotate(-45deg) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: rotate(-36deg) scale(1);
    }
}

@keyframes fadeBeam {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes pulseRing {
    0% {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.05), inset 0 0 8px rgba(0, 212, 255, 0.02);
        border-color: rgba(0, 212, 255, 0.15);
    }

    100% {
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.25), inset 0 0 15px rgba(0, 212, 255, 0.1);
        border-color: rgba(0, 212, 255, 0.4);
    }
}

@keyframes wipeReveal {
    0% {
        clip-path: inset(-50% 100% -50% -50%);
    }

    100% {
        clip-path: inset(-50% -50% -50% -50%);
    }
}

@keyframes textShine {
    0% {
        background-position: 250% center;
    }

    100% {
        background-position: -50% center;
    }
}

@keyframes slideUpTagline {
    0% {
        opacity: 0;
        transform: translateY(12px);
        letter-spacing: 0em;
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0.2em;
    }
}

@keyframes breatheGlow {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

/* Fade out state controlled by JS */
.lumium-splash.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* =========================================================
 * KIOSK OPTIMIZATIONS (Pi Zero 2W)
 * ========================================================= */
@media screen and (max-width: 950px) and (max-height: 950px) {
    .lumium-splash {
        background: #000;
    }

    .splash-ambient-glow {
        display: none;
        /* Critical for Pi GPU */
    }

    .splash-logo-wrapper {
        width: 100px;
        height: 100px;
    }

    .splash-ring {
        box-shadow: none !important;
        border: 2px solid rgba(0, 212, 255, 0.6);
        animation: none;
        backdrop-filter: none;
    }

    svg path,
    svg rect,
    svg circle,
    svg polygon,
    svg ellipse {
        filter: none !important;
        /* Force remove heavy SVG dropshadows for Pi */
    }

    .splash-title {
        font-size: 2.8rem;
        text-shadow: none;
        background: none;
        /* Disable gradient text */
        color: #ffffff;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        animation: none;
        /* Disable text shine */
    }

    .splash-tagline {
        font-size: 0.7rem;
        margin-top: 4px;
    }
}