/*
 * Öffentliche Seite von SPÜR.
 *
 * Ersetzt die WordPress-Seite mit Divi. Bewusst ohne Baukasten und ohne
 * JavaScript-Bibliothek: die Seite hat sieben Abschnitte und ein
 * Kontaktangebot. Alles, was hier an Ladezeit gespart wird, kommt Besuchern
 * zugute, die sie vom Handy aus einer Gemeindeverwaltung heraus aufrufen.
 *
 * Farben und Schriftbild folgen dem Logo und der bisherigen Seite:
 * Anthrazit für Text und Flächen, Orange als Akzent. Das Orange trägt hier –
 * anders als in der Prüfanwendung – auch Knöpfe, denn hier gibt es keine
 * Mängelstufen, mit denen es sich beißen könnte.
 */

:root {
  --anthrazit: #373738;
  --anthrazit-hell: #55555a;
  --orange: #e9880d;
  --orange-dunkel: #c46e08;
  --grund: #ffffff;
  --grund-grau: #f4f4f4;
  --linie: #dcdcdc;
  --text: #2a2a2a;
  --text-leise: #55555a;

  --breite: 1180px;
  --rand: clamp(1rem, 4vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sonst verschwindet die Überschrift eines Abschnitts beim Sprung hinter
     der klebenden Kopfzeile. */
  scroll-padding-top: 6.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--grund);
}

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

a {
  color: var(--orange-dunkel);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

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

/* Für Bildschirmleser, aber nicht sichtbar. */
.nur-vorlesen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

.springen:focus {
  left: 0;
}

/* ── Kopfzeile ─────────────────────────────────────────────────── */

.leiste {
  background: var(--orange);
  color: #fff;
  font-size: 0.95rem;
}

.leiste .mitte {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  padding-block: 0.5rem;
}

.leiste a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.leiste a:hover {
  text-decoration: underline;
}

.kopf {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--linie);
}

.kopf .mitte {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.kopf img {
  height: 3rem;
  width: auto;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navigation a {
  color: var(--anthrazit);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  font-weight: 600;
}

.navigation a:hover {
  color: var(--orange-dunkel);
}

/* Das Kundenportal ist kein Menüpunkt wie die anderen: es führt aus der
   Seite heraus in die Anwendung. Deshalb als Knopf abgesetzt. */
.navigation .knopf-klein {
  border: 2px solid var(--anthrazit);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}

.navigation .knopf-klein:hover {
  background: var(--anthrazit);
  color: #fff;
}

/* ── Abschnitte ────────────────────────────────────────────────── */

section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.grau {
  background: var(--grund-grau);
}

.dunkel {
  background: var(--anthrazit);
  color: #fff;
}

.dunkel a {
  color: #fff;
}

.orange {
  background: var(--orange);
  color: #fff;
}

.orange a {
  color: #fff;
}

h1,
h2,
h3 {
  line-height: 1.2;
  color: inherit;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}

/* Der kurze Strich unter der Überschrift ist das wiederkehrende Zeichen der
   bisherigen Seite – ohne ihn wirkt sie fremd. */
h2 + .strich {
  width: 5.5rem;
  height: 3px;
  background: var(--orange);
  margin-bottom: 2rem;
}

.dunkel h2 + .strich,
.orange h2 + .strich {
  background: #fff;
}

h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.4rem;
}

/* ── Titelbereich ──────────────────────────────────────────────── */

.titel {
  position: relative;
  color: var(--text);
  padding-block: clamp(3.5rem, 10vw, 7rem);
  background-image: linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.9)),
    url('bilder/web-539757_19201.jpg');
  background-size: cover;
  background-position: center;
}

.titel .mitte {
  max-width: 46rem;
}

.titel h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: 0.1em;
  margin: 0;
}

.titel .unterzeile {
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  margin: 0.25rem 0 1.5rem;
}

.titel p.text {
  font-size: 1.2rem;
  max-width: 34rem;
}

/* ── Knöpfe ────────────────────────────────────────────────────── */

.knopf {
  display: inline-block;
  border: 2px solid var(--anthrazit);
  border-radius: 999px;
  padding: 0.8rem 1.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--anthrazit);
  background: transparent;
}

.knopf:hover {
  background: var(--anthrazit);
  color: #fff;
}

.knopf-voll {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.knopf-voll:hover {
  background: var(--orange-dunkel);
  border-color: var(--orange-dunkel);
}

.dunkel .knopf,
.orange .knopf {
  border-color: #fff;
  color: #fff;
}

.dunkel .knopf:hover,
.orange .knopf:hover {
  background: #fff;
  color: var(--anthrazit);
}

/* ── Raster ────────────────────────────────────────────────────── */

.raster {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.raster-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.raster-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.ziffer {
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 1;
  color: var(--anthrazit);
  margin-bottom: 0.75rem;
}

.orange .ziffer,
.dunkel .ziffer {
  color: #fff;
}

.leistung .strich-klein {
  width: 3rem;
  height: 2px;
  background: var(--orange);
  margin: 0.6rem 0 1rem;
}

.orange .leistung .strich-klein {
  background: #fff;
}

/* ── Person ────────────────────────────────────────────────────── */

.person {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  align-items: start;
}

.person dl {
  margin: 0;
}

.person dt {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

.person dd {
  margin: 0.25rem 0 0;
}

.person figure {
  margin: 0;
}

.person img {
  border-radius: 4px;
}

/* ── Listen ────────────────────────────────────────────────────── */

.liste {
  margin: 0;
  padding-left: 1.2rem;
}

.liste li {
  margin-bottom: 0.4rem;
}

.begriffe dt {
  font-weight: 700;
  margin-top: 1rem;
}

.begriffe dd {
  margin: 0;
}

/* ── Kontakt ───────────────────────────────────────────────────── */

.kontakt {
  background-image: linear-gradient(rgba(40, 40, 40, 0.78), rgba(40, 40, 40, 0.78)),
    url('bilder/kontakt.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
}

.kontakt a {
  color: #fff;
}

.karte {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 1.5rem;
}

.karte h3 {
  margin-top: 0;
}

address {
  font-style: normal;
}

/* ── Fußzeile ──────────────────────────────────────────────────── */

footer {
  background: #2b2b2b;
  color: #e6e6e6;
  padding-block: 3rem;
  font-size: 0.95rem;
}

footer a {
  color: #e6e6e6;
}

footer .raster {
  gap: 2rem;
}

/* ── Rechtliche Seiten ─────────────────────────────────────────── */

.rechtstext {
  max-width: 48rem;
}

.rechtstext h2 {
  font-size: 1.25rem;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2.5rem;
}

.rechtstext h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

@media (max-width: 46rem) {
  /* Die Navigation bricht hier auf zwei Zeilen um, und die Kopfzeile wird
     dadurch über 120 px hoch. Klebend würde sie ein Sechstel des Bildschirms
     dauerhaft belegen – auf einem Handy zu viel für ein Menü mit fünf
     Einträgen. Sie rollt deshalb mit weg. */
  .kopf {
    position: static;
  }

  html {
    scroll-padding-top: 1rem;
  }

  .kopf .mitte {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .kopf img {
    height: 2.5rem;
  }

  .navigation {
    gap: 0.5rem 1rem;
  }

  /* Die Kontaktzeile ganz oben untereinander statt gequetscht nebeneinander. */
  .leiste .mitte {
    flex-direction: column;
    gap: 0.15rem;
  }
}
