/* Malermeister Biermann: Unterseiten (Innenarbeiten, Aussenarbeiten, Kontakt, Recht).
   Baut auf biermann.css auf (Farben, Schrift, Kopf, Menue, Fuss). Jede Seite hat einen eigenen Aufbau:
   Innen = Kapitel mit mitlaufender Farbleiste, Aussen = abwechselnde Tafeln mit Schiebern, Kontakt = dunkle Buehne. */

/* ------------------------------------------------------------ Grundbausteine */
.unterseite .roll { clip-path: none; transform: none; }
.js .unterseite .u-titel .roll { clip-path: inset(-0.2em 100% -0.2em 0); transform: scaleX(0.62); }
.js .unterseite .u-titel .roll + .roll { transition-delay: 0.12s; }
.js .unterseite .u-titel .roll + .roll + .roll { transition-delay: 0.24s; }
.js .unterseite .u-titel.ist-an .roll { clip-path: inset(-0.2em -0.05em -0.2em 0); transform: none; }

.u-zeile { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gelb); }
.u-titel {
  margin-top: 14px; font-size: clamp(2.9rem, 8.4vw, 9rem); line-height: 0.9; font-weight: 880; font-stretch: 116%;
  letter-spacing: -0.03em; text-wrap: balance;
}
.u-lead { margin-top: clamp(18px, 3vh, 28px); max-width: 38rem; font-size: 1.12em; line-height: 1.5; }
.u-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 0 26px;
  margin-top: clamp(22px, 4vh, 36px); border: 0; border-radius: var(--rand);
  background: var(--gelb); color: var(--schiefer); font-weight: 760; font-size: 17px; text-decoration: none;
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}
.u-knopf::after { content: ""; width: 22px; height: 2px; background: currentColor; transition: width 0.35s var(--ease-out); }
.u-knopf:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .u-knopf:hover { transform: translateY(-2px); } .u-knopf:hover::after { width: 34px; } }
.u-knopf-dunkel { background: var(--schiefer); color: #fff; }
.u-knopf-leise { display: inline-flex; align-items: center; min-height: 54px; margin-top: clamp(22px, 4vh, 36px); font-weight: 700; text-underline-offset: 5px; }
.u-knopf-leise-hell { color: #fff; }
.u-ruf-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }

.marken { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.marken li {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: var(--rand);
  background: #fff; box-shadow: inset 0 0 0 1px rgba(35, 40, 49, 0.12); font-weight: 600; font-size: 0.95em;
}
.marken li::before { content: ""; width: 10px; height: 10px; border-radius: 1px; background: var(--f, var(--gelb)); }
.anker-alt { position: absolute; top: 0; }
:target, .kapitel, .tafel { scroll-margin-top: 96px; }
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Lange deutsche Woerter (Schimmelbeseitigung, Fassadendaemmung) passen am Handy sonst nicht in die Zeile */
.u-titel, .kapitel h2, .tafel-text h2, .u-ruf h2, .recht h1, .recht h2, .k-danke h2, .a-sprung a, .recht a { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; hyphenate-limit-chars: 10 4 4; }

/* ------------------------------------------------------------ Innenarbeiten: Bildkopf */
.u-kopf { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--schiefer); color: #fff; }
.u-kopf-bild, .u-kopf-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.u-kopf-bild img { transform: scale(1.06); transition: transform 2.4s var(--ease-out); }
.u-kopf.ist-da .u-kopf-bild img { transform: none; }
.u-kopf::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 23, 29, 0.92) 0%, rgba(20, 23, 29, 0.55) 42%, rgba(20, 23, 29, 0.05) 78%),
              linear-gradient(to right, rgba(20, 23, 29, 0.55), transparent 60%);
}
.u-kopf-text { position: relative; z-index: 1; padding: 140px var(--seite) clamp(48px, 9vh, 96px); max-width: 1180px; }

/* ------------------------------------------------------------ Innenarbeiten: Kapitel mit Leiste */
.kapitel-rahmen {
  display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  padding: clamp(56px, 10vh, 120px) var(--seite) 0; max-width: 1480px; margin: 0 auto;
}
.kapitel-rahmen > * { min-width: 0; }
.kapitel-leiste { position: sticky; top: 104px; align-self: start; }
.kapitel-leiste-titel { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--leise); margin-bottom: 14px; }
.kapitel-leiste ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.kapitel-leiste a {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px 0 22px;
  text-decoration: none; font-weight: 640; border-radius: var(--rand); overflow: hidden; isolation: isolate;
  transition: color 0.35s;
}
.kapitel-leiste a::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--f); z-index: -1;
  transition: width 0.55s var(--ease-roll);
}
.kapitel-leiste a span { font-size: 12px; font-weight: 700; opacity: 0.55; font-variant-numeric: tabular-nums; }
.kapitel-leiste li.ist-aktiv a { color: #fff; }
.kapitel-leiste li.ist-aktiv a::before { width: 100%; }
@media (hover: hover) and (pointer: fine) { .kapitel-leiste li:not(.ist-aktiv) a:hover::before { width: 14px; } }

.kapitel-einleitung { font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.35; font-weight: 560; max-width: 44rem; padding-bottom: clamp(40px, 7vh, 80px); }
.kapitel { position: relative; padding: clamp(48px, 8vh, 96px) 0; border-top: 1px solid rgba(35, 40, 49, 0.14); }
.kapitel-nr {
  font-size: clamp(4.2rem, 9vw, 8.5rem); line-height: 0.8; font-weight: 900; font-stretch: 120%; letter-spacing: -0.04em;
  color: var(--f); font-variant-numeric: tabular-nums;
}
.kapitel h2 {
  margin-top: 18px; font-size: clamp(2rem, 4.2vw, 4rem); line-height: 0.98; font-weight: 820; font-stretch: 114%;
  letter-spacing: -0.02em; max-width: 18ch; text-wrap: balance;
}
.kapitel-bild { display: block; margin-top: clamp(26px, 5vh, 48px); border-radius: var(--rand); overflow: hidden; background: var(--kalk-2); }
.kapitel-bild img { width: 100%; height: auto; }
.kapitel-text { display: grid; grid-template-columns: repeat(2, minmax(0, 30rem)); gap: 18px clamp(24px, 4vw, 56px); margin-top: clamp(24px, 4vh, 40px); color: #3b4148; }
.kapitel-text > .marken, .kapitel-text > .kapitel-mehr { grid-column: 1 / -1; }
.kapitel-text > .marken { margin: 0; }
.kapitel-mehr { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 700; color: var(--schiefer); text-decoration: none; justify-self: start; }
.kapitel-mehr::after { content: ""; width: 26px; height: 2px; background: var(--f); transition: width 0.35s var(--ease-out); }
.kapitel-mehr:hover::after { width: 44px; }

/* Schichtbild: Wandaufbau setzt sich beim Hereinkommen Schicht fuer Schicht zusammen */
.schichtbild { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--kalk-2); overflow: hidden; }
.schichtbild img {
  position: absolute; left: 50%; top: 50%; width: min(64%, 520px); height: auto; translate: -50% -50%;
  transition: transform 1.1s var(--ease-roll), opacity 0.6s; transition-delay: calc(var(--s) * 140ms);
  transform: translate(calc(var(--s) * 9%), calc(var(--s) * -6%));
}
.js .schichtbild:not(.ist-da) img { transform: translate(calc(var(--s) * 9% + 40%), calc(var(--s) * -6% - 20%)); opacity: 0; }
.js .schichtbild:not(.ist-da) img:first-child { transform: none; opacity: 1; }
.schicht-namen {
  position: absolute; left: 18px; bottom: 14px; list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; font-weight: 650; counter-reset: s;
}
.schicht-namen li { counter-increment: s; }
.schicht-namen li::before { content: counter(s) " "; color: var(--f, var(--gelb)); font-weight: 800; }
.schichtbild-dunkel { background: var(--schiefer); color: #fff; }

/* Abschluss-Ruf */
.u-ruf { margin-top: clamp(40px, 8vh, 96px); padding: clamp(64px, 12vh, 140px) var(--seite); background: var(--gelb); color: var(--schiefer); }
.u-ruf h2 { font-size: clamp(2.4rem, 6.4vw, 6.4rem); line-height: 0.92; font-weight: 880; font-stretch: 116%; letter-spacing: -0.03em; max-width: 14ch; text-wrap: balance; }
.u-ruf > p { margin-top: 18px; max-width: 34rem; font-size: 1.1em; }

/* ------------------------------------------------------------ Aussenarbeiten: Kopf mit Fassaden-Schieber */
.a-kopf {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: clamp(28px, 5vw, 80px);
  min-height: 100svh; padding: 130px var(--seite) clamp(48px, 8vh, 88px); background: var(--schiefer); color: #fff;
}
.a-kopf .u-titel { font-size: clamp(2.7rem, 6.6vw, 7.4rem); }
.a-kopf .u-lead { color: rgba(255, 255, 255, 0.86); }
.a-sprung { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--schiefer); }
.a-sprung a { min-width: 0; }
.a-sprung a {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: clamp(120px, 18vh, 180px);
  padding: 18px clamp(14px, 2vw, 28px); background: var(--f); color: #fff; text-decoration: none;
  font-weight: 780; font-size: clamp(1.05rem, 1.6vw, 1.5rem); line-height: 1.05; font-stretch: 110%;
  transition: transform 0.45s var(--ease-out);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(0,0,0,0.14));
}
.a-sprung a span { font-size: 13px; font-weight: 700; opacity: 0.75; }
@media (hover: hover) and (pointer: fine) { .a-sprung a:hover { transform: translateY(-10px); } }

.tafel {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center;
  gap: clamp(28px, 6vw, 96px); padding: clamp(72px, 14vh, 160px) var(--seite); overflow: hidden; max-width: 1560px; margin: 0 auto;
}
.tafel + .tafel { border-top: 1px solid rgba(35, 40, 49, 0.12); }
.tafel-rechts .tafel-text { order: 2; }
.tafel-nr {
  position: absolute; top: clamp(20px, 5vh, 56px); right: var(--seite); z-index: 0; pointer-events: none;
  font-size: clamp(8rem, 22vw, 22rem); line-height: 0.8; font-weight: 900; font-stretch: 125%; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 2px var(--f); opacity: 0.35;
}
.tafel-rechts .tafel-nr { right: auto; left: var(--seite); }
.tafel-text, .tafel-bild { position: relative; z-index: 1; }
.tafel-text h2 { font-size: clamp(2rem, 4vw, 3.8rem); line-height: 0.98; font-weight: 820; font-stretch: 114%; letter-spacing: -0.02em; text-wrap: balance; }
.tafel-text h2::before { content: ""; display: block; width: 64px; height: 10px; border-radius: var(--rand); background: var(--f); margin-bottom: 22px; }
.tafel-text p { margin-top: 16px; max-width: 34rem; color: #3b4148; }
.tafel-bild { display: block; margin: 0; border-radius: var(--rand); overflow: hidden; }
.tafel > * { min-width: 0; }
.tafel-bild img { width: 100%; height: auto; }

/* Vorher/Nachher-Schieber */
.schieber { position: relative; overflow: hidden; border-radius: var(--rand); background: var(--kalk-2); touch-action: pan-y; }
.schieber img { width: 100%; height: auto; display: block; }
.schieber-vorher { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--v)) 0 0); }
.schieber-vorher img { width: 100%; height: 100%; object-fit: cover; }
.schieber-regler { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.schieber-griff { position: absolute; top: 0; bottom: 0; left: var(--v); width: 3px; translate: -50% 0; background: #fff; z-index: 2; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
.schieber-griff::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; translate: -50% -50%; border-radius: 50%;
  background: var(--gelb) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6' fill='none' stroke='%23232831' stroke-width='2.2'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.schieber-regler:focus-visible ~ .schieber-griff::after { outline: 3px solid #fff; outline-offset: 3px; }
.schieber-marke { position: absolute; top: 14px; z-index: 2; padding: 5px 10px; border-radius: var(--rand); font-size: 13px; font-weight: 700; background: rgba(35,40,49,0.78); color: #fff; pointer-events: none; }
.schieber-marke-v { left: 14px; }
.schieber-marke-n { right: 14px; }

/* ------------------------------------------------------------ Kontakt */
.k-buehne { min-height: 100svh; padding: 130px var(--seite) clamp(64px, 12vh, 120px); background: var(--schiefer); color: #fff; }
.k-buehne-kurz { display: flex; align-items: center; min-height: 92svh; }
.k-kopf { max-width: 1100px; }
.k-kopf .u-lead { color: rgba(255, 255, 255, 0.86); }
.k-kopf .u-lead a { color: var(--gelb); }
.k-raster { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); margin-top: clamp(40px, 7vh, 72px); align-items: start; }
.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.formular[hidden] { display: none; }
.formular .wahl, .formular .feld-breit, .formular .k-hinweis, .formular .k-senden { grid-column: 1 / -1; }
.feld { display: grid; gap: 8px; }
.feld label, .wahl legend { font-size: 15px; font-weight: 650; color: rgba(255, 255, 255, 0.9); }
.stern { color: var(--gelb); }
.feld input, .feld textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; border: 0; border-radius: var(--rand);
  background: #fff; color: var(--schiefer); font: inherit; font-size: 17px; line-height: 1.4;
  box-shadow: inset 0 -3px 0 transparent; transition: box-shadow 0.25s;
}
.feld textarea { min-height: 160px; resize: vertical; }
.feld input:focus, .feld textarea:focus { outline: none; box-shadow: inset 0 -3px 0 var(--gelb), 0 0 0 3px rgba(242, 179, 42, 0.45); }
.feld textarea::placeholder { color: #8a9096; }
.wahl { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wahl legend { margin-bottom: 10px; width: 100%; }
.wahl label { position: relative; cursor: pointer; }
.wahl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wahl span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: var(--rand);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); font-weight: 700; transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.wahl input:checked + span { background: var(--gelb); color: var(--schiefer); box-shadow: none; }
.wahl input:focus-visible + span { outline: 3px solid var(--gelb); outline-offset: 3px; }
.k-hinweis { font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.k-hinweis a { color: #fff; }
.k-senden { justify-self: start; margin-top: 4px; }
.k-senden:disabled { opacity: 0.7; cursor: progress; }
.k-danke, .k-umweg { padding: clamp(28px, 4vw, 44px); border-radius: var(--rand); background: var(--schiefer-2); }
.k-danke:focus, .k-umweg:focus { outline: none; }
.k-danke h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1; font-weight: 820; font-stretch: 112%; margin-top: 18px; }
.k-danke p { margin-top: 14px; color: rgba(255, 255, 255, 0.86); }
.k-danke-zeichen { width: 64px; height: 10px; border-radius: var(--rand); background: linear-gradient(to right, var(--gruen) 25%, var(--blau) 25% 50%, var(--rot) 50% 75%, var(--gelb) 75%); }
.k-umweg { margin-top: 18px; box-shadow: inset 4px 0 0 var(--rot); }
.k-umweg a { color: var(--gelb); }

.k-seite { display: grid; gap: 22px; }
.k-whatsapp {
  display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--rand); text-decoration: none;
  background: #1f8f55; color: #fff; transition: transform 0.4s var(--ease-out);
}
.k-whatsapp svg { flex: none; width: 44px; height: 44px; }
.k-whatsapp b { display: block; font-size: 1.25em; font-weight: 800; }
.k-whatsapp small { display: block; margin-top: 4px; font-size: 15px; opacity: 0.9; }
@media (hover: hover) and (pointer: fine) { .k-whatsapp:hover { transform: translateY(-3px); } }
.k-ablauf { padding: 22px; border-radius: var(--rand); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.k-ablauf h2 { font-size: 1.25em; font-weight: 800; }
.k-ablauf ol { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: a; }
.k-ablauf li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; counter-increment: a; }
.k-ablauf li::before {
  content: counter(a); grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--rand);
  background: var(--gelb); color: var(--schiefer); font-weight: 800;
}
.k-ablauf b { font-weight: 750; }
.k-ablauf span { font-size: 15px; color: rgba(255, 255, 255, 0.75); }
.k-mail { font-size: 15px; color: rgba(255, 255, 255, 0.75); }
.k-mail a { color: #fff; }

/* ------------------------------------------------------------ Rechtstexte */
.recht { max-width: 46rem; margin: 0 auto; padding: 150px var(--seite) clamp(72px, 12vh, 140px); }
.recht .u-zeile { color: var(--blau); }
.recht h1 { margin-top: 12px; font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.95; font-weight: 880; font-stretch: 116%; letter-spacing: -0.03em; }
.recht h2 { margin-top: 2.2em; font-size: 1.3em; font-weight: 800; }
.recht p { margin-top: 0.8em; color: #3b4148; }
.recht a { text-underline-offset: 3px; }
.recht-stand { color: var(--leise); }

/* ------------------------------------------------------------ Einblenden */
.js .unterseite [data-ein] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
.js .unterseite [data-ein].ist-da { opacity: 1; transform: none; }
.js .unterseite .bild-wachs { clip-path: inset(10% 14% 10% 14% round var(--rand)); transition: clip-path 1.2s var(--ease-roll); }
.js .unterseite .bild-wachs.ist-da { clip-path: inset(0 0 0 0 round var(--rand)); }

/* ------------------------------------------------------------ Schmal */
@media (max-width: 900px) {
  .kapitel-rahmen { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .kapitel-leiste {
    top: 0; z-index: 30; margin: 0 calc(var(--seite) * -1); padding: 10px var(--seite); background: rgba(242, 243, 240, 0.96);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(35, 40, 49, 0.1);
  }
  .kapitel-leiste-titel { display: none; }
  .kapitel-leiste ol { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .kapitel-leiste ol::-webkit-scrollbar { display: none; }
  .kapitel-leiste li { flex: none; scroll-snap-align: start; }
  .kapitel-leiste a { padding: 0 14px 0 18px; white-space: nowrap; }
  .kapitel-leiste a span { display: none; }
  .kapitel-einleitung { padding-top: 40px; }
  :target, .kapitel, .tafel { scroll-margin-top: 72px; }
  .kapitel-text { grid-template-columns: 1fr; }
  .a-kopf { grid-template-columns: 1fr; min-height: auto; padding-top: 120px; }
  .a-sprung { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tafel { grid-template-columns: 1fr; }
  .tafel-rechts .tafel-text { order: 0; }
  .tafel-nr { font-size: clamp(7rem, 34vw, 12rem); }
  .k-raster { grid-template-columns: 1fr; }
  .formular { grid-template-columns: 1fr; }
  .schichtbild { aspect-ratio: 4 / 3.4; }
  .schichtbild img { width: 72%; }
}
@media (max-width: 520px) {
  .u-kopf-text { padding-top: 120px; }
  .u-knopf { width: 100%; }
  .u-ruf-knoepfe { flex-direction: column; align-items: stretch; }
  .u-ruf-knoepfe .u-knopf-leise { margin-top: 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .js .unterseite .u-titel .roll, .js .unterseite [data-ein], .js .unterseite .bild-wachs, .schichtbild img, .u-kopf-bild img {
    transition: none !important; clip-path: none !important; opacity: 1 !important;
  }
  .js .schichtbild:not(.ist-da) img { transform: translate(calc(var(--s) * 9%), calc(var(--s) * -6%)); }
}
