/* ============================================
   Animations & Transitions
   ============================================ */

/* Scroll Animations */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Delays */
.animate-in:nth-child(1) { transition-delay: 0ms; }
.animate-in:nth-child(2) { transition-delay: 100ms; }
.animate-in:nth-child(3) { transition-delay: 200ms; }
.animate-in:nth-child(4) { transition-delay: 300ms; }
.animate-in:nth-child(5) { transition-delay: 400ms; }
.animate-in:nth-child(6) { transition-delay: 500ms; }
.animate-in:nth-child(7) { transition-delay: 600ms; }
.animate-in:nth-child(8) { transition-delay: 700ms; }

/* Hero Specific Animations */
.hero .animate-in:nth-child(1) { transition-delay: 200ms; }
.hero .animate-in:nth-child(2) { transition-delay: 400ms; }
.hero .animate-in:nth-child(3) { transition-delay: 600ms; }
.hero .animate-in:nth-child(4) { transition-delay: 800ms; }
.hero .animate-in:nth-child(5) { transition-delay: 1000ms; }

/* Parallax Container */
[data-parallax] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Glow Pulse Animation */
@keyframes glowPulse {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
}

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

.float {
    animation: float 6s ease-in-out infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Typing Cursor */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--color-accent-primary);
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Slide Up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Fade In */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Counter Animation Class */
.counting {
    transition: none;
}

/* Performance Bars Animation */
.perf-fill {
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.perf-fill.animated {
    width: var(--width);
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

    .animate-in {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
