/* Kalėdinis leidimas – only with html.kaledos (set by kaledos.js inside the festive window). */

/* hero logo: snow, Santa hat, ribbon and blinking lights over the plain logo (its flame keeps animating below).
   Overlay box 133 x 56 texels, the logo sits at (2, 12) in it; room is reserved before the first paint. */
html.kaledos .logo-art { margin-top: calc(12px * var(--k)); margin-bottom: calc(14px * var(--k)); }
.xmas-logo { position: absolute; left: calc(-2px * var(--k)); top: calc(-12px * var(--k)); width: calc(133px * var(--k));
  height: calc(56px * var(--k)); background: url(/assets/img/brand/kaledos/logo-overlay.gif) 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated; pointer-events: none; }

/* string of lights hanging under the top bar */
.xmas-lights { position: absolute; left: 0; right: 0; bottom: -15px; height: 15px; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse 15px 6px at 14px -1px, transparent 5px, #17301c 5px, #17301c 6.5px, transparent 7px)
    0 0 / 28px 9px repeat-x; }
.xmas-lights i { flex: none; position: relative; width: 6px; height: 8px; margin: 5px 11px 0; border-radius: 1px 1px 3px 3px;
  background: #eb2d2d; box-shadow: 0 0 6px 1px currentColor; color: #eb2d2d; }
/* two layers (kaledos.js): the first shows bulbs 4n+1/4n+2, the second 4n+3/4n+4 half a cycle later; only the layers blink */
.xmas-lights b { position: absolute; inset: 0; display: flex; padding-left: 7px;
  animation: xmas-blink 1.6s steps(1, end) infinite; will-change: opacity; }
.xmas-lights b + b { animation-delay: -.8s; }
.xmas-lights b:first-child i:nth-child(4n+3), .xmas-lights b:first-child i:nth-child(4n+4),
.xmas-lights b + b i:nth-child(4n+1), .xmas-lights b + b i:nth-child(4n+2) { visibility: hidden; }
.xmas-lights i::before { content: ""; position: absolute; left: 1px; top: -3px; width: 4px; height: 3px; background: #3b3b3b; }
.xmas-lights i::after { content: ""; position: absolute; left: 1px; top: 1px; width: 2px; height: 2px; background: rgba(255,255,255,.7); }
.xmas-lights i:nth-child(4n+2) { background: #ffc428; color: #ffc428; }
.xmas-lights i:nth-child(4n+3) { background: #3cc850; color: #3cc850; }
.xmas-lights i:nth-child(4n+4) { background: #468cff; color: #468cff; }
@keyframes xmas-blink { 0% { opacity: 1; } 50% { opacity: .3; } }

/* light pixel snow (canvas at half resolution, scaled up) */
.xmas-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none;
  image-rendering: pixelated; }

@media (prefers-reduced-motion: reduce) {
  .xmas-logo { background-image: url(/assets/img/brand/kaledos/logo-overlay.png); }
  .xmas-lights b { animation: none; }
}
