/* ============================================
   WEB TECH STUDIOS - SCROLL ANIMATIONS
   Sleek, modern, and mobile-friendly
   ============================================ */

/* Base state for animated elements */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--delay, 0s);
}

/* Animated state */
.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Fade Up */
.fade-up {
    transform: translateY(30px);
}

/* Fade Down */
.fade-down {
    transform: translateY(-30px);
}

/* Slide from Left */
.slide-left {
    transform: translateX(-40px);
}

/* Slide from Right */
.slide-right {
    transform: translateX(40px);
}

/* Scale Up */
.scale-up {
    transform: scale(0.95);
}

/* Staggered children - use on parent container */
.stagger-children > .animate-on-scroll:nth-child(1) { --delay: 0s; }
.stagger-children > .animate-on-scroll:nth-child(2) { --delay: 0.1s; }
.stagger-children > .animate-on-scroll:nth-child(3) { --delay: 0.2s; }
.stagger-children > .animate-on-scroll:nth-child(4) { --delay: 0.3s; }
.stagger-children > .animate-on-scroll:nth-child(5) { --delay: 0.4s; }
.stagger-children > .animate-on-scroll:nth-child(6) { --delay: 0.5s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-on-scroll.visible {
        opacity: 1;
        transform: none;
    }
}

/* Mobile optimizations - shorter transitions */
@media (max-width: 768px) {
    .animate-on-scroll {
        transition-duration: 0.4s;
    }
    
    .fade-up {
        transform: translateY(20px);
    }
    
    .fade-down {
        transform: translateY(-20px);
    }
    
    .slide-left {
        transform: translateX(-25px);
    }
    
    .slide-right {
        transform: translateX(25px);
    }
}

