/**
 * Gemeinsames Grundgerüst aller Seiten in diesem Repo.
 *
 * Hier steht ausschließlich Struktur — Abstände, Raster, Typografie, Komponenten. Jede Farbe
 * kommt aus einer Variablen, die die jeweilige Seite in ihrer eigenen `farben.css` setzt. Eine
 * neue Seite braucht deshalb nur diese Datei einzubinden und ihre Marke zu definieren; an dieser
 * Datei ist dafür nichts zu ändern.
 *
 * Reihenfolge im HTML: erst farben.css (setzt die Variablen), dann basis.css.
 */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--grund);
}

a {
  color: var(--verweis);
}

/* --- Kopfbereich --- */

/* Kopfzeile und Aufmacher sind ein durchgehender dunkler Block. Der Verlauf liegt deshalb auf
   der Klammer und nicht zweimal getrennt darin — sonst entsteht genau dort eine sichtbare
   Kante, wo optisch keine sein soll. */
.kopfbereich {
  background: var(--kopf-hintergrund);
  color: #fff;
}

.kopf {
  color: #fff;
}

.kopf-inhalt {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.marke {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
}

.marke img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

nav a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover,
nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
}

/* --- Aufmacher --- */

.held {
  border-bottom: var(--held-rand);
  color: #fff;
}

.held-inhalt {
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 24px 64px;
}

.held h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 0 0 14px;
  line-height: 1.15;
  /* Verteilt den Umbruch gleichmäßig, statt ein einzelnes Wort auf der zweiten Zeile
     stehenzulassen. */
  text-wrap: balance;
  max-width: 20ch;
}

.held p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.84);
  max-width: 62ch;
  margin: 0;
}

/* --- Inhalt --- */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 22px;
}

.karte > h2:first-child,
.karte > h3:first-child {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.3;
}

h2 {
  font-size: 1.3rem;
  margin-top: 32px;
}

h3 {
  font-size: 1.05rem;
  margin-top: 24px;
}

.raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.raster {
  margin-bottom: 22px;
}

.raster .karte {
  margin-bottom: 0;
}

.hinweis {
  border-left: 4px solid var(--hinweis-streifen);
  background: var(--hinweis-hintergrund);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Als ganze Karte hervorgehoben: Polster und Rundung bleiben wie bei jeder anderen Karte,
   nur der farbige Streifen links und der Hintergrund kommen dazu. */
.karte.hinweis {
  padding: 22px 26px;
  border-radius: var(--radius);
}

.schwach {
  color: var(--text-schwach);
  font-size: 0.92rem;
}

/* --- Tabellen --- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rand);
}

th {
  background: var(--tabellen-kopf);
  font-weight: 600;
}

/* Tabellen mit vielen Spalten dürfen im eigenen Bereich scrollen statt die Seite zu sprengen. */
.tabelle-rahmen {
  overflow-x: auto;
}

dl.kontakt dt {
  font-weight: 600;
  margin-top: 12px;
}

dl.kontakt dd {
  margin: 0;
}

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

.knopf {
  display: inline-block;
  padding: 11px 22px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--akzent);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.knopf:hover {
  background: var(--akzent-dunkel);
}

/* Auf dem dunklen Aufmacher: heller Knopf für die Hauptaktion, umrandeter für die zweite. */
.knopf--hell {
  color: var(--akzent-dunkel);
  background: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.knopf--hell:hover {
  background: #eef2f7;
}

.knopf--rand {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
}

.knopf--rand:hover {
  background: rgba(255, 255, 255, 0.12);
}

.knopf-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* --- Kontaktformular --- */

.formular {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

/* Zwei Felder nebeneinander, sobald Platz ist — auf dem Telefon untereinander. */
.formular-paar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.formular label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 5px;
}

.formular input,
.formular select,
.formular textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 8px;
}

.formular input:focus,
.formular select:focus,
.formular textarea:focus {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
  border-color: var(--akzent);
}

.formular textarea {
  min-height: 150px;
  resize: vertical;
}

.formular .pflicht {
  color: var(--text-schwach);
  font-weight: 400;
}

/* Ohne eingerichtetes Mailprogramm passiert beim Absenden nichts Sichtbares — dann muss die
   Adresse im Klartext danebenstehen, sonst hält der Besucher die Seite für kaputt. */
[data-kontakt-hinweis][hidden] {
  display: none;
}

/* --- Nummerierte Schritte --- */

ol.schritte {
  counter-reset: schritt;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 14px;
}

ol.schritte li {
  counter-increment: schritt;
  position: relative;
  padding-left: 44px;
}

ol.schritte li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: -1px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: var(--akzent);
  border-radius: 50%;
}

ol.schritte strong {
  display: block;
}

/* --- Fußzeile --- */

footer {
  background: var(--fuss-hintergrund);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.fuss-inhalt {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

footer a {
  color: rgba(255, 255, 255, 0.9);
}

/* Noch einzutragende Angaben — im laufenden Betrieb soll das auffallen und nicht in einer
   README versanden. */
.platzhalter {
  background: #fff4d6;
  border: 1px dashed #c08a00;
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .platzhalter {
    background: #3a2f10;
    border-color: #a07a1a;
    color: #ffd98a;
  }
}

/* --- Bilder aus der Anwendung --- */

/* Für Screenshots: Rahmen wie eine Karte, Bildunterschrift darunter. Ein Screenshot ohne
   Erklärung nützt niemandem — die Unterschrift sagt, was man sieht. */
figure.bild {
  margin: 0 0 22px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  overflow: hidden;
}

figure.bild img {
  display: block;
  width: 100%;
  height: auto;
}

figure.bild figcaption {
  padding: 12px 18px;
  border-top: 1px solid var(--rand);
  color: var(--text-schwach);
  font-size: 0.92rem;
}

.bildreihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.bildreihe figure.bild {
  margin-bottom: 0;
}

/* Hochformat (Handy-Ansichten): sonst würde eine 440 px breite Zeichnung über die volle
   Spaltenbreite gezogen und wirkte wie ein Tablet. */
figure.bild--hoch {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  border: 0;
}

figure.bild--hoch figcaption {
  border-top: 0;
  padding: 10px 0 0;
  text-align: center;
}
