/* Scroll Parallax & Animations */

/* Fade in on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for interactive elements */
.hero-content,
.about-content,
.product-card,
.why-card,
.contact-form {
    animation: fadeInUp 0.8s ease-out;
}

/* Parallax effect for hero image */
.hero-visual {
    transition: transform 0.3s ease-out;
}

/* Code overlay typing effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.code-overlay {
    animation: fadeInUp 1s ease-out 0.5s both;
}

/* Hover effects with smooth transitions */
.product-card,
.why-card,
.btn {
    transition: all var(--transition-base);
}

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

.title-line {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Link hover animations */
.mega-column a,
.footer-column a {
    position: relative;
    transition: all var(--transition-fast);
}

.mega-column a::after,
.footer-column a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-secondary);
    transition: width var(--transition-base);
}

.mega-column a:hover::after,
.footer-column a:hover::after {
    width: 100%;
}

/* Stat counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    animation: countUp 0.6s ease-out;
}

.stat-item:nth-child(1) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.4s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.6s;
}

/* Feature item stagger animation */
.feature-item {
    animation: fadeInUp 0.8s ease-out;
}

.feature-item:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* Product card stagger */
.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Why card stagger */
.why-card:nth-child(1) {
    animation-delay: 0.1s;
}

.why-card:nth-child(2) {
    animation-delay: 0.2s;
}

.why-card:nth-child(3) {
    animation-delay: 0.3s;
}

.why-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Form input focus animation */
.form-group input:focus,
.form-group textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Button press effect */
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
