/* 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;
    }

@media (min-width: 992px) {
    .winter .header__bottom {
        position: relative;
    }
}

.garland {
    position: absolute;
    z-index: 3;
    top: -3px;
    left: 0;
    right: 0;
    height: 56px;
    overflow: hidden;
    pointer-events: none;
}

.garland__wire {
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
}

    .garland__wire path {
        fill: none;
        stroke-linecap: round;
    }

    .garland__wire .garland__cord {
        stroke: #0b2215;
        stroke-width: 2;
    }

    .garland__wire .garland__twist {
        stroke: rgba(160, 210, 175, .4);
        stroke-width: .8;
        stroke-dasharray: 2 3;
    }

.garland__bulb {
    position: absolute;
    width: 10px;
    margin-left: -5px;
    transform-origin: 50% 0;
    will-change: transform;
}

.garland__sway {
    display: block;
    transform-origin: 50% 0;
    animation: garlandSway 3.2s ease-in-out infinite;
    animation-delay: var(--sway, 0s);
}

.garland__cap {
    display: block;
    width: 6px;
    height: 5px;
    margin: 0 auto;
    border-radius: 1.5px 1.5px 1px 1px;
    background: linear-gradient(90deg, #2d322f, #a3aca6 45%, #262a28);
}

.garland__glass {
    position: relative;
    display: block;
    width: 10px;
    height: 15px;
    margin-top: -1px;
    border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
    background: var(--dim);
}

.garland__light {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 35% 28%, #fff 0, rgba(255, 255, 255, .8) 14%, rgba(255, 255, 255, 0) 40%), var(--lit);
    animation: garlandTwinkle 2.8s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * -.18s);
}

    .garland__light::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 36px;
        height: 36px;
        margin: -18px 0 0 -18px;
        border-radius: 50%;
        background: radial-gradient(closest-side, var(--halo), rgba(0, 0, 0, 0));
    }

.garland__bulb--red {
    --lit: #ff4545;
    --dim: #6b1919;
    --halo: rgba(255, 69, 69, .55);
}

.garland__bulb--gold {
    --lit: #ffd447;
    --dim: #6e5515;
    --halo: rgba(255, 212, 71, .5);
}

.garland__bulb--green {
    --lit: #42e684;
    --dim: #155a33;
    --halo: rgba(66, 230, 132, .5);
}

.garland__bulb--blue {
    --lit: #4ab6ff;
    --dim: #16406c;
    --halo: rgba(74, 182, 255, .55);
}

.garland__bulb--pink {
    --lit: #ff66d6;
    --dim: #661d56;
    --halo: rgba(255, 102, 214, .5);
}

/* 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 garlandSway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes garlandTwinkle {
    0%, 45%, 75%, 100% { opacity: 1; }
    60% { opacity: .15; }
}

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