/* ═══════════════════════════════════════════════════════════
   NEON MANDALA — Façade Loader (Strategy §2B: LCP)
   Lightweight CSS-only loading animation that mimics a 
   glowing mandala. Loads instantly before heavy WebGL assets.
   ═══════════════════════════════════════════════════════════ */

.facade-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: #030305;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), 
                visibility 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.facade-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ─── Mandala spinner (pure CSS — no images) ─── */
.facade-mandala {
    width: 120px;
    height: 120px;
    position: relative;
}

.facade-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 2px solid transparent;
}

.facade-ring:nth-child(1) {
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border-top-color: #a855f7;
    border-bottom-color: #ec4899;
    animation: facadeSpin 2s linear infinite;
}

.facade-ring:nth-child(2) {
    width: 90px;
    height: 90px;
    margin: -45px 0 0 -45px;
    border-left-color: #06b6d4;
    border-right-color: #a855f7;
    animation: facadeSpin 1.5s linear infinite reverse;
}

.facade-ring:nth-child(3) {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-top-color: #ec4899;
    border-bottom-color: #22d3ee;
    animation: facadeSpin 1s linear infinite;
}

.facade-ring:nth-child(4) {
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border-left-color: #a855f7;
    border-right-color: #f472b6;
    animation: facadeSpin 0.8s linear infinite reverse;
}

/* ─── Center glow dot ─── */
.facade-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    background: #a855f7;
    border-radius: 50%;
    box-shadow: 
        0 0 20px #a855f7,
        0 0 40px rgba(168, 85, 247, 0.5),
        0 0 60px rgba(168, 85, 247, 0.3);
    animation: facadePulse 1.5s ease-in-out infinite;
}

@keyframes facadeSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes facadePulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 20px #a855f7, 0 0 40px rgba(168,85,247,0.5);
    }
    50% { 
        transform: scale(1.3); 
        box-shadow: 0 0 30px #a855f7, 0 0 60px rgba(168,85,247,0.6), 0 0 80px rgba(168,85,247,0.3);
    }
}

/* ─── Loading text ─── */
.facade-text {
    margin-top: 32px;
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(168, 85, 247, 0.8);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: facadeTextPulse 2s ease-in-out infinite;
}

.facade-sub {
    margin-top: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

@keyframes facadeTextPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ─── Progress bar ─── */
.facade-progress {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.facade-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #ec4899, #06b6d4);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: facadeProgressIndeterminate 2s ease-in-out infinite;
}

@keyframes facadeProgressIndeterminate {
    0% { width: 0%; margin-left: 0; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}
