/* Christmas theme for stropk.ai. Pairs with js/christmas.js. Remove the theme by deleting the two tags that load these files.
   Everything here is fixed or absolute and ignores the pointer, so it never moves the layout or blocks a click. */

/* Snow caps: one small canvas per box, in a zero-size layer that scrolls with the page. */
.xmas-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 40; pointer-events: none; }
.xmas-layer canvas { position: absolute; pointer-events: none; }
/* Falling flakes: one fixed canvas. */
.xmas-canvas { position: fixed; inset: 0; z-index: 41; width: 100%; height: 100%; pointer-events: none; }

/* Santa and sleigh: a faceless silhouette that crosses the top of the window now and then. */
.xmas-santa { position: fixed; top: 10px; left: 0; z-index: 39; width: 128px; height: 45px; color: #f2f2f4; opacity: 0; pointer-events: none; will-change: transform; }
.xmas-santa svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Tree: stands in the footer's lower right corner. */
.foot { position: relative; overflow-x: clip; }
.foot > .st-page { position: relative; }
.xmas-tree { position: absolute; right: 36px; bottom: -22px; width: 58px; height: 82px; pointer-events: none; isolation: isolate; }
.xmas-tree::before { content: ""; position: absolute; left: 50%; top: 52%; width: 150px; height: 150px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(245, 196, 107, .17), rgba(245, 196, 107, .05) 55%, transparent); pointer-events: none; z-index: -1; }
.xmas-tree svg { position: relative; }
.xmas-tree svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (max-width: 720px) { .xmas-tree { right: 20px; width: 52px; height: 74px; } .xmas-tree::before { width: 120px; height: 120px; } }
.xmas-tree .lit { animation: xmas-twinkle 4.8s ease-in-out infinite; }
.xmas-tree .lit:nth-child(2) { animation-delay: -1.1s; }
.xmas-tree .lit:nth-child(3) { animation-delay: -2.3s; }
.xmas-tree .lit:nth-child(4) { animation-delay: -3.4s; }
.xmas-tree .lit:nth-child(5) { animation-delay: -0.5s; }
.xmas-tree .lit:nth-child(6) { animation-delay: -1.7s; }
.xmas-tree .lit:nth-child(7) { animation-delay: -2.9s; }
.xmas-tree .lit:nth-child(8) { animation-delay: -4.1s; }
.xmas-tree .star { animation: xmas-star 6s ease-in-out infinite; transform-origin: 24px 6px; }
@keyframes xmas-twinkle { 0%, 100% { opacity: .25; } 45% { opacity: 1; } 60% { opacity: .55; } }
@keyframes xmas-star { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }

/* String of lights along the footer's top edge. */
.xmas-lights { position: absolute; left: 0; right: 0; top: -3px; height: 8px; pointer-events: none; }
.xmas-lights i { position: absolute; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: #f5c46b; box-shadow: 0 0 6px 1px rgba(245, 196, 107, .45); opacity: .28; animation: xmas-bulb 5.6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.83s); }
.xmas-lights i:nth-child(3n) { background: #f2f2f4; box-shadow: 0 0 6px 1px rgba(242, 242, 244, .3); animation-duration: 7.1s; }
.xmas-lights i:nth-child(3n+1) { animation-duration: 6.4s; }
@keyframes xmas-bulb { 0%, 100% { opacity: .22; } 50% { opacity: .85; } }
@media (max-width: 720px) { .xmas-lights i:nth-child(even) { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .xmas-lights i { animation: none; opacity: .6; }
  .xmas-tree .lit, .xmas-tree .star { animation: none; opacity: .85; }
  .xmas-santa { display: none; }
}
