/* =========================================================================
   SITE PRELOADER
   Full-screen splash shown while the page loads: brand mark, "Anop Mandal
   International" wordmark underneath, and a thin gold progress sweep.
   Uses the same --bg-black / --brand-primary tokens as the rest of the
   site (see style.css :root) so it reads as one continuous dark theme
   rather than a bolted-on widget.
   ========================================================================= */

html.is-preloading,
html.is-preloading body {
    overflow: hidden;
    height: 100%;
}

.site-preloader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-black, #111111);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.site-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Soft ambient gold glow behind the mark */
.site-preloader-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 42%, rgba(176, 141, 60, 0.16) 0%, rgba(17, 17, 17, 0) 70%);
    pointer-events: none;
}

.site-preloader-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 0 24px;
    text-align: center;
}

/* Logo + rotating ring */
.site-preloader-logo-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-preloader-logo {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(176, 141, 60, 0.35));
    animation: site-preloader-pulse 1.8s ease-in-out infinite;
}

.site-preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(176, 141, 60, 0.18);
    border-top-color: var(--brand-primary, #B08D3C);
    border-right-color: var(--brand-primary, #B08D3C);
    animation: site-preloader-spin 1.1s linear infinite;
}

/* Wordmark under the logo */
.site-preloader-text {
    margin: 0;
    color: var(--text-white, #FFFFFF);
    font-family: "Playfair Display", var(--font-primary, serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.92;
}

/* Thin indeterminate progress sweep */
.site-preloader-bar {
    display: block;
    width: 140px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.site-preloader-bar-fill {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-primary-dark, #8C6F2E), var(--brand-primary, #B08D3C));
    animation: site-preloader-sweep 1.3s ease-in-out infinite;
}

@keyframes site-preloader-spin {
    to { transform: rotate(360deg); }
}

@keyframes site-preloader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.85; }
}

@keyframes site-preloader-sweep {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(340%); }
}

@media (prefers-reduced-motion: reduce) {
    .site-preloader-logo,
    .site-preloader-ring,
    .site-preloader-bar-fill {
        animation: none;
    }
}
