/* ============================================
   XBuilder.ai - Animations CSS
   Modern animations for homepage
   ============================================ */

/* Base animation classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Fade In Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.animated {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Animations */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.animated {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Delay Classes */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Hover Effects */
.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, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

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

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(114, 82, 255, 0.5);
    transform: translateY(-2px);
}

/* Button Animations */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(114, 82, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(114, 82, 255, 0);
    }
}

.btn-glow {
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(114, 82, 255, 0.6), 0 0 50px rgba(170, 63, 255, 0.4);
    transform: translateY(-2px);
}

/* Card Animations */
.card-animated {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, box-shadow;
}

.card-animated:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Image Animations */
.img-fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.img-fade-in.animated {
    opacity: 1;
}

/* Text Animations */
.text-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.text-reveal.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient Background Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* Parallax Effect */
.parallax-slow {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Loading States */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 1000px 100%;
}

/* Checkmark Animation */
@keyframes checkmark-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.checkmark-animated {
    animation: checkmark-pop 0.5s ease-out;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .fade-in,
    .fade-in-up,
    .slide-in-left,
    .slide-in-right {
        transform: translateY(20px);
        transition-duration: 0.5s;
    }
    
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }
    
    .card-animated:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .fade-in,
    .fade-in-up,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        transition: opacity 0.2s ease;
        transform: none !important;
    }
    
    .btn-pulse {
        animation: none;
    }
    
    .gradient-animated {
        animation: none;
    }
}

/* Performance Optimizations */
.animate-on-scroll,
.fade-in,
.fade-in-up,
.slide-in-left,
.slide-in-right,
.scale-in {
    will-change: opacity, transform;
}

.animated {
    will-change: auto;
}


