/* ════════════════════════════════════════════════════════════════════
   Hausverwaltung Kippelt — Erscheinungsbild
   nach KS-Architektur_CI-Kurzmanual, Stand 7. Oktober 2026, Version 2
   Eine Schrift, Schwarz und Weiss, keine Akzentfarbe.
   Einzige Ausnahme: das Gruen von WhatsApp als Kanalkennung.
   ════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-700.woff2") format("woff2");
}

:root {
  /* Farbe, Abschnitt 4 des Manuals */
  --papier:      #ffffff;
  --schwarz:     #1d1d1b;
  --grau:        #6f6f6e;
  --linie:       #bdbdbb;
  --feld:        #ecece8;
  --signal:      #25d366;   /* WhatsApp */
  --signal-tief: #19b253;

  --schrift: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Zwei Lesegroessen, dazu eine Kleingroesse. Hierarchie macht der Fettschnitt. */
  --text:  1.0625rem;
  --klein: 0.8125rem;
  --satz:  clamp(1.75rem, 0.6rem + 5.2vw, 4rem);

  /* Mass, abgeleitet vom Briefbogen: Rand, Spaltenabstand, Abschnittsluft */
  --rand:   clamp(20px, 5vw, 56px);
  --spalt:  clamp(16px, 2vw, 28px);
  --luft:   clamp(72px, 10vw, 152px);
  --breite: 1120px;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--schwarz);
  font: 400 var(--text)/1.55 var(--schrift);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

p, h1, h2, h3, ul, ol, dl, dd, figure, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }

/* Keine zweite Schriftgroesse fuer Hierarchie: Titel sind Lesegroesse, fett.
   Der grosse Satz der Startseite ist die einzige Ausnahme, siehe .satz. */
h1, h2, h3, dt, strong, b { font-size: inherit; font-weight: 700; }

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
:focus-visible {
  outline: 2px solid var(--schwarz);
  outline-offset: 3px;
}

/* ── Seitengerüst ──────────────────────────────────────────────────── */

.seite {
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.sprung {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--schwarz);
  color: var(--papier);
  padding: 12px 20px;
}
.sprung:focus {
  left: var(--rand);
  top: 12px;
  text-decoration: none;
}

/* ── Kopf ──────────────────────────────────────────────────────────── */

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 40px;
  padding-block: clamp(22px, 3.2vw, 44px);
}

/* Wortmarke: Stichwort fett, Zusatz normal, Zeichenabstand +50 wie im Manual */
.marke {
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.marke:hover { text-decoration: none; }

.schluss .zeile ul a {
  display: inline-block;
  padding-block: 13px;
}

/* ── Abschnitte: Satzspiegel links, Inhalt rechts ──────────────────── */

.abschnitt {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--spalt);
  row-gap: clamp(28px, 4vw, 56px);
  padding-top: var(--luft);
  scroll-margin-top: clamp(24px, 4vw, 48px);
}
.abschnitt > .kapitel {
  grid-column: 1 / 4;
  align-self: start;
}
.abschnitt > .inhalt {
  grid-column: 4 / -1;
  display: grid;
  row-gap: clamp(32px, 4.5vw, 64px);
}
.auftakt { padding-top: clamp(32px, 6vw, 104px); }

/* ── Der grosse Satz ───────────────────────────────────────────────── */

.satz {
  font-size: var(--satz);
  line-height: 1.07;
  letter-spacing: -0.021em;
  max-width: 15em;
}
/* Ausgleich der Zeilenlaengen erst, wenn genug Breite da ist. Auf dem Telefon
   erzeugt er sonst eine vierte, fast leere Zeile. */
@media (min-width: 900px) {
  .satz { text-wrap: balance; }
}

.fliess { max-width: 34em; }
.grau   { color: var(--grau); }

/* ── Handlungen ────────────────────────────────────────────────────── */

.tat-gruppe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.tat {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 30px;
  background: var(--schwarz);
  color: var(--papier);
  font-weight: 700;
  transition: background-color 0.15s ease-out;
}
.tat:hover {
  background: var(--grau);
  text-decoration: none;
}
/* Einzige Farbe der Seite. Schwarze Schrift auf dem Gruen: 8,5:1 statt 2:1. */
.tat-wa {
  background: var(--signal);
  color: var(--schwarz);
}
.tat-wa:hover { background: var(--signal-tief); }

/* ── Angabenblock: Stichwort fett, Wert, Zusatz grau ───────────────── */

.angaben { border-top: 1px solid var(--schwarz); }
.angaben > div {
  display: grid;
  grid-template-columns: minmax(7rem, 3fr) minmax(0, 7fr);
  column-gap: var(--spalt);
  padding-block: 14px;
  border-bottom: 1px solid var(--linie);
}
.angaben > div:last-child { border-bottom-color: var(--schwarz); }
/* Zusatz steht unter dem Wert, nicht daneben: Werte bleiben untereinander lesbar. */
.angaben dd > .grau { display: block; }

/* ── Liste mit Haarlinien, ohne Nummern ────────────────────────────── */

.liste li {
  padding-block: 10px;
  border-bottom: 1px solid var(--linie);
}
.liste li:last-child { border-bottom: none; }

/* ── Rechtstexte ───────────────────────────────────────────────────── */

.rechtstext { display: grid; row-gap: 12px; max-width: 42em; }
.rechtstext p { max-width: 42em; }
.zurueck { padding-top: clamp(16px, 2vw, 24px); }

/* ── Fuss ──────────────────────────────────────────────────────────── */

.schluss {
  padding-top: var(--luft);
  padding-bottom: clamp(24px, 3vw, 44px);
  font-size: var(--klein);
}
.schluss .zeile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: clamp(18px, 2.4vw, 32px);
  border-top: 1px solid var(--schwarz);
}
.schluss .zeile ul { display: flex; gap: clamp(20px, 3vw, 44px); margin-block: -13px; }
.hinweis {
  color: var(--grau);
  padding-top: 10px;
  max-width: 48em;
}

/* ── Schmale Bildschirme ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .abschnitt > .kapitel,
  .abschnitt > .inhalt { grid-column: 1 / -1; }
  .abschnitt { row-gap: 26px; }
  .satz { max-width: none; }
}

@media (max-width: 620px) {
  .angaben > div {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
  }
  .tat-gruppe { display: grid; }
  .tat { justify-content: center; }
  .kopf { align-items: flex-start; }
}

/* ── Bewegung nur, wenn gewuenscht ─────────────────────────────────── */

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

/* ── Papier: die Seite ist als Dokument gesetzt und druckt auch so ──── */

@media print {
  :root {
    --text: 10pt;
    --klein: 7.5pt;
    --satz: 18pt;
    --luft: 10mm;
    --rand: 0;
  }
  .tat-gruppe, .sprung, .zurueck { display: none; }
  .abschnitt { break-inside: avoid; }
  a { text-decoration: none; }
}
