/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--brice-yellow), var(--brice-green));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Parallax Container */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    will-change: transform;
}

/* Slider hero: slow zoom-out Ken Burns on each active slide */
@keyframes brice-zoom-out {
    from { transform: scale(1.12); }
    to   { transform: scale(1.0); }
}

.swiper-slide-active .image-layer.parallax-bg {
    animation: brice-zoom-out 7s ease-out forwards;
}

/* Sticky Header Enhancement */
.main-header.sticky-active {
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.main-header.sticky-hidden {
    transform: translateY(-100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-bottom.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Delays */
.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; }

/* Floating Animation for Decorative Elements */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Scroll-triggered Counter Animation */
.counter-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.counter-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Content Animation Enhancement */
.hero-content-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-content-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Card Hover Effects */
.card-hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.card-hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Intersection Observer Fallback */
.no-js .fade-in-up,
.no-js .fade-in-left,
.no-js .fade-in-right,
.no-js .scale-in,
.no-js .slide-in-bottom {
    opacity: 1;
    transform: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .scroll-progress {
        transition: none;
    }
    
    .fade-in-up,
    .fade-in-left,
    .fade-in-right,
    .scale-in,
    .slide-in-bottom,
    .hero-content-animate,
    .counter-animate {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .float-animation {
        animation: none;
    }
    
    .card-hover-effect {
        transition: none;
    }
    
    .parallax-bg {
        background-attachment: scroll;
        transform: none !important;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
        height: 100%;
        top: 0;
    }

    .swiper-slide-active .image-layer.parallax-bg {
        animation: brice-zoom-out 7s ease-out forwards;
    }
    
    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        transform: translateY(20px);
    }
    
    .fade-in-left,
    .fade-in-right {
        transform: translateY(20px);
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Remove will-change after animation completes */
.animation-complete {
    will-change: auto;
}