/* Intro overlay — černá → fade aurory → text */

html.intro-boot,
body.intro-boot,
html:has(body.intro-sequence:not(.intro-aurora-fade)),
body.intro-sequence:not(.intro-aurora-fade) {
    background: #000 !important;
}

body.intro-boot .site-shell {
    opacity: 0;
    visibility: hidden;
}

body.intro-boot .intro-curtain {
    display: flex;
    opacity: 1;
}

/* Aurora běží, ale neviditelná do fade */
body.intro-sequence:not(.intro-aurora-fade) #aurora-canvas,
body.intro-sequence:not(.intro-aurora-fade) .aurora-fallback,
body.intro-boot #aurora-canvas,
body.intro-boot .aurora-fallback {
    opacity: 0;
}

body.page-home #aurora-canvas,
body.page-home .aurora-fallback:not([hidden]) {
    transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.intro-aurora-fade #aurora-canvas,
body.intro-aurora-fade .aurora-fallback:not([hidden]) {
    opacity: 1;
}

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 50000;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
}

.intro-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-curtain {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
    opacity: 1;
    pointer-events: none;
}

.intro-curtain.is-on,
.intro-curtain.is-fading {
    display: flex;
}

.intro-curtain.is-fading,
.intro-curtain.is-entering {
    display: flex;
    will-change: opacity;
}

.intro-brand {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 900;
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

.intro-brand span {
    color: #64ffda;
    text-shadow: 0 0 14px rgba(100, 255, 218, 0.55);
}

body.intro-exiting .intro-brand {
    opacity: 0;
    visibility: hidden;
}

body.intro-sequence .site-shell {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.intro-reveal .site-shell {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.intro-sequence .animate-in {
    opacity: 0 !important;
    animation: none !important;
}

body.intro-reveal .animate-in {
    animation: floatUp 0.85s ease-out forwards;
}

body.intro-reveal .animate-in.delay-1 { animation-delay: 0.08s; }
body.intro-reveal .animate-in.delay-2 { animation-delay: 0.22s; }
body.intro-reveal .animate-in.delay-3 { animation-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
    body.intro-sequence .site-shell,
    body.intro-reveal .site-shell,
    body.intro-boot .site-shell {
        opacity: 1 !important;
        visibility: visible !important;
    }

    .intro-overlay {
        display: none !important;
    }

    body.page-home #aurora-canvas,
    body.page-home .aurora-fallback {
        opacity: 1 !important;
        transition: none !important;
    }
}
