/* Anchor outside clipped card tracks, not to the full-width section. */
[data-christmas], .new-footer .footer-wrap {
  position: relative;
  --figure-size: clamp(36px, 4vw, 64px);
}

[data-christmas]::after, .new-footer .footer-wrap::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 3;
  bottom: 100%;
  inset-inline-start: var(--perch-start, min(8%, 54px));
  inset-inline-end: var(--perch-end, auto);
  width: var(--figure-size);
  aspect-ratio: 1;
  transform: translateY(var(--perch-overlap, 10%));
  background: var(--christmas-figure) center / contain no-repeat;
  pointer-events: none;
}

[data-christmas="wave"] {
  --christmas-figure: url("../images/Animierter Weihnachtsmann beim Winken.gif");
}

[data-christmas="sit"] {
  --christmas-figure: url("../images/Weihnachtsjunge beim Beinschwingen.gif");
  /* Let the legs hang down over the face of the card. */
  --perch-overlap: 34%;
}

[data-christmas="tumble"] {
  --christmas-figure: url("../images/Fröhliche Weihnachtsmann-Cartwheel-Animation.gif");
  --perch-start: auto;
  --perch-end: min(12%, 64px);
}

.new-footer .footer-wrap {
  --christmas-figure: url("../images/Fröhlicher Weihnachtsmann-Hutwurf als Animation.gif");
  --perch-start: auto;
  --perch-end: min(16%, 96px);
}

.search-perch {
  width: min(100%, 46.1875rem);
  margin-inline: auto;
  --perch-start: auto;
  --perch-end: 5%;
}

.search-field-block:has(.search-perch) {
  gap: max(1.6875rem, clamp(36px, 4vw, 64px));
}

.christmas-snow {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
}

.christmas-snow::before,
.christmas-snow::after {
  content: "";
  position: absolute;
  inset: -180px -40px 0;
  background-image:
    radial-gradient(circle at 22px 47px, #ece9ff 1.6px, #b9b1db99 2px, transparent 3px),
    radial-gradient(circle at 143px 128px, #fff 1px, #c7c0e0aa 1.5px, transparent 2.5px);
  background-size: 210px 180px;
  opacity: .7;
  animation: christmas-fall 7s linear infinite;
}

.christmas-snow::after {
  background-size: 310px 180px;
  background-position: 70px 80px;
  opacity: .45;
  animation-duration: 12s;
  animation-delay: -5s;
}

@keyframes christmas-fall {
  0% { transform: translate(0, 0); }
  50% { transform: translate(12px, 90px); }
  100% { transform: translate(0, 180px); }
}
