/* ============================================================
   WINTERLOOK 2026/27 (Winterflyer „Gut versorgt durch den Winter“)
   Schaltung: Inline-Skript im <head> setzt html.winter nur bis 31.01.2027.
   Ab 01.02.2027 ist der Look automatisch aus. Endgültiger Rückbau:
   diese Datei, die Kopfzeilen (Skript + Link) und .winterband in
   freie-plaetze.html entfernen. Alles ist dekorativ (keine Inhalte).
   ============================================================ */

/* Flocken als SVG (Linienflocke wie im Flyer) */
html.winter {
  --flocke-gruen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-11 -11 22 22'%3E%3Cpath d='M0-10V10M-8.66-5L8.66 5M-8.66 5L8.66-5M-2.5-7.5L0-5L2.5-7.5M-2.5 7.5L0 5L2.5 7.5M-7.75-1.6L-4.33-2.5L-5.25-5.9M7.75 1.6L4.33 2.5L5.25 5.9M-7.75 1.6L-4.33 2.5L-5.25 5.9M7.75-1.6L4.33-2.5L5.25-5.9' fill='none' stroke='%23349E64' stroke-width='1.3' stroke-linecap='round' opacity='.32'/%3E%3C/svg%3E");
  --flocke-weiss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-11 -11 22 22'%3E%3Cpath d='M0-10V10M-8.66-5L8.66 5M-8.66 5L8.66-5M-2.5-7.5L0-5L2.5-7.5M-2.5 7.5L0 5L2.5 7.5M-7.75-1.6L-4.33-2.5L-5.25-5.9M7.75 1.6L4.33 2.5L5.25 5.9M-7.75 1.6L-4.33 2.5L-5.25 5.9M7.75-1.6L4.33-2.5L5.25-5.9' fill='none' stroke='%23ffffff' stroke-width='1.3' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E");
  --flocke-beige: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-11 -11 22 22'%3E%3Cpath d='M0-10V10M-8.66-5L8.66 5M-8.66 5L8.66-5M-2.5-7.5L0-5L2.5-7.5M-2.5 7.5L0 5L2.5 7.5M-7.75-1.6L-4.33-2.5L-5.25-5.9M7.75 1.6L4.33 2.5L5.25 5.9M-7.75 1.6L-4.33 2.5L-5.25 5.9M7.75-1.6L4.33-2.5L5.25-5.9' fill='none' stroke='%23E3D4AB' stroke-width='1.3' stroke-linecap='round' opacity='.8'/%3E%3C/svg%3E");
  /* Schneeverwehung (geschwungene Kante, wie 03_schneeverwehung) */
  --verwehung-weiss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 718 46' preserveAspectRatio='none'%3E%3Cpath d='M0 29C68 10 128 10 196 23S325 39 393 23 529 3 605 19 688 29 718 16V46H0Z' fill='%23fff'/%3E%3C/svg%3E");
  --verwehung-gruen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 718 46' preserveAspectRatio='none'%3E%3Cpath d='M0 29C68 10 128 10 196 23S325 39 393 23 529 3 605 19 688 29 718 16V46H0Z' fill='%23084223'/%3E%3C/svg%3E");
  /* feiner Schneefall als Punkte (statisch, kein Animieren) */
  --schneefall:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.75) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 63% 9%,  rgba(255,255,255,.55) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 37% 71%, rgba(255,255,255,.45) 0 1.4px, transparent 2px),
    radial-gradient(circle at 86% 52%, rgba(255,255,255,.7)  0 1.8px, transparent 2.4px),
    radial-gradient(circle at 24% 46%, rgba(255,255,255,.4)  0 1px,   transparent 1.6px),
    radial-gradient(circle at 74% 84%, rgba(255,255,255,.6)  0 1.3px, transparent 1.9px);
  /* leiser Schneefall für Flächen mit Text (Footer, Video-Hero) */
  --schneefall-leise:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.35) 0 1.3px, transparent 1.9px),
    radial-gradient(circle at 63% 9%,  rgba(255,255,255,.28) 0 1px,   transparent 1.6px),
    radial-gradient(circle at 86% 52%, rgba(255,255,255,.32) 0 1.4px, transparent 2px),
    radial-gradient(circle at 74% 84%, rgba(255,255,255,.26) 0 1.1px, transparent 1.7px);
}

/* ---------- 1. Kopfbereiche (beige): wenige Flocken + Schneekante oben ---------- */
html.winter .pagehead,
html.winter .hero:not(.hero--video) {
  position: relative;
  background-image: var(--flocke-gruen), var(--flocke-gruen), var(--flocke-weiss), var(--flocke-weiss);
  background-repeat: no-repeat;
  background-size: 34px, 20px, 46px, 26px;
  background-position: right 4% top 26px, left 1.4% top 34px, left 2% bottom 18%, right 3% bottom 14%;
}
html.winter .pagehead::before,
html.winter .hero:not(.hero--video)::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px;
  background: var(--verwehung-weiss) center / 100% 100% no-repeat;
  transform: scaleY(-1); /* Schnee „hängt“ vom weißen Header herab */
  pointer-events: none; z-index: 1;
}
html.winter .pagehead.karriere-hero::before { display: none; } /* weißer Hintergrund: Kante unsichtbar */

/* ---------- 2. Video-Hero (Startseite u. a.): Schneefall + Flocken über dem Video, Verwehung unten ---------- */
html.winter .hero--video .hero__overlay {
  background-image: var(--flocke-weiss), var(--flocke-beige), var(--flocke-weiss), var(--schneefall-leise),
    linear-gradient(180deg, rgba(8,66,35,.50) 0%, rgba(8,66,35,.68) 60%, rgba(8,66,35,.80) 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-size: 34px, 24px, 20px, 240px 240px, 100% 100%;
  background-position: right 5% top 30px, right 12% top 46%, left 3% bottom 40px, 0 0, 0 0;
}
html.winter .hero--video::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; z-index: 2;
  background: var(--verwehung-weiss) center / 100% 100% no-repeat;
  pointer-events: none;
}

/* ---------- 3. Footer: Schneeverwehung oben + Schneefall ---------- */
html.winter .footer {
  position: relative;
  background-image: var(--schneefall-leise);
  background-size: 300px 300px;
}
html.winter .footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 23px;
  background: var(--verwehung-gruen) center / 100% 100% no-repeat;
  pointer-events: none;
}

/* ---------- 4. Flyer-Landingpage /freie-plaetze: Winterband wie Flyer-Kopf ---------- */
html.winter .winterband[hidden] { display: block; }
.winterband {
  position: relative;
  background-color: #084223;
  background-image: var(--flocke-weiss), var(--flocke-beige), var(--flocke-weiss), var(--flocke-beige), var(--schneefall);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-size: 26px, 18px, 20px, 28px, 220px 220px;
  background-position: left 3% top 12px, left 14% bottom 24px, right 16% top 10px, right 3% bottom 22px, 0 0;
  color: #fff; text-align: center;
  padding: 1.05rem 1rem 1.9rem;
}
.winterband__text {
  margin: 0; font-family: var(--font-head, serif); letter-spacing: .22em; text-transform: uppercase;
  font-size: clamp(.78rem, 2.4vw, .95rem); color: #fff;
}
.winterband__text span { color: var(--beige, #E3D4AB); }
.winterband::after { /* Übergang ins Beige des Heros */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 718 46' preserveAspectRatio='none'%3E%3Cpath d='M0 29C68 10 128 10 196 23S325 39 393 23 529 3 605 19 688 29 718 16V46H0Z' fill='%23F6F0E1'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
html.winter .winterband + .hero::before { display: none; }

/* ---------- Mobil: weniger Flocken, damit Text frei bleibt ---------- */
@media (max-width: 640px) {
  html.winter .pagehead,
  html.winter .hero:not(.hero--video) {
    background-image: var(--flocke-gruen);
    background-size: 26px;
    background-position: right 4% top 18px;
  }
  html.winter .hero--video .hero__overlay {
    background-size: 24px, 0px 0px, 0px 0px, 200px 200px, 100% 100%;
    background-position: right 4% top 16px, 0 0, 0 0, 0 0, 0 0;
  }
}

@media (max-width: 640px) {
  .winterband {
    padding: .85rem 2.6rem 1.6rem;
    background-size: 20px, 0px 0px, 0px 0px, 18px, 200px 200px;
    background-position: left 10px top 12px, 0 0, 0 0, right 10px top 14px, 0 0;
  }
  .winterband__text { letter-spacing: .1em; font-size: .74rem; }
}

/* Druck: kein Winterschmuck */
@media print {
  html.winter .pagehead, html.winter .hero, html.winter .footer { background-image: none !important; }
  html.winter .pagehead::before, html.winter .hero::before, html.winter .footer::before, .winterband { display: none !important; }
}
