/* Qish bezaklari: qor, logodagi Qorbobo shapkasi va archa chiroqlari */

/* Logodagi "UZ" qutisi burchagiga Qorbobo shapkasi (o'lchamlar logoga nisbatan, telefonda ham moslashadi) */
.winter .header__middle {
    padding-top: 18px; /* shapka uchun joy: tepasi kesilmasin */
}

.winter .header__logo > a {
    position: relative;
}

    .winter .header__logo > a::before {
        content: "";
        position: absolute;
        z-index: 2;
        top: -24%;
        left: -5%;
        width: 17%;
        aspect-ratio: 150 / 120;
        background: url("../images/holiday/santa-hat.svg") no-repeat center / contain;
        transform: rotate(-18deg);
        transform-origin: 10% 90%;
        pointer-events: none;
        animation: hatSway 4s ease-in-out infinite;
    }

    /* Shapka yonida jimirlaydigan yulduzchalar */
    .winter .header__logo > a::after {
        content: "";
        position: absolute;
        z-index: 2;
        top: -32%;
        left: 13%;
        width: 8%;
        aspect-ratio: 1;
        background: url("../images/holiday/sparkle.svg") no-repeat center / contain;
        pointer-events: none;
        animation: sparkleTwinkle 2.6s ease-in-out infinite;
    }

    /* Logo ustiga sichqoncha olib borilsa shapka silkinadi */
    .winter .header__logo > a:hover::before {
        animation: hatWiggle .7s ease-in-out;
    }

/* Menyu paneli ustida archa chiroqlari: chiroqlar to'lqinsimon yonib yuguradi */
@media (min-width: 992px) {
    .winter .header__bottom {
        position: relative;
    }

        .winter .header__bottom::before,
        .winter .header__bottom::after {
            content: "";
            position: absolute;
            z-index: 3;
            top: -3px;
            left: 0;
            right: 0;
            height: 24px;
            background: url("../images/holiday/garland.svg") repeat-x 0 0 / 96px 24px;
            pointer-events: none;
        }

        .winter .header__bottom::after {
            background-image: url("../images/holiday/garland-glow.svg");
            -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 24%, transparent 36%, transparent 50%, #000 62%, #000 74%, transparent 86%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 24%, transparent 36%, transparent 50%, #000 62%, #000 74%, transparent 86%);
            -webkit-mask-size: 768px 100%;
            mask-size: 768px 100%;
            /* 32 qadam = har qadamda bitta chiroq: haqiqiy girlyandadek, sekundiga ~9 marta chiziladi */
            animation: garlandChase 3.5s steps(32) infinite;
        }
}

/* Qor yog'ishi: sahifa ustida, lekin bosishlarga xalaqit bermaydi */
.snow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

@keyframes hatSway {
    0%, 100% { transform: rotate(-18deg); }
    50% { transform: rotate(-12deg); }
}

@keyframes hatWiggle {
    0%, 100% { transform: rotate(-18deg); }
    30% { transform: rotate(-26deg); }
    65% { transform: rotate(-10deg); }
}

@keyframes sparkleTwinkle {
    0%, 100% { opacity: 0; transform: scale(.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.1) rotate(25deg); }
}

@keyframes garlandChase {
    from { -webkit-mask-position: 0 0; mask-position: 0 0; }
    to { -webkit-mask-position: 768px 0; mask-position: 768px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .winter .header__logo > a::before,
    .winter .header__logo > a::after,
    .winter .header__bottom::after {
        animation: none;
    }
}
