/* ELBWEISS Gebäudeservice – Stylesheet (mobil zuerst)
   Version: 5 (bei Änderungen ?v= in allen HTML-Dateien erhöhen) */

/* ---------- Schriften (lokal, SIL Open Font License, siehe /fonts/) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-latin-wdth-normal.woff2?v=1") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-normal.woff2?v=1") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2?v=1") format("woff2");
}

/* ---------- Grundwerte ---------- */
:root {
  --navy: #091f32;
  --navy-2: #0c2a44;
  --tuerkis: #4cc6dd;
  --tuerkis-hell: #6fd3e6;
  --petrol: #0c6a93;
  --text: #0e2238;
  --grau: #4b5d70;
  --grau-dunkel: #33475b;
  --hell: #f3f7fa;
  --linie: #dfe7ee;
  --auf-dunkel: #c9d6e2;
  --auf-dunkel-leise: #9fb3c6;
  --wa: #25d366;
  --wa-text: #052e16;
  --kopf-hoehe: 72px;
  --leiste-hoehe: 64px;
  --fokus: #0c6a93;
  /* Rundungen (A4) */
  --radius-pill: 999px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  /* Typo-Skala (A5) */
  --fs-klein: 0.875rem;   /* 14 px: Überzeilen, Kleingedrucktes */
  --fs-text: 1.0625rem;   /* 17 px: Fließtext */
  --fs-lead: 1.1875rem;   /* 19 px: Einleitungen */
  --fs-h3: 1.3125rem;     /* 21 px: Zwischenüberschriften */
  --fs-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --fs-h1: clamp(1.625rem, 0.75rem + 5vw, 3.5rem);
  --zeile: 62ch;
  /* Abstände (A6): 8-px-Raster */
  --abschnitt-mobil: 64px;
  --abschnitt-desktop: 96px;
  /* Flächen (A7) */
  --kontur: #e3ebf2;
  --icon-flaeche: #e8f2f7;
  --schatten: 0 1px 2px rgba(9, 31, 50, 0.04), 0 8px 24px rgba(9, 31, 50, 0.05);
  --schatten-hover: 0 2px 4px rgba(9, 31, 50, 0.05), 0 12px 32px rgba(9, 31, 50, 0.09);
  --dauer: 180ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--kopf-hoehe) + 16px);
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-text);
  line-height: 1.6;
}

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

a { color: var(--petrol); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
}
/* Fokusring folgt der Rundung des Elements; Textlinks bekommen eine kleine Rundung */
a:not([class]), .logo-link { border-radius: var(--radius-sm); }
.dunkel :focus-visible,
.fuss :focus-visible { outline-color: var(--tuerkis); }
main:focus { outline: none; }

h1, h2, .h-archivo {
  font-family: "Archivo", "Source Sans 3", system-ui, sans-serif;
  font-weight: 800;
}
h1, h2 { font-stretch: 112%; margin: 0; }
h1, h2, h3 { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.015em; }
h3 { margin: 0; font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; max-width: var(--zeile); text-wrap: pretty; }
li { text-wrap: pretty; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* Wörter wie „E-Mail“ nicht am Bindestrich umbrechen */
.nobr { white-space: nowrap; }

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

/* ---------- Sprunglink ---------- */
.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--radius-pill);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--fs-text); line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; text-align: center;
}
.btn-wa { background: var(--wa); color: var(--wa-text); }
.btn-wa:hover { background: #1fbe5b; color: var(--wa-text); }
.btn-linie { border-color: #5b7590; color: #fff; }
.btn-linie:hover { border-color: #fff; color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-klein { min-height: 48px; padding: 12px 20px; font-size: var(--fs-text); }
.btn, .kachel, .leiste a, .nav-voll a, .menue a, .faq summary { transition: background-color var(--dauer) ease, border-color var(--dauer) ease, color var(--dauer) ease; }
.btn-reihe { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Kopfzeile ---------- */
/* Bleibt oben; leicht transparent mit Unschärfe, sonst solide weiß */
.kopf { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--kontur); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .kopf {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
  }
}
.kopf .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--kopf-hoehe); padding-top: 12px; padding-bottom: 12px;
}
.logo-link { display: block; line-height: 0; }
.logo-link img { width: auto; height: 48px; aspect-ratio: 1000 / 446.05; }

.nav-voll { display: none; }
.nav-voll ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
.nav-voll a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  color: var(--text); text-decoration: none; font-weight: 600; border-radius: var(--radius-pill);
}
.nav-voll a:not(.btn):hover { background: var(--hell); color: var(--navy); }
.nav-voll li:last-child { margin-left: 8px; }

.menue { position: relative; }
.menue summary {
  list-style: none; cursor: pointer; min-height: 48px; padding: 8px 16px;
  border: 1.5px solid #5b7590; border-radius: var(--radius-pill); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.menue summary::-webkit-details-marker { display: none; }
.menue summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.menue[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.menue ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
  list-style: none; margin: 0; padding: 8px; background: #fff;
  border: 1px solid #e3eaf0; border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(9, 31, 50, 0.12);
}
.menue a { display: flex; align-items: center; min-height: 48px; padding: 8px 16px; color: var(--text); font-weight: 600; text-decoration: none; border-radius: var(--radius-sm); }
.menue a:hover { background: var(--hell); }

/* ---------- Abschnitte ---------- */
.abschnitt { padding: var(--abschnitt-mobil) 0; }
.dunkel { background: var(--navy); color: #fff; }
.hell { background: var(--hell); }
.kopfgruppe { display: flex; flex-direction: column; gap: 16px; max-width: 40em; margin-bottom: 40px; }
/* Überzeilen: einheitlich in Größe, Laufweite und Farbe */
.kicker, .schritt-nr {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: var(--fs-klein); line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--petrol); font-weight: 600;
}
.dunkel .kicker, .dunkel .schritt-nr { color: var(--tuerkis-hell); }
.einleitung { font-size: var(--fs-lead); color: var(--grau); }

/* Einstieg */
.einstieg { padding: 56px 0 64px; }
.einstieg .wrap { display: flex; flex-direction: column; gap: 24px; }
.einstieg .kicker { display: inline-flex; align-items: center; gap: 8px; }
.einstieg .kicker::before { content: ""; width: 24px; height: 2px; border-radius: var(--radius-pill); background: var(--tuerkis); }
.einstieg h1 { max-width: 16em; }
.einstieg .lead { font-size: var(--fs-lead); color: var(--auf-dunkel); }
.einstieg .hinweis { font-size: var(--fs-klein); color: var(--auf-dunkel-leise); }

/* Einstieg mit Hintergrundbild (Bild ist bereits dunkelblau gefiltert) */
.mit-bild { position: relative; isolation: isolate; overflow: hidden; }
.einstieg-bild, .mit-bild::before { position: absolute; inset: 0; }
.einstieg-bild { z-index: -2; }
.einstieg-bild img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.mit-bild::before {
  content: ""; z-index: -1;
  /* 0.45 reichte für AA nicht (Fließtext 4,5:1); 0.55 ergibt ≥ 4,8:1 */
  background: linear-gradient(90deg, rgba(9, 31, 50, 0.55) 0%, rgba(9, 31, 50, 0) 100%);
}
.mit-bild .hinweis { color: var(--auf-dunkel); }

/* Vertrauensleiste */
.vertrauen { background: var(--navy-2); color: #fff; }
.vertrauen ul {
  list-style: none; margin: 0 auto; padding: 24px 16px; max-width: 1200px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px;
}
/* Icon und erste Textzeile exakt auf einer Linie (Zeilenhöhe = Icongröße) */
.vertrauen li {
  display: grid; grid-template-columns: 24px auto; column-gap: 12px; align-items: start;
  font-size: 0.9375rem; line-height: 24px; hyphens: manual; -webkit-hyphens: manual;
}
.vertrauen svg { width: 24px; height: 24px; }

/* Karten (Warum, Büroseite) */
.karten { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.karte {
  background: #fff; border: 1px solid var(--kontur); border-radius: var(--radius-lg); box-shadow: var(--schatten);
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
/* Icon in einem dezent getönten, abgerundeten Kästchen */
.karte svg {
  box-sizing: content-box; width: 28px; height: 28px; padding: 10px;
  background: var(--icon-flaeche); border-radius: var(--radius-md);
}
@media (hover: hover) and (pointer: fine) {
  .karte { transition: transform var(--dauer) ease, box-shadow var(--dauer) ease; }
  .karte:hover { transform: translateY(-2px); box-shadow: var(--schatten-hover); }
}
.karte h3, .karte h2 { font-stretch: normal; font-family: "Archivo", "Source Sans 3", sans-serif; font-weight: 800; font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.01em; }
.karte p { color: var(--grau-dunkel); }

/* Leistungen */
.leistungen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--linie); }
.leistungen li { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--linie); display: flex; flex-direction: column; gap: 8px; }
.leistungen h3 { font-weight: 600; }
.leistungen p { color: var(--grau); }
.pfeil-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; text-decoration: none; color: var(--petrol); border-radius: var(--radius-sm);
}
.pfeil-link span { transition: transform var(--dauer) ease; }
.pfeil-link:hover { color: var(--navy); }
.pfeil-link:hover span { transform: translateX(2px); }

/* Ablauf */
.schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 32px; }
.schritte li { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #2c4a66; padding-top: 24px; }
.schritte h3 { font-weight: 600; }
.schritte p { color: var(--auf-dunkel); }

/* FAQ */
.faq { max-width: 52em; display: flex; flex-direction: column; gap: 16px; }
.faq details { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--kontur); box-shadow: var(--schatten); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 56px 16px 24px; position: relative;
  font-weight: 600; font-size: var(--fs-text); line-height: 1.4; min-height: 44px; border-radius: var(--radius-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--hell); }
/* Ruhiges Plus/Minus */
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background:
    linear-gradient(var(--petrol), var(--petrol)) center / 14px 2px no-repeat,
    linear-gradient(var(--petrol), var(--petrol)) center / 2px 14px no-repeat;
  border-radius: var(--radius-pill);
  transition: background-size var(--dauer) ease;
}
.faq details[open] summary::after {
  background-size: 14px 2px, 2px 0;
}
/* Weiche Öffnung, wo der Browser es unterstützt; sonst öffnet sich die Antwort sofort */
@supports selector(::details-content) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content {
    height: 0; overflow: clip;
    transition: height 220ms ease, content-visibility 220ms allow-discrete;
  }
  .faq details[open]::details-content { height: auto; }
}
.faq details p { padding: 0 24px 24px; color: var(--grau); }

/* Kontakt */
.kontakt-inhalt { display: flex; flex-direction: column; gap: 16px; }
.kacheln { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }
.kachel {
  display: flex; flex-direction: column; gap: 0; padding: 16px 24px; border-radius: var(--radius-lg);
  text-decoration: none; font-weight: 600; font-size: var(--fs-lead); min-height: 44px;
}
.kachel span + span { font-weight: 400; font-size: var(--fs-text); overflow-wrap: anywhere; }
.kachel-wa { background: var(--wa); color: var(--wa-text); }
.kachel-wa:hover { background: #1fbe5b; color: var(--wa-text); }
.kachel { box-shadow: var(--schatten); }
.kachel-mail { background: var(--navy); color: #fff; }
.kachel-mail:hover { background: var(--navy-2); color: #fff; }
/* Wie der Sekundärknopf: weißer Grund, sichtbarer Rand (4,8 : 1), dunkle Schrift */
.kachel-tel { background: #fff; color: var(--text); border: 1.5px solid #5b7590; }
.kachel-tel:hover { border-color: var(--navy); color: var(--text); }
.kontakt-zusatz { font-size: var(--fs-klein); color: var(--grau); }
.kontakt-zusatz a { color: var(--text); }

/* Büroseite */
.liste-haken { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 52em; }
.liste-haken li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-lead); }
.liste-haken li::before {
  content: ""; flex: none; width: 22px; height: 12px; margin-top: 6px;
  border-left: 2.5px solid var(--petrol); border-bottom: 2.5px solid var(--petrol);
  transform: rotate(-45deg) scale(0.8);
}
.cta .wrap { display: flex; flex-direction: column; gap: 24px; }
.cta p { color: var(--auf-dunkel); font-size: var(--fs-lead); }

/* Rechtstexte, Fehlerseite */
.text-seite { padding: 48px 0 64px; }
.text-seite .wrap { max-width: 800px; }
.text-seite h1 { font-size: clamp(1.375rem, 6.5vw, 2.75rem); margin-bottom: 24px; }
.text-seite h2 { font-family: "Source Sans 3", system-ui, sans-serif; font-stretch: normal; font-weight: 600; font-size: var(--fs-h3); line-height: 1.3; letter-spacing: 0; margin: 32px 0 8px; }
.text-seite p { margin: 0 0 16px; }
.text-seite address { font-style: normal; margin: 0 0 16px; }
.fehler .wrap { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

/* ---------- Fußzeile ---------- */
.fuss { background: var(--navy); color: var(--auf-dunkel); }
.fuss .wrap {
  padding-top: 48px; padding-bottom: 48px;
  display: flex; flex-direction: column; gap: 24px;
}
.fuss img { width: auto; height: 56px; aspect-ratio: 1000 / 438.33; }
.fuss p { font-size: var(--fs-klein); line-height: 1.6; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; font-size: var(--fs-klein); }
.fuss a { color: var(--auf-dunkel); display: inline-flex; align-items: center; min-height: 44px; }
.fuss a:hover { color: #fff; }

/* ---------- Mobile Kontaktleiste ---------- */
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 8px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #e3eaf0;
}
.leiste a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 48px; border-radius: var(--radius-pill); font-weight: 600; text-decoration: none;
}
.leiste .wa { background: var(--wa); color: var(--wa-text); }
.leiste .mail { background: var(--navy); color: #fff; }
.mit-leiste { padding-bottom: calc(var(--leiste-hoehe) + env(safe-area-inset-bottom)); }
html:has(.mit-leiste) { scroll-padding-bottom: calc(var(--leiste-hoehe) + 16px + env(safe-area-inset-bottom)); }

/* ---------- Größere Bildschirme ---------- */
@media (min-width: 560px) {
  .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leistungen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 721px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .vertrauen ul { padding-left: 24px; padding-right: 24px; }
  .leiste { display: none; }
  .mit-leiste { padding-bottom: 0; }
  html:has(.mit-leiste) { scroll-padding-bottom: 0; }
  .menue { display: none; }
  /* Kontakt: drei gleich große Kacheln nebeneinander */
  .kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kachel { padding: 16px 20px; }
  .nav-voll { display: block; }
  .abschnitt { padding: var(--abschnitt-desktop) 0; }
  .einstieg { padding: 64px 0 72px; }
  .schritte { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Fußzeile: Logo | Anschrift | Links */
  .fuss .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 48px; }
  .vertrauen li { font-size: 1rem; }
}

@media (min-width: 721px) and (max-width: 999px) {
  .kachel span + span { font-size: 0.9375rem; }
}

@media (min-width: 1000px) {
  .vertrauen ul { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .karten-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .leistungen { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1180px) {
  .karten-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .karten-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Einblenden beim Scrollen (A9, nur mit /js/einblenden.js) ---------- */
.einblenden { opacity: 0; transform: translateY(12px); transition: opacity 400ms ease, transform 400ms ease; }
.einblenden.sichtbar { opacity: 1; transform: none; }
@media print { .einblenden { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .karte:hover { transform: none; }
  .einblenden { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  @supports selector(::details-content) {
    .faq details::details-content { transition: none; }
  }
}
