/**
 * MB Vos Exclusive - Dynamic Background Effects
 * Adds life and movement to the luxury automotive experience
 */

/* Floating particles effect for added depth */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

/* Additional accent particles for more dynamic feel */
.particles-background .particle-accent-1,
.particles-background .particle-accent-2,
.particles-background .particle-accent-3 {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.particle-accent-1 {
    width: 800px;
    height: 800px;
    top: 20%;
    left: 60%;
    background: radial-gradient(circle, rgba(224, 220, 212, 0.15) 0%, rgba(200, 195, 185, 0.1) 30%, transparent 60%);
    animation: accentFloat1 16s infinite ease-in-out;
    filter: blur(35px);
}

.particle-accent-2 {
    width: 600px;
    height: 600px;
    bottom: 25%;
    left: 15%;
    background: radial-gradient(circle, rgba(224, 220, 212, 0.12) 0%, rgba(190, 185, 175, 0.08) 35%, transparent 65%);
    animation: accentFloat2 19s infinite ease-in-out;
    filter: blur(30px);
}

.particle-accent-3 {
    width: 700px;
    height: 700px;
    top: 60%;
    right: 20%;
    background: radial-gradient(circle, rgba(224, 220, 212, 0.14) 0%, rgba(195, 190, 180, 0.09) 32%, transparent 62%);
    animation: accentFloat3 22s infinite ease-in-out;
    filter: blur(38px);
}

@keyframes accentFloat1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translate(-100px, -80px) scale(1.2);
        opacity: 0.9;
    }
    50% {
        transform: translate(-50px, 100px) scale(1.1);
        opacity: 1;
    }
    75% {
        transform: translate(80px, 50px) scale(1.15);
        opacity: 0.95;
    }
}

@keyframes accentFloat2 {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    33% {
        transform: translate(120px, -60px) scale(1.15) rotate(120deg);
        opacity: 0.9;
    }
    66% {
        transform: translate(-80px, 90px) scale(1.25) rotate(240deg);
        opacity: 1;
    }
}

@keyframes accentFloat3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    30% {
        transform: translate(90px, 110px) scale(1.18);
        opacity: 0.95;
    }
    60% {
        transform: translate(-120px, -70px) scale(1.22);
        opacity: 1;
    }
}

/* Darker champagne pearl particles - dynamic and clearly visible */
.particles-background::before {
    content: '';
    position: absolute;
    width: 1400px;
    height: 1400px;
    top: -400px;
    left: -400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 220, 212, 0.18) 0%, rgba(195, 190, 180, 0.14) 20%, rgba(175, 170, 160, 0.09) 40%, rgba(155, 152, 142, 0.05) 60%, transparent 80%);
    animation: champagneFloat 9s infinite ease-in-out;
    filter: blur(40px);
}

.particles-background::after {
    content: '';
    position: absolute;
    width: 1600px;
    height: 1600px;
    bottom: -500px;
    right: -500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 220, 212, 0.2) 0%, rgba(190, 185, 175, 0.15) 22%, rgba(170, 165, 155, 0.11) 45%, rgba(150, 148, 138, 0.06) 65%, transparent 82%);
    animation: champagneFloat 11s infinite ease-in-out reverse;
    filter: blur(45px);
}

/* Dynamic champagne floating animation - clearly visible */
@keyframes champagneFloat {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    15% {
        transform: translate(150px, -120px) scale(1.15) rotate(30deg);
        opacity: 0.95;
    }
    30% {
        transform: translate(250px, -80px) scale(1.25) rotate(70deg);
        opacity: 1;
    }
    45% {
        transform: translate(320px, 50px) scale(1.3) rotate(120deg);
        opacity: 0.95;
    }
    60% {
        transform: translate(280px, 150px) scale(1.2) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translate(150px, 200px) scale(1.1) rotate(240deg);
        opacity: 0.95;
    }
    90% {
        transform: translate(50px, 100px) scale(1.05) rotate(300deg);
        opacity: 1;
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Wave background effect - PlayStation style */
.wave-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    overflow: hidden;
}

.wave-background::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(224, 220, 212, 0.12) 0%, rgba(190, 185, 175, 0.08) 38%, transparent 58%),
        radial-gradient(ellipse at 70% 60%, rgba(224, 220, 212, 0.11) 0%, rgba(180, 175, 165, 0.07) 42%, transparent 62%);
    animation: waveRotate 14s linear infinite;
}

.wave-background::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(ellipse at 60% 30%, rgba(224, 220, 212, 0.13) 0%, rgba(185, 180, 170, 0.09) 40%, transparent 60%),
        radial-gradient(ellipse at 40% 70%, rgba(224, 220, 212, 0.1) 0%, rgba(175, 170, 160, 0.07) 44%, transparent 64%);
    animation: waveRotate 18s linear infinite reverse;
}

/* Rotating wave animation */
@keyframes waveRotate {
    0% {
        transform: rotate(0deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1.1);
    }
}

/* Subtle parallax effect on scroll */
@media (min-width: 768px) {
    .parallax-section {
        position: relative;
        overflow: hidden;
    }
    
    .parallax-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: 0;
        width: 100%;
        height: 200%;
        background: radial-gradient(ellipse at center, rgba(173, 174, 156, 0.05) 0%, transparent 70%);
        transform: translateZ(-1px) scale(2);
        z-index: -1;
    }
}

/* Animated gradient borders for luxury feel */
.luxury-border {
    position: relative;
    overflow: hidden;
}

.luxury-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        #adae9c,
        #e0dcd4,
        #adae9c,
        #8a8b79,
        #adae9c
    );
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientRotate 8s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.luxury-border:hover::before {
    opacity: 0.3;
}

@keyframes gradientRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Glowing accent effect */
.glow-accent {
    position: relative;
}

.glow-accent::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 220, 212, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.6s ease;
}

.glow-accent:hover::after {
    width: 300px;
    height: 300px;
    opacity: 1;
}

/* Ripple effect on click */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(224, 220, 212, 0.5);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.ripple-effect:active::before {
    animation: ripple 0.6s ease-out;
}

/* Subtle breathing animation for emphasis */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

.breathe-animation {
    animation: breathe 4s ease-in-out infinite;
}

/* Sheen effect on hover */
.sheen-effect {
    position: relative;
    overflow: hidden;
}

.sheen-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: skewX(-25deg);
    transition: left 0.8s ease;
}

.sheen-effect:hover::before {
    left: 150%;
}

/* Depth shadow on scroll */
.scroll-shadow {
    transition: box-shadow 0.3s ease;
}

.scroll-shadow.is-scrolled {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Gradient text effect for headings */
.gradient-text {
    background: linear-gradient(135deg, #adae9c 0%, #8a8b79 50%, #adae9c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Glass morphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Ambient light effect */
.ambient-light {
    position: relative;
}

.ambient-light::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(173, 174, 156, 0.1) 0%,
        transparent 50%
    );
    animation: ambientPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ambientPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    33% {
        opacity: 0.8;
        transform: scale(1.12);
    }
    66% {
        opacity: 0.6;
        transform: scale(1.08);
    }
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .particles-background::before,
    .particles-background::after {
        animation-duration: 20s; /* Slightly slower on mobile for performance */
    }
    
    .particle-accent-1,
    .particle-accent-2,
    .particle-accent-3 {
        animation-duration: 25s; /* Slower accent animations on mobile */
    }
    
    .wave-background::before,
    .wave-background::after {
        animation-duration: 20s; /* Slower waves on mobile */
    }
    
    .luxury-border::before {
        display: none; /* Remove heavy border effects on mobile */
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
