/**
 * Teil 1 von 3. Weiter in stil-bausteine.css, stil-fein.css: base.njk bindet sie in dieser Reihenfolge ein
 * (die Reihenfolge entscheidet, welche Regel gewinnt). Keine Datei über 500 Zeilen.
 * Handwerker-Template – Stylesheet
 *
 * Grundsatz: Hier steht KEINE feste Farbe. Alles leitet sich aus den vier
 * Werten ab, die base.njk aus kunde.json setzt:
 *     --primaer  Struktur: Überschriften, Linien
 *     --akzent   Signal: Knöpfe und genau eine Hervorhebung pro Abschnitt
 *     --dunkel   dunkle Flächen und Textfarbe
 *     --hell     heller Seitenhintergrund
 * Andere Farben in kunde.json eintragen = komplettes Erscheinungsbild neu,
 * ohne diese Datei anzufassen.
 */

@import url("/schriften/schriften.css");

/* ========================================================== Farbableitungen */
:root {
  /* Flächen */
  --flaeche:        #ffffff;
  --flaeche-tief:   color-mix(in srgb, var(--hell) 93%, var(--primaer) 7%);

  /* Text */
  --text:           var(--dunkel);
  --text-leise:     color-mix(in srgb, var(--dunkel) 70%, var(--hell));
  --text-auf-dunkel:       color-mix(in srgb, #ffffff 88%, var(--primaer));
  --text-auf-dunkel-leise: color-mix(in srgb, #ffffff 58%, var(--primaer));

  /* Linien – bewusst sehr fein. Trennung kommt aus Abstand, nicht aus Rahmen. */
  --linie:          color-mix(in srgb, var(--dunkel) 13%, transparent);
  --linie-stark:    color-mix(in srgb, var(--dunkel) 24%, transparent);
  --linie-dunkel:   color-mix(in srgb, #ffffff 16%, transparent);

  /* Akzent */
  --akzent-tief:    color-mix(in srgb, var(--akzent) 82%, var(--dunkel));

  /* Barrierefreiheit: Der Akzent des Kunden ist oft zu hell oder zu blass fuer
     Schrift. Diese Werte werden deshalb aus ihm ABGELEITET, damit Text immer
     mindestens 4,5 : 1 Kontrast hat (WCAG AA). Die genaue Rechnung steht im
     @supports-Block unten; hier nur der Rueckfall fuer aeltere Browser.
       --akzent-text        Akzent als Schrift auf hellem Grund (dunkler gerechnet)
       --akzent-auf-dunkel  Akzent als Schrift auf dunklem Grund (heller gerechnet)
       --auf-akzent         Schriftfarbe AUF einer Akzent-Flaeche (weiss oder schwarz)
       --auf-akzent-tief    dasselbe fuer die Hover-Farbe */
  --akzent-text:       color-mix(in srgb, var(--akzent) 55%, #000000);
  --akzent-auf-dunkel: color-mix(in srgb, var(--akzent) 50%, #ffffff);
  --auf-akzent:        #ffffff;
  --auf-akzent-tief:   #ffffff;

  /* Rand von Eingabefeldern: muss mindestens 3 : 1 gegen den Grund haben
     (WCAG 1.4.11), sonst sieht man das Feld nicht. */
  --linie-feld:     color-mix(in srgb, var(--dunkel) 58%, var(--flaeche));

  /* Fokusrahmen: zweifarbig (innen Flaechenfarbe, aussen Textfarbe), damit er
     auf hellem UND dunklem Grund sichtbar ist. */
  --fokus:          var(--text);
  --fokus-gegen:    var(--flaeche);

  /* Semantische Farbe – getrennt vom Akzent, damit „geprüft" nicht wie ein
     Knopf aussieht und ein Knopf nicht wie eine Statusmeldung. */
  --gut:            #2f7d5c;
  --fehler:         #a8342a;

  /* Schrift */
  --schrift-display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --schrift-text:    "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  /* Abstände */
  --raum-s:  1rem;
  --raum-m:  1.75rem;
  --raum-l:  3rem;
  --raum-xl: clamp(4rem, 8vw, 7rem);

  --rand: min(1120px, 100% - 2.5rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--flaeche);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--schrift-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
  color: var(--primaer);
}

h1 { font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4.1rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 1.35rem + 1.8vw, 2.65rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.015em; }

p { margin: 0; }

a { color: var(--primaer); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

::selection { background: color-mix(in srgb, var(--akzent) 26%, transparent); }

:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--fokus-gegen);
  border-radius: 2px;
}

.huelle { width: var(--rand); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: var(--raum-s);
  top: var(--raum-s);
  z-index: 200;
  background: var(--dunkel);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 4px;
}

/* Kleines Etikett über Überschriften. Benennt den Abschnitt, ist also
   Information und keine Dekoration. */
.etikett {
  display: block;
  font-family: var(--schrift-text);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--akzent-text);
  margin-bottom: .85rem;
}
.auf-dunkel .etikett { color: var(--akzent-auf-dunkel); }

.fuehrungstext {
  font-size: 1.13rem;
  line-height: 1.7;
  color: var(--text-leise);
  max-width: 34em;
}

/* ================================================================== Knöpfe */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--schrift-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 1.05rem 1.9rem;
  border: 2px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.knopf:active { transform: translateY(1px); }

.knopf-haupt {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--auf-akzent);
}
.knopf-haupt:hover { background: var(--akzent-tief); border-color: var(--akzent-tief); color: var(--auf-akzent-tief); }

.knopf-zweit {
  background: transparent;
  border-color: var(--linie-stark);
  color: var(--primaer);
}
.knopf-zweit:hover { border-color: var(--primaer); background: color-mix(in srgb, var(--primaer) 5%, transparent); }

.auf-dunkel .knopf-zweit { border-color: var(--linie-dunkel); color: var(--text-auf-dunkel); }
.auf-dunkel .knopf-zweit:hover { border-color: var(--text-auf-dunkel); background: rgba(255,255,255,.07); }

.knopf-klein { padding: .68rem 1.15rem; font-size: .92rem; }

/* ==================================================================== Kopf */
.kopf {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--flaeche) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linie);
}

.kopf-inhalt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--raum-s);
  min-height: 74px;
  position: relative;
}

.marke {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--primaer);
}
.marke img { width: 38px; height: 38px; }
/* Breites Logo mit Schriftzug (kunde.logo_breit), ohne Hintergrund. Bei dunkler Kopfzeile eine helle Fassung des Logos nehmen */
.marke .logo-breit, .seitenmenue-marke .logo-breit {
  width: auto; height: 64px; max-width: 60vw; object-fit: contain;
}
@media (max-width: 860px) { .marke .logo-breit { height: 52px; } }
/* Flachere Kopfzeile pro Kunde ("kopf_kompakt": true), stärker als die Höhe aus den Design-Linien */
.kopf.kopf-kompakt .kopf-inhalt { min-height: 64px; }
.kopf.kopf-kompakt .marke .logo-breit { height: 50px; }
.marke-name {
  font-family: var(--schrift-display);
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.marke-zusatz {
  display: block;
  font-family: var(--schrift-text);
  font-size: .67rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-leise);
  margin-top: .15rem;
}

.navi { display: flex; align-items: center; gap: 2rem; }

.navi-link {
  font-size: .97rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.navi-link:hover { border-bottom-color: var(--linie-stark); }
.navi-link[aria-current="page"] { border-bottom-color: var(--akzent); font-weight: 600; }

.kopf-tel {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  line-height: 1.15;
}
.kopf-tel-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-leise);
}
.kopf-tel-nr {
  font-family: var(--schrift-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--primaer);
  font-variant-numeric: tabular-nums;
}
.kopf-tel:hover .kopf-tel-nr { color: var(--akzent-text); }

.menue-knopf { display: none; }

/* Seitenmenü: nur auf Handy und Tablet (siehe Media-Query unten) */
.seitenmenue, .seitenmenue-schleier { display: none; }

/* Knopf im Kopf – nur sichtbar, wenn eine Design-Linie ihn einschaltet */
.kopf-cta { display: none; }

/* ==================================================================== Held */
.held {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--raum-xl);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--hell) 70%, var(--flaeche)), var(--flaeche));
}

.held-raster {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.held h1 { margin-bottom: 1.3rem; }
.held .fuehrungstext { margin-bottom: 2.2rem; }

.held-knoepfe { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Kennzahlen unter dem Fließtext – durch Haarlinien getrennt statt als
   Kachelreihe. Zahlen mit tabular-nums, damit sie sauber stehen. */
.kennzahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  margin-top: 2.8rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--linie);
}
.kennzahl { padding-right: 1.1rem; }
.kennzahl + .kennzahl { border-left: 1px solid var(--linie); padding-left: 1.1rem; }
.kennzahl-wert {
  display: block;
  font-family: var(--schrift-display);
  font-weight: 800;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--primaer);
  font-variant-numeric: tabular-nums;
}
.kennzahl-label {
  display: block;
  font-size: .8rem;
  color: var(--text-leise);
  margin-top: .4rem;
  line-height: 1.35;
}

/* Bildseite: ein bewusst gesetzter Überlapp – nur hier, nicht als Muster. */
.held-bild { position: relative; }
.held-bild img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}
.held-marke {
  position: absolute;
  left: -1.6rem;
  bottom: 2.2rem;
  background: var(--dunkel);
  padding: 1.25rem 1.5rem;
  border-radius: 3px;
  max-width: 15.5rem;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--dunkel) 26%, transparent);
}
.held-marke-titel {
  font-family: var(--schrift-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: .35rem;
}
.held-marke-text { font-size: .86rem; color: var(--text-auf-dunkel-leise); line-height: 1.5; }

/* =============================================================== Abschnitte */
.abschnitt { padding-block: var(--raum-xl); }
.abschnitt-tief { background: var(--flaeche-tief); }

/* Held und folgender Abschnitt bringen je einen großen Abstand mit.
   Zusammen wird daraus ein Loch – deshalb hier der kleinere Wert. */
.held + .abschnitt { padding-top: clamp(2.5rem, 5vw, 4rem); }

.auf-dunkel { background: var(--dunkel); color: var(--text-auf-dunkel); }
/* "html" davor erhoeht die Gewichtung absichtlich: Design-Linien setzen gern
   [data-linie] h3 { color: ... } fuer helle Seiten - das darf in einem dunklen
   Band die Ueberschrift nicht dunkel auf dunkel machen. Eine Linie, die im Band
   bewusst eine andere Farbe will, schreibt .auf-dunkel h3 in ihre eigene CSS
   (hoehere Gewichtung, gewinnt). */
html .auf-dunkel h1,
html .auf-dunkel h2,
html .auf-dunkel h3,
html .auf-dunkel h4 { color: #fff; }
.auf-dunkel p { color: var(--text-auf-dunkel-leise); }

.abschnitt-kopf { max-width: 40rem; margin-bottom: clamp(2.4rem, 4vw, 3.6rem); }
.abschnitt-kopf h2 { margin-bottom: .9rem; }
.abschnitt-kopf p { color: var(--text-leise); }
.auf-dunkel .abschnitt-kopf p { color: var(--text-auf-dunkel-leise); }

/* ============================================================== Leistungen
   Bewusst eine Liste mit Haarlinien statt eines Rasters aus sechs gleichen
   Karten: die Leistungen sind gleichwertig, aber unterschiedlich lang – ein
   Kartenraster würde sie auf dieselbe Höhe zwingen und Leerraum erzeugen. */
.leistungsliste { border-top: 1px solid var(--linie); }

.leistung {
  display: grid;
  grid-template-columns: 15.5rem 1fr 14rem;
  gap: clamp(1.2rem, 3vw, 3rem);
  padding-block: 2.1rem;
  border-bottom: 1px solid var(--linie);
  position: relative;
  transition: background-color .18s ease;
}
.leistung::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0;
  bottom: -1px;
  width: 3px;
  background: var(--akzent);
  opacity: 0;
  transition: opacity .18s ease;
}
.leistung:hover { background: color-mix(in srgb, var(--primaer) 3%, transparent); }
.leistung:hover::before { opacity: 1; }

.leistung-kurz {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-leise);
  padding-top: .35rem;
}
.leistung h3 { margin-bottom: .6rem; }
.leistung-text { color: var(--text-leise); font-size: 1rem; }

.leistung-punkte { list-style: none; margin: 0; padding: 0; }
.leistung-punkte li {
  font-size: .89rem;
  color: var(--text-leise);
  padding-left: 1.15rem;
  position: relative;
  margin-bottom: .45rem;
  line-height: 1.5;
}
.leistung-punkte li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--akzent);
}

/* ================================================================ Vorteile */
.vorteile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.8rem, 4vw, 3.2rem);
}
.vorteil { border-top: 3px solid var(--akzent); padding-top: 1.3rem; }
.vorteil h3 { margin-bottom: .6rem; }
.vorteil p { color: var(--text-leise); font-size: .98rem; }
