/* ============================================================
   Fahrschule Barmbek – Stylesheet (v2, ruhige Designsprache)
   Viel Weißraum, große klare Typografie, dezente Bewegung.
   Markenfarben aus dem Logo nur als Akzente:
   Rot #ED1C24 · Blau #26AAE1
   ============================================================ */

/* ---------- Schriften (lokal gehostet, DSGVO-konform) ---------- */
@font-face { font-family:"Barlow"; src:url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Barlow"; src:url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"Barlow"; src:url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:"Barlow"; src:url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }

/* ---------- Design-Tokens ---------- */
:root {
  --rot: #ED1C24;
  --blau: #1B87B5;          /* etwas abgedunkelt für Text-Kontrast */
  --blau-hell: #26AAE1;
  --schwarz: #1D1D1F;
  --text: #1D1D1F;
  --text-grau: #6E6E73;
  --flaeche: #F5F5F7;        /* helle Sektionen & Karten */
  --papier: #FFFFFF;
  --linie: #E8E8ED;
  --nav-bg: rgba(22, 22, 24, .82);

  --body: "Barlow", -apple-system, system-ui, sans-serif;
  --radius: 18px;
  --max: 1040px;
  --uebergang: .5s cubic-bezier(.25,.1,.25,1);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blau); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blau-hell); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.container--schmal { max-width: 720px; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
.grau { color: var(--text-grau); }
.untertitel {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: var(--text-grau);
  font-weight: 400;
  line-height: 1.5;
  max-width: 38rem;
}

/* ---------- Sanftes Einblenden beim Scrollen ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--uebergang), transform var(--uebergang);
}
.reveal.sichtbar { opacity: 1; transform: none; }
/* Fallback: ohne JavaScript alles anzeigen */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Header / Navigation (transluzent mit Blur) ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 60px;
}
.nav__brand {
  display: flex; align-items: center; gap: .7rem;
  color: #F5F5F7; font-weight: 600; font-size: 1.1rem;
}
.nav__brand:hover { text-decoration: none; }
.nav__brand img { width: 36px; height: 36px; border-radius: 50%; }
.nav__list { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  display: block; padding: .5rem .85rem;
  color: rgba(245,245,247,.85); font-size: .98rem;
  border-radius: 8px; transition: color .2s, background .2s;
}
.nav__list a:hover { color: #fff; background: rgba(255,255,255,.09); text-decoration: none; }
.nav__list a.aktiv { color: #fff; }

.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: .5rem; color: #F5F5F7;
}
.nav__toggle svg { width: 26px; height: 26px; }

@media (max-width: 800px) {
  .nav__toggle { display: block; }
  .nav__list {
    display: none;
    position: absolute; left: 0; right: 0; top: 60px;
    flex-direction: column; gap: 0;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    padding: .5rem 1.5rem 1.25rem;
  }
  .nav__list.offen { display: flex; }
  .nav__list a { padding: .9rem .25rem; font-size: 1.1rem; }
}

/* ---------- Hero (hell, zentriert, ruhig) ---------- */
.hero {
  text-align: center;
  padding: 5.5rem 0 4.5rem;
}
.hero .untertitel { margin: 0 auto 1.6rem; }
.hero__links { display: flex; gap: 1.8rem; justify-content: center; flex-wrap: wrap; }
.hero__links a { font-size: 1.15rem; }
.pfeil::after { content: " ›"; }
.hero__logo {
  width: min(230px, 50vw);
  margin: 3.2rem auto 0;
  border-radius: 50%;
  box-shadow: 0 24px 60px rgba(0,0,0,.16);
}

/* ---------- Sektionen ---------- */
.sektion { padding: 5rem 0; }
.sektion--flaeche { background: var(--flaeche); }
.sektion--mittig { text-align: center; }
.sektion--mittig .untertitel { margin-left: auto; margin-right: auto; }
.sektion__kopf { margin-bottom: 2.8rem; }

/* ---------- Karten ---------- */
.karten {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.karte {
  background: var(--papier);
  border-radius: var(--radius);
  padding: 2rem 1.9rem;
  transition: transform var(--uebergang), box-shadow var(--uebergang);
}
.sektion:not(.sektion--flaeche) .karte { background: var(--flaeche); }
.karte:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.karte h3 { margin-bottom: .5em; }
.karte p { color: var(--text-grau); font-size: 1rem; }
.karte p:last-child { margin-bottom: 0; }
.karte__tag {
  display: inline-block;
  font-size: .85rem; font-weight: 600;
  color: var(--blau); background: rgba(38,170,225,.1);
  padding: .25rem .75rem; border-radius: 999px;
  margin-bottom: 1rem;
}
.karte__tag--rot { color: #C4141B; background: rgba(237,28,36,.08); }

/* ---------- Schritte ---------- */
.schritte {
  counter-reset: schritt;
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.schritt {
  counter-increment: schritt;
  background: var(--papier);
  border-radius: var(--radius);
  padding: 1.8rem 1.7rem;
}
.schritt::before {
  content: counter(schritt);
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--schwarz); color: #fff;
  font-weight: 600; font-size: 1.15rem;
  margin-bottom: 1rem;
}
.schritt h3 { font-size: 1.12rem; }
.schritt p { margin: 0; color: var(--text-grau); font-size: .97rem; }

/* ---------- Buttons (zurückhaltend, pillenförmig) ---------- */
.btn {
  display: inline-block;
  padding: .75rem 1.6rem;
  border-radius: 980px;
  font-weight: 500; font-size: 1.05rem;
  background: var(--schwarz); color: #fff;
  border: 0; cursor: pointer; font-family: inherit;
  transition: opacity .2s, transform .15s;
}
.btn:hover { opacity: .85; text-decoration: none; color: #fff; }
.btn:active { transform: scale(.98); }
.btn--blau { background: var(--blau-hell); }

/* ---------- Info-Leiste (Kontakt kompakt) ---------- */
.infoleiste {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  text-align: left;
}
.infoleiste > div {
  background: var(--papier);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
}
.infoleiste h3 { font-size: 1rem; color: var(--text-grau); font-weight: 500; margin-bottom: .4em; }
.infoleiste p { margin: 0; font-size: 1.05rem; font-weight: 500; }

/* ---------- Preistabelle ---------- */
.preistabelle {
  width: 100%; border-collapse: collapse;
  background: var(--papier);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--linie) inset;
}
.preistabelle th, .preistabelle td {
  text-align: left; padding: 1.05rem 1.4rem;
  border-bottom: 1px solid var(--linie);
}
.preistabelle th {
  font-size: .85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-grau); background: var(--flaeche);
}
.preistabelle td:last-child, .preistabelle th:last-child {
  text-align: right; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.preistabelle tr:last-child td { border-bottom: 0; }
.preistabelle .nebentext { color: var(--text-grau); font-size: .93rem; font-weight: 400; }

/* ---------- Kontakt ---------- */
.kontakt__grid {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 3.5rem;
}
@media (max-width: 800px) { .kontakt__grid { grid-template-columns: 1fr; } }

.infoblock { display: grid; gap: 1.6rem; align-content: start; }
.infoblock h3 { font-size: 1rem; color: var(--text-grau); font-weight: 500; margin-bottom: .3em; }
.infoblock p { margin: 0; font-size: 1.08rem; }

.formular { display: grid; gap: 1.15rem; }
.feld { display: grid; gap: .4rem; }
.feld label { font-weight: 500; font-size: .95rem; }
.feld input, .feld textarea {
  font: inherit; padding: .85rem 1.05rem;
  border: 1.5px solid var(--linie); border-radius: 12px;
  background: var(--papier); color: var(--text); width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.feld input:focus, .feld textarea:focus {
  outline: none; border-color: var(--blau-hell);
  box-shadow: 0 0 0 4px rgba(38,170,225,.15);
}
.feld--check { grid-template-columns: auto 1fr; align-items: start; gap: .7rem; }
.feld--check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; }
.feld--check label { font-weight: 400; font-size: .92rem; color: var(--text-grau); }
.honigtopf { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Hinweisboxen ---------- */
.hinweis {
  background: var(--flaeche);
  padding: 1.2rem 1.4rem; border-radius: var(--radius);
  margin: 1.8rem 0; font-size: 1rem;
}
.sektion--flaeche .hinweis { background: var(--papier); }
.hinweis--fehler { background: rgba(237,28,36,.07); color: #8E1218; }

/* ---------- Footer ---------- */
.footer {
  background: var(--flaeche); color: var(--text-grau);
  padding: 2.8rem 0 2rem; font-size: .95rem;
}
.footer a { color: var(--text); }
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1.4fr;
  gap: 2rem; margin-bottom: 2rem;
}
@media (max-width: 700px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h3 { color: var(--text); font-size: 1rem; margin-bottom: .6em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer p { margin: 0 0 .3em; }
.footer__unten {
  border-top: 1px solid var(--linie); padding-top: 1.3rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* ---------- Rechtstexte ---------- */
.rechtstext { max-width: 46rem; }
.rechtstext h2 { font-size: 1.45rem; margin-top: 2.2em; }
.rechtstext h3 { font-size: 1.12rem; margin-top: 1.6em; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
