body[data-new-year-decor] .site-header {
    border-bottom-color: transparent;
}

.holiday-garland {
    --bulb-count: 8;
    position: absolute;
    inset: auto 0 -3px;
    display: grid;
    grid-template-columns: repeat(var(--bulb-count), 1fr);
    justify-items: center;
    align-items: start;
    height: 22px;
    pointer-events: none;
}

.holiday-garland-wire {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #9c753d;
    stroke-width: 1.15;
}

.holiday-bulb {
    --wire-y: 12px;
    --bulb-size: 11px;
    --bulb-color: #e78308;
    --bulb-next: #d32b56;
    --bulb-last: #6a3ac9;
    position: relative;
    width: var(--bulb-size);
    height: var(--bulb-size);
    margin-top: calc(var(--wire-y) - 3px);
    border-radius: 50%;
    color: var(--bulb-color);
    background: radial-gradient(circle at 39% 31%, #fffdf4 5%, color-mix(in srgb, currentColor 50%, #fff) 27%, currentColor 58%, color-mix(in srgb, currentColor 74%, #402025) 100%);
    box-shadow: 0 0 6px 1px color-mix(in srgb, currentColor 73%, transparent),
        0 0 14px 3px color-mix(in srgb, currentColor 34%, transparent);
    animation: holiday-garland-colors 5.3s ease-in-out infinite;
}

.holiday-bulb:nth-of-type(2),
.holiday-bulb:nth-of-type(4),
.holiday-bulb:nth-of-type(7) { --wire-y: 10px; }
.holiday-bulb:nth-of-type(3) { --wire-y: 14px; }
.holiday-bulb:nth-of-type(5) { --wire-y: 13px; }
.holiday-bulb:nth-of-type(8) { --wire-y: 11px; }

.holiday-bulb:nth-of-type(2) {
    --bulb-size: 10px;
    --bulb-color: #d92049;
    --bulb-next: #508913;
    --bulb-last: #018caa;
    animation-duration: 7.9s;
    animation-delay: -.6s;
}

.holiday-bulb:nth-of-type(3) {
    --bulb-size: 12px;
    --bulb-color: #078f54;
    --bulb-next: #3158d7;
    --bulb-last: #e5810a;
    animation-duration: 6.1s;
    animation-delay: -.3s;
}

.holiday-bulb:nth-of-type(4) {
    --bulb-color: #295de2;
    --bulb-next: #dd3977;
    --bulb-last: #0e9b91;
    animation-duration: 8.7s;
    animation-delay: -1.1s;
}

.holiday-bulb:nth-of-type(5) {
    --bulb-size: 10px;
    --bulb-color: #973dc8;
    --bulb-next: #dc730e;
    --bulb-last: #3e74df;
    animation-duration: 7.2s;
    animation-delay: -.7s;
}

.holiday-bulb:nth-of-type(6) {
    --bulb-size: 12px;
    --bulb-color: #e16021;
    --bulb-next: #00a487;
    --bulb-last: #d42857;
    animation-duration: 5.9s;
    animation-delay: -1.1s;
}

.holiday-bulb:nth-of-type(7) {
    --bulb-color: #008aaa;
    --bulb-next: #8132c1;
    --bulb-last: #d68a08;
    animation-duration: 9.3s;
    animation-delay: -1.3s;
}

.holiday-bulb:nth-of-type(8) {
    --bulb-size: 10px;
    --bulb-color: #c62888;
    --bulb-next: #d54528;
    --bulb-last: #168d65;
    animation-duration: 6.6s;
    animation-delay: -.3s;
}

@keyframes holiday-garland-colors {
    0%, 19%, 100% { color: var(--bulb-color); transform: scale(1); }
    36%, 49% { color: var(--bulb-next); transform: scale(1.12); }
    68%, 77% { color: var(--bulb-last); transform: scale(.93); }
}

body[data-new-year-decor] .site-header::after,
body[data-new-year-decor] .header-inner::after {
    content: '';
    position: absolute;
    bottom: -7px;
    width: clamp(44px, 5vw, 86px);
    aspect-ratio: 200 / 69;
    background: url('./decor-fir.webp') left bottom / contain no-repeat;
    pointer-events: none;
}

body[data-new-year-decor] .site-header::after {
    left: 0;
}

body[data-new-year-decor] .header-inner::after {
    right: 0;
    transform: scaleX(-1);
}

body[data-new-year-decor] .site-footer {
    position: relative;
}

body[data-new-year-decor] .site-footer::before {
    content: '';
    position: absolute;
    pointer-events: none;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, #ab813f, #f3d37e 49%, #ab813f);
}

.holiday-footer-ornament {
    display: block;
    width: clamp(128px, 13vw, 168px);
    max-width: 100%;
    height: auto;
    margin-top: 6px;
    pointer-events: none;
}

@media (max-width: 760px) {
    .holiday-garland {
        --bulb-count: 4;
    }

    .holiday-bulb:nth-of-type(n) { --wire-y: 13px; }
    .holiday-bulb:nth-of-type(3) { --wire-y: 14px; }
    .holiday-bulb:nth-of-type(4) { --wire-y: 12px; }
    .holiday-bulb:nth-of-type(n + 5) { display: none; }

    body[data-new-year-decor] .site-header::after,
    body[data-new-year-decor] .header-inner::after {
        bottom: -5px;
        width: 43px;
    }

    .holiday-footer-ornament {
        width: 124px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .holiday-bulb { animation: none; }
}

@media print {
    .holiday-garland,
    body[data-new-year-decor] .site-header::after,
    body[data-new-year-decor] .header-inner::after,
    body[data-new-year-decor] .site-footer::before,
    .holiday-footer-ornament {
        display: none;
    }
}
