/**
 * Component: Festive Touches
 * 
 * CSS-only falling snow effect, floating decorative elements,
 * holiday sparkle animations. Fully respects prefers-reduced-motion.
 */

/* =========================================================================
   CSS-Only Falling Snow
   Lightweight pseudo-element snow layers with zero JS overhead
   ========================================================================= */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
    overflow: hidden;
}

.snow-layer {
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: repeat;
    background-position: 0 0;
    pointer-events: none;
}

/* Layer 1: Fine gentle snow */
.snow-layer-1 {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2.5px 2.5px at 100px 150px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 200px 80px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 300px 240px, rgba(255, 255, 255, 0.5), transparent);
    background-size: 350px 350px;
    animation: snowfall 16s linear infinite;
    opacity: 0.65;
}

/* Layer 2: Soft blurred snowflakes */
.snow-layer-2 {
    background-image: 
        radial-gradient(3px 3px at 50px 90px, rgba(255, 248, 238, 0.5), transparent),
        radial-gradient(3.5px 3.5px at 180px 280px, rgba(255, 248, 238, 0.4), transparent),
        radial-gradient(2.5px 2.5px at 320px 140px, rgba(255, 248, 238, 0.5), transparent);
    background-size: 400px 400px;
    animation: snowfall 24s linear infinite;
    animation-delay: -8s;
    opacity: 0.45;
}

@keyframes snowfall {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* Floating animation on hero cards */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes float-alt {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-7px) rotate(-1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element-alt {
    animation: float-alt 5s ease-in-out infinite;
    animation-delay: -2s;
}

/* Disable heavy animation on mobile and reduced-motion */
@media (max-width: 768px) {
    .snow-layer-2 {
        display: none; /* Keep only layer 1 for performance */
    }
    .floating-element, .floating-element-alt {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .snow-container {
        display: none !important;
    }
    .floating-element, .floating-element-alt {
        animation: none !important;
    }
}
