/* ============================================================================
   CPC Hannover — Basis: Marken-Token, Grundgeruest, Kopf- und Fusszeile,
   Knoepfe, Formulare, Modal. Wird von JEDER Seite geladen.

   Zwei Welten, ein System:
     body[data-welt="fahrzeuge"]  dunkle Fahrzeugseiten
     body[data-welt="shop"]       heller Zubehoershop
   Beide setzen dieselben semantischen Variablen auf andere Werte, deshalb
   funktionieren Knopf, Formular und Fusszeile in beiden Welten unveraendert.

   Radien-Regel (bewusst, gilt ueberall):
     Fahrzeugwelt weich  --r 14px  --r-klein 10px
     Shopwelt knapp      --r  8px  --r-klein  6px
   ========================================================================= */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------- Token ---- */
:root {
  /* Markenrot. Ein einziger Wert fuer Flaechen UND kleinen Text auf Hell:
     5,07:1 gegen Weiss, 4,65:1 gegen Papier, weisse Schrift darauf 5,07:1. */
  --rot: #d81f26;
  --rot-tief: #b91419;      /* Hover, 6,61:1 */
  --rot-hell: #f2564a;      /* nur auf Dunkel, 5,62:1 gegen --grund */

  --breite: 1280px;
  --breite-weit: 1560px;
  --luft: clamp(1rem, 4vw, 2.5rem);

  --schrift: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --zeit: .28s cubic-bezier(.16, 1, .3, 1);

  /* Ebenen. Nie freihaendig z-index vergeben, immer hieraus. */
  --z-sticky: 40;
  --z-menue: 50;
  --z-modal: 60;
}

body[data-welt="fahrzeuge"] {
  --grund: #101012;
  --grund-tief: #0a0a0b;
  --flaeche: #1a1a1d;
  --flaeche-hoch: #232327;
  --text: #ffffff;
  --text-leise: #9a9aa2;     /* 6,80:1 auf --grund, 6,09:1 auf --flaeche */
  --linie: rgba(255, 255, 255, .14);
  --linie-stark: rgba(255, 255, 255, .28);
  --akzent: var(--rot-hell);
  --feld: #16161a;
  --feld-linie: rgba(255, 255, 255, .22);
  --r: 14px;
  --r-klein: 10px;
  --schatten: 0 24px 60px rgba(0, 0, 0, .55);
}

body[data-welt="shop"] {
  --grund: #f2f3f5;
  --grund-tief: #e7e9ec;
  --flaeche: #ffffff;
  --flaeche-hoch: #ffffff;
  --text: #16181d;
  /* Muss auf ALLEN drei Untergruenden bestehen, auch auf --grund-tief:
     6,03:1 auf Weiss, 5,43:1 auf --grund, 4,96:1 auf --grund-tief.
     Der erste Kandidat #666a72 fiel mit 4,46 gegen --grund-tief durch. */
  --text-leise: #5f636b;
  --linie: #e1e4e8;
  --linie-stark: #c9ced6;
  --akzent: var(--rot);
  --feld: #ffffff;
  --feld-linie: #c9ced6;
  --r: 8px;
  --r-klein: 6px;
  --schatten: 0 10px 30px rgba(16, 20, 30, .10);
}

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  line-height: 1.15;
  font-stretch: 112%;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 3px;
  border-radius: 3px;
}

.nur-fuer-screenreader {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.sprungmarke {
  position: absolute; left: 1rem; top: -100px; z-index: var(--z-modal);
  background: var(--flaeche); color: var(--text); padding: .75rem 1.25rem;
  border: 1px solid var(--linie-stark); border-radius: var(--r-klein);
}
.sprungmarke:focus { top: 1rem; }

.huelle {
  width: 100%; max-width: var(--breite); margin-inline: auto;
  padding-inline: var(--luft);
}
.huelle-weit { max-width: var(--breite-weit); }

.abschnitt { padding-block: clamp(3rem, 7vw, 6rem); }

/* -------------------------------------------------------------- Typo ------ */
.ueberschrift {
  font-size: clamp(1.75rem, 4.4vw, 3.1rem);
  font-weight: 300;
  font-stretch: 118%;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ueberschrift-klein {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 600;
  font-stretch: 108%;
}
.lauftext { color: var(--text-leise); }
.mittig { text-align: center; }
.mittig .lauftext { margin-inline: auto; }

/* Zahlen und Preise laufen tabellarisch, damit Spalten nicht zappeln. */
.zahl { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- Knoepfe ---- */
.knopf {
  --knopf-grund: var(--rot);
  --knopf-text: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding: .75rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--r-klein);
  background: var(--knopf-grund);
  color: var(--knopf-text);
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: .04em;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;          /* Beschriftungen bleiben einzeilig */
  cursor: pointer;
  transition: background var(--zeit), border-color var(--zeit),
    transform .12s ease, color var(--zeit);
}
.knopf:hover { --knopf-grund: var(--rot-tief); }
.knopf:active { transform: translateY(1px); }

.knopf-rahmen {
  --knopf-grund: transparent;
  --knopf-text: var(--text);
  border-color: var(--linie-stark);
}
.knopf-rahmen:hover { --knopf-grund: transparent; border-color: var(--text); }

.knopf-hell {
  --knopf-grund: #fff;
  --knopf-text: #101012;
}
.knopf-hell:hover { --knopf-grund: #e6e6e9; }

.knopf-klein { min-height: 40px; padding: .45rem 1rem; font-size: .875rem; }
.knopf-breit { width: 100%; }

/* Runder Pfeilknopf (Schieber, Karten) */
.rundknopf {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--linie-stark);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background var(--zeit), border-color var(--zeit), opacity var(--zeit);
}
.rundknopf:hover:not(:disabled) { background: var(--flaeche-hoch); border-color: var(--text); }
.rundknopf:disabled { opacity: .35; cursor: default; }
.rundknopf svg { width: 18px; height: 18px; }

/* ----------------------------------------------------------- Formulare ---- */
.feldgruppe { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.feldgruppe > label { font-size: .8125rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-leise); font-weight: 600; }

.feld {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  background: var(--feld);
  color: var(--text);
  border: 1px solid var(--feld-linie);
  border-radius: var(--r-klein);
  transition: border-color var(--zeit), box-shadow var(--zeit);
}
.feld::placeholder { color: var(--text-leise); opacity: 1; }
.feld:focus { border-color: var(--akzent); box-shadow: 0 0 0 3px rgba(216, 31, 38, .2); }
select.feld { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  background-size: 12px; padding-right: 2.6rem; }
textarea.feld { min-height: 130px; resize: vertical; }

.feld[aria-invalid="true"] { border-color: var(--rot); }
.fehler { font-size: .875rem; color: var(--akzent); font-weight: 600; }
.fehler[hidden] { display: none; }
.hinweis { font-size: .8125rem; color: var(--text-leise); }

.haken { display: flex; gap: .7rem; align-items: flex-start;
  font-size: .875rem; color: var(--text-leise); cursor: pointer; }
.haken input { width: 20px; height: 20px; flex: none; margin: 2px 0 0;
  accent-color: var(--rot); }
.haken a { color: var(--akzent); }

/* --------------------------------------------------------- Kopfzeile ------ */
.dienstleiste {
  background: var(--grund-tief);
  border-bottom: 1px solid var(--linie);
  font-size: .8125rem;
}
.dienstleiste-inner {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 42px; flex-wrap: wrap;
}
.dienstleiste a { text-decoration: none; color: var(--text-leise); }
.dienstleiste a:hover { color: var(--text); }
.dienst-rechts { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; }
.dienst-punkt { display: inline-flex; align-items: center; gap: .45rem;
  color: var(--text-leise); }
.dienst-punkt svg { width: 15px; height: 15px; flex: none; }

.kopf {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--grund);
  border-bottom: 1px solid var(--linie);
}
.kopf-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 72px;
}
.marke { display: inline-flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--text); flex: none; }
.marke-mal { width: 44px; height: 26px; flex: none; }
.marke-wort { font-size: 1.35rem; font-weight: 700; font-stretch: 118%;
  letter-spacing: .16em; line-height: 1; display: block; }
.marke-zusatz { font-size: .5625rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-leise); display: block; margin-top: .3rem; }

.haupt-nav { margin-left: auto; }
.haupt-nav ul { display: flex; gap: clamp(1rem, 2.2vw, 2.25rem); align-items: center; }
.haupt-nav a {
  display: inline-block; padding: .4rem 0;
  text-decoration: none; font-size: .875rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.haupt-nav a:hover { border-bottom-color: var(--linie-stark); }
.haupt-nav a[aria-current="page"] { border-bottom-color: var(--rot); }

.kopf-werkzeuge { display: flex; align-items: center; gap: .35rem; flex: none; }
.werkzeug {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border: 0; background: transparent;
  color: inherit; border-radius: var(--r-klein); cursor: pointer;
  text-decoration: none;
}
.werkzeug:hover { background: var(--flaeche-hoch); }
.werkzeug svg { width: 21px; height: 21px; }
.zaehler {
  position: absolute; top: 4px; right: 3px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--rot); color: #fff;
  border-radius: 999px; font-size: .6875rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.zaehler[data-leer="ja"] { display: none; }

.burger { display: none; }

/* Mobiles Menue */
.mobil-menue {
  display: none;
  position: fixed; inset: 0; z-index: var(--z-menue);
  background: var(--grund);
  padding: 5.5rem var(--luft) 2rem;
  overflow-y: auto;
}
.mobil-menue[data-offen="ja"] { display: block; }
.mobil-menue ul { display: grid; gap: .25rem; }
.mobil-menue a {
  display: block; padding: .9rem 0; text-decoration: none;
  font-size: 1.05rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--linie);
}
.mobil-schliessen { position: absolute; top: 1.1rem; right: var(--luft); }

@media (max-width: 1023px) {
  .haupt-nav { display: none; }
  .burger { display: inline-grid; }
  .dienst-rechts { display: none; }
}

/* Unter 480 px passen Wortmarke, Zusatzzeile und drei Werkzeuge nicht mehr
   nebeneinander: die Zusatzzeile geht, der Rest rueckt zusammen. */
@media (max-width: 480px) {
  .kopf-inner { gap: .5rem; min-height: 64px; }
  .marke-zusatz { display: none; }
  .marke-mal { width: 34px; height: 20px; }
  .marke-wort { font-size: 1.15rem; letter-spacing: .12em; }
  .kopf-werkzeuge { gap: 0; }
  .werkzeug { width: 40px; height: 40px; }
  .dienstleiste-inner { gap: .75rem; font-size: .75rem; }
}

/* ---------------------------------------------------------- Fusszeile ----- */
.fuss {
  background: var(--grund-tief);
  border-top: 1px solid var(--linie);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.fuss-kopf {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding-bottom: 2rem; border-bottom: 1px solid var(--linie);
}
.fuss-kontakt { margin-left: auto; display: flex; align-items: center;
  gap: 1.25rem; flex-wrap: wrap; }
.fuss-telefon { display: inline-flex; align-items: center; gap: .5rem;
  font-size: 1.05rem; font-weight: 600; text-decoration: none;
  font-variant-numeric: tabular-nums; }
.fuss-telefon svg { width: 18px; height: 18px; flex: none; }
.fuss-sozial { display: flex; gap: .5rem; }
.fuss-sozial a { display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--linie-stark); border-radius: 999px; }
.fuss-sozial svg { width: 17px; height: 17px; }

.fuss-spalten {
  display: grid; gap: 2rem clamp(1rem, 3vw, 2.5rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: 2.5rem;
}
.fuss-spalten h3 {
  font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 1.1rem;
}
.fuss-spalten li + li { margin-top: .65rem; }
.fuss-spalten a { color: var(--text-leise); text-decoration: none; font-size: .9375rem; }
.fuss-spalten a:hover { color: var(--text); }

.fuss-boden {
  display: flex; gap: 1rem 2rem; flex-wrap: wrap; align-items: center;
  padding-top: 1.75rem; border-top: 1px solid var(--linie);
  font-size: .875rem; color: var(--text-leise);
}
.fuss-boden nav { margin-left: auto; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.fuss-boden a { text-decoration: none; }
.fuss-boden a:hover { color: var(--text); }

@media (max-width: 860px) {
  .fuss-spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fuss-boden nav { margin-left: 0; }
}
@media (max-width: 460px) {
  .fuss-spalten { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------- Modal ----- */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: var(--luft);
  background: rgba(6, 6, 8, .72);
}
.modal[hidden] { display: none; }
.modal-karte {
  width: min(520px, 100%);
  background: var(--flaeche);
  color: var(--text);
  border: 1px solid var(--linie);
  border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  max-height: 90vh; overflow-y: auto;
}
.modal-karte h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.modal-wege { display: grid; gap: .75rem; margin-top: 1.5rem; }
.modal-fuss { margin-top: 1.25rem; display: flex; justify-content: flex-end; }

/* ---------------------------------------------------------- Bewegung ------ */
.einblenden { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: no-preference) {
  .einblenden { transition: opacity .6s cubic-bezier(.16, 1, .3, 1),
    transform .6s cubic-bezier(.16, 1, .3, 1); }
}
.einblenden[data-sichtbar="ja"] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .einblenden { opacity: 1; transform: none; }
}
