/* Плитки бесшовные: слой сдвигается ровно на размер плитки (512/640/768 px), в кадрах без var(), чтобы анимацию вёл композитор */
.new-year-snow {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    overflow: hidden;
    pointer-events: none;
}

.new-year-snow__sway {
    position: absolute;
    inset: 0;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    will-change: transform;
}

.new-year-snow__sway--0 {
    animation-name: new-year-snow-sway-0;
    animation-duration: 7s;
}

.new-year-snow__sway--1 {
    animation-name: new-year-snow-sway-1;
    animation-duration: 5s;
}

.new-year-snow__sway--2 {
    animation-name: new-year-snow-sway-2;
    animation-duration: 4s;
}

.new-year-snow__layer {
    position: absolute;
    bottom: 0;
    background-repeat: repeat;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

.new-year-snow__layer--0 {
    top: -512px;
    right: -15px;
    left: -15px;
    background-image: url('../images/new-year/snow-layer-0.webp');
    background-size: 512px 512px;
    animation-name: new-year-snow-fall-0;
    animation-duration: 14.6s;
    animation-delay: -3s;
}

.new-year-snow__layer--1 {
    top: -640px;
    right: -25px;
    left: -25px;
    background-image: url('../images/new-year/snow-layer-1.webp');
    background-size: 640px 640px;
    animation-name: new-year-snow-fall-1;
    animation-duration: 8.5s;
    animation-delay: -5s;
}

.new-year-snow__layer--2 {
    top: -768px;
    right: -40px;
    left: -40px;
    background-image: url('../images/new-year/snow-layer-2.webp');
    background-size: 768px 768px;
    animation-name: new-year-snow-fall-2;
    animation-duration: 5.9s;
    animation-delay: -1s;
}

@keyframes new-year-snow-fall-0 {
    to {
        transform: translate3d(0, 512px, 0);
    }
}

@keyframes new-year-snow-fall-1 {
    to {
        transform: translate3d(0, 640px, 0);
    }
}

@keyframes new-year-snow-fall-2 {
    to {
        transform: translate3d(0, 768px, 0);
    }
}

@keyframes new-year-snow-sway-0 {
    from {
        transform: translate3d(-15px, 0, 0);
    }

    to {
        transform: translate3d(15px, 0, 0);
    }
}

@keyframes new-year-snow-sway-1 {
    from {
        transform: translate3d(-25px, 0, 0);
    }

    to {
        transform: translate3d(25px, 0, 0);
    }
}

@keyframes new-year-snow-sway-2 {
    from {
        transform: translate3d(-40px, 0, 0);
    }

    to {
        transform: translate3d(40px, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .new-year-snow {
        display: none;
    }
}
