/* Christmas theme (seasonal). Turned on with "python build.py --dark --season=christmas".
   A classic, jolly Santa pops up over the home hero's round "One call" badge, gripping its rim
   with his white gloves, his beard spilling over the top and his boots sticking out below. Strings of lights twinkle along the top and bottom of the hero
   and light snow drifts down. Everything here is decorative and hidden from screen readers. */

/* Santa wraps the badge: his body sits behind it, his mittens in front */
.xm-wrap { position: relative; width: 176px; height: 176px; }
.xm-wrap .hc-badge { position: relative; z-index: 2; }
.xm-santa, .xm-front { position: absolute; left: -70px; top: -80px; width: 316px; height: 300px; pointer-events: none; overflow: visible; max-width: none; max-height: none; }
.xm-santa { z-index: 1; }
.xm-front { z-index: 3; }
@media (max-width: 560px) {
  .xm-wrap { margin: 188px auto 24px; }
  .xm-wrap .hc-badge { margin: 0; }
}

.xm-head { transform-origin: 158px 108px; }
.xm-pom { transform-origin: 210px -16px; }

@media (prefers-reduced-motion: no-preference) {
  .xm-mitt { opacity: 0; transform: translate(var(--dx), 14px); animation: xm-grip .5s cubic-bezier(.2,.9,.3,1.3) forwards; animation-delay: 1.5s; }
  .xm-arms { opacity: 0; animation: xm-show .3s ease-out 1.45s forwards; }
  .xm-boots { opacity: 0; animation: xm-show .4s ease-out 2s forwards; }
  .xm-head { transform: translateY(140px); animation: xm-rise .9s cubic-bezier(.2,.9,.3,1.15) 2.1s forwards, xm-chuckle 7s ease-in-out 5s infinite; }
  .xm-pom { animation: xm-bob 2.6s ease-in-out infinite alternate; }
  .xm-wrap:hover .xm-head { animation: xm-hoho 1s ease-in-out 1; transform: translateY(0); }
  .xm-bulb { animation: xm-twinkle 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.37s); }
}
@media (prefers-reduced-motion: reduce) {
  .xm-snow { display: none; }
}
@keyframes xm-show { to { opacity: 1; } }
@keyframes xm-grip { to { opacity: 1; transform: translate(0, 0); } }
@keyframes xm-rise { to { transform: translateY(0); } }
@keyframes xm-chuckle {         /* every few seconds Santa gives a little "ho ho ho" */
  0%, 76%, 100% { transform: translateY(0) rotate(0deg); }
  80% { transform: translateY(-4px) rotate(-2.5deg); }
  84% { transform: translateY(0) rotate(1.5deg); }
  88% { transform: translateY(-4px) rotate(-2deg); }
  92% { transform: translateY(0) rotate(1deg); }
  96% { transform: translateY(-3px) rotate(0deg); }
}
@keyframes xm-bob { from { transform: translate(0, 0); } to { transform: translate(2px, 4px); } }
@keyframes xm-hoho { 0%, 100% { transform: translateY(0) rotate(0deg); } 15% { transform: translateY(-6px) rotate(-5deg); } 30% { transform: translateY(0) rotate(4deg); } 45% { transform: translateY(-6px) rotate(-4deg); } 60% { transform: translateY(0) rotate(3deg); } 75% { transform: translateY(-4px) rotate(-2deg); } }

/* Greeting banner floating above Santa's hat */
.xm-banner { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 124px); z-index: 3;
  width: 290px; justify-content: center; margin: 0; padding: 8px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--head); font-weight: 700; font-size: 1rem; line-height: 1.2; color: #ffe3a3; text-align: center;
  background: rgba(12, 46, 30, .82); border: 1px solid rgba(255, 227, 163, .4); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.xm-banner svg { width: 22px; height: 22px; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .xm-banner { opacity: 0; animation: xm-banner .6s ease-out 3s forwards; }
}
@keyframes xm-banner { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* Hero: room for the light strings, and snow behind the content */
.hero.xm-hero { position: relative; overflow: hidden; padding-top: 84px; padding-bottom: 76px; }
.hero.xm-hero > .wrap { position: relative; z-index: 1; }
.xm-lights { position: absolute; left: 0; z-index: 2; pointer-events: none; overflow: visible; max-width: none; }
.xm-lights-top { top: 0; }
.xm-lights-bottom { bottom: 0; }
.xm-glow { opacity: .28; filter: blur(5px); }
@keyframes xm-twinkle { 0%, 100% { opacity: 1; } 45% { opacity: 1; } 60% { opacity: .35; } 75% { opacity: 1; } }

.xm-snow { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.xm-flake { position: absolute; top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.6);
  animation: xm-fall var(--d) linear var(--delay) infinite; }
@keyframes xm-fall { from { transform: translate3d(0, -12px, 0); } to { transform: translate3d(var(--drift), 860px, 0); } }

/* Medium screens: nudge the diagram left so Santa's mittens and the cables aren't crowded at the screen edge */
@media (min-width: 561px) and (max-width: 1240px) { .hero-cables.xm-on { padding-right: 48px; } }
