/* ==========================================================================
   KKV Trockenbau e.U. — Stylesheet
   Konzept C "Modern & Markant", adaptiert auf die KKV-CI (Grün/Grau/Anthrazit)
   Signaturelement: die Diagonale aus der Fahrzeugbeschriftung
   Keine externen Abhaengigkeiten. Keine Web-Font-CDNs (DSGVO).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Schriften
   Die Dateien gehoeren nach /assets/fonts/. Solange sie fehlen, greift der
   System-Fallback — das Layout bleibt in beiden Faellen stabil.
   Empfehlung Display: Archivo (variabel, Weite 75–100) — SIL Open Font License.
   Empfehlung Text:    Inter (variabel) — SIL Open Font License.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "KKV Display";
  src: url("../fonts/archivo-variable.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-stretch: 62.5% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "KKV Text";
  src: url("../fonts/inter-variable.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design-Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Farbe - exakt aus der Logodatei ausgelesen (KKV_Trockenbau_LOGOS final).
     #335E4B = Gruen des "V", #3C3C3B = Anthrazit des "KK",
     #706F6F / #575756 = Grau der Zusatzzeilen. */
  --c-green:        #335E4B;
  --c-green-deep:   #264739;
  --c-green-mid:    #3E7059;
  --c-green-light:  #A0DCBD;
  --c-ink:          #3C3C3B;
  --c-dark:         #2A2A29;
  --c-ink-soft:     #33332F;
  --c-grey:         #575756;
  --c-grey-light:   #706F6F;
  --c-line:         #DDDDDB;
  --c-paper:        #F3F4F1;
  --c-white:        #FFFFFF;

  --c-text:         var(--c-ink);
  --c-text-muted:   var(--c-grey);

  /* Typografie */
  --f-display: "KKV Display", "Archivo", "Helvetica Neue", "Arial Nova", Arial, sans-serif;
  --f-text: "KKV Text", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --t-hero:    clamp(2.9rem, 10.5vw, 8.6rem);
  --t-h1:      clamp(2.4rem, 7vw, 5.4rem);
  --t-h2:      clamp(1.9rem, 4.6vw, 3.6rem);
  --t-h3:      clamp(1.25rem, 2.2vw, 1.65rem);
  --t-lead:    clamp(1.05rem, 1.6vw, 1.3rem);
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-label:   0.875rem;

  /* Raum */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --section-y: clamp(4.5rem, 9vw, 9rem);
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max: 1440px;

  --header-h: 74px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   3. Reset & Basis
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* clip verhindert seitliches Scrollen zuverlaessiger als hidden und
     erlaubt weiterhin position: sticky im Kopfbereich. */
  overflow-x: clip;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Auf inhaltsarmen Seiten (Impressum, Danke, Fehlerseite) endete der
     Footer mitten im Bildschirm, darunter blieb weisse Flaeche stehen.
     Die Spalte streckt sich auf volle Bildschirmhoehe, der Inhaltsbereich
     nimmt den Ueberschuss auf - der Footer sitzt damit immer am Seitenende.
     Auf inhaltsreichen Seiten aendert sich nichts. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

body > main { flex: 1 0 auto; }
body > .site-header,
body > .site-footer { flex: none; }

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

h1, h2, h3, h4 {
  overflow-wrap: break-word;
  hyphens: auto;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 87.5%;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.01em; }

p { margin: 0 0 var(--s-3); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-underline-offset: 0.2em; }

ul { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--c-green); color: #fff; }

.skip-link {
  position: absolute; left: var(--s-2); top: -100px; z-index: 999;
  background: var(--c-green); color: #fff;
  padding: 0.85rem 1.25rem; font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--s-2); }

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

/* --------------------------------------------------------------------------
   4. Layout-Primitive
   -------------------------------------------------------------------------- */
/* Ueberlaufschutz: Rasterkinder duerfen schrumpfen, nichts sprengt den Rand */
.split > *, .contact > *, .area > *, .head > *,
.svc__inner > *, .deliverables li > *, .bv-index li > *,
.hero__body > *, .form__row > * { min-width: 0; }

.wrap > *, .section, .hero, .pagehead { max-width: 100%; }
.ph, .project, .person, .stats li { max-width: 100%; overflow-wrap: break-word; }
.project__meta, .deliverables span, .bv-index span, .person span { overflow-wrap: anywhere; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--paper { background: var(--c-paper); }
.section--ink { background: var(--c-dark); color: #fff; }
.section--green { background: var(--c-green); color: #fff; }

.section--ink p, .section--green p { color: rgba(255,255,255,0.82); }
/* Buttons ausdruecklich ausnehmen - sonst ueberschreibt diese Regel
   (0,1,1) die Buttonfarbe (0,1,0) und die Schrift wird unsichtbar. */
.section--ink a:not(.btn), .section--green a:not(.btn) { color: #fff; }

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.head h2 { margin-bottom: 0; }

/* Eyebrow — Label-System aus dem Bauwesen (LV-/BV-Notation) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-text);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-green-mid);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: currentColor;
  flex: none;
}
.section--ink .eyebrow,
.section--green .eyebrow { color: var(--c-green-light); }

.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--c-grey); }
.section--ink .lead, .section--green .lead { color: rgba(255,255,255,0.85); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 54px;
  padding: 0.95rem 1.6rem;
  font-family: var(--f-text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn .arw { transition: transform 0.18s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

.btn--primary { background: var(--c-green); color: #fff; }
.btn--primary:hover { background: var(--c-green-mid); }

.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-ink); color: #fff; }

.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn--light:hover { background: #fff; color: var(--c-ink); border-color: #fff; }

/* Schrift bewusst im dunkleren Gruen (#264739), nicht im Sektionsgruen
   (#335E4B) - sonst haetten Schrift und Hintergrundflaeche denselben Ton. */
.btn--white,
.section--green .btn--white,
.section--ink .btn--white { background: #fff; color: var(--c-green-deep); }
.btn--white:hover,
.section--green .btn--white:hover,
.section--ink .btn--white:hover { background: var(--c-paper); color: var(--c-green); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Zwei Buttons nebeneinander brauchen rund 420 px. Darunter stapeln sie
   sich auf volle Breite - so bleibt der zweite immer sichtbar. */
@media (max-width: 480px) {
  .btn-row { display: grid; grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; justify-content: center; }
}

/* Textlink mit Pfeil */
.tlink {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 0.95rem;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--c-green);
  color: var(--c-green);
  transition: gap 0.18s var(--ease);
}
.tlink:hover { gap: 0.95rem; }
.section--ink .tlink, .section--green .tlink {
  color: #fff; border-bottom-color: var(--c-green-light);
}

/* --------------------------------------------------------------------------
   6. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--s-4);
  min-height: var(--header-h);
}

/* Logo — Vektordatei aus der Original-CI (KKV_Trockenbau_LOGOS final) */
.logo { display: inline-flex; flex: none; text-decoration: none; }
.logo img { display: block; height: 46px; width: auto; }
@media (max-width: 600px) { .logo img { height: 40px; } }
.site-footer .logo img { height: 66px; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: clamp(0.5rem, 1.8vw, 1.75rem); }
.nav__link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.65rem 0.25rem;
  font-size: 0.95rem; font-weight: 600; text-decoration: none;
  color: var(--c-ink);
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.nav__link:hover { color: var(--c-green); border-bottom-color: var(--c-green); }
.nav__link[aria-current="page"] { color: var(--c-green); border-bottom-color: var(--c-green); }

.nav__item--has-sub { position: relative; }
.nav__sub {
  position: absolute; top: 100%; left: -1rem;
  min-width: 320px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-green);
  padding: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0.16s;
}
.nav__item--has-sub:hover .nav__sub,
.nav__item--has-sub:focus-within .nav__sub {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__sub a {
  display: block; padding: 0.8rem 0.9rem; text-decoration: none;
  border-left: 2px solid transparent;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.nav__sub a:hover { background: var(--c-paper); border-left-color: var(--c-green); }
.nav__sub strong { display: block; font-size: 0.95rem; }
.nav__sub span { display: block; font-size: 0.875rem; color: var(--c-grey); }

.header-cta { display: none; }
@media (min-width: 1080px) { .header-cta { display: inline-flex; } }

.nav-close {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  min-height: 48px;
  padding: 0.6rem 1rem 0.6rem 1.1rem;
  background: var(--c-ink);
  color: #fff;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-close b { font-size: 1.15rem; line-height: 1; font-weight: 400; }
.nav-close:hover { background: var(--c-green); }
.nav__close-row { display: none; }

.nav-toggle {
  margin-left: auto;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 0 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--c-ink);
  transition: transform 0.22s var(--ease), opacity 0.18s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1079px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    max-width: 100vw;
    background: #fff;
    padding: var(--s-4) var(--gutter) 8rem;
    overflow-y: auto; overflow-x: hidden;
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.24s var(--ease),
                visibility 0.24s;
  }
  .nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .nav__close-row {
    display: flex;
    position: sticky; top: 0; z-index: 2;
    justify-content: flex-end;
    margin: calc(var(--s-4) * -1) calc(var(--gutter) * -1) var(--s-3);
    padding: var(--s-2) var(--gutter);
    background: #fff;
  }
  .nav-close { display: inline-flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--c-line); }
  .nav__link {
    font-family: var(--f-display); font-weight: 800; font-stretch: 87.5%;
    font-size: 1.6rem; padding: 1.1rem 0; border-bottom: 0;
  }
  .nav__sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; border-left: 2px solid var(--c-line);
    min-width: 0; padding: 0 0 var(--s-3) var(--s-3); margin-bottom: var(--s-3);
  }
  .nav__mobile-contact { margin-top: var(--s-5); display: grid; gap: var(--s-2); }
}
@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .nav__mobile-contact { display: none; }
}

/* --------------------------------------------------------------------------
   7. Hero — geteilter Bildschirm mit Diagonale (Signaturelement)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--c-dark);
  color: #fff;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(78vh, 780px);
}
.hero__body {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  position: relative; z-index: 2;
}
.hero__title {
  /* Der Titel steht ab 900px in einer halben Spalte - deshalb bewusst
     kleiner skaliert als die Bildschirmbreite. Niemals im Wort trennen. */
  font-size: clamp(1.95rem, 8.5vw, 4rem);
  font-stretch: 75%;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0 0 var(--s-3);
}
.hero__title span { display: block; }
.hero__region {
  font-family: var(--f-text);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--c-green-light);
  margin-bottom: var(--s-3);
}
.hero__text { color: rgba(255,255,255,0.8); max-width: 46ch; margin-bottom: var(--s-4); }

.hero__figures {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.25rem);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.18);
}
.hero__fig b {
  display: block;
  font-family: var(--f-display); font-weight: 900; font-stretch: 75%;
  font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1;
  letter-spacing: -0.03em;
}
.hero__fig span {
  display: block; font-size: 0.875rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-top: 0.4rem;
}

/* Hero ohne Bildspalte - bis ein passendes Motiv vorliegt */
.hero--plain .hero__grid { min-height: 0; }
.hero--plain .hero__body { padding-right: 0; }
@media (min-width: 900px) {
  .hero--plain .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero--plain .hero__body { max-width: 62ch; }
  .hero--plain .hero__figures { max-width: 46rem; }
}

.hero__media { position: relative; }
.hero__media .ph { aspect-ratio: 4 / 3; height: auto; border: 0; }

@media (min-width: 900px) {
  .hero__media .ph { aspect-ratio: auto; height: 100%; }
}

@media (min-width: 900px) {
  .hero__title { font-size: clamp(2.9rem, 4.8vw, 5.6rem); }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .hero__body { padding-right: clamp(2rem, 4vw, 4rem); }
  /* Die Diagonale: Zitat der Fahrzeugbeschriftung */
  .hero__media {
    margin-left: -8vw;
    clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* --------------------------------------------------------------------------
   8. Leistungen — zwei ungleiche Bloecke, aufklappbar
   -------------------------------------------------------------------------- */
.svc { border-top: 2px solid var(--c-ink); }
.svc__item { border-bottom: 1px solid var(--c-line); }

.svc__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  max-width: 100%;
  padding: clamp(1.5rem, 3.2vw, 2.5rem) 0;
  background: none; border: 0; cursor: pointer;
  text-align: left; font: inherit; color: inherit;
}
.svc__title {
  font-family: var(--f-display); font-weight: 900; font-stretch: 75%;
  font-size: clamp(1.35rem, 4.6vw, 3.4rem);
  line-height: 0.98; letter-spacing: -0.03em; text-transform: uppercase;
  overflow-wrap: break-word; hyphens: auto;
  transition: color 0.18s var(--ease);
}
.svc__head:hover .svc__title { color: var(--c-green); }
.svc__meta {
  display: block; margin-top: 0.5rem;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--c-grey);
}
.svc__plus {
  position: relative; width: 46px; height: 46px; flex: none;
  border: 2px solid var(--c-ink);
}
.svc__plus::before, .svc__plus::after {
  content: ""; position: absolute; inset: 50% 22%; height: 2px;
  background: var(--c-ink); transform: translateY(-1px);
  transition: transform 0.22s var(--ease);
}
.svc__plus::after { transform: translateY(-1px) rotate(90deg); }
.svc__head[aria-expanded="true"] .svc__plus::after { transform: translateY(-1px) rotate(0deg); }

.svc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s var(--ease);
}
.svc__panel[data-open="true"] { grid-template-rows: 1fr; }
.svc__panel > div { overflow: hidden; }
/* Zugeklappte Inhalte duerfen nicht per Tab erreichbar sein */
.svc__panel:not([data-open="true"]) > div { visibility: hidden; }
.svc__panel[data-open="true"] > div { visibility: visible; transition: visibility 0s; }
.svc__inner {
  display: grid; gap: var(--s-4);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 860px) {
  /* auto-fit: mit Bild zwei Spalten, ohne Bild nutzt der Text die volle Breite */
  .svc__inner {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
}

/* Teilleistungen: typografische Liste, keine Icons, keine Haken */
.deliverables { border-top: 1px solid var(--c-line); margin-top: var(--s-3); }
.deliverables li {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: var(--s-2);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--c-line);
}
.deliverables .pos {
  font-family: var(--f-display); font-weight: 800; font-stretch: 75%;
  font-size: 0.9rem; color: var(--c-green-light); padding-top: 0.15rem;
}
.deliverables strong { display: block; font-weight: 700; }
.deliverables span { display: block; font-size: var(--t-small); color: var(--c-grey); }
.section--ink .deliverables li,
.section--green .deliverables li { border-color: rgba(255,255,255,0.16); }
.section--ink .deliverables,
.section--green .deliverables { border-color: rgba(255,255,255,0.3); }
.section--ink .deliverables span,
.section--green .deliverables span { color: rgba(255,255,255,0.7); }

/* --------------------------------------------------------------------------
   9. Split-Sektion (Text + Bild), diagonal beschnitten
   -------------------------------------------------------------------------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-text { grid-template-columns: 1.15fr 1fr; }
  .split--flip .split__media { order: -1; }
}

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--c-line); margin-top: var(--s-4);
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { background: var(--c-white); padding: var(--s-3); }
.section--paper .stats li { background: var(--c-paper); }
.section--ink .stats, .section--green .stats { background: rgba(255,255,255,0.2); }
.section--ink .stats li { background: var(--c-dark); }
.section--green .stats li { background: var(--c-green); }
.stats b {
  display: block;
  font-family: var(--f-display); font-weight: 900; font-stretch: 75%;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1; letter-spacing: -0.03em;
}
.stats span {
  display: block; margin-top: 0.45rem;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--c-grey);
}
.section--ink .stats span, .section--green .stats span { color: rgba(255,255,255,0.62); }

/* --------------------------------------------------------------------------
   10. Projekte
   -------------------------------------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(276px, 30%);
  gap: var(--s-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--s-2);
  /* Die systemeigene Leiste wird ausgeblendet - sie ist je nach Geraet
     duenn, unsichtbar oder verschwindet nach kurzer Zeit. Stattdessen
     die eigene Leiste darunter, die ueberall gleich aussieht. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }

/* Eigener Schieber unter dem Projektstreifen */
.rail-scroll {
  position: relative;
  height: 10px;
  margin-top: var(--s-3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.rail-scroll::before {          /* groessere Trefferflaeche fuer den Finger */
  content: "";
  position: absolute;
  inset: -14px 0;
}
.rail-scroll[data-drag="true"] { cursor: grabbing; }
.rail-scroll[hidden] { display: none; }

.rail-scroll__thumb {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  min-width: 56px;
  border-radius: 999px;
  background: var(--c-green-light);
  transition: background-color 0.18s var(--ease);
}
.rail-scroll:hover .rail-scroll__thumb,
.rail-scroll[data-drag="true"] .rail-scroll__thumb { background: #fff; }

/* Auf hellen Flaechen */
.section--paper .rail-scroll,
.section:not(.section--ink):not(.section--green) .rail-scroll {
  background: var(--c-line);
}
.section--paper .rail-scroll__thumb,
.section:not(.section--ink):not(.section--green) .rail-scroll__thumb {
  background: var(--c-green);
}
.rail > * { scroll-snap-align: start; }
@media (min-width: 900px) { .rail { grid-auto-columns: minmax(340px, 34%); } }

.pgrid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }

.project { display: block; text-decoration: none; color: inherit; }
.project .ph { transition: transform 0.4s var(--ease); }
.project__media { overflow: hidden; background: var(--c-paper); }
.project:hover .ph { transform: scale(1.03); }
.project__tag {
  display: inline-block; margin-top: var(--s-2);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; background: var(--c-green); padding: 0.3rem 0.6rem;
}
.project__name {
  font-family: var(--f-display); font-weight: 800; font-stretch: 87.5%;
  font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.1;
  letter-spacing: -0.015em; margin: 0.7rem 0 0.35rem;
}
/* Standort als eigenes Element - beim Ueberfliegen sofort erfassbar.
   Bewusst kein zweites Farbfeld: dieselbe Label-Sprache wie die Eyebrows,
   nur mit vorangestelltem Ortsmarker. */
.project__ort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-green);
  line-height: 1.2;
}
.project__ort::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
}
.section--ink .project__ort { color: var(--c-green-light); }

@media (max-width: 480px) {
  .project__ort { font-size: 0.9rem; letter-spacing: 0.1em; }
}

.project__meta { font-size: var(--t-small); color: var(--c-grey); margin: 0; }
.section--ink .project__meta { color: rgba(255,255,255,0.68); }

/* BV-Index — Referenzauszug als Bautafel gesetzt */
.bv-index { border-top: 1px solid rgba(255,255,255,0.28); }
.bv-index li {
  display: grid; grid-template-columns: 1fr; gap: 0.2rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
@media (min-width: 760px) {
  .bv-index li { grid-template-columns: 1.6fr 1fr; align-items: baseline; gap: var(--s-3); }
}
.bv-index b {
  font-family: var(--f-display); font-weight: 800; font-stretch: 87.5%;
  font-size: clamp(1.05rem, 2.1vw, 1.4rem);
  letter-spacing: -0.01em; text-transform: uppercase; line-height: 1.15;
}
.bv-index span { font-size: var(--t-small); color: rgba(255,255,255,0.68); }
.bv-index--light { border-top-color: var(--c-line); }
.bv-index--light li { border-bottom-color: var(--c-line); }
.bv-index--light span { color: var(--c-grey); }

/* --------------------------------------------------------------------------
   11. Einzugsgebiet
   -------------------------------------------------------------------------- */
.area { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .area { grid-template-columns: 1fr 1.1fr; } }
.area__map { width: 100%; height: auto; }
.area__legend { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.area__key { display: grid; grid-template-columns: 18px 1fr; gap: var(--s-2); align-items: start; }
.area__swatch { width: 18px; height: 18px; margin-top: 5px; }
.area__swatch { border-radius: 50%; }
.area__swatch--a { background: rgba(51,94,75,.14); border: 2px solid var(--c-green); }
.area__swatch--b { background: rgba(51,94,75,.06); border: 2px dashed #7FB79B; }
.area__key strong { display: block; }
.area__key span { font-size: var(--t-small); color: var(--c-grey); }
.section--ink .area__key span { color: rgba(255,255,255,0.7); }

/* --------------------------------------------------------------------------
   12. Kontakt & Formular
   -------------------------------------------------------------------------- */
.contact { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 960px) { .contact { grid-template-columns: 1fr 1.15fr; } }

.contact-list { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.person {
  display: block; text-decoration: none;
  padding: var(--s-3);
  background: rgba(255,255,255,0.07);
  border-left: 3px solid var(--c-green-light);
  transition: background-color 0.18s var(--ease);
}
.person:hover { background: rgba(255,255,255,0.14); }
.person strong { display: block; font-size: 1.05rem; }
.person em {
  display: block; font-style: normal; font-size: 0.875rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--c-green-light); margin: 0.15rem 0 0.5rem;
}
.person span {
  font-family: var(--f-display); font-weight: 800; font-stretch: 87.5%;
  font-size: 1.25rem; letter-spacing: -0.01em;
}
.person--light { background: var(--c-paper); border-left-color: var(--c-green); }
.person--light:hover { background: #EAEEE8; }
.person--light em { color: var(--c-green-mid); }

.form { display: grid; gap: var(--s-2); }
@media (min-width: 620px) { .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 54px;
  padding: 0.9rem 1rem;
  font: inherit; font-size: 1rem;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 0;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.5); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-green-light); background: rgba(255,255,255,0.13);
}
.field select option { color: var(--c-ink); }
.form__consent {
  display: grid; grid-template-columns: 24px 1fr; gap: 0.75rem;
  align-items: start; font-size: var(--t-small); margin-top: var(--s-1);
}
.form__consent input { width: 24px; height: 24px; min-height: 0; margin-top: 2px; accent-color: var(--c-green-light); }
.form__note { font-size: 0.9rem; color: rgba(255,255,255,0.6); }

/* --------------------------------------------------------------------------
   13. Footer & mobile Aktionsleiste
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-green-deep); color: rgba(255,255,255,0.75); }
.site-footer__top {
  display: grid; gap: var(--s-5);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
@media (min-width: 800px) { .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 {
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  color: #fff; font-family: var(--f-text); margin-bottom: var(--s-2);
}
.site-footer a { color: rgba(255,255,255,0.78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer li { padding: 0.32rem 0; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4);
  justify-content: space-between; align-items: center;
  padding-block: var(--s-3);
  border-top: 1px solid rgba(255,255,255,0.16);
  font-size: 0.9rem;
}
.site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.actionbar a {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 62px; padding: 0.6rem;
  font-weight: 700; font-size: 0.98rem; text-decoration: none; color: #fff;
}
.actionbar a:first-child { background: var(--c-dark); }
.actionbar a:last-child { background: var(--c-green); }
@media (min-width: 1080px) { .actionbar { display: none; } }
@media (max-width: 1079px) { body { padding-bottom: 62px; } }

/* Seitlicher Anfrage-Reiter (Desktop) */
.side-tab {
  position: fixed; right: 0; top: 50%; z-index: 80;
  transform: translateY(-50%) translateX(0);
  display: none; align-items: center; gap: 0.6rem;
  writing-mode: vertical-rl;
  padding: 1.1rem 0.85rem;
  background: var(--c-green); color: #fff;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.18s var(--ease);
}
.side-tab:hover { background: var(--c-green-mid); }
@media (min-width: 1200px) { .side-tab { display: flex; } }

/* --------------------------------------------------------------------------
   14. Seitenkopf der Unterseiten
   -------------------------------------------------------------------------- */
.pagehead {
  background: var(--c-dark); color: #fff;
  padding-block: clamp(3rem, 7vw, 6rem);
}
.pagehead h1 {
  font-size: var(--t-h1); font-stretch: 75%; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.92;
}
.pagehead p { color: rgba(255,255,255,0.8); font-size: var(--t-lead); }
.crumbs { font-size: 0.875rem; color: rgba(255,255,255,0.6); margin-bottom: var(--s-3); }
.crumbs a { color: rgba(255,255,255,0.8); }
.crumbs span { margin-inline: 0.5rem; }

/* --------------------------------------------------------------------------
   Projektgalerie und Lightbox
   -------------------------------------------------------------------------- */
/* Die gesamte Projektkarte oeffnet die Galerie.
   Die weiteren Bilder liegen als JSON in der Karte und werden erst beim
   Oeffnen der Lightbox geladen - sie sind nicht im Layout vorhanden. */
.project--klickbar { cursor: pointer; }
.project--klickbar:focus-visible {
  outline: 3px solid var(--c-green);
  outline-offset: 6px;
}
.section--ink .project--klickbar:focus-visible { outline-color: var(--c-green-light); }

.project__media .foto { transition: transform 0.4s var(--ease); }
.project--klickbar:hover .foto { transform: scale(1.03); }

.project__mehr { margin: 0.75rem 0 0; }
.project--klickbar:hover .tlink { gap: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  .project--klickbar:hover .foto { transform: none; }
}

/* --- Lightbox --- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 500;   /* ueber Kopfzeile (100) und Aktionsleiste (90) */
  display: none;
  background: rgba(20, 23, 20, 0.94);
  padding: clamp(0.75rem, 3vw, 2rem);
}
.lb[data-offen="true"] { display: grid; grid-template-rows: auto 1fr auto; }

.lb__kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.lb__zaehler {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.66);
  font-variant-numeric: tabular-nums;
}
.lb__zu {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 48px; padding: 0.6rem 1rem;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  font: inherit; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.lb__zu:hover { background: #fff; color: var(--c-ink); border-color: #fff; }

.lb__buehne {
  position: relative;
  display: grid; place-items: center;
  min-height: 0;
  padding-inline: clamp(3.5rem, 8vw, 6rem);   /* Platz fuer die Pfeile */
}
.lb__bild {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  cursor: default;
}
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.12);
  color: #fff; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1;
  transition: background-color 0.18s var(--ease);
}
.lb__nav:hover { background: var(--c-green); }
.lb__nav--vor { left: 0; }
.lb__nav--zurueck { right: 0; }

.lb__fuss { text-align: center; }
.lb__text {
  margin: 0 auto; max-width: 68ch;
  font-size: var(--t-small); color: rgba(255,255,255,0.8);
}

@media (max-width: 640px) {
  .lb__nav { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
}

/* Dreizeiliger Claim mit KKV-Hervorhebung.
   Die Anfangsbuchstaben sind Teil der Marke: K und K grau, V gruen. */
.kkv-claim span { display: block; }
.kkv-claim b { font-weight: inherit; color: var(--c-grey); }
.kkv-claim .kkv-claim__v { color: var(--c-green); }

/* Fehlerseite: Auswahl mittig und etwas groesser,
   damit sie nicht am linken Rand untergeht. */
.nf {
  max-width: 66ch;
  margin-inline: auto;
  text-align: center;
}
.nf .eyebrow { justify-content: center; }
.nf .btn-row { justify-content: center; }
.nf .deliverables { text-align: left; }
.nf .deliverables li { padding: 1.15rem 0; }
.nf .deliverables strong { font-size: 1.15rem; line-height: 1.3; }
.nf .deliverables span { font-size: 1rem; }
.nf .deliverables .pos { font-size: 1.05rem; padding-top: 0.05rem; }

@media (max-width: 560px) {
  .nf .deliverables strong { font-size: 1.05rem; }
  .nf .deliverables li { padding: 1rem 0; }
}

/* Prosa (Impressum, Datenschutz) */
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-top: var(--s-5); }
.prose h3 { margin-top: var(--s-4); }
.prose ul { list-style: disc; padding-left: 1.3rem; margin-bottom: var(--s-3); }
.prose ul li { padding: 0.2rem 0; }
.prose dl { display: grid; gap: 0.4rem 1.5rem; margin: 0 0 var(--s-4); }
@media (min-width: 620px) { .prose dl { grid-template-columns: 200px 1fr; } }
.prose dt { font-weight: 700; }
.prose dd { margin: 0; }

/* --------------------------------------------------------------------------
   15. Projektfotos
   -------------------------------------------------------------------------- */
.foto {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--c-paper);
}
.foto--wide   { aspect-ratio: 16 / 9; }
.foto--tall   { aspect-ratio: 3 / 4; }
.foto--square { aspect-ratio: 1 / 1; }

/* Im Hero fuellt das Bild ab 900px die halbe Spalte in voller Hoehe */
.hero__media .foto { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .hero__media .foto { aspect-ratio: auto; height: 100%; }
}

/* --------------------------------------------------------------------------
   16. Bild-Platzhalter
   Ersetzen durch <img src="..." alt="..." loading="lazy" decoding="async">
   -------------------------------------------------------------------------- */
.ph {
  position: relative;
  display: flex; align-items: flex-end;
  aspect-ratio: 4 / 3;
  padding: var(--s-3);
  background-color: #E7EAE5;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(51,94,75,0.08) 0 14px,
      rgba(51,94,75,0) 14px 28px);
  border: 1px dashed rgba(51,94,75,0.35);
  color: var(--c-green);
  overflow: hidden;
}
.ph--dark {
  background-color: #33352F;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(160,220,189,0.16) 0 14px,
      rgba(78,158,114,0) 14px 28px);
  border-color: rgba(160,220,189,0.4);
  color: var(--c-green-light);
}
.ph--wide { aspect-ratio: 16 / 9; }
.ph--tall { aspect-ratio: 3 / 4; }
.ph--square { aspect-ratio: 1 / 1; }
.ph__label {
  max-width: 100%;
  font-size: 0.72rem; font-weight: 700; line-height: 1.5;
  letter-spacing: 0.08em; text-transform: uppercase;
  overflow-wrap: anywhere; hyphens: auto;
}
@media (max-width: 560px) {
  .ph { padding: var(--s-2); }
  .ph__label { font-size: 0.66rem; letter-spacing: 0.04em; line-height: 1.45; }
}
.ph__label b { display: block; font-size: 0.78rem; }

/* Offene Angabe im Text */
.todo {
  background: #FFF3CD; color: #5C4600;
  padding: 0.1em 0.45em; font-weight: 700; font-size: 0.85em;
  white-space: nowrap;
}
.section--ink .todo, .section--green .todo { background: #FFE08A; color: #4A3800; }

/* --------------------------------------------------------------------------
   17. Bewegung
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .actionbar, .side-tab { display: none; }
  body { color: #000; }
}
