/* ========================================
   PARALLAX EFFECTS
   ======================================== */

.parallax-element {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Smooth scrolling sections */
section {
    position: relative;
    will-change: transform;
}

/* Background parallax layers */
.intro-section,
.teammates-section,
.benefits-section,
.contact-section {
    position: relative;
    overflow: hidden;
}

.intro-section::before,
.teammates-section::before,
.benefits-section::before,
.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(158, 234, 1, 0.1) 0%, transparent 50%);
    opacity: 0.5;
    will-change: transform;
}

/* Hero section parallax background */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(158, 234, 1, 0.05) 0%, transparent 70%);
    animation: heroGlow 20s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(10%, 10%) scale(1.1);
        opacity: 0.5;
    }
}

/* Floating animation for mascot cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.mascot-card {
    animation: float 3s ease-in-out infinite;
}

.mascot-card:nth-child(2) {
    animation-delay: 0.5s;
}

.mascot-card:nth-child(3) {
    animation-delay: 1s;
}

.mascot-card:nth-child(4) {
    animation-delay: 1.5s;
}

.mascot-card:nth-child(5) {
    animation-delay: 2s;
}

.mascot-card:nth-child(6) {
    animation-delay: 2.5s;
}

/* Fade in on scroll animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stats counter animation */
.stat-value {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Testimonial cards stagger animation */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(1) {
    transition-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    transition-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* Step cards entrance animation */
.step-card {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.step-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.step-card:nth-child(1) {
    transition-delay: 0.1s;
}

.step-card:nth-child(2) {
    transition-delay: 0.2s;
}

.step-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* Smooth reveal for images */
.gorilla-standing img,
.family-image img {
    transform: scale(0.95);
    transition: opacity 1s ease, transform 1s ease;
}

.gorilla-standing img.visible,
.family-image img.visible {
    opacity: 1;
    transform: scale(1);
}

/* Parallax speed variations */
[data-speed="0.3"] {
    transform: translateY(calc(var(--scroll-speed, 0) * 0.3px));
}

[data-speed="0.5"] {
    transform: translateY(calc(var(--scroll-speed, 0) * 0.5px));
}

[data-speed="0.7"] {
    transform: translateY(calc(var(--scroll-speed, 0) * 0.7px));
}

/* Smooth transitions for all interactive elements */
.mascot-card,
.testimonial-card,
.step-card,
.stat-card {
    will-change: transform;
}

/* Contact form fields animation */
.form-group {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.6s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navbar entrance */
.navbar {
    transform: translateY(-100%);
    animation: slideDown 0.6s ease forwards;
}

@keyframes slideDown {
    to {
        transform: translateY(0);
    }
}

/* Hero content entrance */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 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;
    }
    
    .parallax-element {
        transform: none !important;
    }
}
