/* ==========================================================================
   Animations - Reveal Effects, RTL Support, Accessibility
   ========================================================================== */

/* Smooth reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.5, 0, 0, 1), transform 1s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

/* Performance: will-change hints */
.animate-float {
    will-change: transform;
}

/* Mobile: disable ALL animations for instant loading */
@media (max-width: 768px) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    [class*="animate-"] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Accessibility: 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;
    }
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
}

/* Keep nav in LTR for RTL languages */
html[dir="rtl"] nav,
html[dir="rtl"] nav * {
    direction: ltr;
}

html[dir="rtl"] kbd {
    direction: ltr;
    display: inline-block;
}
