/* =========================================================
   Fliesen Jegg: Gestaltung der Website
   Alle Farben, Schriften und Abstaende stehen ganz oben.
   Die Markenfarben stammen aus dem Logo: Gelb und Anthrazit.
   Das Aussehen folgt der Vorlage des Betriebs: Weiss und Grau wie Fliesen
   und Fugen, Ueberschriften in weit gesetzten Grossbuchstaben.
   ========================================================= */

/* ---------- Schriften: liegen lokal in /assets/fonts ---------- */
/* Jost fuer Ueberschriften. Die zweite Datei enthaelt seltenere Buchstaben (zum Beispiel c mit Akzent
   in Namen). Der Browser laedt sie nur, wenn eine Seite solche Buchstaben zeigt. */
@font-face {
  font-family: "Jost";
  src: url("/assets/fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  src: url("/assets/fonts/jost-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("/assets/fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Grundwerte ---------- */
:root {
  /* Grundfarben: Weiss und Grau, wie Fliesen und Fugen */
  --c-grund: #FFFFFF;        /* Weiss: Hintergrund */
  --c-grund-tief: #F2F2F1;   /* helles Grau: abgesetzte Flaechen und breite Fugen */
  --c-fuge: #E3E3E1;         /* Fugen und Linien */
  --c-fuge-tief: #BDBDBA;    /* kraeftigere Linien */
  --c-text: #454648;         /* Anthrazit, genau aus dem Logo gemessen: Schrift */
  --c-text-weich: #626367;   /* Anthrazit, weicher: Nebentexte */
  --c-hell: #FFFFFF;
  --c-rand-feld: #7F8083;    /* Rand von Eingabefeldern: dunkel genug, um als Feld erkennbar zu sein */

  /* Markenfarbe: das Gelb aus dem Logo. Gelb ist eine helle Farbe, deshalb steht
     darauf immer dunkle Schrift (--c-auf-marke), nie weisse. */
  --c-marke: #FFD500;        /* Knoepfe, Kacheln, Balken */
  --c-marke-tief: #F0C400;   /* etwas dunkler: wenn die Maus darueber ist */
  --c-marke-hell: #FFF6CC;   /* sehr hell: ruhige Hinweisflaechen */
  --c-auf-marke: #454648;    /* Schrift und Symbole auf Gelb */
  --c-dunkel: #3E3D3F;       /* dunkle Flaechen: Kopfbereiche, dunkle Kacheln */
  --c-mittel: #636365;       /* Mittelgrau: Namenskacheln und Fussbereich, weisse Schrift darauf */
  --c-auf-dunkel: #EBEBE9;   /* Fliesstext auf dunklen Flaechen */
  --c-marke-schatten: rgba(130, 105, 0, .4);

  /* Nur fuer Fehlermeldungen in Formularen */
  --c-fehler: #9C3F2B;
  --c-fehler-hell: #F6E6E1;

  /* Schriften */
  --f-titel: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --f-text: "Commissioner", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --sperrung: .19em;         /* Buchstabenabstand der grossen Ueberschriften */

  /* Schriftgroessen, wachsen mit der Bildschirmbreite */
  --t-text: 1.0625rem;
  --t-gross: clamp(1.125rem, 1.04rem + .35vw, 1.3rem);
  --t-h3: clamp(1.02rem, .98rem + .25vw, 1.18rem);
  --t-h2: clamp(1.5rem, 1.12rem + 1.55vw, 2.45rem);
  --t-h1: clamp(1.9rem, 1.2rem + 2.9vw, 3.7rem);

  /* Abstaende und Formen */
  --rand: clamp(1rem, .45rem + 2.6vw, 2.5rem);
  --behaelter: 1240px;
  --abschnitt: clamp(4.5rem, 3rem + 5vw, 8rem);
  --fuge: 8px;               /* schmale Fuge zwischen Kacheln */
  --fugen-balken: 14px;      /* breite Fuge zwischen Abschnitten und Spalten */
  --radius: 2px;
  --kopf-hoehe: 76px;        /* Hoehe der Menuezeile ganz oben */
  --logo: 132px;             /* Kantenlaenge des Logos */

  /* Bewegung */
  --ease: cubic-bezier(.2, .7, .2, 1);        /* Standard: Knoepfe, Balken, kurze Wege */
  --ease-weich: cubic-bezier(.16, .8, .24, 1); /* Einblenden beim Scrollen, Kopfbilder, Buchung */
  --ease-foto: cubic-bezier(.2, .6, .3, 1);    /* lange, langsame Fotozooms */
  --ease-aus: cubic-bezier(.4, 0, .6, 1);      /* alles, was verschwindet */
  --schatten-2: 0 2px 6px rgba(40, 40, 42, .06), 0 24px 48px -20px rgba(40, 40, 42, .3);
}

/* Tablet: kleineres Logo. Die Raender sind so breit, dass der Reiter oben rechts keinen Text verdeckt. */
@media (min-width: 768px) {
  :root { --rand: max(5.25rem, .45rem + 2.6vw); }
}
@media (max-width: 1179px) {
  :root { --logo: 104px; }
}
@media (max-width: 767px) {
  :root {
    --fuge: 6px;
    --fugen-balken: 10px;
    --kopf-hoehe: 64px;
    --logo: 84px;
    --sperrung: .12em;
  }
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
  scrollbar-gutter: stable;    /* Platz fuer den Rollbalken bleibt frei: nichts springt, wenn das Menue oeffnet */
}

/* Weiches Rollen gilt erst, wenn die Seite fertig geladen ist (das Skript setzt dann die Klasse rollt-weich).
   Wer mit einem Sprungziel ankommt, zum Beispiel ueber den Menuepunkt Historie, steht so sofort an der
   richtigen Stelle. Sonst wuerde die Seite nach dem Laden von selbst von oben bis dorthin fahren. */
@media (prefers-reduced-motion: no-preference) {
  html.rollt-weich { scroll-behavior: smooth; }
  /* Waehrend der Ueberblendung bei Ankunft an einer Sprungmarke bleibt das Rollen hart: Schaltet der Browser auf
     weiches Rollen um, bricht er die laufende Ueberblendung ab (Klasse aus-sprung faellt danach weg) */
  html.aus-sprung.rollt-weich { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--c-grund);
  color: var(--c-text);
  font-family: var(--f-text);
  font-size: var(--t-text);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

[hidden] { display: none !important; }

a {
  color: var(--c-text);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--c-text); text-decoration-color: var(--c-marke-tief); text-decoration-thickness: 2px; }
/* Verweise im Fliesstext (zum Beispiel auf die Ausstellung): nicht unterstrichen, nur etwas kraeftiger */
.textlink { font-weight: 600; text-decoration: none; }
.textlink:hover, .textlink:focus-visible { text-decoration: underline; text-decoration-color: var(--c-marke-tief); text-decoration-thickness: 2px; }

/* Ueberschriften wie in der Vorlage: Grossbuchstaben mit weitem Abstand */
h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-family: var(--f-titel);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: var(--sperrung);
  text-transform: uppercase;
  color: inherit;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: 1.16; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: .12em; line-height: 1.35; }

/* Sicherheitsnetz: sehr lange Woerter duerfen umbrechen, statt ueber den Rand zu ragen.
   Schoene Trennstellen setzen wir in den Ueberschriften von Hand (weiches Trennzeichen). */
h1, h2, h3 { overflow-wrap: break-word; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 650; }

address { font-style: normal; }

:focus-visible {
  outline: 2px solid var(--c-text);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--c-marke); color: var(--c-auf-marke); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprung-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--c-text);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: top .2s;
}
.sprung-link:focus { top: 1rem; color: #fff; }

/* Linien-Symbole aus /assets/img/icons.svg */
.ikon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Aufbau ---------- */
.behaelter {
  width: min(100% - 2 * var(--rand), var(--behaelter));
  margin-inline: auto;
}

.abschnitt {
  --abschnitt-grund: var(--c-grund);
  padding-block: var(--abschnitt);
  background: var(--abschnitt-grund);
}
.abschnitt--tief { --abschnitt-grund: var(--c-grund-tief); }
.abschnitt--schmal { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
/* Breite helle Fuge zwischen zwei Abschnitten */
.abschnitt--linie { border-top: var(--fugen-balken) solid var(--c-grund-tief); }
.abschnitt--ohne-oben { padding-top: 0; }

/* Dunkler Abschnitt: weisse Schrift, gelbe Akzente */
.abschnitt--dunkel { --abschnitt-grund: var(--c-dunkel); color: #fff; }
.abschnitt--dunkel .oberzeile { color: #DEDEDC; }
.abschnitt--dunkel .einleitung,
.abschnitt--dunkel .teilung__text > p { color: var(--c-auf-dunkel); }
.abschnitt--dunkel .pfeil-link,
.abschnitt--dunkel .pfeil-link:hover { color: #fff; }
.abschnitt--dunkel .pfeil-link .ikon { color: var(--c-marke); }
.abschnitt--dunkel .pfeil-link:hover { text-decoration-color: #fff; }
.abschnitt--dunkel :focus-visible { outline-color: var(--c-marke); }
.abschnitt--dunkel .luecke { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .45); color: #E3E3E1; }

/* Gelber Abschnitt: dunkle Schrift, dunkle Akzente */
.abschnitt--marke { --abschnitt-grund: var(--c-marke); color: var(--c-auf-marke); }
.abschnitt--marke .oberzeile,
.abschnitt--marke .einleitung { color: var(--c-auf-marke); }
.abschnitt--marke .oberzeile::before { background: var(--c-auf-marke); }
.abschnitt--marke .pfeil-link { text-decoration-color: var(--c-auf-marke); }

.abschnitt__kopf {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.abschnitt__kopf--zeile {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.abschnitt__kopf--zeile > :first-child { max-width: 46rem; }
.abschnitt__kopf h2 { margin-bottom: .35em; }

.oberzeile {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  margin: 0 0 1.1rem;
  font-family: var(--f-titel);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-text-weich);
}
.oberzeile::before {
  content: "";
  width: 13px;
  height: 13px;
  background: var(--c-marke);
  border-radius: 1px;
}

.einleitung {
  font-size: var(--t-gross);
  line-height: 1.6;
  color: var(--c-text-weich);
}

.teilung {
  --spalt: clamp(2rem, 1rem + 5vw, 6rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spalt);
  align-items: center;
}
.teilung--breit-links { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.teilung--breit-rechts { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.teilung--oben { align-items: start; }
@media (min-width: 900px) {
  .teilung--umgekehrt > :first-child { order: 2; }
}
@media (max-width: 899px) {
  .teilung, .teilung--breit-links, .teilung--breit-rechts { grid-template-columns: minmax(0, 1fr); }
}

/* Hochformat in der einspaltigen Teilung: auf Tablets nicht bildschirmhoch */
@media (min-width: 600px) and (max-width: 899px) {
  .teilung > .bild--hochkant { max-width: 30rem; }
}

.teilung__text > :last-child { margin-bottom: 0; }

/* Zwei Spalten mit breiter Fuge dazwischen, wie zwei grosse Fliesen nebeneinander.
   Nur fuer Abschnitte, in denen die Teilung der einzige Inhalt ist. */
@media (min-width: 900px) {
  .abschnitt:has(> .teilung--fuge) { overflow: hidden; }
  .teilung--fuge { position: relative; }
  .teilung--fuge::before {
    content: "";
    position: absolute;
    top: calc(-1 * var(--abschnitt));
    bottom: calc(-1 * var(--abschnitt));
    left: var(--fugen-ort, 50%);
    width: var(--fugen-balken);
    translate: -50% 0;
    background: var(--c-grund-tief);
  }
  .teilung--fuge.teilung--breit-links { --fugen-ort: calc((100% - var(--spalt)) * 7 / 12 + var(--spalt) / 2); }
  .teilung--fuge.teilung--breit-rechts { --fugen-ort: calc((100% - var(--spalt)) * 5 / 12 + var(--spalt) / 2); }
  .abschnitt--tief > .teilung--fuge::before { background: var(--c-grund); }
}

/* ---------- Kopfzeile mit Menue ---------- */
/* Wie in der Vorlage gibt es keine feste Leiste. Oben haengt das Logo als gelbes Schild in die dunkle
   Flaeche jeder Seite. Auf breiten Bildschirmen stehen links und rechts davon die Menuepunkte.
   Beides scrollt mit der Seite weg. Was immer bleibt, ist der Reiter oben rechts (siehe unten). */
.kopf {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  color: #fff;
}
.kopf__innen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--kopf-hoehe);
}

/* Der Link ist nur so hoch wie die Menuezeile, das Bild ragt darunter heraus */
.logo {
  position: relative;
  z-index: 2;
  display: block;
  flex: none;
  align-self: flex-start;
  width: var(--logo);
  height: var(--kopf-hoehe);
  text-decoration: none;
}
.logo__bild {
  display: block;
  width: var(--logo);
  height: var(--logo);
  max-width: none;
  transform-origin: 50% 0;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .75);
  transition: transform .45s var(--ease);
}
.logo:hover .logo__bild { transform: translateY(5px); }
/* Beim Klick hebt sich das Schild erst wieder, dann wechselt die Seite (siehe main.js) */
.logo.logo--geht .logo__bild { transform: none; }
.logo:focus-visible { outline: none; }
.logo:focus-visible .logo__bild { outline: 2px solid var(--c-marke); outline-offset: 3px; }
/* Beim Oeffnen der Seite senkt sich das Schild von oben herab */
.js .kopf .logo__bild { animation: schild .8s var(--ease) .15s both; }
.kurz .kopf .logo__bild { animation: none; }
@keyframes schild { from { transform: translateY(-104%); } }

.nav { display: none; }
.nav__liste {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__punkt { position: relative; display: flex; align-items: center; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .6rem .7rem;
  color: #fff;
  font-family: var(--f-titel);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: .7rem; right: calc(.7rem + .14em); bottom: .3rem;
  height: 3px;
  background: var(--c-marke);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.kopf :focus-visible { outline-color: var(--c-marke); }

.nav__punkt--unter > .nav__link { padding-right: .1rem; }
.nav__punkt--unter > .nav__link::after { right: calc(.1rem + .14em); }

.nav__unter-knopf {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}
.nav__unter-knopf .ikon { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.nav__unter-knopf[aria-expanded="true"] .ikon { transform: rotate(180deg); }

.nav__unter {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 14rem;
  margin: 0;
  padding: .5rem;
  list-style: none;
  background: var(--c-hell);
  border: 1px solid var(--c-fuge);
  border-radius: var(--radius);
  box-shadow: var(--schatten-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
}
.nav__unter::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -12px;
  height: 12px;
}
.nav__unter a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .8rem;
  border-radius: 2px;
  color: var(--c-text);
  text-decoration: none;
}
.nav__unter a::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--c-fuge-tief);
  border-radius: 1px;
  transition: background-color .2s;
}
.nav__unter a:hover { background: var(--c-grund-tief); }
.nav__unter a:hover::before { background: var(--c-marke); }
.nav__unter :focus-visible { outline-color: var(--c-text); }

.nav__punkt--unter.ist-offen .nav__unter,
html:not(.js) .nav__punkt--unter:focus-within .nav__unter {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

/* Breite Bildschirme: Logo in der Mitte, die Menuepunkte links und rechts davon */
@media (min-width: 1180px) {
  .kopf__innen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0 1.5rem;
  }
  .logo { grid-column: 2; grid-row: 1; }
  .nav { display: contents; }
  .nav__liste--links { grid-column: 1; grid-row: 1; justify-self: end; }
  .nav__liste--rechts { grid-column: 3; grid-row: 1; justify-self: start; }
}
@media (hover: hover) and (min-width: 1180px) {
  .nav__punkt--unter:hover .nav__unter {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
}

/* ---------- Reiter oben rechts: Menue, Anrufen, Termin, E-Mail ---------- */
/* Bleibt beim Scrollen immer in der Ecke stehen, auf jedem Geraet. */
.ecke {
  position: fixed;
  top: .75rem;
  right: .75rem;
  z-index: 60;
  display: grid;
  grid-template-columns: 1.25rem 2.75rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), var(--schatten-2);
  view-transition-name: ecke;
}
.ecke__menue {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  height: 3rem;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  transition: background-color .25s;
}
.ecke__menue:hover { background: var(--c-marke); }
.ecke__menue .ikon { width: 28px; height: 28px; stroke-width: 2.1; transition: transform .35s var(--ease); }
.ecke__menue:hover .ikon { transform: scaleX(1.12); }
.ecke__menue:focus-visible { outline-offset: -4px; }
.ecke__wort {
  grid-column: 1;
  grid-row: 2 / span 3;
  display: grid;
  place-items: center;
  background: var(--c-marke);
  color: var(--c-auf-marke);
  font-family: var(--f-titel);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  rotate: 180deg;
}
.ecke__link {
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--c-dunkel);
  color: #fff;
  transition: background-color .25s;
}
.ecke__link + .ecke__link { border-top: 1px solid rgba(255, 255, 255, .28); }
.ecke__link:hover { background: var(--c-mittel); color: #fff; }
.ecke__link .ikon { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.ecke__link:hover .ikon { transform: scale(1.14); }
.ecke__link:focus-visible { outline-color: var(--c-marke); outline-offset: -4px; }
@media (max-width: 767px) {
  .ecke { top: .5rem; right: .5rem; }
  .ecke__link--mail { display: none; }   /* auf dem Handy steht die E-Mail im Menue */
}

/* ---------- Menue: oeffnet sich ueber der ganzen Seite ---------- */
/* Das Menue ist ein "Popover": Der Browser oeffnet und schliesst es selbst, auch ohne Skript,
   und die Taste Escape schliesst es. Es waechst als Kreis aus dem Knopf in der Ecke heraus. */
.menue { display: none; }
@supports selector(:popover-open) {
  .menue {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    z-index: 70;               /* fuer Browser, die das Menue beim Schliessen aus der obersten Ebene nehmen */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;     /* kein eigener Rollbalken: er stuende neben dem frei gehaltenen Streifen der Seite */
    background: var(--c-dunkel);
    color: #fff;
    clip-path: circle(0 at calc(100% - 2.75rem) 2.25rem);
    opacity: 1;
    transition: clip-path 1.55s var(--ease-foto), opacity 1s var(--ease-foto), overlay 1.55s allow-discrete, display 1.55s allow-discrete;
  }
  /* Schliessen geht schneller als Oeffnen */
  .menue:not(:popover-open) { transition-duration: .9s; opacity: 0; }
  .menue::-webkit-scrollbar { display: none; }
  .menue:popover-open {
    display: block;
    clip-path: circle(150vmax at calc(100% - 2.75rem) 2.25rem);
  }
  @starting-style {
    .menue:popover-open { clip-path: circle(0 at calc(100% - 2.75rem) 2.25rem); opacity: 0; }
  }
  /* Solange das Menue offen ist, scrollt die Seite dahinter nicht mit */
  html:has(.menue:popover-open) { overflow: hidden; background: var(--c-dunkel); }
}
.ecke__ersatz { display: none; }
@supports not selector(:popover-open) {
  /* Aeltere Browser (zum Beispiel iPhones mit iOS 16) kennen das Menue nicht. Dort fuehrt der oberste
     Knopf im Reiter stattdessen zur Seitenliste im Fussbereich. */
  .ecke__menue { display: none; }
  .ecke__ersatz {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    height: 3rem;
    background: #fff;
    color: var(--c-text);
  }
  .ecke__ersatz .ikon { width: 28px; height: 28px; stroke-width: 2.1; }
  .ecke__ersatz:focus-visible { outline-offset: -4px; }
}

.menue__innen {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem clamp(2rem, 1rem + 6vw, 7rem);
  min-height: 100%;
  padding-block: 6.5rem 3.5rem;
}
.menue__zu {
  position: fixed;             /* bleibt stehen, wenn der Menueinhalt auf dem Handy rollt */
  z-index: 2;
  top: .75rem;
  right: .75rem;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 3rem;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  transition: background-color .25s;
}
.menue__zu:hover { background: var(--c-marke); }
.menue__zu .ikon { width: 26px; height: 26px; stroke-width: 2.1; transition: transform .35s var(--ease); }
.menue__zu:hover .ikon { transform: rotate(90deg); }
.menue__zu:focus-visible { outline-offset: -4px; }
.menue :focus-visible { outline-color: var(--c-marke); }
.menue__zu:focus-visible { outline-color: var(--c-text); }

.menue__heim {
  position: absolute;
  top: 0;
  left: var(--rand);
  display: block;
}
.menue__heim img { display: block; width: 76px; height: 76px; }

.menue__liste { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.menue__link {
  display: inline-block;
  padding: .3rem 0 .38rem;
  color: #fff;
  font-family: var(--f-titel);
  font-size: clamp(1.45rem, 1.05rem + 1.9vw, 2.5rem);
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  background: linear-gradient(var(--c-marke), var(--c-marke)) 0 100% / 0% .1em no-repeat;
  transition: background-size .45s var(--ease);
}
.menue__link:hover { color: #fff; }
.menue__link:hover,
.menue__link[aria-current="page"] { background-size: calc(100% - .14em) .1em; }
.menue__unter { display: flex; flex-wrap: wrap; gap: 0 1.6rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
.menue__unter a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #DEDEDC;
  text-decoration: none;
}
.menue__unter a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--c-marke); text-decoration-thickness: 2px; }

.menue__seite { display: grid; justify-items: start; gap: 1.15rem; color: var(--c-auf-dunkel); }
.menue__seite address { margin: 0; }
.menue__tel {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  color: #fff;
  font-family: var(--f-titel);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-decoration: none;
}
.menue__tel:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--c-marke); text-decoration-thickness: 3px; text-underline-offset: .2em; }
.menue__tel .ikon { color: var(--c-marke); }
.menue__klein { margin: 0; font-size: .95rem; }
.menue__klein a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; }
/* Oeffnungszeiten im Menue: Titel in Grossbuchstaben, Zeiten darunter */
.menue__zeiten { line-height: 1.5; }
.menue__zeiten-titel { margin: 0 0 .35rem; font-family: var(--f-titel); font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-marke); }
.menue__zeiten dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem 1.5rem; margin: 0; }
.menue__zeiten dt { color: #D9D9D7; white-space: nowrap; }
.menue__zeiten dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Die Menuepunkte ruecken nacheinander an ihren Platz */
.menue__liste > li,
.menue__seite > * {
  opacity: 0;
  translate: 0 10px;
  transition: opacity .8s, translate .95s var(--ease-weich);
}
.menue:popover-open .menue__liste > li,
.menue:popover-open .menue__seite > * {
  opacity: 1;
  translate: none;
  transition-delay: calc(min(var(--n, 0), 3) * 115ms + 420ms);
}
@starting-style {
  .menue:popover-open .menue__liste > li,
  .menue:popover-open .menue__seite > * { opacity: 0; translate: 0 10px; }
}

@media (max-width: 899px) {
  .menue__innen {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2.25rem;
    padding-block: 6.25rem 2.5rem;
  }
}
@media (max-width: 767px) {
  .menue__zu { top: .5rem; right: .5rem; }
  .menue__heim img { width: 64px; height: 64px; }
  .menue__link { padding: .5rem 0 .55rem; }   /* auf dem Handy mindestens 44 px hoch */
}

/* Ohne JavaScript funktionieren Filter und Pfeile nicht, deshalb verschwinden sie dann. */
html:not(.js) .filter,
html:not(.js) .slider__steuerung { display: none; }

/* ---------- Knoepfe und Links ---------- */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 50px;
  padding: .8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--c-marke);
  color: var(--c-auf-marke);
  font-family: var(--f-titel);
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .35s, color .35s, border-color .35s, transform .35s var(--ease), box-shadow .35s;
}
.knopf:hover {
  background: var(--c-marke-tief);
  color: var(--c-auf-marke);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -14px var(--c-marke-schatten);
}
/* Beim Druecken geht der Knopf ganz leicht zurueck: kurze, spuerbare Rueckmeldung */
.knopf:active, .tag:active:not(:disabled), .zeit:active:not(:disabled), .quadrat-knopf:active:not(:disabled) { transform: scale(.97); box-shadow: none; transition-duration: .12s; }
.knopf .ikon { width: 19px; height: 19px; }
@media (max-width: 767px) {
  /* Auf dem Handy etwas enger gesetzt, damit "Beratungstermin buchen" in eine Zeile passt */
  .knopf { padding-inline: .9rem; font-size: .86rem; letter-spacing: .06em; }
}
.knopf--rand {
  background: transparent;
  color: var(--c-text);
  border-color: rgba(60, 60, 59, .3);
}
.knopf--rand:hover { background: var(--c-hell); color: var(--c-text); border-color: var(--c-text); box-shadow: none; }
/* Dunkler Knopf fuer die gelbe Abschluss-Flaeche */
.knopf--hell { background: var(--c-text); color: #fff; }
.knopf--hell:hover { background: #2B2B2A; color: #fff; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .5); }
.knopf:disabled, .knopf[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.pfeil-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--c-text);
  font-family: var(--f-titel);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--c-marke);
  text-decoration-thickness: 3px;
  text-underline-offset: .45em;
  white-space: nowrap;
}
.pfeil-link .ikon { width: 19px; height: 19px; color: var(--c-text); transition: transform .3s var(--ease); }
.pfeil-link:hover { color: var(--c-text); text-decoration-color: var(--c-text); text-decoration-thickness: 3px; }
/* E-Mail-Adressen als Pfeil-Link: in Kleinbuchstaben, wie man sie tippt */
.pfeil-link--adresse { text-transform: none; letter-spacing: .04em; font-size: .95rem; }
.pfeil-link:hover .ikon { transform: translateX(4px); }

.tel-zeile { margin: 0; color: var(--c-text-weich); }
.tel-zeile a {
  color: var(--c-text);
  font-weight: 600;
  white-space: nowrap;
  text-decoration-color: var(--c-marke-tief);
  text-decoration-thickness: 2px;
}
.tel-zeile a:hover { color: var(--c-text); text-decoration-color: var(--c-text); }

.quadrat-knopf {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--c-fuge-tief);
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-text);
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, opacity .25s;
}
.quadrat-knopf:hover:not(:disabled) { background: var(--c-text); border-color: var(--c-text); color: #fff; }
.quadrat-knopf:disabled { opacity: .35; cursor: default; }
.quadrat-knopf .ikon { width: 20px; height: 20px; }

/* ---------- Bilder und Platzhalter ---------- */
/* Echte Fotos: <img class="bild" ...>. Platzhalter: <div class="bild bild--platzhalter ..."> */
.bild {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--c-fuge);
  aspect-ratio: var(--format, 4 / 3);
}
img.bild { height: auto; object-fit: cover; }
.bild > img { width: 100%; height: 100%; object-fit: cover; }
.bild > img, img.bild, .bild__icon { transition: transform .8s var(--ease); }

.bild--platzhalter {
  --fugenfarbe: rgba(40, 40, 42, .07);
  display: grid;
  place-items: center;
  color: var(--c-text-weich);
  background-color: #ECECEA;
  background-image:
    linear-gradient(var(--fugenfarbe) 1px, transparent 1px),
    linear-gradient(90deg, var(--fugenfarbe) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
}
/* Grautoene, damit die Seite schon jetzt wie mit Fotos wirkt. Gelb nur sparsam einsetzen. */
.bild--sand { background-color: #DCDCDA; }
.bild--marke-hell { background-color: #CCCCC9; color: var(--c-text); --fugenfarbe: rgba(40, 40, 42, .09); }
.bild--mittel { background-color: var(--c-mittel); color: #fff; --fugenfarbe: rgba(255, 255, 255, .09); }
.bild--graphit { background-color: var(--c-dunkel); color: #fff; --fugenfarbe: rgba(255, 255, 255, .08); }
.bild--marke { background-color: var(--c-marke); color: var(--c-auf-marke); --fugenfarbe: rgba(110, 88, 0, .16); }

/* Platzhalter mit Hinweis "Bild folgt in Kuerze" (Team) */
.bild__platz { display: grid; justify-items: center; gap: .6rem; padding: 1rem; text-align: center; }
.bild__folgt { font-family: var(--f-titel); font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.bild__icon {
  width: clamp(34px, 22%, 76px);
  height: auto;
  aspect-ratio: 1;
  stroke-width: 1.1;
  opacity: .9;
}

/* ---------- Kachelraster (Leistungen) ---------- */
.kachelraster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fuge);
  margin: 0;
  padding: var(--fuge);
  list-style: none;
  background: var(--c-fuge);
  border-radius: 4px;
}
.kachelraster > li { display: flex; }
.kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--c-grund);
  color: var(--c-text);
  border-radius: 2px;
  transition: background-color .35s;
}
.kachel .bild { border-radius: 0; }
.kachel__text {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.15rem 1.3rem 1.4rem;
}
.kachel__titel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  font-size: 1.02rem;
}
.kachel__titel a { min-width: 0; color: inherit; text-decoration: none; }
.kachel__titel a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.kachel__titel a:focus-visible { outline: none; }
.kachel:focus-within { outline: 2px solid var(--c-text); outline-offset: 2px; }
.kachel__pfeil { width: 20px; height: 20px; color: var(--c-text); transition: transform .35s var(--ease); }
.kachel p { margin: 0; color: var(--c-text-weich); font-size: .98rem; }
.kachel:hover { background: var(--c-grund-tief); }
.kachel:hover .kachel__pfeil { transform: translateX(4px); }
.kachel:hover .bild__icon,
.kachel:hover .bild > img,
.kachel:hover img.bild { transform: scale(1.04); }

@media (max-width: 899px) {
  .kachelraster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .kachel__text { padding: .8rem .85rem 1rem; }
  .kachel__titel { font-size: .8125rem; letter-spacing: .05em; hyphens: auto; }
  .kachel p { font-size: .9rem; }
  .kachel .bild { --format: 1 / 1 !important; }
}

/* ---------- Kopfbereich der Startseite ---------- */
/* Eine Wand aus Zierfliesen fuellt den ganzen Kopfbereich. Beim Oeffnen der Seite legt sie sich
   Fliese fuer Fliese, Reihe fuer Reihe. Davor steht eine dunkle Tafel mit Ueberschrift und Knopf. */
.held {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(100svh, 56rem);
  padding-block: calc(var(--logo) + clamp(2rem, 1rem + 3vw, 4rem)) clamp(2rem, 1rem + 4vw, 4.5rem);
  overflow: hidden;
  background: #2F2E30;
  color: #fff;
}

/* Die Fliesenwand. Die Fliesen stehen fertig in index.html (erzeugt mit .claude/werkzeug/wand.py). */
.wand {
  --fuge-wand: 6px;
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: start;
  gap: var(--fuge-wand);
  padding: var(--fuge-wand);
  background: #58575B;       /* Farbe der Fugen */
}
.wand > i {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--k1);
  color: var(--k2);
}
.wand > i > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  rotate: calc(var(--d, 0) * 90deg);
}
/* Farbpaare: Grund der Fliese und Farbe des Musters */
.wand .w1 { --k1: #3E3D3F; --k2: #4F4E51; }
.wand .w2 { --k1: #48474A; --k2: #5E5D61; }
.wand .w3 { --k1: #636365; --k2: #7B7B7E; }
.wand .w4 { --k1: #DCDCDA; --k2: #454648; }
.wand .w5 { --k1: var(--c-marke); --k2: #454648; }
.wand .w6 { --k1: #333234; --k2: #48474A; }
.wand .w7 { --k1: #3E3D3F; --k2: #CFCFCC; }

/* Ein einziger Lichtstreif, wie Licht auf glasierten Fliesen */
/* Der Lichtstreif ueber der Wand ist auf Wunsch entfernt (13.11.2026). */

/* Verlaeufe ueber der Wand: oben dunkler fuer Logo und Menue, links dunkler fuer die Tafel */
.held::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(34, 33, 35, .84), rgba(34, 33, 35, 0) 27%),
    linear-gradient(90deg, rgba(34, 33, 35, .42), rgba(34, 33, 35, 0) 62%);
}

.held__innen { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: var(--fuge); }
/* Sonderhinweis neben der Tafel (zum Beispiel frueherer Ladenschluss), gelb wie die Fliesen in der Wand */
.held__hinweis {
  width: min(100%, 25rem);
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.4rem);
  background: var(--c-marke);
  color: var(--c-auf-marke);
  box-shadow: 0 34px 60px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .15);
}
/* Titel klein und gesperrt, durch eine feine dunkle Linie und Abstand vom Satz darunter getrennt */
.held__hinweis .held__hinweis-titel { margin: 0 0 1.1rem; padding-bottom: .9rem; border-bottom: 2px solid rgba(69, 70, 72, .35); font-family: inherit; font-size: .95rem; font-weight: 700; letter-spacing: .16em; line-height: 1.3; text-transform: uppercase; color: var(--c-auf-marke); }
.held__hinweis .held__hinweis-text { margin: 0; font-size: clamp(1.3rem, 1rem + .9vw, 1.7rem); font-weight: 700; line-height: 1.35; }
.held__hinweis strong { white-space: nowrap; }
.tafel {
  width: min(100%, 36rem);
  padding: clamp(1.6rem, 1rem + 2.6vw, 3rem);
  background: var(--c-dunkel);
  box-shadow: 0 34px 60px -34px rgba(0, 0, 0, .75);
}
.tafel .oberzeile { color: #DEDEDC; }
.tafel h1 { margin-bottom: .7em; }
.tafel .einleitung { color: var(--c-auf-dunkel); }
.held__aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}
.held .tel-zeile { color: #DEDEDC; }
.held .tel-zeile a { color: #fff; text-decoration-color: var(--c-marke); }
.held .tel-zeile a:hover { color: #fff; text-decoration-color: #fff; }
.held :focus-visible { outline-color: var(--c-marke); }

/* Ueberschrift in fetten Zeilen, jede mit einem Balken darunter */
.titel-balken {
  display: grid;
  justify-items: start;
  gap: .34em;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1.08;
}
.titel-balken > span {
  display: block;
  margin-right: -.15em;
  padding-bottom: .2em;
  background: linear-gradient(var(--c-marke), var(--c-marke)) 0 100% / 100% .11em no-repeat;
}
.js .titel-balken[data-reveal] > span {
  --balken-start: 450ms;
  opacity: 0;
  translate: 0 .25em;
  scale: .985;
  background-size: 0% .11em;
  /* Jede Zeile: erst das Wort weich von unten (wie der Stempel im Intro), dann zieht sich der Balken auf */
  transition:
    opacity 1.8s var(--ease) calc(var(--z, 0) * 320ms + var(--balken-start)),
    translate 1.8s var(--ease) calc(var(--z, 0) * 320ms + var(--balken-start)),
    scale 1.8s var(--ease) calc(var(--z, 0) * 320ms + var(--balken-start)),
    background-size 1.6s var(--ease) calc(var(--z, 0) * 320ms + var(--balken-start) + 600ms);
}
.js .titel-balken[data-reveal].ist-sichtbar > span { opacity: 1; translate: none; scale: none; background-size: 100% .11em; }

/* Ablauf beim Oeffnen: Wand legt sich, Tafel kommt, Balken ziehen sich, Lichtstreif */
.js .wand.legen > * { transform: translateY(10px) scale(.94); }
.js .wand.legen.ist-gelegt > * { animation-duration: .7s; animation-delay: calc(var(--i, 0) * 13ms + 120ms); }
.js .tafel { animation: tafel-ein .9s var(--ease) .7s both; }
.js .tafel .titel-balken[data-reveal] > span { --balken-start: 1300ms; }
@keyframes tafel-ein { from { opacity: 0; transform: translateY(26px); } }
/* ---------- Intro der Startseite ---------- */
/* Beim ersten Aufruf: ein Foto aus der Ausstellung, stark abgedunkelt, zieht ganz langsam heran. Darauf
   erscheint weich der Stempel. Dann blendet alles zur Seite ueber. Ein Klick oder eine Taste ueberspringt
   das Intro. Wer von einer Unterseite kommt oder weniger Bewegung eingestellt hat, sieht es nicht. */
.intro { display: none; }
/* Solange das Intro laeuft, bleibt die Seite oben stehen (kein Rollen darunter) */
html.mit-intro:has(.intro) { overflow: hidden; }
.mit-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--c-dunkel);
  animation: intro-weg 1.8s var(--ease-aus) 3s forwards;
}
.intro__foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: brightness(.42) saturate(.7);
  animation: intro-foto 5s var(--ease-foto) both;
  will-change: transform, opacity;
}
.intro__stempel {
  position: relative;
  width: clamp(180px, 32vmin, 270px);
  height: auto;
  opacity: 0;
  animation: intro-stempel 1.76s var(--ease) .7s both, intro-stempel-weg 1.2s var(--ease-aus) 2.9s forwards;
}
/* Das Intro laeuft erst los, wenn Foto und Stempel fertig entpackt sind (Klasse intro-los, siehe index.html).
   Sonst stockt der allererste Moment, weil der Browser das Bild noch aufbereitet. */
.mit-intro:not(.intro-los) .intro,
.mit-intro:not(.intro-los) .intro__foto,
.mit-intro:not(.intro-los) .intro__stempel { animation-play-state: paused; }
@keyframes intro-foto {
  from { opacity: 0; transform: scale(1.1); }
  25% { opacity: 1; }
  to { opacity: 1; transform: scale(1); }
}
@keyframes intro-stempel {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes intro-stempel-weg { to { opacity: 0; transform: translateY(-8px); } }
@keyframes intro-weg { to { opacity: 0; visibility: hidden; } }
/* Mit Intro: Die Wand legt sich schon unter der Intro-Flaeche, unsichtbar. Beim Ueberblenden steht sie
   also still. Schild und Tafel kommen erst, wenn das Intro ganz weg ist (ab 4,8 s), langsam und weich. */
.mit-intro .wand.legen.ist-gelegt > * { animation-delay: calc(var(--i, 0) * 10ms + 1.2s); }
.mit-intro .kopf .logo__bild { animation-duration: 1.2s; animation-delay: 5s; }
.mit-intro .tafel { animation-duration: 1.8s; animation-timing-function: var(--ease); animation-delay: 4.9s; }
/* Intro uebersprungen: alles laeuft sofort an, aber genauso weich */
.intro-uebersprungen .wand.legen.ist-gelegt > * { animation-delay: calc(var(--i, 0) * 8ms); }
.intro-uebersprungen .kopf .logo__bild { animation-delay: .3s; }
.intro-uebersprungen .tafel { animation-delay: .4s; }
.mit-intro .tafel .titel-balken[data-reveal] > span { --balken-start: 5.1s; }
/* Nach dem Intro setzt main.js die Klasse nach-intro: Die Balken fahren dann kurz nach dem Ueberblenden ein */
.nach-intro .tafel .titel-balken[data-reveal] > span { --balken-start: 700ms; }

/* Beim naechsten Besuch in derselben Sitzung geht alles schneller */
.kurz .wand.legen.ist-gelegt > * { animation-duration: .65s; animation-delay: calc(var(--i, 0) * 4ms); }
.kurz .tafel { animation-duration: .5s; animation-delay: .12s; }
.kurz .tafel .titel-balken[data-reveal] > span { --balken-start: 350ms; }

/* Beim Scrollen bleibt die Wand ein wenig zurueck (nur in Browsern, die das selbst koennen) */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .wand {
      animation: wand-zieht linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 100vh;
    }
    @keyframes wand-zieht { to { translate: 0 8%; } }
  }
}

@media (min-width: 1700px) {
  .wand { grid-template-columns: repeat(14, minmax(0, 1fr)); }
}
@media (max-width: 1179px) {
  .wand { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .held {
    min-height: calc(100svh - 4.5rem);
    padding-block: calc(var(--logo) + 3.5rem) 1.25rem;
  }
  .wand { --fuge-wand: 5px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .held__aktionen { margin-top: 1.5rem; }
  .held__aktionen .knopf { width: 100%; }
  /* Am Handy steht der Hinweis ueber der Tafel und ist so breit wie sie */
  .held__innen { flex-direction: column; align-items: stretch; }
  .held__hinweis { order: -1; width: 100%; padding: 1.2rem 1.3rem 1.3rem; }
  .held__hinweis .held__hinweis-text { font-size: 1.3rem; }
  .held__hinweis .held__hinweis-titel { margin-bottom: .8rem; padding-bottom: .7rem; }
}

/* Kacheln "legen sich" nacheinander, wie beim Verlegen */
.js .legen > * {
  opacity: 0;
  transform: translateY(14px) scale(.97);
}
.js .legen.ist-gelegt > * {
  animation: legen .9s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 105ms + 180ms);
}
@keyframes legen { to { opacity: 1; transform: none; } }

/* ---------- Karten, Zeiten, Listen ---------- */
.karte {
  padding: 1.4rem 1.5rem;
  background: var(--c-hell);
  color: var(--c-text);
  border: 1px solid var(--c-fuge);
  border-radius: var(--radius);
}
.karte__titel {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .9rem;
  font-family: var(--f-text);
  font-size: .98rem;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.3;
  text-transform: none;
}
.karte__titel .ikon { width: 20px; height: 20px; color: var(--c-text); }

/* ---------- Lager-Oeffnungszeiten (Leistungen) ---------- */
/* Eine helle Kachel wie die abgesetzten Flaechen der Seite, oben ein gelber Balken, die Zeilen durch Fugen getrennt */
.lager {
  margin-top: 2rem;
  padding: 1.5rem 1.6rem 1.4rem;
  background: var(--c-grund-tief);
  border-top: 4px solid var(--c-marke);
}
.lager__titel { margin-bottom: 1rem; font-size: .9rem; color: var(--c-text); }
.lager__zeiten {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.5rem;
  margin: 0;
}
.lager__zeiten dt,
.lager__zeiten dd { margin: 0; padding: .6rem 0; border-top: 1px solid var(--c-fuge-tief); }
.lager__zeiten dt { color: var(--c-text-weich); white-space: nowrap; }
.lager__zeiten dd { font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.5; }
.lager__zeiten dt:first-of-type,
.lager__zeiten dd:first-of-type { border-top: 0; padding-top: 0; }
.lager__fuss { margin: .9rem 0 0; padding-top: .9rem; border-top: 1px solid var(--c-fuge-tief); font-size: .95rem; color: var(--c-text-weich); }
@media (max-width: 480px) {
  .lager { padding: 1.2rem 1.1rem 1.1rem; }
  .lager__zeiten { grid-template-columns: minmax(0, 1fr); }
  .lager__zeiten dd { padding-top: 0; border-top: 0; }
  .lager__zeiten dt { padding-bottom: .15rem; }
  .lager__zeiten dd:first-of-type { padding-bottom: .6rem; }
}
.karte__klein { margin: .9rem 0 0; color: var(--c-text-weich); font-size: .9rem; }
.karte address + p { margin-top: 1rem; }

.zeiten {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .4rem 1.5rem;
  margin: 0;
}
.zeiten dt { color: var(--c-text-weich); }
/* Zeiten brechen nie mitten in einer Uhrzeit um, laufen aber auch nie aus dem Kasten hinaus */
.zeiten dd { margin: 0; min-width: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.zeiten dd { white-space: normal; }
.zeiten dt { white-space: nowrap; }
@media (max-width: 480px) {
  .zeiten { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .zeiten dd { margin-bottom: .55rem; white-space: normal; }
  .zeiten dd:last-child { margin-bottom: 0; }
}

.liste-haken {
  display: grid;
  gap: .55rem;
  margin: 1.25rem 0 1.75rem;
  padding: 0;
  list-style: none;
}
.liste-haken li { position: relative; padding-left: 1.65rem; }
.liste-haken li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 9px;
  height: 9px;
  background: var(--c-marke);
  border-radius: 1px;
}

.luecke {
  display: inline-block;
  padding: .05em .55em;
  border: 1px dashed var(--c-fuge-tief);
  border-radius: 2px;
  background: rgba(40, 40, 42, .04);
  color: var(--c-text-weich);
  font-family: var(--f-text);
  font-size: .9em;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.hinweis {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin: 0 0 2rem;
  padding: 1.1rem 1.25rem;
  background: var(--c-marke-hell);
  border-left: 3px solid var(--c-marke);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hinweis .ikon { width: 22px; height: 22px; margin-top: .15rem; color: var(--c-text); }
.hinweis p { margin: 0; }
.hinweis--entwurf { background: var(--c-grund-tief); border-left-color: var(--c-fuge-tief); }
.hinweis--entwurf .ikon { color: var(--c-text-weich); }
/* Auf abgesetzter Flaeche haette der Hinweis sonst dieselbe Farbe wie der Abschnitt */
.abschnitt--tief .hinweis--entwurf { background: var(--c-grund); }

/* Kurze Reihe aus Pfeil-Links (Fehlerseite) */
.wegweiser {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

/* ---------- Bildgruppe: Fotos wie Fliesen nebeneinander ---------- */
/* Ein hohes Foto links, zwei quadratische rechts, dazwischen nur die Fuge. Kein Bild liegt ueber einem anderen. */
.bildgruppe {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--fuge);
  aspect-ratio: 5 / 4;
}
.bildgruppe > .bild { height: 100%; aspect-ratio: auto; border-radius: 2px; }
.bildgruppe > :first-child { grid-row: 1 / -1; }
.bildgruppe > :nth-child(2):last-child { grid-row: 1 / -1; }   /* nur zwei Fotos: beide ueber die ganze Hoehe */

/* ---------- Waagrechter Bilderstreifen zum Durchwischen ---------- */
.slider { position: relative; }
.slider__spur {
  display: flex;
  gap: calc(var(--fuge) * 2.5);
  margin: 0 calc(-1 * var(--rand));
  padding: 0 var(--rand) .5rem;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--rand);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.slider__spur::-webkit-scrollbar { display: none; }
.slider__spur:focus-visible { outline-offset: -2px; }
.slider__element { flex: 0 0 clamp(240px, 27vw, 340px); scroll-snap-align: start; }
.slider__steuerung { display: flex; gap: .5rem; }
.slider__fuss { margin-top: 2rem; }

.projekt-karte { margin: 0; }
.projekt-karte .bild { --format: 4 / 5; }
.projekt-karte figcaption {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding-top: .9rem;
}
.projekt-karte__art {
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-weich);
}
.projekt-karte__titel {
  font-family: var(--f-titel);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
}
.projekt-karte:hover .bild__icon,
.projekt-karte:hover .bild > img,
.projekt-karte:hover img.bild { transform: scale(1.04); }

@media (max-width: 767px) {
  .slider__steuerung { display: none; }
  .slider__element { flex-basis: 72vw; }
}

/* ---------- Schritte (So laeuft's ab) ---------- */
.schritte {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 1rem + 2.5vw, 3.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.schritte--vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.schritt {
  position: relative;
  padding-top: 1.75rem;
  border-top: 1px solid var(--c-fuge-tief);
}
.schritt::before {
  content: "";
  position: absolute;
  left: 0; top: -2px;
  width: 100%;
  height: 3px;
  background: var(--c-marke);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease) .25s;
}
.schritt.ist-sichtbar::before,
html:not(.js) .schritt::before { transform: scaleX(1); }
.schritt__nr {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.2rem;
  background: var(--c-marke);
  color: var(--c-auf-marke);
  border-radius: 2px;
  font-family: var(--f-titel);
  font-size: 1.2rem;
}
.schritt h3 { margin-bottom: .45rem; }
.schritt p { margin: 0; color: var(--c-text-weich); }

@media (max-width: 1023px) {
  .schritte--vier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .schritte, .schritte--vier { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .schritt { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.1rem; padding-top: 1.25rem; }
  .schritt__nr { grid-row: span 2; margin: 0; width: 2.3rem; height: 2.3rem; font-size: 1.05rem; }
}

/* ---------- Merkmale (drei Punkte nebeneinander) ---------- */
.merkmale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.merkmal__ikon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.1rem;
  background: var(--c-marke);
  color: var(--c-auf-marke);
  border-radius: 2px;
}
.merkmal__ikon .ikon { width: 24px; height: 24px; }
.merkmal h3 { margin-bottom: .4rem; }
.merkmal p { margin: 0; color: var(--c-text-weich); }
@media (max-width: 899px) {
  .merkmale { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Abschluss: Einladung zum Beratungstermin ---------- */
/* Dunkle Tafel mit gelbem Knopf */
.abschluss {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem 3rem;
  padding: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
  overflow: hidden;
  background: var(--c-dunkel);
  color: #fff;
  border-radius: 2px;
}
.abschluss::before {
  content: "";
  position: absolute;
  inset: 0 0 0 50%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
  mask-image: linear-gradient(90deg, transparent, #000 70%);
}
.abschluss > * { position: relative; }
.abschluss h2 { color: #fff; font-weight: 700; letter-spacing: .14em; }
.abschluss p { color: var(--c-auf-dunkel); max-width: 36rem; }
.abschluss__aktionen {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  justify-self: end;
}
.abschluss .knopf--hell { background: var(--c-marke); color: var(--c-auf-marke); }
.abschluss .knopf--hell:hover { background: var(--c-marke-tief); color: var(--c-auf-marke); box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .6); }
.abschluss .tel-zeile { color: #DEDEDC; }
.abschluss .tel-zeile a { color: #fff; text-decoration-color: var(--c-marke); }
.abschluss .tel-zeile a:hover { color: #fff; text-decoration-color: #fff; }
.abschluss :focus-visible { outline-color: var(--c-marke); }
@media (max-width: 899px) {
  .abschluss { grid-template-columns: minmax(0, 1fr); }
  .abschluss__aktionen { justify-self: start; }
  .abschluss::before { inset: 50% 0 0 0; -webkit-mask-image: linear-gradient(180deg, transparent, #000 80%); mask-image: linear-gradient(180deg, transparent, #000 80%); }
}
@media (max-width: 767px) {
  .abschluss__aktionen { width: 100%; }
  .abschluss__aktionen .knopf { width: 100%; }
}
@media (max-width: 480px) {
  .abschluss { padding: 1.75rem 1.25rem; }
  .abschluss__aktionen .knopf { padding-inline: 1rem; }
}

/* ---------- Kopfbereich der Unterseiten ---------- */
/* Dunkle Flaeche mit fetter weisser Ueberschrift und gelbem Balken */
.seitenkopf {
  padding-block: calc(var(--logo) + clamp(1.75rem, 1rem + 2vw, 3rem)) clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  background: var(--c-dunkel);
  color: #fff;
}
.seitenkopf__raster {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
/* Unterseiten: rechts neben dem Text ein grosses Foto aus dem Betrieb, das beim Oeffnen weich aufblendet */
.seitenkopf__raster--bild { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); }
.seitenkopf__bild {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  animation: kopf-bild 1.6s var(--ease-weich) .15s both;
}
.seitenkopf__bild img { width: 100%; height: 100%; object-fit: cover; animation: kopf-foto 7s var(--ease-foto) both; }
.kurz .seitenkopf__bild { animation-duration: 1.1s; animation-delay: 0s; }
/* Blendet der Browser die Seiten selbst ueber, braucht das Kopfbild keine zweite Einblendung */
@supports (view-transition-name: x) { .kurz .seitenkopf__bild { animation: none; } }
/* Startseite ueber die Kopfzeile (Logo) erreicht: Der Kopfbereich blendet als Ganzes ein (Seitenwechsel).
   Wand und Tafel stehen dabei schon fertig da, sonst legen sich 168 Kacheln unter dem Einblenden und es ruckelt. */
@supports (view-transition-name: x) {
  .kurz .wand.legen > *, .kurz .wand.legen.ist-gelegt > * { opacity: 1; transform: none; animation: none; }
  .kurz .tafel { animation: none; }
}
.kurz .seitenkopf__bild img { animation-duration: 3s; }
@keyframes kopf-bild { from { opacity: 0; translate: 0 12px; } }
@keyframes kopf-foto { from { transform: scale(1.06); } to { transform: none; } }
@media (max-width: 899px) {
  .seitenkopf__raster--bild { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .seitenkopf__bild { aspect-ratio: 3 / 2; }
}
.seitenkopf h1 { margin-bottom: .75em; font-weight: 700; letter-spacing: .14em; }
.seitenkopf h1::after {
  content: "";
  display: block;
  width: 3.4em;
  height: .11em;
  margin-top: .42em;
  background: var(--c-marke);
}
.seitenkopf .einleitung { max-width: 40rem; margin: 0; color: var(--c-auf-dunkel); }
.seitenkopf .einleitung a, .seitenkopf .einleitung a:hover { color: #fff; }
.seitenkopf .einleitung a:hover { text-decoration-color: var(--c-marke); }
.seitenkopf .oberzeile { color: #DEDEDC; }
.seitenkopf :focus-visible { outline-color: var(--c-marke); }

.brotkrumen { margin: 0 0 1.4rem; font-size: .9rem; color: #D4D4D2; }
.brotkrumen ol { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.brotkrumen li + li::before { content: "/"; margin-right: .45rem; color: #A9A9A7; }
.brotkrumen a { color: #D4D4D2; text-decoration: none; }
.brotkrumen a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 767px) {
  /* Auf dem Handy steht rechts oben der Reiter: die Brotkrumen brechen vorher um */
  .brotkrumen { margin-right: 4.5rem; }
}

.seitenkopf__kacheln {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fuge);
  width: 100%;
  max-width: 24rem;
  justify-self: end;
  padding: var(--fuge);
  background: var(--c-fuge);
  border-radius: 2px;
}
.deko {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 1px;
  background: var(--c-grund);
  color: var(--c-text);
}
.deko .ikon { width: 42%; height: auto; aspect-ratio: 1; stroke-width: 1.2; }
.deko--tief { background: #DCDCDA; }
.deko--sand { background: #CCCCC9; }
.deko--marke { background: var(--c-marke); color: var(--c-auf-marke); }
.deko--marke-hell { background: var(--c-mittel); color: #fff; }
.deko--graphit { background: var(--c-dunkel); color: #fff; }
/* Kacheln mit Inhalt aus dem Betrieb: Fotos, Logo, drei Worte, ein Fliesenmuster */
.deko { position: relative; overflow: hidden; }
.deko--foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.deko--logo { gap: .15rem; align-content: center; }
.deko--logo img { width: 54%; height: auto; }
.deko--logo small { font-family: var(--f-titel); font-size: .8125rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.deko--worte {
  padding: .5rem;
  font-family: var(--f-titel);
  font-size: clamp(.8125rem, .55rem + .5vw, .86rem);
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.45;
  text-transform: uppercase;
  text-align: center;
}
.deko--muster { background: #5A595C; color: #8E8D90; }
.deko--muster svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 899px) {
  .seitenkopf__raster { grid-template-columns: minmax(0, 1fr); }
  .seitenkopf__kacheln { display: none; }
}

.textbreite { max-width: 44rem; }

/* ---------- Galerie (Bildkacheln mit Fugen) ---------- */
.galerie {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(120px, 13vw, 190px);
  gap: var(--fuge);
  margin: 0;
  padding: var(--fuge);
  list-style: none;
  background: var(--c-fuge);
  border-radius: 4px;
}
.galerie > li { display: flex; }
.galerie .bild { height: 100%; aspect-ratio: auto; border-radius: 2px; }
.galerie .g-breit { grid-column: span 2; }
.galerie .g-hoch { grid-row: span 2; }
.galerie .g-gross { grid-column: span 2; grid-row: span 2; }

/* ---------- Bildwechsel (Ausstellung) ---------- */
/* Ein grosses Bild, die anderen liegen unsichtbar darunter und blenden weich ueber. Darunter eine Reihe
   Vorschaubilder; das aktive hat einen gelben Rahmen. Pfeile am Rand, auf dem Handy auch Wischen (main.js). */
/* Nicht ueber die ganze Breite: mittig, hoechstens etwa 930 px breit, damit das Bild nicht den Bildschirm fuellt */
.bildwechsel { max-width: 58rem; margin-inline: auto; }
.bildwechsel__buehne {
  position: relative;
  aspect-ratio: 4 / 3;      /* wie die Fotos selbst: nichts wird oben und unten abgeschnitten */
  overflow: hidden;
  background: var(--c-grund-tief);
  border-radius: 2px;
}
/* Das neue Bild gleitet beim Einblenden ein kleines Stueck herein, das alte gleitet in dieselbe Richtung hinaus */
.bildwechsel__bild {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateX(5%) scale(1.025);
  /* sehr lange, sanfte Ueberblendung; die Bewegung laeuft noch etwas laenger nach als das Einblenden */
  transition: opacity 1.8s var(--ease-foto), transform 2s var(--ease-foto);
}
.bildwechsel__bild.war-aktiv { transform: translateX(-5%) scale(1); }
.bildwechsel--zurueck .bildwechsel__bild { transform: translateX(-5%) scale(1.025); }
.bildwechsel--zurueck .bildwechsel__bild.war-aktiv { transform: translateX(5%) scale(1); }
.bildwechsel__bild.ist-aktiv { opacity: 1; transform: none; z-index: 1; }
.bildwechsel__bild img { width: 100%; height: 100%; object-fit: cover; }
.bildwechsel__pfeil {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, .94);
  border-color: transparent;
  color: var(--c-text);
}
.bildwechsel__pfeil .ikon { width: 24px; height: 24px; stroke-width: 2.8; }
.bildwechsel__pfeil:hover:not(:disabled) { background: var(--c-marke); border-color: var(--c-marke); color: var(--c-text); }
.bildwechsel__pfeil--zurueck { left: .9rem; }
.bildwechsel__pfeil--weiter { right: .9rem; }
.bildwechsel__unten { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .9rem; }
.bildwechsel__text { margin: 0; color: var(--c-text-weich); font-size: .95rem; min-height: 1.5em; }
.bildwechsel__zaehler { flex: none; font-size: .85rem; letter-spacing: .08em; color: var(--c-text-weich); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .bildwechsel__pfeil { width: 42px; height: 42px; }   /* auf dem Handy kann man auch wischen */
  .bildwechsel__pfeil--zurueck { left: .5rem; }
  .bildwechsel__pfeil--weiter { right: .5rem; }
}
@media (max-width: 599px) {
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 36vw, 216px); }
}

/* ---------- Team, Partner, Zeitstrahl ---------- */
/* Team wie in der Vorlage: Portraet als Kachel, darunter eine graue Kachel mit Name und Aufgabe */
.team-gruppe + .team-gruppe { margin-top: clamp(2.75rem, 2rem + 3vw, 4.5rem); }
.team-gruppe__titel {
  margin: 0 0 1.25rem;
  font-size: clamp(1.15rem, 1rem + .7vw, 1.6rem);
  font-weight: 400;
  letter-spacing: var(--sperrung);
}
.team-raster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--fuge);
  margin: 0;
  padding: 0;
  list-style: none;
}
.person { display: grid; grid-template-rows: auto 1fr; gap: var(--fuge); }
.person .bild { --format: 3 / 4; border-radius: 1px; }
.person img.bild, .person .bild > img { filter: grayscale(1); }
.person__info {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: .3rem;
  min-height: 8.5rem;
  padding: 1.35rem .8rem 1.5rem;
  background: var(--c-mittel);
  color: #fff;
  border-radius: 1px;
  font-size: .95rem;
  line-height: 1.45;
  text-align: center;
}
.person__name { margin: 0 0 .15rem; font-size: 1rem; font-weight: 700; letter-spacing: .12em; }
.person__rolle { margin: 0; }
/* Arbeitstage und Zeiten unter der Mailadresse: etwas kleiner als der Text, aber gut lesbar */
.person__info small { font-size: .9em; }
.person__info a { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); overflow-wrap: anywhere; }
.person__info a:hover { color: #fff; text-decoration-color: #fff; }
.person__info :focus-visible { outline-color: var(--c-marke); }
@media (max-width: 999px) {
  .team-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .team-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person__info { min-height: 7.5rem; padding: 1rem .5rem 1.1rem; font-size: .86rem; }
  .person__name { font-size: .84rem; letter-spacing: .08em; }
}

/* Partner: Kacheln mit Gewerk, Name und Link. Die ganze Kachel ist anklickbar und wird beim Zeigen dunkel. */
.partner-raster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--fuge);
  margin: 0;
  padding: var(--fuge);
  list-style: none;
  background: var(--c-fuge);
  border-radius: 2px;
}
.partner-raster > li { display: flex; }
.partner {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  width: 100%;
  min-height: 14rem;
  padding: 1.4rem 1.4rem 1.3rem;
  background: var(--c-grund);
  border-radius: 1px;
  color: var(--c-text);
  text-decoration: none;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
/* Logo-Feld oben in der Kachel: alle gleich hoch, Logo mittig und ganz zu sehen */
.partner__logo {
  display: grid;
  place-items: center;
  height: 5.5rem;
  margin: -.2rem 0 .9rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--c-fuge);
}
.partner__logo img { display: block; max-width: 100%; max-height: 4.2rem; width: auto; height: auto; object-fit: contain; }
.partner__logo--text {
  font-family: var(--f-titel);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-weich);
}
.partner:hover .partner__logo, .partner:focus-visible .partner__logo { border-color: rgba(255, 255, 255, .2); }
.partner:hover .partner__logo img, .partner:focus-visible .partner__logo img { background: #fff; padding: .35rem; border-radius: 2px; }
.partner__gewerk {
  display: flex;
  align-items: flex-start;
  gap: .6em;
  min-height: 3em;             /* Platz fuer zwei Zeilen: so stehen alle Namen auf derselben Hoehe */
  font-family: var(--f-titel);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--c-text-weich);
  transition: color .35s var(--ease);
}
.partner__gewerk::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: .32em;
  background: var(--c-marke);
  border-radius: 1px;
}
.partner__name { margin: .35rem 0 0; font-size: 1.12rem; font-weight: 600; letter-spacing: .12em; line-height: 1.4; }
.partner__zusatz { font-size: .9rem; color: var(--c-text-weich); transition: color .35s var(--ease); }
.partner__link {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: .92rem;
  font-weight: 500;
}
.partner__link .ikon { width: 16px; height: 16px; rotate: -45deg; transition: translate .3s var(--ease); }
.partner:hover, .partner:focus-visible { background: var(--c-dunkel); color: #fff; }
.partner:hover .partner__gewerk, .partner:focus-visible .partner__gewerk,
.partner:hover .partner__zusatz, .partner:focus-visible .partner__zusatz { color: var(--c-auf-dunkel); }
.partner:hover .partner__link .ikon { translate: 2px -2px; }
.partner:focus-visible { outline-color: var(--c-marke); outline-offset: -5px; }
@media (max-width: 1099px) {
  .partner-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .partner-raster { grid-template-columns: minmax(0, 1fr); }
  .partner { min-height: 0; }
  .partner__gewerk { min-height: 0; }
}

/* Historie: Kapitel links, Stationen rechts. Grosse Jahreszahlen, feine Linien, ein gelber Balken je Station. */
.chronik {
  display: grid;
  gap: clamp(3rem, 2rem + 4vw, 5.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.chronik__kapitel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.chronik__zeit {
  margin: 0 0 .7rem;
  font-family: var(--f-titel);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-marke);
}
.chronik__kopf h3 {
  margin: 0;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 400;
  letter-spacing: var(--sperrung);
  line-height: 1.3;
}
.chronik__liste {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.chronik__punkt {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: .5rem 2rem;
  align-items: start;
  padding: 1.7rem 0 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.chronik__jahr {
  margin: 0;
  font-family: var(--f-titel);
  font-size: clamp(2.1rem, 1.5rem + 2vw, 3rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: .03em;
  font-variant-numeric: lining-nums tabular-nums;
  color: #fff;
}
/* Der gelbe Balken unter der Jahreszahl zieht sich auf, sobald die Station zu sehen ist */
.chronik__jahr::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 4px;
  margin-top: .8rem;
  background: var(--c-marke);
  transform-origin: left center;
  /* Zieht sich auf, wenn die Station ins Bild kommt (Klasse zeigt-balken aus main.js), und bleibt dann. */
  transition: transform .9s var(--ease) calc(var(--verz, 0ms) + .5s);
}
.js .chronik__punkt:not(.zeigt-balken) .chronik__jahr::after { transform: scaleX(0); transition: none; }
.chronik__punkt h4 { margin: .2rem 0 .4rem; font-size: 1rem; font-weight: 600; letter-spacing: .12em; line-height: 1.4; }
.chronik__punkt p:not(.chronik__jahr) { margin: 0; max-width: 34rem; color: var(--c-auf-dunkel); }
@media (min-width: 900px) {
  .chronik__kapitel {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 0 clamp(2rem, 1rem + 5vw, 6rem);
    align-items: start;
  }
  /* Der Kapitelname bleibt stehen, waehrend die Stationen daran vorbeiziehen */
  .chronik__kopf { position: sticky; top: 2.5rem; padding-top: 1.6rem; }
}
@media (max-width: 599px) {
  .chronik__punkt { grid-template-columns: minmax(0, 1fr); padding: 1.4rem 0 1.5rem; }
  .chronik__jahr::after { margin-top: .6rem; }
}

/* ---------- Stellenangebote ---------- */
.stellen { display: grid; gap: var(--fuge); margin: 0; padding: 0; list-style: none; }
.stelle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
  padding: 1.5rem 1.75rem;
  background: var(--c-hell);
  border: 1px solid var(--c-fuge);
  border-radius: var(--radius);
  transition: border-color .3s, transform .3s var(--ease);
}
.stelle:hover { border-color: var(--c-fuge-tief); transform: translateY(-2px); }
.stelle__titel { margin: 0 0 .4rem; font-size: 1.12rem; font-weight: 600; letter-spacing: .12em; }
.stelle__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.1rem;
  margin: 0 0 .65rem;
  color: var(--c-text-weich);
  font-size: .92rem;
}
.stelle__meta span { display: inline-flex; align-items: center; gap: .4rem; }
.stelle__meta .ikon { width: 16px; height: 16px; color: var(--c-text); }
.stelle p { margin: 0; }
.stelle .stelle__meta { margin-bottom: .65rem; }
@media (max-width: 767px) {
  .stelle { grid-template-columns: minmax(0, 1fr); padding: 1.3rem; }
}

/* ---------- Projekte mit Filter ---------- */
.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; }
.filter__knopf {
  min-height: 44px;
  padding: .5rem 1.15rem;
  border: 1px solid var(--c-fuge-tief);
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-text);
  font-family: var(--f-text);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.filter__knopf:hover { border-color: var(--c-text); }
.filter__knopf[aria-pressed="true"] { background: var(--c-text); border-color: var(--c-text); color: #fff; }

.projekt-raster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  container-type: inline-size;
}
/* Drei Kartengroessen: hochkant (eine Zelle), breit (zwei Spalten, so hoch wie die hochkanten
   daneben) und gross (zwei Spalten, zwei Reihen). Die Reihen muessen immer aufgehen. */
.projekt-raster__breit { grid-column: span 2; }
.projekt-karte--breit .bild { aspect-ratio: auto; height: calc((100cqw - 3.75rem) * 0.3125); }
.projekt-raster__gross { grid-column: span 2; grid-row: span 2; }
.projekt-raster__gross .projekt-karte { display: flex; flex-direction: column; height: 100%; }
.projekt-karte--gross .bild { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
.ist-eingeblendet { animation: einblenden .55s var(--ease); }
@keyframes einblenden { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 899px) {
  .projekt-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .projekt-karte--breit .bild { height: calc((100cqw - 1.25rem) * 0.625); }
  .projekt-raster__gross { grid-column: auto; grid-row: auto; }
  .projekt-raster__gross .projekt-karte { display: block; height: auto; }
  .projekt-karte--gross .bild { aspect-ratio: 4 / 5; }
}
@media (max-width: 520px) {
  .projekt-raster { grid-template-columns: minmax(0, 1fr); }
  .projekt-raster__breit { grid-column: auto; }
  .projekt-karte--breit .bild { height: auto; aspect-ratio: 4 / 3; }
}

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */
.textseite { max-width: 48rem; }
.textseite h2 { margin: 2.75rem 0 .75rem; font-size: clamp(1.15rem, 1.05rem + .4vw, 1.4rem); font-weight: 500; letter-spacing: .14em; }
.textseite h3 { margin: 1.75rem 0 .5rem; font-size: 1rem; }
.textseite h2:first-child { margin-top: 0; }
.textseite p, .textseite li { max-width: 68ch; }
.textseite ul { padding-left: 1.2rem; }
.textseite li { margin-bottom: .35rem; }
.textseite address { margin: 0 0 1em; }

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 1.15rem; }
.formular__reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
@media (max-width: 640px) {
  .formular__reihe { grid-template-columns: minmax(0, 1fr); }
}
.feld { display: grid; gap: .4rem; align-content: start; }
.feld label { font-size: .95rem; font-weight: 600; }
.feld__pflicht { color: var(--c-text); font-weight: 700; }
.feld input,
.feld select,
.feld textarea {
  width: 100%;
  min-height: 50px;
  padding: .75rem .9rem;
  border: 1px solid var(--c-rand-feld);
  border-radius: var(--radius);
  background: var(--c-hell);
  color: var(--c-text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}
.feld select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-text) 50%), linear-gradient(135deg, var(--c-text) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 52%, calc(100% - .95rem) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.feld textarea { min-height: 8rem; resize: vertical; }
.feld input:hover, .feld select:hover, .feld textarea:hover { border-color: var(--c-text-weich); }
.feld input:focus, .feld select:focus, .feld textarea:focus {
  border-color: var(--c-text);
  box-shadow: 0 0 0 3px rgba(255, 213, 0, .55);
}
.feld [aria-invalid="true"] { border-color: var(--c-fehler); }
.feld__fehler { margin: 0; color: var(--c-fehler); font-size: .9rem; }
.feld__hilfe { margin: 0; color: var(--c-text-weich); font-size: .88rem; }

/* Dateien mitschicken: grosse Ablageflaeche, darunter die Liste der gewaehlten Dateien */
.feld--dateien input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.feld--dateien { position: relative; }
.ablage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 5.5rem;
  padding: 1.3rem 1.2rem 1.4rem;
  border: 2px dashed var(--c-fuge-tief);
  border-radius: var(--radius);
  background: var(--c-grund);
  color: var(--c-text-weich);
  cursor: pointer;
  text-align: center;
  transition: border-color .25s, background-color .25s, color .25s;
}
.ablage .ablage__ikon { width: 28px; height: 28px; flex: none; }
.ablage__text { margin: 0; }
.ablage__text label { cursor: pointer; }
.ablage__knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .2rem; }
.ablage__knopf { cursor: pointer; }
.ablage__knopf .ikon { width: 18px; height: 18px; }
/* Mit Maus: Dateien lassen sich hineinziehen, die Kamera gibt es nur auf dem Handy */
@media (hover: none), (pointer: coarse) { .ablage__ziehen { display: none; } }
@media (hover: hover) and (pointer: fine) { .ablage__knoepfe { display: none; } }
/* Auf dem Handy sind die Knoepfe das Wichtigste, die Textzeile wird zur Ueberschrift */
@media (hover: none), (pointer: coarse) { .ablage__text { font-size: .95rem; } }
.ablage strong { color: var(--c-text); font-weight: 600; }
.ablage:hover, .ablage.ist-aktiv { border-color: var(--c-text); background: var(--c-marke-hell); color: var(--c-text); }
.feld--dateien:has(input[type="file"]:focus-visible) .ablage { outline: 2px solid var(--c-text); outline-offset: 2px; }
.ablage__liste { display: grid; gap: .4rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.ablage__liste:empty { display: none; }
.ablage__liste li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .6rem .45rem .8rem;
  background: var(--c-grund);
  border: 1px solid var(--c-fuge);
  border-radius: var(--radius);
  font-size: .92rem;
  animation: knopf-auf .5s var(--ease-weich) both;
}
.ablage__liste .ikon { width: 18px; height: 18px; flex: none; color: var(--c-text-weich); }
.ablage__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ablage__groesse { color: var(--c-text-weich); white-space: nowrap; }
.ablage__weg {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text-weich);
  cursor: pointer;
}
.ablage__weg:hover { background: var(--c-fuge); color: var(--c-text); }
.knopf--klein { min-height: 0; padding: .5rem .9rem; font-size: .8125rem; }
.ablage__weg .ikon { width: 16px; height: 16px; color: inherit; }
/* Beim Oeffnen der Kontaktseite leuchtet der Rahmen der Terminwahl einmal sanft gelb auf */
.termin.betont { position: relative; }
.termin.betont::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--c-marke);
  border-radius: inherit;
  pointer-events: none;
  animation: aufmerksam 2.2s var(--ease) both;
}

/* Unsichtbares Feld gegen Spam-Programme */
.honigtopf {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formular__fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.formular__datenschutz { margin: 0; color: var(--c-text-weich); font-size: .88rem; }
.formular__status { margin: 0; padding: 1rem 1.15rem; border-radius: 0 var(--radius) var(--radius) 0; }
/* Leer unsichtbar, aber schon vorhanden: nur so lesen Vorleseprogramme eine neue Meldung zuverlaessig vor */
.formular__status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
.formular__status--ok { background: var(--c-marke-hell); border-left: 3px solid var(--c-marke); }
.formular__status--fehler { background: var(--c-fehler-hell); border-left: 3px solid var(--c-fehler); }
.formular__status--info { background: var(--c-grund-tief); border-left: 3px solid var(--c-fuge-tief); }

/* Meldungen nach dem Absenden ohne JavaScript */
.ziel-meldung { display: none; }
.ziel-meldung:target { display: block; margin-bottom: 1.15rem; }

/* ---------- Terminbuchung ---------- */
.termin {
  overflow: hidden;
  background: var(--c-hell);
  color: var(--c-text);
  border: 1px solid var(--c-fuge);
  border-radius: 4px;
}
.termin__schritt { padding: clamp(1.25rem, .9rem + 1.6vw, 2rem); }
.termin__schritt + .termin__schritt { border-top: 1px solid var(--c-fuge); }
/* Solange das Skript nicht geladen ist, bleiben die Schritte verborgen */
.termin:not(.ist-bereit) .termin__schritt { display: none; }
.termin__hinweis { margin: 0; padding: clamp(1.25rem, .9rem + 1.6vw, 2rem); }
.termin.ist-bereit .termin__hinweis { display: none; }
.termin__meldung .formular__status:not(:empty) { margin: clamp(1rem, .8rem + 1vw, 1.5rem); }
.termin__schritt-titel {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.15rem;
  font-family: var(--f-text);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
.termin__schritt-nr {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  flex: none;
  background: var(--c-marke);
  color: var(--c-auf-marke);
  border-radius: 2px;
  font-size: .9rem;
}
.termin__woche {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.termin__woche-titel { margin: 0; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.termin__tage {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .5rem;
}
.tag {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .2rem;
  min-height: 78px;
  padding: .6rem .2rem;
  border: 1px solid var(--c-fuge-tief);
  border-radius: var(--radius);
  background: var(--c-grund);
  color: var(--c-text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s, transform .25s var(--ease);
}
.tag__name {
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-text-weich);
}
.tag__datum {
  font-family: var(--f-titel);
  font-size: 1.35rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tag__frei { font-size: .8125rem; font-weight: 600; color: var(--c-text-weich); }
.tag:hover:not(:disabled) { border-color: var(--c-text); transform: translateY(-2px); }
/* Neu aufgebaute Tage und Uhrzeiten erscheinen leicht versetzt, wie hingelegt */
.js .neu > .tag, .js .neu > .zeit { animation: knopf-auf .6s var(--ease-weich) backwards; animation-delay: calc(min(var(--i, 0), 4) * 45ms); }
@keyframes knopf-auf { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes aufmerksam {
  0% { opacity: 0; scale: .995; }
  30% { opacity: .9; scale: 1; }
  100% { opacity: 0; scale: 1.005; }
}
.tag[aria-pressed="true"] { background: var(--c-marke); border-color: var(--c-text); color: var(--c-auf-marke); }
.tag[aria-pressed="true"] .tag__name,
.tag[aria-pressed="true"] .tag__frei { color: var(--c-auf-marke); }
.tag:disabled { cursor: not-allowed; opacity: .42; background: transparent; }

.termin__zeiten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .5rem;
}
.zeit {
  min-height: 50px;
  border: 1px solid var(--c-fuge-tief);
  border-radius: var(--radius);
  background: var(--c-grund);
  color: var(--c-text);
  font-family: var(--f-text);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.zeit:hover:not(:disabled) { border-color: var(--c-text); transform: translateY(-2px); }
.zeit { transition: border-color .2s, background-color .2s, transform .2s; }
.zeit[aria-pressed="true"] { background: var(--c-marke); border-color: var(--c-text); color: var(--c-auf-marke); }
.zeit:disabled {
  cursor: not-allowed;
  color: var(--c-text-weich);
  text-decoration: line-through;
  background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(40, 40, 42, .07) 6px 12px);
}
.termin__leer { margin: 0; color: var(--c-text-weich); }
.termin__auswahl {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.25rem;
  padding: .9rem 1.1rem;
  background: var(--c-marke-hell);
  border-radius: var(--radius);
  font-weight: 600;
}
.termin__auswahl .ikon { color: var(--c-text); }
.termin__vorschau {
  margin: 0 0 1.1rem;
  padding: .65rem .9rem;
  background: var(--c-grund-tief);
  border-radius: var(--radius);
  color: var(--c-text-weich);
  font-size: .88rem;
}
.termin__erfolg { padding: clamp(2rem, 1.5rem + 2vw, 3rem) clamp(1.25rem, 1rem + 2vw, 2.5rem); text-align: center; }
.termin__erfolg .ikon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  padding: 12px;
  background: var(--c-marke);
  color: var(--c-auf-marke);
  border-radius: 2px;
  stroke-width: 2;
}
.termin__erfolg h3 { margin-bottom: .6rem; }
.termin__erfolg p { max-width: 34rem; margin-inline: auto; }
@media (max-width: 380px) {
  .termin__schritt { padding-inline: .75rem; }
}
@media (max-width: 345px) {
  /* !important, weil das Skript die Spaltenzahl direkt am Element setzt */
  .termin__tage { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  .termin__tage { gap: .3rem; }
  .tag { min-height: 66px; padding: .5rem .1rem; }
  .tag__datum { font-size: 1.15rem; }
  .tag__name { font-size: .8125rem; letter-spacing: .03em; }
}

/* ---------- Kontaktseite ---------- */
/* Oben Text und Foto nebeneinander, darunter die Terminwahl in voller Breite, darunter drei Karten */
.termin-breit { margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
/* Hinweis direkt unter dem Buchungskasten */
.kontakt-karten {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fuge);
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
/* Seit 30.11.2026 zwei Karten: links Telefon und Adresse, rechts (breiter) die Zeiten in drei Spalten */
.kontakt-karten--zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.karte__titel--zweit { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--c-fuge); }
.zeiten-spalten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; }
/* In den schmalen Spalten stehen Tag und Uhrzeit untereinander */
.zeiten-spalten .zeiten { grid-template-columns: minmax(0, 1fr); row-gap: .1rem; }
.zeiten-spalten .zeiten dd + dt { margin-top: .6rem; }
.zeiten-spalten .zeiten dt { white-space: normal; }
@media (max-width: 1099px) {
  .kontakt-karten--zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
}
@media (max-width: 899px) {
  .kontakt-karten, .kontakt-karten--zwei { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .zeiten-spalten { grid-template-columns: minmax(0, 1fr); }
}
.anruf__nummer {
  display: inline-block;
  margin: .25rem 0 .5rem;
  font-family: var(--f-titel);
  font-size: clamp(1.8rem, 1.45rem + 1.4vw, 2.5rem);
  line-height: 1.1;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
/* Die Zeiten unter der Nummer bekommen etwas Luft zur grossen Zahl */
.karte .anruf__nummer + .zeiten { margin-top: .5rem; }
.anruf__nummer:hover { color: var(--c-text); text-decoration: underline; text-decoration-color: var(--c-marke); text-decoration-thickness: 4px; text-underline-offset: .18em; }

/* ---------- Fussbereich ---------- */
/* Mittelgrau wie in der Vorlage, darauf weisse Schrift */
.fuss {
  position: relative;
  padding-block: clamp(3.5rem, 3rem + 3vw, 5.5rem) 2rem;
  background: var(--c-mittel);
  color: #fff;
  font-size: .98rem;
}
.fuss a { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
.fuss a:hover { color: #fff; text-decoration-color: #fff; }
/* Der Fokusrahmen waere sonst dunkel auf grau, hier deshalb gelb */
.fuss :focus-visible { outline-color: var(--c-marke); }
/* Bühne oben im Fuss, wie in der Vorlage: Stempel links, Teamfoto mit Logo in der Mitte, Kacheln rechts,
   darunter eine weisse Linie. Das Logo hängt über die Linie. */
.fuss__buehne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px) minmax(0, 1fr);
  grid-template-areas: "stempel team kacheln" "linie linie linie";
  align-items: end;
  column-gap: 2.5rem;
}
.fuss__stempel { grid-area: stempel; width: clamp(150px, 17vw, 230px); height: auto; justify-self: center; align-self: center; margin-bottom: 2.5rem; }
.fuss__team { grid-area: team; position: relative; width: 100%; justify-self: center; align-self: end; }
.fuss__teambild { display: block; width: 100%; height: auto; }
.fuss__logo { position: absolute; left: 40.3%; top: 67%; width: 23.2%; z-index: 1; margin: 0; }
.fuss .fuss__logo .logo__bild,
.fuss .fuss__logo:hover .logo__bild { display: block; width: 100%; height: auto; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); transform: none; }
.fuss .fuss__logo:focus-visible .logo__bild { outline: 3px solid #fff; outline-offset: 3px; }
.fuss__linie { grid-area: linie; height: 9px; background: #fff; }
/* Kacheln mit schmaler weisser Fuge, wie die Zahlenkacheln auf der Startseite */
.fuss__kacheln {
  grid-area: kacheln;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2px;
  width: min(100%, 330px);
  justify-self: center;
  align-self: center;
  margin-bottom: 2.5rem;
  padding: 2px;
  background: rgba(255, 255, 255, .55);
}
.fuss__kachel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 4.6rem;
  margin: 0;
  padding: .55rem .8rem;
  background: var(--c-mittel);
  color: #fff;
  line-height: 1.1;
}
.fuss__kachel--wort { font-family: var(--f-titel); font-size: 1.35rem; font-weight: 700; letter-spacing: .03em; line-height: .95; text-transform: uppercase; }
.fuss__kachel--satz { font-size: .92rem; font-weight: 300; line-height: 1.25; color: #F3F3F2; }
.fuss__kachel--stein { background: var(--c-dunkel) url("/assets/img/fotos/fuss-kachel.jpg?v=2") center / cover; }
.fuss__kachel--zahl strong { display: block; font-family: var(--f-titel); font-size: 1.75rem; white-space: nowrap; font-weight: 700; line-height: 1; }
.fuss__kachel--zahl span { display: block; margin-top: .15rem; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: #F3F3F2; }
.fuss__raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, .8fr);
  gap: 2.5rem;
  margin-top: 4.5rem;
}
.fuss__titel {
  margin: 0 0 1rem;
  font-family: var(--f-titel);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: #fff;
}
.fuss__liste { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.fuss__liste a { text-decoration: none; }
.fuss__liste a:hover { text-decoration: underline; }
.fuss address { margin-bottom: 1rem; }
.fuss .zeiten { gap: .25rem 1rem; }
.fuss .zeiten dt { color: #F3F3F2; }
.fuss .zeiten dd { font-weight: 500; }
.fuss__titel--zweit { margin-top: 1.4rem; }
/* Zwischenueberschriften in Oeffnungszeiten-Kaesten: beide gleich, mit gelbem Quadrat wie die Oberzeilen */
.zeiten__titel { display: flex; align-items: center; gap: .5rem; margin: 1.3rem 0 .6rem; font-family: var(--f-titel); font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-text); }
.zeiten__titel::before { content: ""; width: 9px; height: 9px; background: var(--c-marke); border-radius: 1px; }
.zeiten__titel--erst { margin-top: .5rem; }
.zeiten__hinweis { margin: -.3rem 0 .6rem; font-size: .92rem; color: var(--c-text-weich); }
.zeiten__titel + .zeiten { margin-top: .75rem; }
.fuss__klein { margin: .75rem 0 0; color: #F3F3F2; font-size: .9rem; }
.fuss__unten {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .3);
  color: #F3F3F2;
  font-size: .9rem;
}
.fuss__unten p { margin: 0; }
.fuss__unten ul { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.fuss__hoch {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--f-titel);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
}
.fuss__hoch .ikon { width: 18px; height: 18px; rotate: -90deg; transition: translate .3s var(--ease); }
.fuss__hoch:hover .ikon { translate: 0 -3px; }
@media (max-width: 999px) {
  .fuss__raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fuss__buehne { grid-template-columns: 1fr 1fr; grid-template-areas: "team team" "linie linie" "stempel kacheln"; row-gap: 0; }
  .fuss__stempel { margin: 3.5rem 0 0; }
  .fuss__kacheln { margin: 3.5rem 0 0; }
}
@media (max-width: 599px) {
  .fuss__raster { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .fuss__buehne { grid-template-columns: 1fr; grid-template-areas: "team" "linie" "stempel" "kacheln"; }
  .fuss__stempel { width: 150px; margin-top: 3rem; }
  .fuss__kacheln { margin-top: 1.5rem; }
}

/* ---------- Feste Leiste unten auf dem Handy ---------- */
.leiste-mobil { display: none; }
@media (max-width: 767px) {
  .leiste-mobil {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: flex;
    gap: .5rem;
    padding: .6rem var(--rand) calc(.6rem + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--c-fuge);
    view-transition-name: leiste;
  }
  .leiste-mobil .knopf { flex: 1; min-height: 48px; }
  html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .leiste-mobil__tel { flex: 0 0 52px !important; padding: 0; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* Auf der Kontaktseite steht der echte Knopf "Termin buchen" im Formular. Die Leiste waere dort ein
   zweiter, gleich aussehender Knopf, der nur nach oben springt. Deshalb entfaellt sie auf dieser Seite. */
@media (max-width: 767px) {
  body:has([data-termin]) .leiste-mobil { display: none; }
  body:has([data-termin]) { padding-bottom: 0; }
  html:has([data-termin]) { scroll-padding-bottom: 0; }
}
/* Handy im Querformat: Leiste weg, der Reiter oben rechts reicht */
@media (max-width: 767px) and (max-height: 480px) and (orientation: landscape) {
  .leiste-mobil { display: none; }
  body { padding-bottom: 0; }
  html { scroll-padding-bottom: 0; }
}

/* ---------- Auf dem Handy gut tippbar: Links und Logo bekommen mehr Flaeche ---------- */
@media (max-width: 767px) {
  .pfeil-link, .logo { min-height: 44px; }
  .anruf__nummer { display: inline-flex; align-items: center; min-height: 44px; }
  .fuss__liste { gap: 0; }
  .fuss__liste a, .fuss__unten li a { display: inline-block; padding-block: .5rem; }
  .fuss__hoch { min-height: 44px; }
  .brotkrumen a { display: inline-block; padding-block: .4rem; }
  .brotkrumen ol { align-items: center; }
  .fuss__unten { align-items: center; }
  .fuss__unten p { margin: 0; }
}

/* ---------- Bausteine aus der Vorlage ---------- */
/* Runder, schraeg gestellter Aufkleber als Blickfang */
.aufkleber {
  display: grid;
  place-content: center;
  width: clamp(8.25rem, 6rem + 8vw, 11.5rem);
  aspect-ratio: 1;
  padding: 1rem;
  border-radius: 50%;
  background: var(--c-marke);
  color: var(--c-auf-marke);
  box-shadow: 0 18px 30px -18px rgba(30, 30, 32, .65);
  font-family: var(--f-titel);
  font-size: clamp(.8125rem, .6rem + .55vw, 1.02rem);
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  rotate: -12deg;
  transition: rotate .5s var(--ease), scale .5s var(--ease);
}
.aufkleber--hell { background: #fff; color: var(--c-text); }
a.aufkleber:hover { color: var(--c-auf-marke); rotate: -4deg; scale: 1.04; }
a.aufkleber--hell:hover { color: var(--c-text); }
/* Bild mit Aufkleber an der Ecke */
.mit-aufkleber { position: relative; }
.mit-aufkleber > .aufkleber { position: absolute; left: -1rem; top: -1.5rem; z-index: 1; }
@media (max-width: 899px) {
  .mit-aufkleber { margin-top: 1.5rem; }
  .mit-aufkleber > .aufkleber { left: -.25rem; }
}

/* Zahlen als Kacheln: seit 1965, 600 m2, 66 Haende */
.zahlen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fuge);
  margin: 0;
  padding: var(--fuge);
  background: var(--c-fuge);
  border-radius: 2px;
  container-type: inline-size;
}
.zahl {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  aspect-ratio: 1;
  padding: .75rem .5rem;
  background: var(--c-dunkel);
  color: #fff;
  border-radius: 1px;
  text-align: center;
}
.zahl--marke { background: var(--c-marke); color: var(--c-auf-marke); }
.zahl--mittel { background: var(--c-mittel); }
/* Kacheln auf Material: Stein und Holz aus der Ausstellung, abgedunkelt, damit die Zahl lesbar bleibt */
.zahl--stein, .zahl--holz { position: relative; isolation: isolate; overflow: hidden; }
.zahl--stein::before, .zahl--holz::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: center / cover no-repeat;
  filter: brightness(.5);
}
.zahl--stein::before { background-image: url("/assets/img/struktur-muster.jpg?v=6"); filter: brightness(.52); }
.zahl--holz::before { background-image: url("/assets/img/struktur-holz.jpg"); filter: brightness(.55) saturate(.85); }
.zahl dt {
  font-family: var(--f-titel);
  /* skaliert mit der Kachelbreite, damit "Ausstellung" immer ganz in sein Quadrat passt */
  font-size: clamp(.72rem, 3.3cqw, .96rem);
  font-weight: 500;
  letter-spacing: .14em;
  white-space: nowrap;
  text-transform: uppercase;
}
.zahl dd {
  margin: 0;
  font-family: var(--f-titel);
  font-size: clamp(1.1rem, .55rem + 1.55vw, 2.05rem);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.zahlen__satz { margin: 1rem 0 0; color: var(--c-text-weich); font-size: .95rem; }
@media (max-width: 899px) {
  .zahl { aspect-ratio: 3 / 2; }
}

/* Fetter Merksatz in Grossbuchstaben, wie die Zwischenzeilen der Vorlage */
.merksatz {
  margin: 1.5rem 0 0;
  font-family: var(--f-titel);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1.6;
  text-transform: uppercase;
}

/* Gelber Abschnitt mit Aufkleber rechts (Jobs) */
.werbeband {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem clamp(2rem, 1rem + 6vw, 7rem);
}
.werbeband__text { max-width: 40rem; }
.werbeband__text > :last-child { margin-bottom: 0; }
.werbeband__text > p { margin-bottom: 1.5rem; }
@media (max-width: 767px) {
  .werbeband { grid-template-columns: minmax(0, 1fr); }
  .werbeband > .aufkleber { justify-self: end; margin-top: -1rem; }
}

/* ---------- Sanftes Einblenden beim Scrollen ---------- */
.js [data-reveal] {
  opacity: 0;
  translate: 0 14px;
  transition:
    opacity 1.2s var(--ease-weich) var(--verz, 0ms),
    translate 1.2s var(--ease-weich) var(--verz, 0ms),
    transform .3s var(--ease),
    rotate .5s var(--ease),
    scale .5s var(--ease),
    border-color .3s,
    background-color .3s,
    box-shadow .3s;
}
.js [data-reveal].ist-sichtbar { opacity: 1; translate: none; }
.js [data-reveal].sofort, .js .bild[data-reveal].sofort.ist-sichtbar { transition: none; animation: none; }
.js [data-reveal].sofort > img { transition: none; }
/* Bilder blenden weich auf und ziehen dabei ganz leicht heran: ruhig, kein Wischeffekt */
.js .bild[data-reveal] { opacity: 0; translate: none; transition: none; }
.js .bild[data-reveal].ist-sichtbar {
  opacity: 1;
  animation: bild-auf 1.4s var(--ease-weich) var(--verz, 0ms) backwards;
}
.js .bild[data-reveal] > img { transition: transform .8s var(--ease); }
@keyframes bild-auf {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: none; }
}
/* Springt der Tastaturfokus in einen noch nicht eingeblendeten Block, ist er sofort zu sehen */
.js [data-reveal]:focus-within { opacity: 1; translate: none; transition-delay: 0s; }

/* ---------- Weicher Seitenwechsel ---------- */
/* Aktuelle Browser blenden beim Wechsel von Seite zu Seite weich ueber. Alle anderen wechseln wie gewohnt. */
@view-transition { navigation: auto; }
/* Waehrend der Ueberblendung bleibt die Seite bedienbar: Die Maus erreicht Knoepfe und Links darunter (Hover
   leuchtet sofort), und ein Klick oder eine Taste bricht die Ueberblendung ab (siehe Kopfskript der Seiten). */
::view-transition { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  /* Der Kopf mit Logo und Menuezeile bleibt stehen, nur der Inhalt darunter wechselt: ruhig, nicht abrupt */
  .kopf { view-transition-name: kopf; }
  /* Der Seitenkopf (Ueberschrift und grosses Foto) wechselt an Ort und Stelle als eigene Ebene, der Rest gleitet */
  .seitenkopf { view-transition-name: seitenkopf; }
  .held { view-transition-name: held; }
  /* Der dunkle Kopfbereich behaelt waehrend des Wechsels seine dunkle Flaeche: kein heller Blitz dazwischen */
  ::view-transition-group(seitenkopf), ::view-transition-group(held) { background: var(--c-dunkel); }
  /* Von der Startseite weg: Ihr hoher Kopfbereich (held) gibt es auf der neuen Seite nicht mehr. Seine dunkle
     Flaeche blendet darum mit dem alten Abbild aus (.5 s), statt bis zum Ende des Wechsels in voller Hoehe stehen
     zu bleiben und dann auf die kleine Hoehe zu springen. */
  :root:not(:has(.held))::view-transition-group(held) { animation: kopf-geht .5s var(--ease-aus) both; }
  /* Zur Startseite hin: Ihr hoher Kopfbereich wuerde mit seiner dunklen Flaeche sofort den ganzen Bildschirm
     abdecken, die alte Seite waere schlagartig weg. Darum blendet die Flaeche in der halben Sekunde ein, in der die
     alte Seite ausblendet: ein weiches Ueberblenden ins Dunkle, danach kommt die Fliesenwand wie gewohnt. */
  :root:has(.held)::view-transition-group(held) { animation: dunkel-kommt .5s var(--ease-aus) both; }
  /* Folgt direkt unter dem Seitenkopf ein gelber Block (Jobs), bekommt er wie der Kopf eine eigene Ebene mit gelber
     Flaeche. Sonst waere die Stelle waehrend des Wechsels kurz weiss, weil der Rest der Seite erst spaeter einblendet.
     Die gelbe Flaeche blendet mit der alten Seite ein (.5 s) und beim Verlassen mit ihr aus. */
  .seitenkopf + .abschnitt--marke { view-transition-name: anschluss; }
  ::view-transition-group(anschluss) { background: var(--c-marke); z-index: 2; }
  :root:has(.seitenkopf + .abschnitt--marke)::view-transition-group(anschluss) { animation: dunkel-kommt .5s var(--ease-aus) both; }
  :root:not(:has(.seitenkopf + .abschnitt--marke))::view-transition-group(anschluss) { animation: kopf-geht .5s var(--ease-aus) both; }
  ::view-transition-old(anschluss) { animation: kopf-geht .5s var(--ease-aus) both; }
  ::view-transition-new(anschluss) { animation: kopf-kommt 1.6s var(--ease-weich) .45s both; }
  /* Ankunft an einer Sprungmarke auf einer anderen Seite (z.B. Team oder Historie aus der Menuezeile): Die neue
     Seite steht weiter unten, Kopfzeile und Seitenkopf liegen ausserhalb des Bildes. Haetten sie eigene Ebenen,
     rutschten die alten Abbilder in einer Viertelsekunde nach oben weg. Darum gibt es sie bei dieser Ankunft nicht
     als Ebenen; die alten Abbilder blenden ruhig mit der alten Seite aus (.5 s), die neue kommt wie gewohnt. */
  :root.aus-sprung .kopf, :root.aus-sprung .seitenkopf, :root.aus-sprung .held, :root.aus-sprung .seitenkopf + .abschnitt--marke { view-transition-name: none; }
  :root.aus-sprung::view-transition-group(kopf), :root.aus-sprung::view-transition-group(seitenkopf), :root.aus-sprung::view-transition-group(held), :root.aus-sprung::view-transition-group(anschluss) { animation: kopf-geht .5s var(--ease-aus) both; }
  :root.aus-sprung::view-transition-old(kopf) { display: block; animation: kopf-geht .5s var(--ease-aus) both; }
  :root.aus-sprung.aus-menue::view-transition-old(kopf) { display: none; }
  /* Aus dem Vollbild-Menue zu einer Sprungmarke: Die alten Ebenen von Kopfzeile und Kopfbereich haben auf der
     neuen Seite kein Gegenstueck. Ohne diese Regel bliebe ihre dunkle Flaeche ueber dem Menue stehen, bis die neue
     Seite fertig ist. Das Menue deckt ohnehin alles ab, also verschwinden sie ganz. */
  :root.aus-sprung.aus-menue::view-transition-group(kopf), :root.aus-sprung.aus-menue::view-transition-group(seitenkopf),
  :root.aus-sprung.aus-menue::view-transition-group(held), :root.aus-sprung.aus-menue::view-transition-group(anschluss) { display: none; }
  /* Erst verabschiedet sich die alte Seite, dann erst erscheint die neue: kein Ineinanderlaufen */
  ::view-transition-old(root) { animation: seite-geht .5s var(--ease-aus) both; }
  ::view-transition-new(root) { animation: seite-kommt 1.4s var(--ease-weich) .42s both; }
  ::view-transition-old(seitenkopf), ::view-transition-old(held) { animation: kopf-geht .5s var(--ease-aus) both; }
  ::view-transition-new(seitenkopf), ::view-transition-new(held) { animation: kopf-kommt 1.6s var(--ease-weich) .45s both; }
  /* Die Kopfzeile hat keinen eigenen Hintergrund: Das alte Abbild muss sofort weg, sonst scheint der gelbe Strich
     des vorherigen Menuepunkts durch das neue Abbild hindurch */
  ::view-transition-old(kopf) { display: none; }
  /* War die alte Seite beim Wechsel ueber die Menuezeile gescrollt (Klasse aus-rollt, Merker aus dem Kopfskript),
     lagen Kopfzeile und Seitenkopf dort ausserhalb des Bildes. Ohne diese Regel springen beide im ersten Bild von
     oben an ihren Platz. Stattdessen blenden ihre Ebenen in der halben Sekunde ein, in der die alte Seite ausblendet.
     Die Sonderfaelle Menue, Knopf, Logo und Sprungmarke haben ihre eigenen Regeln und bleiben davon unberuehrt. */
  :root.aus-rollt:not(.aus-menue):not(.aus-knopf):not(.aus-logo):not(.aus-sprung)::view-transition-group(kopf),
  :root.aus-rollt:not(.aus-menue):not(.aus-knopf):not(.aus-logo):not(.aus-sprung)::view-transition-group(seitenkopf) { animation: dunkel-kommt .5s var(--ease-aus) both; }
  /* Ueber das Logo zur Startseite, wenn die alte Seite gescrollt war (Klasse aus-logo, siehe main.js): Das Logo war
     nicht zu sehen und darf nicht sofort dastehen. Die Kopfzeile verhaelt sich wie der Kopfbereich darunter und
     blendet mit der Fliesenwand zusammen weich ein. Kein Gleiten, kein Sprung. */
  :root.aus-logo::view-transition-group(kopf) { animation: none; }
  /* Die Kopfzeile (und auf dem Handy Ecke und Leiste) liegt waehrend des Wechsels ausdruecklich UEBER dem Kopfbereich.
     Ohne diese Reihenfolge lag sie darunter: Die dunkle Flaeche des Kopfbereichs verdeckte das Logo waehrend des
     ganzen Wechsels, und es sprang erst am Ende schlagartig hervor ("das gelbe Quadrat kommt abrupt rein"). */
  ::view-transition-group(kopf), ::view-transition-group(ecke), ::view-transition-group(leiste) { z-index: 3; }
  ::view-transition-group(held), ::view-transition-group(seitenkopf) { z-index: 2; }
  :root.aus-logo::view-transition-new(kopf) { animation: kopf-kommt 1.6s var(--ease-weich) .45s both; }
  /* Seitenwechsel aus dem offenen Vollbild-Menue: Die neue Seite steht sofort, das dunkle Menue liegt als eigene
     Ebene darueber und loest sich langsam auf. Kein Kreis, kein zweiter Uebergang. */
  .menue:popover-open { view-transition-name: menue; }
  .menue:popover-open .menue__innen { view-transition-name: menue-innen; }
  /* Die dunkle Flaeche bleibt stehen, nur die Menuepunkte verschwinden kurz vorher. Darueber taucht die neue
     Seite aus dem Dunkel auf: Man sieht nichts Altes verblassen, nur Neues erscheinen. */
  ::view-transition-old(menue) { animation: none; mix-blend-mode: normal; }
  ::view-transition-old(menue-innen) { display: none; }
  /* Nach dem Klick: Menuepunkte und Kontaktangaben gehen weich weg, noch vor dem Seitenwechsel (Klasse aus main.js) */
  .menue.menue--geht:popover-open .menue__liste > li, .menue.menue--geht:popover-open .menue__seite > * { opacity: 0; translate: 0 -8px; transition: opacity .5s var(--ease-aus), translate .5s var(--ease-aus); transition-delay: 0s; }
  ::view-transition-group(menue) { z-index: 50; }
  ::view-transition-group(menue-innen) { z-index: 51; }
  :root.aus-menue::view-transition-old(root), :root.aus-menue::view-transition-old(seitenkopf), :root.aus-menue::view-transition-old(held), :root.aus-menue::view-transition-old(anschluss) { display: none; }
  :root.aus-menue::view-transition-group(root) { z-index: 60; }
  :root.aus-menue::view-transition-group(seitenkopf), :root.aus-menue::view-transition-group(held), :root.aus-menue::view-transition-group(anschluss) { z-index: 61; animation: none; }
  :root.aus-menue::view-transition-group(kopf), :root.aus-menue::view-transition-group(ecke), :root.aus-menue::view-transition-group(leiste) { z-index: 62; }
  :root.aus-menue::view-transition-new(root) { animation: aus-dunkel 3s var(--ease-weich) .3s both; }
  :root.aus-menue::view-transition-new(seitenkopf), :root.aus-menue::view-transition-new(held), :root.aus-menue::view-transition-new(anschluss) { animation: aus-dunkel 3.5s var(--ease-weich) .4s both; }
  :root.aus-menue::view-transition-new(kopf) { animation: aus-dunkel 1.9s var(--ease-weich) .2s both; }
  /* Ueber den Knopf "Beratungstermin buchen" zur Kontaktseite: besonders ruhig. Die alte Seite blendet langsam aus,
     die Kontaktseite kommt mit Verzoegerung weich von unten. Kopf und Seitenkopf springen nicht von oben herein. */
  :root.aus-knopf::view-transition-group(kopf), :root.aus-knopf::view-transition-group(seitenkopf), :root.aus-knopf::view-transition-group(held),
  :root.aus-knopf::view-transition-group(ecke), :root.aus-knopf::view-transition-group(leiste) { animation: none; }
  :root.aus-knopf::view-transition-group(seitenkopf), :root.aus-knopf::view-transition-group(held) { background: transparent; }
  :root.aus-knopf::view-transition-old(kopf), :root.aus-knopf::view-transition-old(seitenkopf), :root.aus-knopf::view-transition-old(held) { display: none; }
  :root.aus-knopf::view-transition-old(root) { animation: seite-geht .6s var(--ease-aus) both; }
  :root.aus-knopf::view-transition-new(root) { animation: seite-kommt 1.7s var(--ease-weich) .5s both; }
  :root.aus-knopf::view-transition-new(seitenkopf) { animation: aus-dunkel 1.9s var(--ease-weich) .55s both; }
  :root.aus-knopf::view-transition-new(kopf) { animation: aus-dunkel 1.2s var(--ease-weich) .5s both; }
  ::view-transition-new(kopf) { animation: none; mix-blend-mode: normal; }
  ::view-transition-old(ecke), ::view-transition-new(ecke), ::view-transition-old(leiste), ::view-transition-new(leiste) { animation: none; }
}
@keyframes seite-geht { to { opacity: 0; transform: translateY(-10px); } }
@keyframes seite-kommt { from { opacity: 0; transform: translateY(22px); } }
@keyframes kopf-geht { to { opacity: 0; } }
@keyframes dunkel-kommt { from { opacity: 0; } }
@keyframes menue-innen-weg { to { opacity: 0; } }
@keyframes aus-dunkel { from { opacity: 0; transform: translateY(18px); } }
@keyframes kopf-kommt { from { opacity: 0; transform: scale(.985); } }

/* ---------- Weniger Bewegung, wenn im System so eingestellt ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  /* Farbwechsel bei Hover und Fokus bleiben weich, nur Bewegung faellt weg */
  a, button, input, select, textarea, .knopf, .tag, .zeit, .nav__link, .kachel, .projekt-karte, .stelle, .partner {
    transition-property: background-color, color, border-color, box-shadow, outline-color, text-decoration-color !important;
    transition-duration: .2s !important;
  }
  .js [data-reveal], .js .legen > *, .js .titel-balken > span { opacity: 1 !important; transform: none !important; translate: none !important; clip-path: none !important; }
  @view-transition { navigation: none; }
  .js .tafel, .js .kopf .logo__bild { animation: none; }
  .intro { display: none !important; }
}

/* ---------- Druck ---------- */
@media print {
  .kopf .nav, .ecke, .menue, .leiste-mobil, .sprung-link, .slider__steuerung { display: none !important; }
  body { background: #fff; padding: 0; }
  .js [data-reveal], .js .legen > * { opacity: 1 !important; transform: none !important; translate: none !important; clip-path: none !important; }
}

/* ---------- Hover-Bewegung nur mit Maus ---------- */
/* Auf Touch-Geraeten loest ein Tipp den Hover-Zustand aus und das Element bliebe verschoben. Farbwechsel bleiben. */
@media (hover: none), (pointer: coarse) {
  .logo:hover .logo__bild, .ecke__menue:hover .ikon, .ecke__link:hover .ikon, .menue__zu:hover .ikon,
  .pfeil-link:hover .ikon, .kachel:hover .kachel__pfeil, .kachel:hover img.bild, .projekt-karte:hover img.bild,
  .stelle:hover, .tag:hover:not(:disabled), .zeit:hover:not(:disabled), .knopf:hover { transform: none; }
  .knopf:hover { box-shadow: none; }
  .partner:hover .partner__link .ikon, .fuss__hoch:hover .ikon { translate: none; }
  a.aufkleber:hover { rotate: -12deg; scale: none; }
}

/* ---------- Merker (nur in der Vorschau sichtbar) ---------- */
/* Hinweise fuer uns an Textstellen. Auf der echten Website immer unsichtbar; der Vorschau-Server blendet sie ein. */
.merker { display: none; }
