/* Madame Lunaris — layered scene, idle motion, orb glow (LAN-7 fas 1) */

.lunara-scene {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.lunara-stack {
    position: relative;
    display: block;
    width: 100%;
}

.lunara-layer-bg {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
}

.lunara-layer-table,
.lunara-layer-seer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.lunara-layer-seer { z-index: 1; }
.lunara-layer-table { z-index: 2; }

.lunara-fallback {
    display: block;
    width: 100%;
    height: auto;
}

.lunara-eyes-shut {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 3;
    opacity: 0;
    transition: opacity 1.8s ease;
    pointer-events: none;
}

.lunara-scene[data-lunara-idle="true"] .lunara-eyes-shut {
    animation: lunaraEyesIdle 11s ease-in-out infinite;
}

.lunara-scene.lunara-eyes-open .lunara-eyes-shut,
.lunara-scene[data-lunara-idle="false"] .lunara-eyes-shut.lunara-eyes-dismissed {
    opacity: 0 !important;
    animation: none;
}

.lunara-vignette {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

.lunara-orb-glow {
    position: absolute;
    top: 34%;
    left: 50%;
    width: 16%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(
        circle,
        rgba(200, 180, 255, 0.55) 0%,
        rgba(140, 110, 220, 0.2) 42%,
        transparent 72%
    );
    animation: lunaraOrbPulse 4.2s ease-in-out infinite;
}

@keyframes lunaraSeerBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.008); }
}

@keyframes lunaraEyesIdle {
    0%, 86%, 100% { opacity: 0; }
    90%, 94% { opacity: 1; }
}

@keyframes lunaraOrbPulse {
    0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(0.92); }
    50% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.12); }
}

.lunara-scene[data-lunara-idle="true"] .lunara-layer-seer {
    transform-origin: center 28%;
    animation: lunaraSeerBreathe 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .lunara-scene [class*="lunara-layer"],
    .lunara-scene .lunara-eyes-shut,
    .lunara-scene .lunara-orb-glow {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .lunara-scene[data-lunara-idle="true"] .lunara-eyes-shut {
        opacity: 0;
    }
}

html.lunara-reduced-motion .lunara-scene [class*="lunara-layer"],
html.lunara-reduced-motion .lunara-scene .lunara-eyes-shut,
html.lunara-reduced-motion .lunara-scene .lunara-orb-glow {
    animation: none !important;
}
