/* Sawa Cultural Foundation - Animations & Transitions Utilities */

/* Text Reveal Animation Styles */
.text-reveal-container {
    overflow: hidden;
    position: relative;
    display: inline-block;
}

.text-reveal-line {
    display: block;
    transform: translateY(0);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Image Clip Path Reveals (GSAP managed, but fallback classes defined) */
.clip-reveal {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.clip-reveal.active {
    clip-path: inset(0 0 0 0);
}

/* Page Loader overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 9999;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-transition-overlay.loading {
    transform: scaleY(1);
    transform-origin: bottom;
}

/* Fade in elements scroll observer fallback */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Skeleton Loading utility */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, rgba(0,0,0,0.05) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
}

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

/* GPU Accelerated Scroll Animation Classes */
.gsap-reveal,
.gsap-parallax,
.hero-text,
.hero-image,
.card-bg-service-card,
.creative-stat-box,
.timeline-row-premium,
.contact-card-glass {
    will-change: transform, opacity;
}

/* Timeline Vertical Fill Line Animation Support */
.premium-timeline {
    position: relative;
}

.premium-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 24px; /* Align with node dots in RTL */
    width: 3px;
    background: rgba(234, 179, 8, 0.15);
    border-radius: 4px;
    z-index: 0;
}

.timeline-progress-line {
    position: absolute;
    top: 0;
    right: 24px;
    width: 3px;
    height: 0%;
    background: linear-gradient(180deg, var(--primary) 0%, #f59e0b 50%, #ca8a04 100%);
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.6);
    border-radius: 4px;
    z-index: 1;
    transition: height 0.1s linear;
}

/* Line Separators Scale & Glow Effect */
img[src*="line1.png"] {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
    will-change: transform, opacity;
}

/* Accessibility Support for Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

