.site-preloader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    place-items: center;
    background: #fff;
    opacity: 1;
    transition: opacity 220ms ease;
}

html.is-page-loading,
html.is-page-leaving {
    overflow: hidden;
}

.is-page-loading .site-preloader,
.is-page-leaving .site-preloader {
    display: grid;
}

.is-page-leaving .site-preloader {
    opacity: 0;
    pointer-events: none;
}

.site-preloader-logo {
    display: block;
    width: clamp(calc((96 / var(--base-text-size)) * 1rem), 20vw, calc((144 / var(--base-text-size)) * 1rem));
    aspect-ratio: 1;
    animation: logo-glow 1.4s ease-in-out infinite;
}

.site-preloader-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes logo-glow {
    0%, 100% {
        opacity: 0.48;
        transform: scale(0.96);
        filter: drop-shadow(0 0 calc((2 / var(--base-text-size)) * 1rem) rgba(212, 175, 55, 0.08));
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
        filter: drop-shadow(0 0 calc((18 / var(--base-text-size)) * 1rem) rgba(212, 175, 55, 0.3));
    }
}

/* Content remains readable if JavaScript or the animation CDN is unavailable. */
html:not(.aos-enabled) [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* Preparing the hidden starting state must not itself run a transition. */
html.aos-preparing [data-aos] {
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .site-preloader-logo { animation: none; }
    .site-preloader { transition: none; }
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        pointer-events: auto !important;
    }
}
