/**
 * Green AVIC - Smooth Animations
 * Making the site come alive!
 */

/* ==========================================
   SLIDE IN ANIMATIONS
   ========================================== */

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

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

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

/* Fade and Scale */
@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.animate-left {
    opacity: 0;
    animation: slideInLeft 0.8s ease forwards;
}

.animate-right {
    opacity: 0;
    animation: slideInRight 0.8s ease forwards;
}

.animate-up {
    opacity: 0;
    animation: slideInUp 0.8s ease forwards;
}

.animate-scale {
    opacity: 0;
    animation: fadeScale 0.8s ease forwards;
}

/* Stagger delays for multiple elements */
.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

/* ==========================================
   SCROLL REVEAL (Triggered on Scroll)
   ========================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.scroll-left {
    opacity: 0;
    transform: translateX(-80px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-left.revealed {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.scroll-right {
    opacity: 0;
    transform: translateX(80px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-right.revealed {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* ==========================================
   HOVER ANIMATIONS
   ========================================== */

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

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    position: relative;
    overflow: hidden;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.hover-glow:hover::before {
    left: 100%;
}

/* ==========================================
   SPECIAL TEXT EFFECTS
   ========================================== */

.text-gradient {
    background: linear-gradient(135deg, #4CAF50, #B8F542);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-highlight {
    position: relative;
    display: inline-block;
}

.text-highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(184, 245, 66, 0.3);
    z-index: -1;
}

/* ==========================================
   REDUCE MOTION (Accessibility)
   ========================================== */

/* ==========================================
   FEATURE BOX ENTRANCE ANIMATION
   ========================================== */

@keyframes featureBoxEntrance {
    0% {
        opacity: 0;
        transform: translateX(80px) scale(0.9);
    }
    60% {
        transform: translateX(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.about-features .feature-box.revealed {
    animation: featureBoxEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ==========================================
   IMPACT STAT CARD ANIMATIONS
   ========================================== */

@keyframes statCardPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.impact-stat-card {
    opacity: 0;
}

.impact-stat-card.revealed {
    animation: statCardPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ==========================================
   REDUCE MOTION (Accessibility)
   ========================================== */

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