/* rahmen.css — S.A.S Automobile (Autohaus 17), Haut A „Der Lichtkasten"
   Grundgerüst, das JEDE Seite teilt: Basis-Typo, Knöpfe, Formularfelder,
   Kopfleiste (.nav), Fuß (.fuss), feste Ecke Anrufen/WhatsApp (.ecke).
   Markup dazu: _arbeit/partials/kopf.html + fuss.html (EIN Teil, Hauptseiten
   in Schritt 6 übernehmen ihn). Kopfleiste hier im „gescrollten" Zustand
   (deckend --grund + Hairline); index/fahrzeuge setzen .nav--ueber-video
   für den transparenten Start über dem Kopf-Video. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--kopf-h) + 1rem); }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.sr-only, .nurSR {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sr-only:focus { position: fixed !important; top: .75rem; left: .75rem; width: auto; height: auto; clip: auto; z-index: 200; background: var(--navy); color: var(--auf-navy); padding: .6rem 1rem; border-radius: var(--radius); }

.bahn { width: 100%; max-width: 88rem; margin-inline: auto; padding-inline: var(--rand); }

.h-2 {
  font-family: var(--disp); font-stretch: 112%; font-weight: 750;
  font-size: clamp(1.9rem, 1.05rem + 2.4vw, 3.25rem); line-height: 1.05; letter-spacing: -0.015em;
  overflow-wrap: break-word;
}
.h-3 {
  font-family: var(--disp); font-stretch: 100%; font-weight: 700;
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.55rem); line-height: 1.2;
}
.eyebrow {
  font-family: var(--body); font-weight: 700; font-size: .8125rem; line-height: 1.35;
  letter-spacing: .06em; text-transform: uppercase; color: var(--meta);
}

/* Knöpfe — Radius 6 (Haut A), Navy = Handlung */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.3rem;
  background: var(--navy); color: var(--auf-navy);
  border: 1px solid var(--navy); border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.knopf:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.knopf--rand { background: transparent; color: var(--navy); border-color: var(--kante-stark); }
.knopf--rand:hover { background: var(--flaeche); color: var(--navy); border-color: var(--navy); }
.knopf--voll { width: 100%; }
.knopf--wa { background: var(--wa-fest); border-color: var(--wa-fest); color: #fff; }
.knopf--wa:hover { background: #12612f; border-color: #12612f; }

/* Formular */
.form { display: grid; gap: .9rem; }
.feld { display: grid; gap: .35rem; }
.feld label, .form legend { font-size: .9rem; font-weight: 700; color: var(--text); }
.feld input, .feld textarea, .feld select {
  width: 100%; min-height: 48px; padding: .65rem .8rem;
  background: var(--grund); color: var(--text);
  border: 1px solid var(--kante-stark); border-radius: var(--radius);
}
.feld textarea { min-height: 6.5rem; resize: vertical; }
.feld input:focus, .feld textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.einwilligung { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.45; color: var(--meta); }
.einwilligung input { width: 20px; height: 20px; margin-top: .1rem; flex: none; accent-color: var(--navy); }
.einwilligung a { color: var(--navy); }
.form__meldung { font-size: .92rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--grund); border: 1px solid var(--kante-stark); }
.form__meldung a { color: var(--navy); font-weight: 700; }
.form__zusage { font-size: .86rem; color: var(--meta); line-height: 1.45; }

/* Kopfleiste */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--kopf-h);
  background: var(--grund); border-bottom: 1px solid var(--kante);
  color: var(--text);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: 88rem; margin-inline: auto; padding-inline: var(--rand); }
.marke {
  font-family: var(--disp); font-stretch: 125%; font-weight: 800; font-size: 1.35rem; line-height: 1;
  letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; color: inherit;
}
.marke b { color: var(--rot-text); font-weight: 800; }
.marke span { font-stretch: 112%; font-weight: 600; }
.nav__liste { list-style: none; display: flex; gap: clamp(1rem, 1.6vw, 2rem); padding: 0; }
.nav__liste a { text-decoration: none; font-weight: 600; font-size: .98rem; padding-block: .4rem; border-bottom: 2px solid transparent; }
.nav__liste a:hover, .nav__liste a[aria-current="page"] { border-bottom-color: var(--rot); }
.nav__rechts { display: flex; align-items: center; gap: .6rem; }
.nav__merk, .nav__schalter {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--kante-stark); background: transparent; color: inherit; cursor: pointer; text-decoration: none;
}
.nav__merk svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav__merkzahl { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--rot); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.nav__merkzahl[hidden] { display: none; }
.nav__schalter svg { width: 20px; height: 20px; }
.nav__cta { min-height: 44px; padding: .55rem 1.1rem; }
.nav__burger { display: none; width: 44px; height: 44px; border: 1px solid var(--kante-stark); border-radius: var(--radius); background: transparent; cursor: pointer; padding: 0 11px; flex-direction: column; justify-content: center; gap: 5px; }
.nav__burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; }
.nav__mobil { display: none; }
.nav--ueber-video:not(.ist-gescrollt) { background: transparent; border-bottom-color: transparent; color: var(--kalk-fest); }
.nav--ueber-video:not(.ist-gescrollt) .marke b { color: var(--rot-fest); }

@media (max-width: 1180px) {
  .nav__liste, .nav__cta { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__mobil {
    position: fixed; inset: var(--kopf-h) 0 auto 0; background: var(--grund); border-bottom: 1px solid var(--kante);
    box-shadow: var(--schatten); padding: .5rem var(--rand) 1.25rem;
  }
  .nav.ist-offen .nav__mobil { display: block; }
  .nav__mobil ul { list-style: none; padding: 0; display: grid; }
  .nav__mobil a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--kante); text-decoration: none; font-weight: 700; font-size: 1.1rem; color: var(--text); }
}
@media (max-width: 420px) {
  .marke { font-size: 1.15rem; }
  .nav__rechts { gap: .4rem; }
}

/* Fuß — hell auf --flaeche (Haut A: dunkle Flächen bleiben den Bühnen vorbehalten) */
.fuss { background: var(--flaeche); color: var(--text); border-top: 1px solid var(--kante); margin-top: 0; }
.fuss__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem 3rem; padding-block: 3.5rem 2.5rem; }
.fuss__block { display: grid; align-content: start; gap: .45rem; font-size: .95rem; }
.fuss__block h3 { font-family: var(--body); font-weight: 700; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--meta); margin-bottom: .3rem; }
.fuss__block a { text-decoration: none; }
.fuss__block a:hover { text-decoration: underline; color: var(--navy); }
.fuss__satz { color: var(--meta); max-width: 24rem; }
.fuss__fenster { font-weight: 700; color: var(--meta); letter-spacing: .04em; }
.fuss__unten { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.1rem 1.4rem; border-top: 1px solid var(--kante); font-size: .86rem; color: var(--meta); padding-right: 22rem; }
.fuss__unten a { color: inherit; }
/* Schritt 7 (04.10.): ab 1181 px liegt die feste Ecke unten rechts — das Fuß-Raster hält dort dieselben 22rem frei wie .fuss__unten (danke.html: Ecke lag auf „Bewerte uns auf Google"). */
@media (min-width: 1181px) { .fuss__grid { padding-right: 22rem; } }
@media (max-width: 960px) { .fuss__grid { grid-template-columns: 1fr 1fr; } }
/* Schritt 7 R2: die Pillen-Ecke steht bis 761 px rechts unten — erst darunter (Handy-Leiste) braucht .fuss__unten keinen Freiraum mehr */
@media (max-width: 760px) { .fuss__unten { padding-right: var(--rand); } }
@media (max-width: 560px) { .fuss__grid { grid-template-columns: 1fr; padding-block: 2.5rem 1.5rem; } }

/* Feste Ecke: Anrufen + WhatsApp (GESETZ Kap. 10) — verdeckt nie Inhalt:
   Desktop unten rechts (Fuß reserviert 22rem rechts), Handy als Leiste mit Platz im body. */
.ecke { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60; display: flex; gap: .6rem; }
.ecke a {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 52px; padding: .8rem 1.2rem;
  border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 24px -10px rgb(0 0 0 / .45);
}
.ecke svg { width: 20px; height: 20px; flex: none; }
.ecke__an { background: var(--navy-fest); color: var(--kalk-fest); }
.ecke__wa { background: var(--wa-fest); color: #fff; }
.ecke a:hover { filter: brightness(1.12); }
@media (max-width: 760px) {
  /* Platz für die Handy-Leiste im Fuß statt am body — sonst Streifen in Seitenfarbe unter dem Fuß (Schritt 7, 04.10.) */
  .fuss { padding-bottom: 60px; }
  .ecke { inset: auto 0 0 0; gap: 0; }
  .ecke a { flex: 1 1 50%; justify-content: center; border-radius: 0; min-height: 60px; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; }
}
/* Ecke tritt zurück, wenn dieselben Knöpfe schon im Bild sind (Detailseiten: Anfrage-Spalte, rahmen.js) */
.ecke { transition: transform 220ms var(--ease-roll, ease-out), opacity 220ms var(--ease-roll, ease-out); }
.ecke.ist-zurueck { transform: translateY(calc(100% + 1.5rem)); opacity: 0; pointer-events: none; }
