/* ==========================================================================
   Baumsanierung Wagler – Relaunch, Gestaltung nach Entwurf 03/2026
   Hell, weiß, zwei Grüntöne, runde Ecken, weiche Schatten.
   Schrift selbst gehostet: Cabinet Grotesk, wie im Entwurf 03/2026.
   ========================================================================== */

@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-var.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("fonts/cabinet-grotesk-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("fonts/cabinet-grotesk-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("fonts/cabinet-grotesk-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cabinet Grotesk";
  src: url("fonts/cabinet-grotesk-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --gruen-dunkel:  #26622f;
  --gruen-mittel:  #3f8a3c;
  --gruen-hell:    #8cd24c;
  --gruen-hell-2:  #a7de74;
  --gruen-piktogramm: #bcd9a8;   /* Salbeigruen der Pictogramme, Wert aus dem Entwurf */
  --braun:         #6b4326;
  --braun-hell:    #8a5a33;
  --weiss:         #ffffff;
  --grau:          #f4f6f1;
  --linie:         #e3e8dd;
  --tinte:         #1e2620;
  --tinte-weich:   #4a544b;

  --display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cabinet: "Cabinet Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --r: 14px;
  --r-gross: 22px;
  --schatten: 0 10px 26px rgba(30, 38, 32, 0.13);
  --schatten-klein: 0 4px 14px rgba(30, 38, 32, 0.10);
  --sec-y: clamp(3rem, 7vw, 5.5rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--weiss);
  color: var(--tinte);
  font-family: var(--body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.06rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gruen-mittel); text-underline-offset: 0.16em; }
a:hover { color: var(--gruen-dunkel); }
:focus-visible { outline: 3px solid var(--gruen-mittel); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-breit { width: min(100% - 1.5rem, 1400px); margin-inline: auto; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--gruen-dunkel); color: #fff; padding: 0.75rem 1.25rem; }
.skip:focus { left: 0; }

/* ---------- Typografie ---------- */

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 0.55em; letter-spacing: -0.005em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); color: var(--gruen-dunkel); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2.1rem); color: var(--gruen-dunkel); }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); font-weight: 600; }
p { margin: 0 0 1.05em; max-width: 68ch; }
strong { font-weight: 700; }
.lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem); color: var(--tinte-weich); }
.tinte-dunkel { color: var(--tinte); }

/* ---------- Kopfzeile ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
}
.masthead .wrap-breit { display: flex; align-items: center; gap: 1.5rem; min-height: 80px; position: relative; }

.logo { display: block; margin-right: auto; }
.logo img { height: 53px; width: auto; border-radius: 4px; }
.logo-text { font-family: var(--display); font-weight: 700; color: var(--gruen-dunkel); font-size: 1.05rem; text-decoration: none; }

.nav ul { display: flex; gap: clamp(0.9rem, 0.2rem + 1.05vw, 1.9rem); list-style: none; margin: 0; padding: 0; }
.nav a {
  text-decoration: none; color: var(--tinte); font-size: clamp(0.95rem, 0.55rem + 0.65vw, 1.15rem); font-weight: 500;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--gruen-dunkel); }
.nav a[aria-current="page"] { border-bottom-color: var(--gruen-dunkel); font-weight: 600; }
.nav-toggle { display: none; }

/* ---------- Wortmarke ---------- */

.wortmarke { padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.25rem, 3vw, 2rem); }
.wortmarke .titel { font-family: var(--display); font-weight: 700; color: var(--gruen-dunkel);
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); line-height: 1.1; margin: 0; }
.wortmarke .unterzeile { font-size: 0.92rem; font-weight: 600; color: var(--tinte); margin: 0.5rem 0 0; }

/* ---------- Kopfbild ---------- */

.kopfbild {
  height: clamp(220px, 34vw, 430px);
  background-size: cover; background-position: center 42%;
  background-color: var(--gruen-dunkel);
}
.kopfbild-rund { border-radius: var(--r-gross); overflow: hidden; }

/* Film mit weichem Uebergang: das Standbild liegt als Lage darueber und blendet weg */
.film-rahmen {
  position: relative; overflow: hidden; border-radius: var(--r-gross);
  aspect-ratio: 628 / 960; background: var(--grau); align-self: center;
}
.film-rahmen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-standbild {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 1; transition: opacity 900ms ease-in-out; pointer-events: none;
}
.film-rahmen.laeuft .film-standbild { opacity: 0; }

/* Referenztabelle: Auftraggeber und Massnahme nebeneinander */
.tabelle { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--linie); }
.tabelle th { background: var(--grau); color: var(--gruen-dunkel); font-family: var(--display);
  font-size: 0.95rem; }
.tabelle td:first-child { width: 34%; font-weight: 600; }
.tabelle .mass { color: var(--gruen-dunkel); font-weight: 700; }
.tabelle .zusatz { display: block; color: var(--tinte-weich); font-size: 0.92rem; margin-top: 0.2rem; }
@media (max-width: 640px) {
  .tabelle thead { display: none; }
  .tabelle tr { display: block; border-bottom: 1px solid var(--linie); padding: 0.6rem 0; }
  .tabelle td { display: block; border: 0; padding: 0.2rem 0; }
  .tabelle td:first-child { width: auto; }
}

/* Bildreihe: alle Aufnahmen gleich hoch, Breite folgt dem Seitenverhaeltnis */
.bildreihe { display: flex; flex-wrap: wrap; gap: clamp(0.8rem, 2vw, 1.4rem); }
.bildreihe img { height: clamp(190px, 24vw, 330px); width: auto; max-width: 100%; object-fit: cover; }

/* ---------- Abschnitte ---------- */

.section { padding: var(--sec-y) 0; }
.section-grau { background: var(--grau); }
.section-eng { padding: clamp(2rem, 4vw, 3rem) 0; }
.section-kopf { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.raster-2 { display: grid; gap: clamp(1.25rem, 3vw, 2.25rem); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster-3 { display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Cabinet Grotesk: nur im Block "Das Wichtigste ueber uns zuerst" ---------- */

.cabinet, .cabinet p, .cabinet li { font-family: var(--cabinet); }
.cabinet h2 { font-family: var(--cabinet); font-weight: 800; letter-spacing: 0.02em; }
.cabinet .hervor { font-weight: 700; }

/* ---------- Punktliste mit freistehenden Pictogrammen ---------- */

.punkte { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1.4rem, 2.8vw, 2.1rem); }
.punkte li { display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; align-items: start; }
.punkte .icon {
  width: 56px; height: 56px;
  color: var(--gruen-piktogramm);
  display: grid; place-items: center;
}
.punkte .icon svg { width: 100%; height: 100%; }
.punkte p {
  margin: 0;
  /* groesserer Fliesstext wie im Entwurf: Zeilenabstand rund 3 % der Inhaltsbreite */
  font-size: clamp(1.05rem, 0.9rem + 0.9vw, 1.35rem);
  line-height: 1.62;
}
.punkte .hervor { color: var(--gruen-dunkel); font-weight: 700; }

/* ---------- Siegelkarte ---------- */

.raster-siegel { grid-template-columns: minmax(0, 1fr) 166px; }
/* Auf schmalen Bildschirmen untereinander statt zwei enge Spalten */
@media (max-width: 700px) {
  .raster-siegel { grid-template-columns: 1fr; }
  .raster-siegel .siegel { max-width: 166px; margin-inline: auto; }
}

.siegel {
  background: var(--gruen-hell); border-radius: var(--r); box-shadow: var(--schatten);
  padding: 0.625rem; text-align: center;
}
.siegel h3 { font-size: 0.95rem; color: var(--gruen-dunkel); margin-bottom: 0.9rem; }
.siegel .logos { display: grid; gap: 0.4rem; }
.siegel img { background: #fff; border-radius: 8px; padding: 0.5rem; margin-inline: auto; width: 100%; height: auto; }

/* ---------- Fotokacheln ---------- */

.kacheln { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.kachel {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r); box-shadow: var(--schatten);
  aspect-ratio: 3 / 2; background: var(--gruen-dunkel);
  text-decoration: none;
}
.kachel img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.kachel:hover img { transform: scale(1.04); }
/* Bildwechsel: zwei Lagen ueber dem Grundbild, weiche Blende */
.wechsler { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity var(--blende, 500ms) ease-in-out; }
.wechsler.sichtbar { opacity: 1; }
/* Bildwechsel neben Textbloecken */
.bildwechsel { position: relative; overflow: hidden; border-radius: var(--r-gross); align-self: start; }
/* nur das Grundbild bestimmt die Kastenhoehe - die eingeblendeten Lagen
   fuellen den Kasten und duerfen nicht ihre eigene Hoehe annehmen */
.bildwechsel > img:not(.wechsler) { display: block; width: 100%; height: auto; }
/* gleiches Format fuer Bilder unterschiedlicher Herkunft */
.bildwechsel.feste-form { aspect-ratio: 3 / 2; }
.bildwechsel.feste-form > img { height: 100%; object-fit: cover; }
/* schmale Bildspalte, damit der Text mehr Breite bekommt */
.raster-bild-schmal { grid-template-columns: minmax(190px, 0.52fr) minmax(0, 1fr); }
@media (max-width: 700px) { .raster-bild-schmal { grid-template-columns: 1fr; } }

/* Einspaltig steht das Bild immer hinter seinem Text - sonst rutscht es bei
   Abschnitten mit Bild links ueber die Ueberschrift. */
@media (max-width: 700px) {
  .raster-2 { grid-template-columns: 1fr; }
  .raster-2 > img,
  .raster-2 > video,
  .raster-2 > .bildwechsel { order: 2; }
  .raster-2 > div { order: 1; }
}

/* Hoch- und Querformate vollstaendig zeigen, nichts beschneiden */
.bildwechsel.ganz-zeigen { aspect-ratio: 3 / 4; background: var(--bildgrund, var(--weiss)); }
/* auf grauen Abschnitten nimmt der freie Raum den Abschnittston an */
.section-grau .bildwechsel.ganz-zeigen { --bildgrund: var(--grau); }
.bildwechsel.ganz-zeigen > img,
.bildwechsel.ganz-zeigen .wechsler { height: 100%; object-fit: contain; }
/* deckende Flaeche, damit das Standbild nicht neben dem Hochformat durchscheint */
.bildwechsel.ganz-zeigen .wechsler { background: var(--bildgrund, var(--weiss)); }
.kachel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.34) 100%);
}
.kachel .beschriftung {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; padding: 1.25rem;
  color: #fff; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem); text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
  line-height: 1.25;
}
.kachel .beschriftung small { display: block; font-family: var(--body); font-weight: 500; font-size: 0.82rem; opacity: 0.92; margin-top: 0.4rem; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }

/* ---------- Farbflächen ---------- */

.flaeche { border-radius: var(--r); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--schatten); }
.flaeche-gruen { background: linear-gradient(160deg, var(--gruen-hell) 0%, var(--gruen-mittel) 100%); color: #12300f; }
.flaeche-gruen h2, .flaeche-gruen h3 { color: #12300f; }
.flaeche-braun { background: linear-gradient(160deg, var(--braun-hell) 0%, var(--braun) 100%); color: #fff; }
.flaeche-braun h2, .flaeche-braun h3 { color: #fff; }
.flaeche-hell { background: var(--weiss); border: 1px solid var(--linie); }
.flaeche-grasgruen { background: var(--gruen-hell); color: #12300f; }
.flaeche-grasgruen h2, .flaeche-grasgruen h3 { color: #12300f; }
.flaeche p:last-child { margin-bottom: 0; }
.flaeche ul { margin: 0; padding-left: 1.15rem; }
.flaeche li { margin-bottom: 0.4rem; }

/* ---------- Karte über Bild (Über uns) ---------- */

.ueberlappung { margin-top: -6rem; position: relative; z-index: 2; }
@media (max-width: 720px) { .ueberlappung { margin-top: -2.5rem; } }

/* ---------- Pillen-Schaltflächen ---------- */

.pillen { display: grid; gap: 0.7rem; max-width: 320px; }
.pille {
  display: flex; align-items: center; gap: 0.65rem;
  background: #fff; color: var(--tinte);
  border-radius: 999px; padding: 0.65rem 1.1rem;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  box-shadow: var(--schatten-klein);
  transition: transform 0.15s ease;
}
.pille:hover { transform: translateX(4px); color: var(--gruen-dunkel); }
.pille .punkt { width: 22px; height: 22px; border-radius: 50%; background: var(--gruen-hell); display: grid; place-items: center; flex: 0 0 auto; }
.pille .punkt svg { width: 13px; height: 13px; color: var(--gruen-dunkel); }

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--gruen-dunkel); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  padding: 0.75rem 1.5rem; border-radius: 999px;
  border: 2px solid var(--gruen-dunkel);
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--gruen-mittel); border-color: var(--gruen-mittel); color: #fff; }
.btn-hell { background: #fff; color: var(--gruen-dunkel); border-color: #fff; }
.btn-hell:hover { background: var(--gruen-hell); border-color: var(--gruen-hell); color: #12300f; }
.btn-rand { background: transparent; color: var(--gruen-dunkel); border-color: var(--gruen-dunkel); }
.btn-rand:hover { background: var(--gruen-dunkel); color: #fff; }

/* ---------- Formular ---------- */

.form { display: grid; gap: 1rem; max-width: 620px; }
.feld { display: flex; flex-direction: column; gap: 0.3rem; }
.feld label { font-weight: 600; font-size: 0.9rem; }
.feld input, .feld textarea, .feld select {
  font: inherit; font-size: 1rem; padding: 0.7rem 0.85rem;
  border: 1px solid #cdd5c8; border-radius: 10px; background: #fff; color: inherit;
}
.feld input:focus, .feld textarea:focus, .feld select:focus { border-color: var(--gruen-mittel); }
.feld textarea { min-height: 150px; resize: vertical; }
.feld .hinweis { font-size: 0.82rem; color: var(--tinte-weich); }
.haken { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.88rem; max-width: 62ch; }
.haken input { margin-top: 0.3rem; }
.hp { position: absolute; left: -9999px; }
.pflicht { color: var(--gruen-mittel); }

/* ---------- Kontaktzeilen ---------- */

.kontaktzeilen { display: grid; gap: 0.55rem; font-size: 0.98rem; }
.kontaktzeilen div { display: flex; gap: 0.75rem; }
.kontaktzeilen .k { font-weight: 600; min-width: 6.5rem; }
.kontaktzeilen a { text-decoration: none; }

/* ---------- Fließtextseiten ---------- */

.prosa { max-width: 74ch; }
.prosa h2 { font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.55rem); margin-top: 2.3rem; }
.prosa h3 { margin-top: 1.7rem; }
.prosa ul { padding-left: 1.2rem; }
.prosa li { margin-bottom: 0.35rem; }
.merk {
  background: #f0f7e8; border-left: 4px solid var(--gruen-hell);
  border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; font-size: 0.92rem; margin: 1.5rem 0;
}
.merk p:last-child { margin-bottom: 0; }

/* ---------- Fußzeile mit Verlauf ---------- */

.fuss-verlauf { height: 180px; background: linear-gradient(180deg, #ffffff 0%, var(--gruen-dunkel) 100%); }
/* Seiten, die grau enden, gehen ohne weissen Streifen in den Fussbereich ueber */
.fuss-verlauf.verlauf-grau { background: linear-gradient(180deg, var(--grau) 0%, var(--gruen-dunkel) 100%); }
.fuss { background: var(--gruen-dunkel); color: #dbe7d5; font-size: 0.85rem; padding: 0 0 2.5rem; }
.fuss a { color: #dbe7d5; text-decoration: none; }
.fuss a:hover { color: #fff; text-decoration: underline; }
.fuss h3 { color: #fff; font-size: 0.85rem; font-family: var(--body); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 0.35rem; }
.fuss p { margin-bottom: 0.6rem; }
.fuss-unten { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.18);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; font-size: 0.78rem; }

/* ---------- Einblenden ---------- */

.zeig { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.zeig.da { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .zeig { opacity: 1; transform: none; } }

/* ---------- Mobil ---------- */

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: none; border: 1px solid var(--linie); color: var(--tinte);
    font: inherit; font-size: 0.88rem; font-weight: 600;
    padding: 0.45rem 0.85rem; border-radius: 999px; cursor: pointer;
  }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--linie); box-shadow: var(--schatten-klein); display: none; }
  .nav[data-open="true"] { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 0.5rem 1.25rem 1rem; }
  .nav a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--linie); }
  .punkte li { grid-template-columns: 42px 1fr; gap: 0.9rem; }
  .punkte .icon { width: 42px; height: 42px; }
}

@media print {
  .masthead, .fuss-verlauf, .kachel { display: none; }
}

/* ---------- Hervorgehobenes erstes Formularfeld ---------- */
.feld-gross label { font-size: 1.07rem; font-weight: 700; }
.feld-gross select { font-size: 1.05rem; padding: 0.8rem 0.85rem; }

/* ---------- Wort-Bild-Marke im Kopf ---------- */
.logo { display: flex; align-items: center; text-decoration: none; }
@media (max-width: 480px) { .logo img { height: 43px; } }
