/* Christmas theme. Everything here is decoration: it never blocks a click and is hidden from screen readers. */

/* Top: a string of lights (two sets that twinkle in turn) and a one-line greeting */
.xmas-top{position:relative;z-index:21;pointer-events:none}
.xmas-lights{position:relative;height:24px;background:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'><path d='M0 3Q15 11 30 3Q45 11 60 3Q75 11 90 3Q105 11 120 3' fill='none' stroke='%232f5d3e' stroke-width='1.6'/></svg>") repeat-x 0 0}
.xmas-lights::before,.xmas-lights::after{content:"";position:absolute;inset:0;background-repeat:repeat-x;background-position:0 0}
.xmas-lights::before{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'><rect x='13' y='6' width='4' height='4' fill='%23314a3a'/><circle cx='15' cy='15' r='9' fill='%23e63946' fill-opacity='.28'/><ellipse cx='15' cy='15' rx='4.2' ry='5.6' fill='%23e63946'/><rect x='73' y='6' width='4' height='4' fill='%23314a3a'/><circle cx='75' cy='15' r='9' fill='%231d8fe0' fill-opacity='.28'/><ellipse cx='75' cy='15' rx='4.2' ry='5.6' fill='%231d8fe0'/></svg>");animation:xmas-a 1.8s ease-in-out infinite alternate}
.xmas-lights::after{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'><rect x='43' y='6' width='4' height='4' fill='%23314a3a'/><circle cx='45' cy='15' r='9' fill='%23ffc93c' fill-opacity='.28'/><ellipse cx='45' cy='15' rx='4.2' ry='5.6' fill='%23ffc93c'/><rect x='103' y='6' width='4' height='4' fill='%23314a3a'/><circle cx='105' cy='15' r='9' fill='%232bb673' fill-opacity='.28'/><ellipse cx='105' cy='15' rx='4.2' ry='5.6' fill='%232bb673'/></svg>");animation:xmas-b 1.8s ease-in-out infinite alternate}
@keyframes xmas-a{from{opacity:1}to{opacity:.3}}
@keyframes xmas-b{from{opacity:.3}to{opacity:1}}
.xmas-greet{background:#fff6e5;color:#8a1f2b;border-bottom:1px solid #f0dfc0;text-align:center;font-size:.88rem;font-weight:600;padding:3px 12px;line-height:1.4}
.xmas-star{color:#d4a017}

/* Footer: a small tree and a wish */
.xmas-foot{display:flex;align-items:center;justify-content:center;gap:12px;padding-block:6px 0;margin-top:14px;color:#cfdad3;font-size:.95rem}
.xmas-tree{flex:none;display:block}
.xmas-tree .tw{animation:xmas-a 1.8s ease-in-out infinite alternate}
.xmas-tree .tw.b{animation-name:xmas-b}

/* The snowman peeking over the top edge of the footer (its twig hands rest on the footer) */
.foot{position:relative}
.xmas-peek{position:absolute;right:max(18px,calc(50% - 33rem));bottom:calc(100% - 9px);line-height:0;pointer-events:none;z-index:22}
.xmas-peek img{display:block;width:110px;height:auto}

/* The moose in a red scarf who walks across the bottom of the window now and then: four poses in one strip */
.xmas-walk{position:fixed;left:0;bottom:6px;width:110px;height:131px;pointer-events:none;z-index:31;transform:translateX(-140px);will-change:transform}
.xmas-walk span{display:block;width:110px;height:131px;background:url(/assets/img/thanksgiving-moose.png) 0 0/400% 100% no-repeat;animation:xmas-frames .8s step-end infinite}
.xmas-walk.go{animation:xmas-run var(--walk-time,18s) linear forwards}
@keyframes xmas-run{from{transform:translateX(-140px)}to{transform:translateX(calc(100vw + 30px))}}
@keyframes xmas-frames{0%{background-position:0 0}25%{background-position:33.3333% 0}50%{background-position:66.6667% 0}75%{background-position:100% 0}100%{background-position:100% 0}}

/* Santa's sleigh with a computer for the customer, flying right to left across the upper part of the window now and then (season-christmas.js) */
.xmas-fly{position:fixed;left:0;top:var(--fly-top,18vh);width:440px;height:123px;pointer-events:none;z-index:31;transform:translateX(100vw);will-change:transform}
.xmas-fly span{display:block;width:100%;height:100%;background:url(/assets/img/christmas-santa.webp) center/contain no-repeat;animation:xmas-bob 2.4s ease-in-out infinite}
.xmas-fly.go{animation:xmas-flyby var(--fly-time,16s) linear forwards}
@keyframes xmas-flyby{from{transform:translateX(100vw)}to{transform:translateX(-480px)}}
@keyframes xmas-bob{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-12px) rotate(1deg)}}

/* Snow: drawn on one see-through layer over the page (see season-christmas.js) */
.xmas-snow{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:30}

/* People who ask their device for less motion see the lights and tree still, and no snow */
@media (prefers-reduced-motion:reduce){
  .xmas-walk,.xmas-fly{display:none}
  .xmas-lights::before,.xmas-lights::after,.xmas-tree .tw{animation:none;opacity:.85}
}
@media print{.xmas-top,.xmas-foot,.xmas-snow,.xmas-peek,.xmas-walk,.xmas-fly{display:none}}
@media (max-width:420px){.xmas-fly{width:230px;height:64px}@keyframes xmas-flyby{from{transform:translateX(100vw)}to{transform:translateX(-260px)}}.xmas-greet{font-size:.8rem}.xmas-star{display:none}.xmas-peek img{width:88px}.xmas-walk,.xmas-walk span{width:80px;height:95px}@keyframes xmas-run{from{transform:translateX(-110px)}to{transform:translateX(calc(100vw + 30px))}}}
