/* ===== Bewegungssystem Hey Horst (Testkopie, 24.11.2026) =====
   Ein System für alle Seiten DE/EN. Leitlinie des Nutzers: „Mehr Interaktivität … mehr Aufbau, mehr kontinuierlich. Aus einem Guss.“
   Regeln: nur transform und opacity animieren; Inhalt ist ohne Bewegung voll sichtbar und lesbar;
   bei prefers-reduced-motion steht alles still; Dauerbewegung nur mit Pause-Knopf; keine Fremdbibliothek.
   Beschreibung: DESIGN.md, Kapitel „Bewegung“. Lädt nach glanz.css; design-b.css schaltet alte Einblend-Animationen ab,
   deshalb stehen die erlaubten Bewegungen hier mit hoher Spezifität (:not(#b):not(#g)). */

:root{
  --b-kurz:200ms;     /* Hover, Knöpfe, Fokus */
  --b-mittel:400ms;   /* Reiter, Schritte einer Szene, Herkunftszeile */
  --b-lang:700ms;     /* große Wechsel, Produkte erscheinen */
  --b-kurve:cubic-bezier(.2,.7,.2,1);   /* eine Kurve für alles */
  --b-weg:24px;       /* so weit schwebt etwas ein */
  --b-heben:6px;      /* so weit hebt sich eine Karte beim Darüberfahren */
  --b-zoom:1.08;      /* Bild-Zoom beim Hereinscrollen, endet bei 1 */
  --b-wachsen:.94;    /* dunkle Kacheln wachsen beim Hereinscrollen von 94 auf 100 % */
  --b-schatten:0 18px 36px rgba(15,36,16,.14);
}

/* ---------- Baustein Knopf ---------- */
html body .btn:not(#b):not(#g){transition:transform var(--b-kurz) var(--b-kurve),background-color var(--b-kurz) var(--b-kurve),box-shadow var(--b-kurz) var(--b-kurve)}
@media (hover:hover) and (pointer:fine){html body .btn:hover:not(#b):not(#g){transform:translateY(-1px)}}
html body .btn:active:not(#b):not(#g){transform:scale(.98)}

/* ---------- Baustein Produktkarte (alle Karten mit Bild) ----------
   Nur Anheben, kein Schatten und kein grauer Kasten (Rückmeldung des Nutzers). */
html body :is(.w1-prod,.g-go li,.d-produkt,.b-karte,.mk-card,.editorial-card,.hh-explainer,.s2-ort,.d-mini.gruppen>div):not(#b):not(#g){transition:transform var(--b-mittel) var(--b-kurve)}
@media (hover:hover) and (pointer:fine){
  html body :is(.w1-prod,.g-go li,.d-produkt,.b-karte,.mk-card,.editorial-card,.hh-explainer,.s2-ort,.d-mini.gruppen>div):hover:not(#b):not(#g){transform:translateY(calc(-1 * var(--b-heben)))}
}
html body :is(.w1-prod,.g-go li,.d-produkt,.b-karte,.mk-card,.editorial-card,.hh-explainer,.s2-ort,.d-mini.gruppen>div):focus-within:not(#b):not(#g){transform:translateY(calc(-1 * var(--b-heben)))}

/* ---------- Baustein Szene (bleibt stehen, baut sich beim Scrollen auf) ----------
   Ohne JavaScript, am Handy und bei reduzierter Bewegung: Endzustand, alles sichtbar, nichts klebt. */
.b-szene{--p:1}
.b-szene [data-schritt]{transition:opacity var(--b-lang) var(--b-kurve),transform var(--b-lang) var(--b-kurve);transition-delay:calc(var(--i,0) * 70ms)}
.b-szene.b-an{height:calc(var(--schritte,4) * 70vh + 100vh)}
.b-szene.b-an .b-szene-buehne{position:sticky;top:64px}
html body .b-seite .d-kachel.b-szene.b-an:not(#b):not(#g){justify-content:flex-start!important;min-height:0!important}
.b-szene.b-an .b-szene-buehne{padding-top:40px}
.b-szene.b-an [data-schritt]:not(.b-da){opacity:0;transform:translateY(var(--b-weg)) scale(.98)}
.b-szene .b-schritte li{transition:opacity var(--b-mittel) var(--b-kurve)}
/* Aktiver Schritt: Ziffer in Tiefgrün, übrige Ziffern Schiefer; nichts verschiebt sich, kein Balken */
.b-szene.b-an .b-schritte li:not(.b-jetzt):before{color:#5C695C}
.b-szene.b-an .b-schritte li:not(.b-jetzt) b{color:#5C695C}



/* ---------- Bewegung beim Scrollen (Kachel, Bild, Produkt) ---------- */
@media (prefers-reduced-motion:no-preference){
  @supports (animation-timeline:view()){
    /* Kachel: Überschrift und Satz heben sich */
    html body main :is(.d-kachel>h2,.d-kachel>.satz,.w1-red .w1-kopf,.w1-orte h2,.b-szene-text):not(#b):not(#g),
    html body main:not(.b-seite)>section>.wrap>h2:not(#b):not(#g){animation:b-heben linear both!important;animation-timeline:view()!important;animation-range:entry 0% cover 35%!important}
    /* Bild: zoomt heran */
    /* 01.12.2026: Kopfbild (.hero-photo) ohne Zoom; vergrößert wuchs es über den Rahmen bis an den Knopf darüber (Abstandsprüfung) */
    html body main :is(.d-kachel .d-bild,.w1-panel figure,.mk-figure,.mk-pano) img:not(#b):not(#g){animation:b-zoom linear both!important;animation-timeline:view()!important;animation-range:entry 0% cover 55%!important}
    /* Bild wird zur Kachel: Videos und Bilder in Kacheln wachsen beim Hereinscrollen */
    html body main .d-kachel .g-vid:not(#b):not(#g){animation:b-wachsen-bild linear both!important;animation-timeline:view()!important;animation-range:entry 0% cover 50%!important}
    /* Dunkle Kacheln wachsen zur vollen Breite: weicher Übergang von hell nach Nachtgrün */
    html body main :is(.d-kachel.dunkel,.w1-tz.g-dunkel):not(#b):not(#g),html body main:not(.b-seite)>section:is(.dark,.contactband):not(#b):not(#g){animation:b-wachsen linear both!important;animation-timeline:view()!important;animation-range:entry 0% entry 80%!important}
    /* Produkte: steigen auf, Karten heben sich */
    html body .g-p:not(#b):not(#g){animation:b-steigen linear both!important;animation-timeline:view()!important;animation-range:entry 0% cover 40%!important}
    html body .g-p:nth-child(2n):not(#b):not(#g){animation-range:entry 6% cover 42%!important}
    html body .g-p:nth-child(3n):not(#b):not(#g){animation-range:entry 12% cover 44%!important}
    html body :is(.w1-prod,.g-go li,.d-mini.gruppen>div):not(#b):not(#g){animation:b-heben linear both!important;animation-timeline:view()!important;animation-range:entry 0% cover 30%!important}
  }
  /* Produkte im Startbild schweben kaum merklich (Dauerbewegung unter 5 s Wirkung, sehr klein) */
  html body .g-p picture:not(#b):not(#g){animation:b-schweben 7s ease-in-out infinite alternate!important}
  html body .g-p:nth-child(2n) picture:not(#b):not(#g){animation-duration:8.5s!important;animation-delay:-2s!important}
  html body .g-p:nth-child(3n) picture:not(#b):not(#g){animation-duration:6.2s!important;animation-delay:-4s!important}
  html body .g-p img:not(#b):not(#g){transition:transform var(--b-lang) var(--b-kurve)}
  /* Laufband: mit Pause-Knopf */
  html body .g-logos:not(#b):not(#g){animation:b-lauf 48s linear infinite!important}
  html body :is(.g-laufband:hover,.g-laufband:focus-within,.g-laufband.halt) .g-logos:not(#b):not(#g){animation-play-state:paused!important}
  /* Wechsel nach Klick: Reiter, Herkunftszeile */
  html body .w1-panel.neu:not(#b):not(#g),html body :is(.w1-prod.offen,.w1-prod:hover) .w1-prod-info:not(#b):not(#g){animation:b-ein var(--b-mittel) var(--b-kurve)!important}
  /* Seitenwechsel: Kopf bleibt stehen, Produktbilder wandern auf die nächste Seite */
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:b-aus var(--b-kurz) var(--b-kurve) both!important}
  ::view-transition-new(root){animation:b-ein var(--b-mittel) var(--b-kurve) both!important}
  ::view-transition-group(*){animation-duration:var(--b-lang);animation-timing-function:var(--b-kurve)}
  html body .header:not(#b){view-transition-name:hh-kopf}
  html body .g-go-kachel .g-vid:not(#b),html body:has(.g-rechner) .b-hero>img:not(#b){view-transition-name:hh-go-bild}
}
@media (prefers-reduced-motion:reduce){
  html body .g-p img,html body .b-szene [data-schritt],html body .b-szene .b-schritte li{transition:none!important;transform:none!important}
  .b-szene [data-schritt]{opacity:1!important}
}
@keyframes b-heben{from{transform:translateY(var(--b-weg))}to{transform:none}}
@keyframes b-zoom{from{transform:scale(var(--b-zoom))}to{transform:none}}
@keyframes b-wachsen{from{transform:scale(var(--b-wachsen))}to{transform:none}}
@keyframes b-wachsen-bild{from{transform:scale(.86)}to{transform:none}}
@keyframes b-steigen{from{transform:translateY(40px) scale(.94)}to{transform:none}}
@keyframes b-schweben{from{transform:translateY(0)}to{transform:translateY(-4px)}}
@keyframes b-lauf{to{transform:translateX(-100%)}}
@keyframes b-ein{from{opacity:0}to{opacity:1}}
@keyframes b-aus{to{opacity:0}}
