/* IranGlass — full-screen splash (from iranglass.php), scoped */

#iranglass-splash {
    --ig-onyx: #061a16;
    --ig-emerald-deep: #0d2e26;
    --ig-pine-royal: #1a4d3e;
    --ig-gold-antique: #a88b50;
    --ig-gold-champagne: #c7a869;
    --ig-pearl: #f0e4c4;
    --ig-cream-muted: rgba(232, 217, 176, 0.5);
    --ig-splash-duration: 3500ms;
    --ig-fadeout-duration: 800ms;
}

html.ig-page-loader-active,
html.ig-page-loader-active body {
    overflow: hidden;
    height: 100%;
}

#iranglass-splash.ig-splash {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        ellipse at top left,
        var(--ig-pine-royal) 0%,
        var(--ig-emerald-deep) 45%,
        var(--ig-onyx) 100%
    );
    animation: igSplashOut var(--ig-fadeout-duration) ease-in-out var(--ig-splash-duration) forwards;
    overflow: hidden;
}

#iranglass-splash.ig-splash::before,
#iranglass-splash.ig-splash::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(40px);
}

#iranglass-splash.ig-splash::before {
    top: -150px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(199, 168, 105, 0.18) 0%, transparent 70%);
    animation: igGlowPulse 6s ease-in-out infinite;
}

#iranglass-splash.ig-splash::after {
    bottom: -180px;
    left: -100px;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(46, 109, 89, 0.4) 0%, transparent 70%);
    animation: igGlowPulse 6s ease-in-out infinite 3s;
}

#iranglass-splash .ig-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    opacity: 0;
    transform: scale(0.96);
    animation: igLogoEntry 1400ms cubic-bezier(0.22, 1, 0.36, 1) 200ms forwards;
}

#iranglass-splash .ig-logo-wrap::before {
    content: "";
    position: absolute;
    inset: -60px -40px;
    background: radial-gradient(
        ellipse,
        rgba(199, 168, 105, 0.28) 0%,
        rgba(199, 168, 105, 0.1) 40%,
        transparent 70%
    );
    filter: blur(30px);
    z-index: 0;
    animation: igHaloBreathe 3.5s ease-in-out infinite 1.6s;
}

#iranglass-splash .ig-logo {
    position: relative;
    z-index: 2;
    width: clamp(200px, 55vw, 480px);
    height: auto;
    mix-blend-mode: screen;
    filter: hue-rotate(120deg) saturate(0.7) brightness(1.15)
        drop-shadow(0 0 24px rgba(199, 168, 105, 0.25)) drop-shadow(0 0 60px rgba(46, 109, 89, 0.3));
    animation: igLogoBlur 1400ms ease-out 200ms forwards;
}

#iranglass-splash .ig-logo--plain {
    mix-blend-mode: normal;
    filter: drop-shadow(0 0 20px rgba(199, 168, 105, 0.2)) drop-shadow(0 0 48px rgba(46, 109, 89, 0.25));
    animation: igLogoBlurPlain 1400ms ease-out 200ms forwards;
}

#iranglass-splash .ig-logo-text-fallback {
    position: relative;
    z-index: 2;
    font-family: var(--ig-font-fa, "Vazirmatn", system-ui), var(--ig-font-en, "Cormorant Garamond", serif), serif;
    font-size: clamp(1.75rem, 6vw, 3rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--ig-pearl);
    text-shadow: 0 0 40px rgba(199, 168, 105, 0.35);
}

html[dir="ltr"] #iranglass-splash .ig-logo-text-fallback {
    font-family: var(--ig-font-en, "Cormorant Garamond", serif), var(--ig-font-fa, "Vazirmatn", system-ui), serif;
}

#iranglass-splash .ig-shimmer {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(240, 228, 196, 0.18) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    animation: igShimmer 2.8s ease-in-out 1.8s infinite;
    pointer-events: none;
    mix-blend-mode: overlay;
}

#iranglass-splash .ig-progress {
    position: relative;
    width: 180px;
    height: 1px;
    background: rgba(199, 168, 105, 0.12);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    animation: igFadeIn 600ms ease 1200ms forwards;
}

#iranglass-splash .ig-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--ig-gold-antique) 30%,
        var(--ig-gold-champagne) 50%,
        var(--ig-pearl) 65%,
        var(--ig-gold-champagne) 80%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: igProgressSlide 2.2s ease-in-out 1400ms infinite;
}

#iranglass-splash .ig-tagline {
    margin-top: 18px;
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--ig-cream-muted);
    text-transform: uppercase;
    opacity: 0;
    animation: igFadeIn 800ms ease 1400ms forwards;
    font-family: var(--ig-font-en, "Inter", system-ui), sans-serif;
}

html[lang="fa-IR"] #iranglass-splash .ig-tagline,
html[dir="rtl"] #iranglass-splash .ig-tagline {
    font-family: var(--ig-font-fa, "Vazirmatn", system-ui), sans-serif;
    letter-spacing: 0.2em;
    text-transform: none;
}

#iranglass-splash.ig-hidden {
    display: none;
}

@keyframes igLogoEntry {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }
    60% {
        opacity: 1;
        transform: scale(1.01);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes igLogoBlur {
    0% {
        filter: blur(12px) hue-rotate(120deg) saturate(0.7) brightness(1.15)
            drop-shadow(0 0 24px rgba(199, 168, 105, 0.25)) drop-shadow(0 0 60px rgba(46, 109, 89, 0.3));
    }
    100% {
        filter: blur(0) hue-rotate(120deg) saturate(0.7) brightness(1.15)
            drop-shadow(0 0 24px rgba(199, 168, 105, 0.25)) drop-shadow(0 0 60px rgba(46, 109, 89, 0.3));
    }
}

@keyframes igLogoBlurPlain {
    0% {
        filter: blur(10px) drop-shadow(0 0 20px rgba(199, 168, 105, 0.2)) drop-shadow(0 0 48px rgba(46, 109, 89, 0.25));
    }
    100% {
        filter: blur(0) drop-shadow(0 0 20px rgba(199, 168, 105, 0.2)) drop-shadow(0 0 48px rgba(46, 109, 89, 0.25));
    }
}

@keyframes igHaloBreathe {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes igShimmer {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes igProgressSlide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes igGlowPulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes igFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes igSplashOut {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #iranglass-splash.ig-splash,
    #iranglass-splash.ig-splash *,
    #iranglass-splash.ig-splash *::before,
    #iranglass-splash.ig-splash *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 640px) {
    #iranglass-splash .ig-logo {
        width: 70vw;
    }
    #iranglass-splash .ig-progress {
        width: 140px;
    }
}
