/* b-schneiter.ch · Design-Richtung «V10 · Synthese», siehe DESIGN-RICHTUNG.md
   Alle Werte, die später verschoben werden könnten, stehen als Variablen auf :root.
   Eigene Änderungen gehören in tweaks.css, nicht hierher. */

:root {
  /* Farben */
  --rot: #BA1319;
  --rot-dunkel: #8E0E13;
  --tinte: #231F20;
  --text: #4A4445;
  --papier: #ffffff;
  --grund: #F5F3F0;
  --linie-kraeftig: #D7D1CA;
  --linie: #DAD3CB;
  --linie-fein: #E3DDD6;
  --linie-zart: #EEE9E3;

  /* Masse */
  --breite: 1240px;
  --rand: 24px;
  --radius: 10px;
  --radius-klein: 8px;
  --abschnitt: 120px;
  --einstieg-ueberlappung: 72px;
  --karte-polster: clamp(26px, 3.4vw, 46px);

  /* Schrift */
  --schrift: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --h1: clamp(32px, 3.8vw, 52px);
  --h2: clamp(28px, 2.9vw, 38px);
  --h3: 21px;
  --lauftext-gross: 17px;
  --lauftext: 16px;
  --ui: 15px;        /* Knöpfe, Navigation, Felder, Kartentext */
  --klein: 14px;
  --kleinst: 13px;   /* Dachzeile, Beschriftungen, Kleingedrucktes */
}

/* Schrift selbst gehostet, kein Google-Fonts-Aufruf */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('../fonts/public-sans-latin-wght-normal.woff2') format('woff2-variations');
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('../fonts/public-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

/* Die klebende Kopfleiste steht 12 px von oben und ist 74 px hoch. Ohne diesen
   Abstand springt ein Anker hinter die Leiste und der Anfang des Abschnitts
   ist verdeckt. Gilt auch für den Sprunglink und die Tastaturbedienung. */
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Weiches Scrollen mit Lenis (main.js). Solange Lenis das Mausrad glättet,
   darf der Browser nicht zusätzlich glätten. Anker-Sprünge laufen weiter nativ
   und weich. Regeln aus lenis.css 1.3.27, soweit hier gebraucht. */
html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth iframe { pointer-events: none; }
/* Solange die Lupe offen ist, steht die Seite dahinter still, auf jeder Breite */
html:has(dialog.lupe[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font-family: var(--schrift);
  font-size: var(--lauftext);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Auf kurzen Seiten wie 404 soll der Fuss trotzdem unten stehen, sonst bleibt
     unter dem Massstab-Band ein weisser Streifen übrig. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }
a { color: inherit; }

/* Das eingebaute `hidden` kommt vom Browser mit schwacher Gewichtung. Jede
   eigene display-Regel schlägt es, und das Element bleibt trotz `hidden`
   sichtbar. Darum hier einmal zentral und stark. */
[hidden] { display: none !important; }

/* Kein einzelnes Wort allein auf der letzten Zeile; wo der Browser das nicht
   kennt, bricht der Text wie bisher um */
p, li, figcaption, .feld label, summary { text-wrap: pretty; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--tinte);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
p { margin: 0; }

.ct { max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand); }
.abschnitt { padding-top: var(--abschnitt); padding-bottom: var(--abschnitt); }
.abschnitt-warm { background: var(--grund); }
.stapel { display: flex; flex-direction: column; gap: 18px; }
.lauftext-gross { font-size: var(--lauftext-gross); line-height: 1.75; }

/* Sprungmarke für die Tastatur */
.sprung {
  position: absolute; left: 0; top: -100px; z-index: 60;
  background: var(--tinte); color: #fff; padding: 12px 18px;
  border-bottom-right-radius: var(--radius-klein);
}
.sprung:focus { top: 0; }

/* Dachzeile mit dem Giebelzeichen aus dem Logo */
/* Das Giebelzeichen steht auf der Grundlinie der Schrift, nicht in der Zeilenmitte */
.dachzeile {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-size: var(--kleinst); font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--tinte);
}
.dachzeile::before {
  content: ""; width: 13px; height: 13px; flex-shrink: 0; background: var(--rot);
  clip-path: polygon(0 100%, 50% 0, 100% 100%, 78% 100%, 50% 42%, 22% 100%);
}

/* Massstab-Band */
.massstab {
  height: 30px;
  background-image:
    linear-gradient(to right, var(--linie) 2px, transparent 2px),
    linear-gradient(to right, var(--linie) 2px, transparent 2px);
  background-size: 60px 30px, 60px 15px;
  background-position: 0 0, 30px 15px;
  background-repeat: repeat-x;
}

/* Knöpfe */
.knopf, .knopf-rand {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 0 24px; border-radius: var(--radius-klein);
  font: inherit; font-size: var(--ui); font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}
.knopf { background: var(--rot); color: #fff; border: 1px solid var(--rot); }
.knopf:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); }
.knopf-rand { background: var(--papier); color: var(--tinte); border: 1px solid var(--linie-kraeftig); }
.knopf-rand:hover { border-color: var(--tinte); }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 10px; }

/* Ein einziger Pfeil auf der ganzen Seite: ein schlichter Winkel, beim Ueberfahren 3 px nach rechts */
.pfeil { display: inline-flex; transition: transform .3s; }
.winkel { display: block; flex-shrink: 0; }
.knopf:hover .pfeil, .knopf-rand:hover .pfeil, a:hover > .pfeil, .karte:hover .karte-mehr .pfeil { transform: translateX(3px); }

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--rot);
  outline-offset: 2px;
}

/* Kopfzeile */
.kopf { position: sticky; top: 0; z-index: 20; padding: 12px 0; }
.kopf-leiste {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--linie-zart); border-radius: var(--radius);
  padding: 10px 10px 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  box-shadow: 0 10px 30px rgba(35, 31, 32, .06);
}
.kopf-logo { flex-shrink: 0; }
.kopf-logo img { height: 52px; width: auto; display: block; }
.navi { display: flex; gap: clamp(18px, 1.8vw, 26px); font-size: var(--ui); font-weight: 500; color: var(--tinte); flex-wrap: nowrap; }
.navi a { position: relative; text-decoration: none; padding: 6px 0; white-space: nowrap; }
.navi-start { display: flex; align-items: center; }
.navi-start svg { display: block; }
.kopf-rechts { flex-shrink: 0; }
.kopf-rechts .knopf { white-space: nowrap; }
.navi a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--rot); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.navi a:hover::after, .navi a[aria-current]::after { transform: scaleX(1); }
.kopf-rechts { display: flex; gap: 8px; align-items: center; }

.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-knopf {
  width: 50px; height: 50px; border-radius: var(--radius-klein);
  border: 1px solid var(--linie-kraeftig);
  display: flex; align-items: center; justify-content: center;
}
.menu nav {
  position: absolute; right: 0; top: 60px; width: 268px; background: var(--papier);
  border-radius: var(--radius);
  padding: 8px; display: flex; flex-direction: column;
  font-size: var(--lauftext); font-weight: 500; color: var(--tinte);
  /* Roter Strich als inset-Schatten statt als border: folgt der runden Ecke */
  box-shadow: 0 18px 50px rgba(35, 31, 32, .16), inset 0 3px 0 var(--rot);
}
.menu nav > a { padding: 12px 14px; text-decoration: none; border-radius: 6px; }
.menu nav > a:hover { background: var(--grund); }

/* Einstieg */
.einstieg { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); align-items: center; }
.einstieg-karte {
  background: var(--papier); border-radius: var(--radius); padding: var(--karte-polster);
  display: flex; flex-direction: column; gap: 20px;
  margin-right: calc(-1 * var(--einstieg-ueberlappung));
  position: relative; z-index: 2;
  box-shadow: 0 30px 70px rgba(35, 31, 32, .10);
  overflow: hidden;
}
.einstieg-strich {
  height: 4px; background: var(--rot);
  margin: calc(-1 * var(--karte-polster)) calc(-1 * var(--karte-polster)) 4px;
}
.einstieg-bild {
  position: relative; min-height: clamp(360px, 46vw, 620px);
  border-radius: var(--radius); overflow: hidden; background: var(--grund);
}
.einstieg-bild > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.haken { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--ui); font-weight: 500; color: var(--tinte); }
.haken li { display: flex; gap: 10px; align-items: center; }
.haken svg { flex-shrink: 0; }

/* Merkmale: feste Spaltenzahl statt auto-fit. Mit auto-fit standen zwischen
   730 und 1000 px drei Spalten und das vierte Merkmal allein darunter, und
   zwischen 1000 und 1180 px brachen einzelne Zeilen um. Jetzt: eine Spalte,
   ab 600 px zwei, ab 1181 px (wie die Navigation) vier. Senkrechte
   Trennlinien erst ab 961 px. Titel oben ausgerichtet, damit sie auf einer
   Linie stehen, auch wenn ein Untertitel umbricht. */
.merkmale {
  display: grid; grid-template-columns: minmax(0, 1fr);
  border-bottom: 1px solid var(--linie-zart);
}
.merkmal { display: flex; gap: 14px; align-items: flex-start; padding: 18px 0; }
.merkmal strong { display: block; color: var(--tinte); font-weight: 600; }
.merkmal span span { font-size: var(--klein); }
.merkmal svg { flex-shrink: 0; }
@media (min-width: 600px) {
  .merkmale { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merkmal:nth-child(odd) { padding-right: 18px; }
  .merkmal:nth-child(even) { padding-left: 18px; }
}
@media (min-width: 961px) {
  .merkmal:nth-child(even) { border-left: 1px solid var(--linie-zart); }
}
@media (min-width: 1181px) {
  .merkmale { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .merkmal:not(:first-child) { padding-left: 18px; border-left: 1px solid var(--linie-zart); }
  .merkmal:not(:last-child) { padding-right: 18px; }
}

/* Bildraster neben Text */
.zwei {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 64px; align-items: center;
}
.bildraster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rahmen { position: relative; overflow: hidden; background: var(--grund); display: block; border-radius: var(--radius); }
.rahmen img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
a:hover .rahmen img { transform: scale(1.05); }

/* Leistungen */
.kopfzeile-abschnitt {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: 20px; margin-bottom: 32px;
}
/* Vier Leistungskarten, auf dem Desktop zwei mal zwei statt drei und eine allein */
.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.karte {
  background: var(--papier); border: 1px solid var(--linie-zart); border-radius: var(--radius);
  padding: 12px 12px 26px; display: flex; flex-direction: column; gap: 18px; text-decoration: none;
  transition: border-color .3s, transform .4s cubic-bezier(.2, .7, .2, 1);
}
.karte:hover { border-color: var(--tinte); transform: translateY(-3px); }
.karte-text { padding: 0 14px; display: flex; flex-direction: column; gap: 8px; }
.karte-text h3 { font-size: var(--h3); }
.karte-text p { font-size: var(--ui); }
.karte-mehr { font-size: var(--klein); font-weight: 600; color: var(--rot); display: inline-flex; align-items: center; gap: 6px; }
.marke {
  position: absolute; left: 12px; top: 12px; background: var(--papier); color: var(--rot-dunkel);
  border-radius: 6px; padding: 3px 9px; font-size: var(--kleinst); font-weight: 600;
}
.zusatz {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 0 24px; margin-top: 24px; border-top: 1px solid var(--linie);
}
.zusatz a { display: flex; gap: 14px; align-items: flex-start; padding-top: 22px; text-decoration: none; }
.zusatz svg { flex-shrink: 0; }
.zusatz strong { display: block; color: var(--tinte); font-weight: 600; }
.zusatz span span { font-size: var(--klein); }

/* Projekte */
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter button {
  background: var(--papier); border: 1px solid var(--linie-fein); border-radius: var(--radius-klein);
  padding: 9px 16px; font: inherit; font-size: var(--klein); font-weight: 600; color: var(--tinte);
  cursor: pointer; transition: border-color .3s, background-color .3s, color .3s;
}
.filter button:hover { border-color: var(--tinte); }
.filter button[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: #fff; }
/* auto-fill statt auto-fit: Die Spalten bleiben stehen, auch wenn der Filter
   nur eine Kachel übrig lässt. Sonst zieht sich eine einzelne Kachel über die
   ganze Breite und wirkt wie ein anderes Element. */
.projekte { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.projekt {
  display: flex; flex-direction: column; text-decoration: none;
  border-radius: var(--radius); overflow: hidden; background: var(--grund);
}
.projekt .rahmen { border-radius: 0; }
.projekt img { width: 100%; aspect-ratio: 4 / 3.5; object-fit: cover; }
.projekt-fuss {
  padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 3px solid var(--rot);
}
.projekt-fuss small { display: block; font-size: var(--kleinst); }
.projekt-fuss h2, .projekt-fuss h3 { font-size: var(--lauftext-gross); }
/* Kachelpfeil: Winkel in Tintenfarbe, beim Ueberfahren rot und 3 px nach rechts */
.projekt-pfeil { flex-shrink: 0; display: flex; color: var(--tinte); transition: color .3s, transform .3s; }
.projekt:hover .projekt-pfeil, .projekt:focus-visible .projekt-pfeil { color: var(--rot); transform: translateX(3px); }

/* Ablauf. Der Massstab entsteht beim Scrollen: main.js setzt --zug von 0 bis 1
   und den Rest unter der letzten Nummer (--rest). Ohne JavaScript und bei
   reduzierter Bewegung bleibt --zug auf 1, der Massstab steht ganz da.
   Ab 961 px: alle Schritte in einer Reihe, Massstab waagrecht von links.
   Darunter: Schritte untereinander, Nummer links, Massstab senkrecht von oben
   durch die Mitte der Nummern. */
.ablauf-band { position: relative; }
.ablauf-band .massstab {
  position: absolute; left: 0; right: 0; top: 22px;
  clip-path: inset(0 calc((1 - var(--zug, 1)) * 100%) 0 0);
}
.schritte {
  list-style: none; margin: 0; padding: 0; position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 28px 24px;
}
.schritte li { display: flex; flex-direction: column; gap: 14px; }
.nr {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: var(--klein); font-weight: 700;
  background: var(--papier); color: var(--tinte); border: 1px solid var(--tinte);
  box-shadow: 0 0 0 8px var(--grund);
}
.nr-rot { background: var(--rot); border-color: var(--rot); color: #fff; }
.nr-schwarz { background: var(--tinte); border-color: var(--tinte); color: #fff; }
.schritte strong { display: block; color: var(--tinte); font-weight: 600; }
.schritte span span { font-size: var(--klein); }
@media (max-width: 960px) {
  .ablauf-band .massstab {
    left: 7px; right: auto; width: 30px; height: auto; bottom: var(--rest, 0px);
    background-image:
      linear-gradient(to bottom, var(--linie) 2px, transparent 2px),
      linear-gradient(to bottom, var(--linie) 2px, transparent 2px);
    background-size: 30px 24px, 15px 24px;
    background-position: 0 0, 15px 12px;
    background-repeat: repeat-y;
    clip-path: inset(0 0 calc((1 - var(--zug, 1)) * 100%) 0);
  }
  .schritte { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .schritte li { flex-direction: row; gap: 18px; align-items: flex-start; }
  .schritte li > span:last-child { padding-top: 9px; }
  .schritte .nr { box-shadow: 0 0 0 5px var(--grund); }
}

/* Betrieb und Fragen */
.signatur { margin-top: 6px; font-weight: 600; color: var(--tinte); letter-spacing: .02em; }
.eckdaten { display: grid; gap: 0; border-top: 1px solid var(--tinte); margin-top: 8px; }
.eckdaten div { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--linie-fein); font-size: var(--klein); }
.eckdaten b { color: var(--tinte); font-weight: 600; min-width: 56px; }
.gebiet { font-size: var(--klein); border-top: 1px solid var(--tinte); padding-top: 14px; }
.gebiet strong { color: var(--tinte); font-weight: 600; }

.fragen { display: flex; flex-direction: column; border-top: 1px solid var(--tinte); }
.fragen details { border-bottom: 1px solid var(--linie-fein); padding: 20px 0; }
.fragen summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px;
  align-items: center; font-size: var(--lauftext-gross); font-weight: 600; color: var(--tinte);
}
.fragen summary::-webkit-details-marker { display: none; }
.fragen p { margin-top: 10px; font-size: var(--ui); max-width: 62ch; }
/* Pluszeichen als Strich-SVG wie die übrigen Zeichen, beim Öffnen zum Kreuz gedreht */
.plus { display: inline-flex; flex-shrink: 0; color: var(--rot); transition: transform .3s; }
.plus svg { display: block; }
.fragen details[open] .plus { transform: rotate(45deg); }

/* Kontakt */
.kontakt {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--linie-zart);
}
.kontakt-links {
  background: var(--grund); border-top: 4px solid var(--rot);
  padding: clamp(26px, 4vw, 52px); display: flex; flex-direction: column; gap: 18px;
}
.nummer { font-size: var(--h2); color: var(--rot); text-decoration: none; font-weight: 600; letter-spacing: -.015em; }
.angaben { display: flex; flex-direction: column; font-size: var(--klein); border-top: 1px solid var(--linie); }
.angaben span { padding: 11px 0; border-bottom: 1px solid var(--linie); }
.angaben span:last-child { border-bottom: 0; }
.angaben strong { color: var(--tinte); font-weight: 600; }

/* Formular */
.formular { padding: clamp(26px, 4vw, 52px); display: flex; flex-direction: column; gap: 14px; background: var(--papier); }
.feld-paar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-size: var(--kleinst); font-weight: 600; color: var(--tinte); }
.feld input, .feld select, .feld textarea {
  font: inherit; font-size: var(--ui); color: var(--tinte); background: var(--papier);
  border: 1px solid var(--linie-kraeftig); border-radius: var(--radius-klein); padding: 12px 14px;
  width: 100%; transition: border-color .2s, box-shadow .2s;
}
.feld textarea { min-height: 120px; resize: vertical; }
/* Eigener Winkel statt des Pfeils, den das Betriebssystem sonst ins Feld zeichnet */
.feld select {
  appearance: none; -webkit-appearance: none; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23231F20' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.feld label .pflicht { font-weight: 400; color: var(--text); }
.formular-hinweis { font-size: var(--kleinst); color: var(--text); margin: 0; }
.feld input:focus, .feld select:focus, .feld textarea:focus {
  outline: none; border-color: var(--rot); box-shadow: 0 0 0 4px rgba(186, 19, 25, .12);
}
.feld-hinweis { font-size: var(--kleinst); font-weight: 400; color: var(--text); }
.feld-error { display: none; margin: 0; font-size: var(--kleinst); color: var(--rot-dunkel); font-weight: 600; }
.feld.has-error .feld-error { display: block; }
.feld.has-error input, .feld.has-error select, .feld.has-error textarea { border-color: var(--rot-dunkel); }
.einwilligung { display: flex; gap: 10px; align-items: flex-start; font-size: var(--kleinst); line-height: 1.45; }
.einwilligung input { width: 18px; height: 18px; margin: 0; accent-color: var(--rot); flex-shrink: 0; }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.form-status { margin: 0; font-size: var(--klein); }
.form-status.is-error { color: var(--rot-dunkel); font-weight: 600; }
#form-wrap.is-sent form { display: none; }
#form-success { display: flex; flex-direction: column; gap: 10px; }
#form-success h3 { font-size: var(--h3); }

/* Fuss */
.fuss { background: var(--grund); border-top: 3px solid var(--rot); }
.fuss-reihe {
  padding-top: 48px; padding-bottom: 36px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 24px; font-size: var(--klein);
}
.fuss-logo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fuss-logo img { height: 38px; width: auto; background: var(--papier); padding: 6px 10px; border-radius: var(--radius-klein); }
.saeulen { font-size: var(--kleinst); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--tinte); }
.fuss-links { display: flex; gap: 18px; font-size: var(--kleinst); }

/* Nach oben: rotes Quadrat mit dem Giebel der Dachzeilen, erscheint nach
   gut einer Fensterhöhe. Eine eigene Anrufleiste auf dem Handy gibt es seit
   06.11.2026 nicht mehr: Der Telefonknopf steht immer in der Kopfleiste. */
.nach-oben {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--rot); border: 0; border-radius: var(--radius-klein); cursor: pointer;
  box-shadow: 0 12px 30px rgba(186, 19, 25, .28);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility 0s .3s, background-color .3s;
}
.nach-oben.ist-sichtbar { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s, background-color .3s; }
.nach-oben:hover { background: var(--rot-dunkel); }
.nach-oben svg { display: block; transition: transform .3s; }
.nach-oben:hover svg { transform: translateY(-2px); }
.nach-oben:focus-visible { outline: 2px solid var(--tinte); outline-offset: 3px; }
body.menu-offen .nach-oben { visibility: hidden; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .nach-oben, .nach-oben svg { transition: none; transform: none; } }

/* Unterseiten: Kopf mit Bild */
/* Kopf einer Projektseite: links Text, rechts die Eckdaten als Werkplan-Block.
   Die Dachzeile steht in einer eigenen Rasterzeile, darum beginnen Titel und
   Eckdaten auf derselben Höhe, ohne dass eine Zahl im CSS stimmen muss. */
.projektkopf {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr);
  column-gap: clamp(32px, 5vw, 72px); row-gap: 18px; align-items: start;
}
.projektkopf .dachzeile { grid-column: 1; grid-row: 1; justify-self: start; }
.projektkopf .stapel { grid-column: 1; grid-row: 2; max-width: 62ch; }
/* Der Strich oben sitzt damit auf der Oberkante der Versalien des Titels */
.projektkopf .eckdaten { grid-column: 2; grid-row: 2; margin-top: 7px; }
@media (max-width: 860px) {
  .projektkopf { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .projektkopf .dachzeile, .projektkopf .stapel, .projektkopf .eckdaten { grid-column: 1; grid-row: auto; }
  .projektkopf .eckdaten { margin-top: 10px; }
}

.seitenkopf { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 48px; align-items: center; padding-top: 48px; }
.seitenkopf .rahmen { aspect-ratio: 4 / 3; }
.inhalt { max-width: 58ch; display: flex; flex-direction: column; gap: 18px; }
.inhalt p { font-size: var(--lauftext-gross); line-height: 1.75; }
/* Aufzählungen tragen einen roten Strich im Massstab-Raster statt der Punkte des Browsers */
.liste { margin: 0; padding-left: 26px; display: grid; gap: 8px; font-size: var(--lauftext-gross); line-height: 1.6; list-style: none; }
.liste li { position: relative; }
.liste li::before { content: ""; position: absolute; left: -26px; top: .78em; width: 12px; height: 2px; background: var(--rot); }
.bildzeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.bildzeile figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bildzeile figcaption { font-size: var(--kleinst); }
.schluss { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.rechtstext { max-width: 60ch; display: flex; flex-direction: column; gap: 16px; padding-top: 48px; }
.rechtstext h2 { font-size: var(--h3); margin-top: 20px; }
.rechtstext p, .rechtstext li { font-size: var(--lauftext); }

/* Bewegung: beim Laden und beim Scrollen, immer abschaltbar */
@keyframes hoch { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes strich { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ticken { from { background-position: -120px 0, -90px 15px; } to { background-position: 0 0, 30px 15px; } }

.a1 { animation: hoch .8s cubic-bezier(.2, .7, .2, 1) .3s both; }
.a2 { animation: hoch .8s cubic-bezier(.2, .7, .2, 1) .45s both; }
.einstieg-strich { transform-origin: left; animation: strich 1s cubic-bezier(.7, 0, .2, 1) .4s both; }
.massstab-einstieg { margin-top: 48px; }
.massstab-lauf { animation: ticken 1.8s cubic-bezier(.2, .7, .2, 1) .5s both; }

@supports (animation-timeline: view()) {
  .auftauchen { animation: hoch linear both; animation-timeline: view(); animation-range: entry 0% entry 28%; }
}

@media (prefers-reduced-motion: reduce) {
  .a1, .a2, .einstieg-strich, .massstab-lauf, .auftauchen { animation: none !important; }
  .rahmen img, .karte, .pfeil, .projekt-pfeil { transition: none !important; }
}

/* Breiten */
@media (max-width: 960px) {
  .einstieg { grid-template-columns: minmax(0, 1fr); }
  .einstieg-karte { margin: 0 0 -40px; order: 2; }
  /* Die Karte ragt 40 px nach unten; der Massstab hält trotzdem 48 px Luft */
  .massstab-einstieg { margin-top: 88px; }
  .zwei { gap: 40px; }
  /* Collage ohne seitlichen Versatz: sonst ragt das Bild unten rechts über den Rand */
  .bildraster > * { margin: 0 !important; }
  .bildraster > :nth-child(2), .bildraster > :nth-child(4) { margin-top: 28px !important; }
}
@media (max-width: 1180px) {
  .navi { display: none; }
  .menu { display: block; }
  .kopf-telefon-text { display: none; }
}
@media (max-width: 700px) {
  :root { --abschnitt: 72px; --rand: 16px; }
  .nach-oben { right: 12px; bottom: 12px; }
  .bildraster { gap: 8px; }
  .kopfzeile-abschnitt { margin-bottom: 24px; }
}

/* ============================================================
   Bildslideshow im Einstieg der Startseite
   ============================================================ */
/* isolation: Die Ebenen der Bilder (z-index 1 und 2 für den Übergang) gelten nur
   innerhalb der Slideshow und schieben sich nie über die Einstiegskarte */
.dia { position: absolute; inset: 0; isolation: isolate; }
/* visibility statt nur opacity: sonst fangen die unsichtbaren Folien die Klicks ab
   und ihre Knoepfe bleiben mit der Tabulatortaste erreichbar */
/* Weicher Übergang: Das neue Bild blendet in 1.6 s über das alte, das alte
   bleibt darunter voll stehen und verschwindet erst danach. So gibt es in der
   Mitte kein Aufhellen, wie es entsteht, wenn beide gleichzeitig halb
   durchsichtig sind. */
.dia-bild {
  position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; z-index: 1;
  transition: opacity 0s linear 1.6s, visibility 0s linear 1.6s;
}
.dia-bild:first-child { opacity: 1; visibility: visible; }
.dia.ist-aktiv .dia-bild { opacity: 0; visibility: hidden; }
.dia.ist-aktiv .dia-bild.ist-da {
  opacity: 1; visibility: visible; z-index: 2;
  transition: opacity 1.6s cubic-bezier(.45, 0, .25, 1), visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .dia-bild, .dia.ist-aktiv .dia-bild.ist-da { transition: opacity .3s linear, visibility 0s; }
}
.dia-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Steuerung der Slideshow: fünf feine Linien am unteren Bildrand, die laufende füllt sich rot.
   Die Füllung steuert auch den Wechsel: ist sie durch (animationend), kommt das nächste Bild.
   Ab 961 px überdeckt die Einstiegskarte die linken 72 px des Bildes (--einstieg-ueberlappung),
   bei 961 bis 1024 px sogar bis zur Unterkante. Linien und linker Pfeil beginnen deshalb erst danach. */
.dia-linien {
  position: absolute; z-index: 3; bottom: 12px;
  left: calc(var(--einstieg-ueberlappung) + 24px); right: 24px;
  display: none; gap: 6px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}
.dia.ist-aktiv ~ .dia-linien { display: flex; }
.dia-linien button {
  /* 28 px hoch, damit die Fläche zum Antippen reicht; der Strich bleibt 3 px */
  flex: 1; height: 28px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center;
}
.dia-linien span {
  position: relative; display: block; width: 100%; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, .42); overflow: hidden; transition: background-color .25s;
}
.dia-linien .ist-gesehen span { background: rgba(255, 255, 255, .92); }
.dia-linien button:hover span { background: rgba(255, 255, 255, .75); }
.dia-linien i {
  position: absolute; inset: 0; background: var(--rot);
  transform: scaleX(0); transform-origin: left;
}
.dia-linien .ist-dran i { animation: dia-lauf var(--dia-dauer, 6s) linear forwards; }
@keyframes dia-lauf { to { transform: scaleX(1); } }
/* Anhalten: Maus auf dem Bild, Tastaturfokus darin, Menü oder Lupe offen, Tab im Hintergrund */
.einstieg-bild:hover .dia-linien .ist-dran i,
.einstieg-bild:has(:focus-visible) .dia-linien .ist-dran i,
body.menu-offen .dia-linien .ist-dran i,
.einstieg-bild.ist-pausiert .dia-linien .ist-dran i { animation-play-state: paused; }
.dia-linien button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Pfeile an den Seiten, erst beim Überfahren oder mit der Tastatur sichtbar */
.dia-pfeil {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border: 0; padding: 0; border-radius: 50%;
  background: rgba(35, 31, 32, .55); color: #fff; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s, background-color .25s;
}
.dia.ist-aktiv ~ .dia-pfeil { display: flex; }
.dia-zurueck { left: calc(var(--einstieg-ueberlappung) + 14px); }
.dia-vor { right: 14px; }
.einstieg-bild:hover .dia-pfeil, .dia-pfeil:focus-visible { opacity: 1; }
.einstieg-bild .dia-pfeil:hover { background: rgba(35, 31, 32, .75); }
.dia-pfeil:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Auf Touch-Geräten keine Pfeile: wischen oder eine Linie antippen */
@media (hover: none) { .dia.ist-aktiv ~ .dia-pfeil { display: none; } }

/* ============================================================
   Bilder vergrössern (Lupe)
   ============================================================ */
.bildknopf {
  display: block; position: relative; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: var(--radius); overflow: hidden;
}
.bildknopf img { display: block; width: 100%; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.bildknopf:hover img { transform: scale(1.04); }
.lupe-zeichen {
  position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: var(--tinte);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s, background-color .25s, color .25s;
}
.bildknopf:hover .lupe-zeichen, .bildknopf:focus-visible .lupe-zeichen { opacity: 1; transform: none; }
.bildknopf:hover .lupe-zeichen { background: var(--rot); color: #fff; }

dialog.lupe {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100dvh; overflow: hidden;
}
dialog.lupe::backdrop { background: rgba(35, 31, 32, .94); }
.lupe-buehne { width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; padding: 16px; box-sizing: border-box; }
.lupe-rahmen { display: flex; align-items: center; justify-content: center; min-height: 0; }
.lupe-rahmen img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; display: block;
  border-radius: var(--radius-klein); background: var(--tinte);
}
.lupe-fuss { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 6px 4px; color: #fff; }
.lupe-text { font-size: var(--klein); line-height: 1.4; }
.lupe-zaehler { font-size: var(--kleinst); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .65); white-space: nowrap; }
.lupe-knopf {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background-color .25s, border-color .25s;
}
.lupe-knopf:hover { background: var(--rot); border-color: var(--rot); }
.lupe-zu { position: absolute; right: 16px; top: 16px; z-index: 2; }
.lupe-vor, .lupe-zurueck { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lupe-zurueck { left: 16px; }
.lupe-vor { right: 16px; }
.lupe-einzeln .lupe-vor, .lupe-einzeln .lupe-zurueck, .lupe-einzeln .lupe-zaehler { display: none; }

/* ============================================================
   Galerie auf den Projektseiten
   ============================================================ */
.galerie { display: flex; flex-direction: column; gap: 20px; }
.galerie figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.galerie figcaption { font-size: var(--kleinst); color: var(--text); }
/* auto-fill: Jede Kachel bleibt gleich gross, auch wenn ein Projekt nur ein oder zwei Bilder hat */
.galerie-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.galerie-raster .bildknopf img { aspect-ratio: 4 / 3; object-fit: cover; }
.galerie-hinweis { font-size: var(--kleinst); color: var(--text); display: flex; align-items: center; gap: 8px; }

/* ============================================================
   Mobiles Menü als ganzflächige Tafel
   ============================================================ */
.menu[open] > summary::before {
  content: ""; position: fixed; inset: 0; background: rgba(35, 31, 32, .45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 40;
}
@media (max-width: 1180px) {
  /* backdrop-filter macht die Kopfleiste zum Bezugsrahmen fuer position:fixed.
     Die Menuetafel waere dann nur so breit wie die Leiste, darum hier ohne Weichzeichner. */
  .kopf-leiste { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--papier); }
  .menu nav {
    position: fixed; inset: 0 0 0 auto; top: 0; width: min(380px, 88vw); height: 100dvh;
    border-radius: 0; box-shadow: -20px 0 60px rgba(35, 31, 32, .3);
    padding: 20px; gap: 2px; z-index: 50; overflow-y: auto;
    animation: tafel-rein .32s cubic-bezier(.2, .7, .2, 1) both;
  }
  .menu nav > a {
    font-size: var(--lauftext-gross); font-weight: 600; color: var(--tinte);
    padding: 16px 14px; border-bottom: 1px solid var(--linie-zart); border-radius: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
  }
  .menu nav > a::after {
    content: ""; width: 8px; height: 8px; flex-shrink: 0;
    border-right: 2px solid var(--rot); border-top: 2px solid var(--rot); transform: rotate(45deg);
  }
  .menu nav > a:hover, .menu nav > a:active { background: var(--grund); }
  /* Aktuelle Seite: roter Balken links, wie der Strich unter dem Eintrag in der Leiste */
  .menu nav > a[aria-current] { box-shadow: inset 3px 0 0 var(--rot); }
  .menu-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px 16px; }
  .menu-kopf img { height: 46px; width: auto; }
  .menu-zu {
    width: 48px; height: 48px; border-radius: var(--radius-klein); border: 1px solid var(--linie-kraeftig);
    background: var(--papier); color: var(--tinte); cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .menu-fuss { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
  .menu-fuss .knopf { width: 100%; }
  .menu-fuss small { font-size: var(--kleinst); color: var(--text); line-height: 1.5; }
  body.menu-offen { overflow: hidden; }
}
@keyframes tafel-rein { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu nav { animation: none !important; } }

/* Bilder, die sich vergrössern lassen: Einstieg und Raster */
.dia-knopf { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.dia-knopf:hover img { transform: none; }
.dia-knopf .lupe-zeichen { top: 20px; right: 20px; bottom: auto; }
.raster-bild { height: 100%; }
.raster-bild img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 960px) {
  .dia-knopf .lupe-zeichen { display: none; }
}
@media (max-width: 700px) {
  .lupe-zeichen { opacity: 1; transform: none; }
  .lupe-vor, .lupe-zurueck { top: auto; bottom: 16px; transform: none; }
  .lupe-fuss { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 72px; }
}

/* Seitenköpfe und Einzelbilder der Unterseiten */
.seitenkopf .bildknopf img { aspect-ratio: 4 / 3; object-fit: cover; }
.zwei > .bildknopf img { aspect-ratio: 4 / 3; object-fit: cover; }
.galerie-hinweis .lupe-zeichen {
  position: static; opacity: 1; transform: none; width: 28px; height: 28px;
  background: var(--grund); color: var(--tinte); flex-shrink: 0;
}

/* Bis 960 px liegt die Karte unter dem Bild: keine Überlappung, Linien über die volle Breite */
@media (max-width: 960px) {
  .dia-linien { left: 16px; right: 16px; }
  .dia-zurueck { left: 6px; }
}

/* Sehr schmale Handys (bis 380 px): Logo etwas kleiner, damit Logo und beide Knöpfe in eine Zeile passen */
@media (max-width: 380px) {
  .kopf-logo img { height: 42px; }
  .kopf-leiste { gap: 10px; padding-left: 12px; }
}

/* Ohne Bewegung: kein Selbstlauf, die aktuelle Linie steht gefüllt */
@media (prefers-reduced-motion: reduce) {
  .dia-linien .ist-dran i { animation: none; transform: scaleX(1); }
}

/* ------------------------------------------------ Nachträge Review 06.11.2026 */

/* Telefonnummern brechen nie mitten in der Nummer um */
a[href^="tel:"] { white-space: nowrap; }

/* Fuss: Adresse und darunter Telefon und E-Mail */
.fuss-adresse { display: flex; flex-direction: column; gap: 2px; }
.fuss-adresse a { color: var(--tinte); text-decoration: none; display: inline-block; padding: 3px 0; }
.fuss-adresse a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fuss-telefon { font-weight: 600; }

/* Brotkrumen über dem Seitenkopf der Unterseiten */
.brotkrumen-zeile { padding-top: 24px; }
.brotkrumen ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: var(--kleinst); color: var(--text); }
.brotkrumen li { display: flex; align-items: center; gap: 8px; }
.brotkrumen li + li::before { content: "/"; color: var(--linie-kraeftig); }
.brotkrumen a { color: var(--text); text-decoration: underline; text-decoration-color: var(--linie-kraeftig); text-underline-offset: 3px; display: inline-block; padding: 3px 0; }
.brotkrumen a:hover { color: var(--tinte); text-decoration-color: currentColor; }
.brotkrumen [aria-current] { color: var(--tinte); }
.brotkrumen-zeile + .seitenkopf, .brotkrumen-zeile + .projektkopf, .brotkrumen-zeile + .uebersicht-kopf { padding-top: 28px; }

/* Zwei weisse Abschnitte hintereinander: nur einmal Abschnittsabstand */
.abschnitt:not(.abschnitt-warm) + .abschnitt:not(.abschnitt-warm) { padding-top: 0; }

/* Werkplan-Block neben Text (Baueingabe, Partnerbetrieb): breitere Beschriftung, Lauftextgrösse */
.seitenblock { display: flex; flex-direction: column; gap: 14px; }
.seitenblock h3 { font-size: var(--h3); }
.eckdaten-weit div { font-size: var(--ui); padding: 14px 0; }
.eckdaten-weit b { min-width: 104px; }
.eckdaten-weit a { color: var(--rot-dunkel); }

/* Fragen der Unterseiten: Titel links, Antworten rechts */
.fragen-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.fragen-raster .fragen-titel { display: flex; flex-direction: column; gap: 14px; }
.fragen-raster .fragen-titel p { font-size: var(--ui); max-width: 34ch; }
.fragen-raster .fragen-titel a { color: var(--rot-dunkel); font-weight: 600; }
@media (max-width: 860px) {
  .fragen-raster { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* Werkstattbild im Abschnitt «Betrieb» */
.betrieb-bild { margin: 0; display: flex; flex-direction: column; gap: 8px; }
/* Rechte Spalte: Bild und Eckdaten beginnen auf Höhe der Dachzeile */
.betrieb-fakten .eckdaten { margin-top: 12px; }
.betrieb-bild img { aspect-ratio: 16 / 9; object-fit: cover; }
.betrieb-bild figcaption { font-size: var(--kleinst); color: var(--text); }
