/* ==========================================================================
   SKANDHA TOURS & TRAVELS CORE CSS ANIMATIONS
   ========================================================================== */

/* 1. PAGELOADER SYSTEM */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-obsidian);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    margin-bottom: 30px;
    animation: scaleUpDown 2.5s ease-in-out infinite;
}

.preloader-logo img {
    height: 120px;
    width: auto;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: rgba(197, 168, 128, 0.15);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.preloader-progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--color-gold) 0%, #ffffff 100%);
    position: absolute;
    top: 0;
    left: 0;
    animation: progressFill 3.5s cubic-bezier(0.1, 0.8, 0.1, 1) forwards;
}

/* 2. CORE KEYFRAMES */
@keyframes scaleUpDown {
    0%, 100% {
        transform: scale(0.95);
        filter: drop-shadow(0 0 10px rgba(197, 168, 128, 0.1));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 35px rgba(197, 168, 128, 0.45));
    }
}

@keyframes progressFill {
    0% { width: 0%; }
    40% { width: 35%; }
    70% { width: 75%; }
    100% { width: 100%; }
}

@keyframes shimmerGlow {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes ambientFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(1.5deg);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.25;
        transform: scale(1);
    }
    50% {
        opacity: 0.55;
        transform: scale(1.05);
    }
}

/* 3. TRANSITION UTILITIES & AMBIENT GRAPHICS */
.glow-spot {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-gold-dim) 0%, rgba(3, 7, 15, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(40px);
}

.float-element {
    animation: ambientFloat 8s ease-in-out infinite;
}

.spin-element {
    animation: spinSlow 40s linear infinite;
}

.glow-element {
    animation: pulseGlow 4s ease-in-out infinite;
}

/* 4. GSAP REVEAL PRESET STYLES (To prevent FOUC / Content Flash) */
.gsap-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: transform 0.1s, opacity 0.1s;
}

.gsap-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
}

.gsap-reveal-right {
    opacity: 0;
    transform: translateX(50px);
}

.gsap-reveal-scale {
    opacity: 0;
    transform: scale(0.92);
}

/* 5. TEXT EFFECT HOVERS */
.luxury-underline {
    display: inline-block;
    position: relative;
}

.luxury-underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: var(--transition-smooth);
}

.luxury-underline:hover::after {
    width: 100%;
}

/* Shimmer utility for luxury tags */
.shimmer-text {
    background: linear-gradient(90deg, #ffffff 0%, var(--color-gold) 50%, #ffffff 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmerGlow 6s linear infinite;
}
