/*
 * CRITICAL: Hide everything by default via CSS (no JS dependency).
 * This prevents ANY flash of content before JS runs.
 */
html:not(.nih-intro-done) main,
html:not(.nih-intro-done) header,
html:not(.nih-intro-done) footer {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/*
 * CRITICAL: Hide banner CTA and text on first visit
 * Only show AFTER intro completes
 */
 html:not(.nih-intro-done) [data-banner],
html:not(.nih-intro-done) .banner-h1,
html:not(.nih-intro-done) .banner-shimmer-done,
html:not(.nih-intro-done) .banner-shimmer-active {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
} 

/*
 * Banner text: HIDDEN by default via CSS.
 * Only becomes visible via banner-shimmer-active or banner-shimmer-done classes
 * Font weight and smoothing are consistent to prevent weight change after shimmer ends
 */
.banner-h1 {
    color: #fff;
    -webkit-text-fill-color: #fff;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: none;
    /* Keep font weight consistent throughout all states */
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CRITICAL: Keep banner text HIDDEN until shimmer animation is ready */
[data-banner]:not(.banner-shimmer-active):not(.banner-shimmer-done) .banner-h1 {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.shimmer {
    text-align: center;
    display: inline;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

/* Shimmer gradient — only applied when JS adds .banner-shimmer-active */
.banner-shimmer-active .banner-h1 {
    opacity: 1 !important;
    visibility: visible !important;
    /* Keep same font weight */
    font-weight: 300;
    background: #e0e0e0 linear-gradient(
        45deg,
        #e0e0e0 0%, #e0e0e0 38%,
        #FFEB87 44%, #FFE66B 48%, #fff 50%, #FFE66B 52%, #FFEB87 56%,
        #e0e0e0 62%, #e0e0e0 100%
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-repeat: no-repeat;
    background-position: 100% 100%;
}
.banner-shimmer-active.banner-shimmer-rest .banner-h1 {
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
}
.banner-shimmer-active .shimmer {
    -webkit-text-fill-color: inherit;
}

/* After shimmer completes — back to solid white, ALWAYS visible, SAME WEIGHT */
.banner-shimmer-done .banner-h1 {
    opacity: 1 !important;
    visibility: visible !important;
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    /* Keep same font weight as during shimmer */
    font-weight: 300 !important;
}

.banner-shimmer-done .shimmer {
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    /* Keep same font weight */
    font-weight: 300 !important;
}

/* ── Intro Overlay ── */
#nihilentIntro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2B2B2B 0%, #203B56 12.02%, #372F46 25%, #411F2E 40.38%, #332537 49.52%, #162A3F 64.42%, #1A1D1F 94.71%);
    pointer-events: all;
    will-change: opacity;
}

/* Texture loads immediately — no lazy loading */
#nihilentIntro::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: var(--hero-texture-bg) repeat;
    background-size: contain;
    mix-blend-mode: color-dodge;
    will-change: transform;
}

#nihilentIntro .intro-gif {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2vh 2vw;
}

/* ── Skip Intro Button ── */
.nih-skip-btn {
    position: absolute;
    bottom: 36px;
    right: 36px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 235, 135, 0.12);
    border: 1.5px solid #FFF;
    border-radius: 999px;
    color: #FFF;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0.4px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 0 0 rgba(255, 235, 135, 0.6);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    /* Fade in, then start pulse glow forever */
    animation:
        nihSkipFadeIn 0.6s ease 0.8s forwards,
        nihSkipPulse 2s ease-in-out 1.6s infinite;
}

/* Hover state — invert to solid yellow CTA */
.nih-skip-btn:hover {
    background: #FFEB87;
    color: #1A1D1F;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 235, 135, 0.4);
    animation:
        nihSkipFadeIn 0.6s ease 0.8s forwards;
    /* Pause the pulse on hover so it doesn't fight the hover state */
}

.nih-skip-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.nih-skip-btn svg {
    width: 14px;
    height: 14px;
    /* Arrow nudges right & back to draw the eye */
    animation: nihSkipNudge 1.4s ease-in-out 2s infinite;
}

@keyframes nihSkipFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Pulse glow — expanding yellow halo around the button */
@keyframes nihSkipPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 235, 135, 0.55);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(255, 235, 135, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 235, 135, 0);
    }
}

/* Arrow icon nudges forward to suggest "click here / move on" */
@keyframes nihSkipNudge {
    0%, 60%, 100% { transform: translateX(0); }
    30%          { transform: translateX(4px); }
}

@media (max-width: 640px) {
    .nih-skip-btn {
        bottom: 22px;
        right: 22px;
        padding: 10px 18px;
        font-size: 13px;
    }
}

.nih-hidden { display: none !important; }
body.nih-locked { overflow: hidden; }

.title-el {
    color: #ffffff;
}

.banner-title-wrap {
    text-align: center;
}