/* ========================================
   Animations & Scroll Effects
   ======================================== */

/* --- Scroll Reveal Animations --- */
[data-aos] {
    opacity: 0;
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Fade Up */
[data-aos="fade-up"] {
    transform: translateY(40px);
}
[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* Fade Down */
[data-aos="fade-down"] {
    transform: translateY(-40px);
}
[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

/* Fade Left (RTL aware) */
[data-aos="fade-left"] {
    transform: translateX(40px);
}
[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

/* Fade Right (RTL aware) */
[data-aos="fade-right"] {
    transform: translateX(-40px);
}
[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

/* Zoom In */
[data-aos="zoom-in"] {
    transform: scale(0.85);
}
[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* Flip Up */
[data-aos="flip-up"] {
    transform: perspective(800px) rotateX(15deg);
    transform-origin: bottom center;
}
[data-aos="flip-up"].aos-animate {
    transform: perspective(800px) rotateX(0);
}

/* Slide Reveal */
[data-aos="slide-reveal"] {
    clip-path: inset(0 100% 0 0);
}
[data-aos="slide-reveal"].aos-animate {
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.8s var(--ease) !important;
}

/* --- Stagger Delay Classes --- */
[data-delay="100"] { transition-delay: 0.1s !important; }
[data-delay="200"] { transition-delay: 0.2s !important; }
[data-delay="300"] { transition-delay: 0.3s !important; }
[data-delay="400"] { transition-delay: 0.4s !important; }
[data-delay="500"] { transition-delay: 0.5s !important; }

/* --- Floating Animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.animate-float {
    animation: float 4s var(--ease) infinite;
}

/* --- Pulse Glow --- */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(var(--gold-rgb), 0);
    }
}

.animate-pulse-glow {
    animation: pulseGlow 2s infinite;
}

/* --- Gradient Text Animation --- */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background: linear-gradient(270deg, var(--gold-light), var(--gold), var(--gold-dark), var(--gold));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

/* --- Line Draw --- */
@keyframes lineDraw {
    from { width: 0; }
    to { width: 100%; }
}

.animate-line-draw::after {
    animation: lineDraw 1s var(--ease) forwards;
}

/* --- Tilt 3D Effect (applied via JS) --- */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card .tilt-inner {
    transition: transform 0.1s linear;
    transform-style: preserve-3d;
}

/* --- Smooth Parallax (applied via JS) --- */
[data-parallax] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* --- Magnetic Hover Cursor --- */
.magnetic-wrap {
    display: inline-block;
    position: relative;
}

/* --- Text Typing Cursor --- */
.typing-cursor::after {
    content: '|';
    display: inline-block;
    color: var(--gold);
    animation: blink 0.7s step-end infinite;
    margin-right: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Card Shine Effect --- */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(var(--white-rgb), 0.08) 50%,
        transparent 100%
    );
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.shine-effect:hover::after {
    transform: rotate(30deg) translateX(100%);
}

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

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}
