/* =========================================================
   Weihnachtsdeko – nur geladen, wenn weihnachtszeit() an ist
   (Option podo.weihnachten). Dezent, rein dekorativ.
   ========================================================= */
:root {
  --xmas-red: #b3202f;
  --xmas-red-light: #e8505b;
  --xmas-red-dark: #6e0f19;
  --xmas-green: #2f7a52;
  --xmas-green-dark: #1f5639;
  --xmas-warm: #fff3c4;
}

/* ---------- Kugeln im Hero ---------- */
.xmas-baubles {
  position: absolute; top: 0; left: 52%; z-index: 1;
  display: flex; gap: 22px; align-items: flex-start;
  pointer-events: none;
}
.xmas-bauble {
  --hell: #ff8f95; --mitte: var(--xmas-red); --dunkel: var(--xmas-red-dark);
  position: relative; display: block; width: 34px;
  /* Faden reicht von oben (hinter der Kopfleiste) bis zur Kugel */
  padding-top: calc(var(--header-h) + var(--faden));
  transform-origin: 50% 0;
  animation: xmas-swing 5s ease-in-out infinite alternate;
  animation-delay: calc(var(--n) * -1.7s);
}
.xmas-bauble--gold { --hell: #fff1b8; --mitte: var(--gold-2); --dunkel: #a8740a; width: 42px; }
.xmas-bauble::before {
  content: ''; position: absolute; top: 0; left: 50%; bottom: 44px;
  width: 1px; background: linear-gradient(rgb(138 95 0 / 0), rgb(138 95 0 / .55) 40%);
}
.xmas-bauble svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 6px 10px rgb(12 31 38 / .18)); }
.xmas-bauble__loop { fill: none; stroke: #a8740a; stroke-width: 1.4; }
.xmas-bauble__cap { fill: #d9a520; }
.xmas-bauble__band { fill: none; stroke: rgb(255 255 255 / .35); stroke-width: 1.4; stroke-dasharray: 1 3.2; stroke-linecap: round; }
.xmas-bauble__glint { fill: #fff; opacity: .55; animation: xmas-glint 4s ease-in-out infinite; animation-delay: calc(var(--n) * -1.3s); }
@keyframes xmas-swing { from { rotate: -4deg; } to { rotate: 4deg; } }
@keyframes xmas-glint { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }

/* ---------- Christbaum am Hero-Bild ---------- */
.xmas-tree {
  position: absolute; right: -2%; bottom: -3%; z-index: 2;
  width: clamp(100px, 12vw, 150px); height: auto; overflow: visible;
  filter: drop-shadow(0 10px 16px rgb(12 31 38 / .25));
  pointer-events: none;
}
.xmas-tree__trunk { fill: #7a4b24; }
.xmas-tree__green--1 { fill: #3b9165; }
.xmas-tree__green--2 { fill: var(--xmas-green); }
.xmas-tree__green--3 { fill: var(--xmas-green-dark); }
.xmas-tree__green { stroke: rgb(0 0 0 / .08); stroke-width: 1; stroke-linejoin: round; }
.xmas-tree__garland { fill: none; stroke: var(--gold-2); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: .1 4; opacity: .9; }
.xmas-tree__star {
  fill: var(--gold-2); stroke: #fff6cf; stroke-width: .8; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: center;
  animation: xmas-star 3s ease-in-out infinite;
}
@keyframes xmas-star {
  0%, 100% { filter: drop-shadow(0 0 2px rgb(247 201 52 / .6)); scale: 1; }
  50% { filter: drop-shadow(0 0 7px rgb(247 201 52 / 1)); scale: 1.08; }
}

/* Lichter am Baum (und an der Lichterkette): vier Farben, versetzt funkelnd */
.xmas-light { animation: xmas-twinkle 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.45s); }
.xmas-light--0 { fill: #ffe27a; }
.xmas-light--1 { fill: var(--xmas-red-light); }
.xmas-light--2 { fill: #fff; }
.xmas-light--3 { fill: var(--gold-2); }
@keyframes xmas-twinkle { 0%, 100% { opacity: 1; } 45% { opacity: .3; } }

/* ---------- Kerzen auf der Termin-Leiste ---------- */
.cta-band__inner { position: relative; }
.xmas-candles {
  position: absolute; right: clamp(20px, 4vw, 56px); top: -76px;
  width: 136px; height: auto; overflow: visible; pointer-events: none;
}
.xmas-candles__sprig path { fill: none; stroke: var(--xmas-green); stroke-width: 2.4; stroke-linecap: round; }
.xmas-candles__sprig path:first-child { stroke: #6b4a22; stroke-width: 2; }
.xmas-candle__body { fill: var(--xmas-red); }
.xmas-candle__drip { fill: none; stroke: var(--xmas-red-light); stroke-width: 2; stroke-linecap: round; }
.xmas-candle__wick { stroke: #3a2a1a; stroke-width: 1.6; stroke-linecap: round; }
.xmas-candle__halo { fill: #ffd25a; opacity: .35; filter: blur(6px); animation: xmas-halo 2.2s ease-in-out infinite alternate; animation-delay: calc(var(--n) * -.9s); }
.xmas-candle__flame, .xmas-candle__core {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: xmas-flicker 1.6s ease-in-out infinite;
  animation-delay: calc(var(--n) * -.7s);
}
.xmas-candle__flame { fill: #ffb627; filter: drop-shadow(0 0 4px rgb(255 190 60 / .9)); }
.xmas-candle__core { fill: #fff6d0; }
@keyframes xmas-flicker {
  0%, 100% { scale: 1 1; rotate: 0deg; }
  20% { scale: .94 1.06; rotate: -2deg; }
  45% { scale: 1.04 .95; rotate: 1.5deg; }
  70% { scale: .97 1.04; rotate: -1deg; }
}
@keyframes xmas-halo { from { opacity: .25; } to { opacity: .5; } }

/* ---------- Lichterkette über dem Footer ---------- */
.site-footer { position: relative; }
.xmas-lights { position: absolute; top: 0; left: 0; right: 0; height: 40px; pointer-events: none; }
.xmas-lights svg { display: block; width: 100%; height: 40px; }
.xmas-lights path { fill: none; stroke: #2a3b40; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.xmas-bulb {
  --c: #ffe27a;
  position: absolute; width: 8px; height: 12px; translate: -50% 0;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c);
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--c) 70%, transparent);
  animation: xmas-twinkle 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -.37s);
}
.xmas-bulb::before { content: ''; position: absolute; left: 1px; right: 1px; top: -3px; height: 4px; border-radius: 1px; background: #4a5a5e; }
.xmas-bulb--1 { --c: var(--xmas-red-light); }
.xmas-bulb--2 { --c: #7fd6a2; }
.xmas-bulb--3 { --c: var(--gold-2); }

/* ---------- Kleine Bildschirme: Hero einspaltig, Kugeln würden über der Überschrift hängen ---------- */
@media (max-width: 860px) {
  .xmas-baubles { display: none; }
}
@media (max-width: 640px) {
  .xmas-candles { width: 96px; top: -54px; }
  .xmas-bulb:nth-child(even) { display: none; }
}

/* ---------- Ruhig bei reduzierter Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .xmas-bauble, .xmas-bauble__glint, .xmas-tree__star, .xmas-light, .xmas-bulb,
  .xmas-candle__flame, .xmas-candle__core, .xmas-candle__halo { animation: none; }
}
