/* ============================================
   Animations — Keyframes & Utility Classes
   ============================================ */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

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

/* Fade Up */
@keyframes fadeUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Fade Down */
@keyframes fadeDown {
    from { 
        opacity: 0; 
        transform: translateY(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Fade Left */
@keyframes fadeLeft {
    from { 
        opacity: 0; 
        transform: translateX(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Fade Right */
@keyframes fadeRight {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

/* Rotate In */
@keyframes rotateIn {
    from { 
        opacity: 0; 
        transform: rotate(-10deg) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: rotate(0) scale(1); 
    }
}

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

/* Float with slight rotation */
@keyframes floatRotate {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-15px) rotate(2deg); 
    }
    75% { 
        transform: translateY(-10px) rotate(-1deg); 
    }
}

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

/* Pulse */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05); 
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 140, 160, 0.2); 
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 140, 160, 0.4); 
    }
}

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

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

/* Bounce In */
@keyframes bounceIn {
    0% { 
        opacity: 0; 
        transform: scale(0.3); 
    }
    50% { 
        transform: scale(1.05); 
    }
    70% { 
        transform: scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Slide In From Bottom */
@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(60px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-60px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(60px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Typewriter */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

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

/* Spin */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Wave */
@keyframes wave {
    0% { transform: translateY(0); }
    25% { transform: translateY(-5px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(5px); }
    100% { transform: translateY(0); }
}

/* Particle Float */
@keyframes particleFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.3; 
    }
    25% { 
        transform: translate(30px, -40px) scale(1.2); 
        opacity: 0.6; 
    }
    50% { 
        transform: translate(-20px, -20px) scale(0.9); 
        opacity: 0.4; 
    }
    75% { 
        transform: translate(10px, -50px) scale(1.1); 
        opacity: 0.5; 
    }
}

/* Progress Bar Fill */
@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Counter Tick */
@keyframes counterTick {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* Morphing Shape */
@keyframes morphShape {
    0%, 100% { 
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; 
    }
    50% { 
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; 
    }
}

/* Underline Grow */
@keyframes underlineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

/* Animation base */
.animate {
    animation-fill-mode: both;
}

/* Fade animations */
.animate-fadeIn { animation-name: fadeIn; }
.animate-fadeUp { animation-name: fadeUp; }
.animate-fadeDown { animation-name: fadeDown; }
.animate-fadeLeft { animation-name: fadeLeft; }
.animate-fadeRight { animation-name: fadeRight; }

/* Scale animations */
.animate-scaleIn { animation-name: scaleIn; }
.animate-bounceIn { animation-name: bounceIn; }

/* Slide animations */
.animate-slideInUp { animation-name: slideInUp; }
.animate-slideInLeft { animation-name: slideInLeft; }
.animate-slideInRight { animation-name: slideInRight; }

/* Special animations */
.animate-float { animation-name: float; animation-iteration-count: infinite; }
.animate-pulse { animation-name: pulse; animation-iteration-count: infinite; }
.animate-bounce { animation-name: bounce; animation-iteration-count: infinite; }
.animate-spin { animation-name: spin; animation-iteration-count: infinite; }
.animate-shake { animation-name: shake; }
.animate-heartbeat { animation-name: heartbeat; animation-iteration-count: infinite; }

/* Duration */
.duration-300 { animation-duration: 0.3s; }
.duration-500 { animation-duration: 0.5s; }
.duration-700 { animation-duration: 0.7s; }
.duration-1000 { animation-duration: 1s; }
.duration-1500 { animation-duration: 1.5s; }
.duration-2000 { animation-duration: 2s; }
.duration-3000 { animation-duration: 3s; }

/* Delay */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }
.delay-700 { animation-delay: 0.7s; }
.delay-1000 { animation-delay: 1s; }

/* Timing functions */
.ease-linear { animation-timing-function: linear; }
.ease-in { animation-timing-function: ease-in; }
.ease-out { animation-timing-function: ease-out; }
.ease-in-out { animation-timing-function: ease-in-out; }
.ease-smooth { animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.ease-bounce { animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.ease-expo { animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

/* Iteration count */
.once { animation-iteration-count: 1; }
.infinite { animation-iteration-count: infinite; }

/* Scroll-triggered reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 80, 120, 0.12);
}

/* Hover glow effect */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 140, 160, 0.3);
}

/* Hover scale effect */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Magnetic hover (CSS only approximation) */
.magnetic {
    transition: transform 0.2s ease;
}

/* Glass morphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Text gradient */
.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shimmer loading effect */
.shimmer {
    background: linear-gradient(
        90deg,
        var(--color-light-gray) 25%,
        #f0f0f0 50%,
        var(--color-light-gray) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
