:root {
  --bg: #111214;
  --surface: #1a1c1f;
  --border: #2a2d31;
  --text: #f2f2f2;
  --muted: #a3a7ad;
  --accent: #fdd929;
  --accent-ink: #111214;
  --radius: 10px;
  --max: 1200px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
html { scroll-behavior: smooth; }
/* smooth.js übernimmt das Scrollen – CSS-Glättung aus, sonst ruckelt es */
html.smooth-scroll { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.logo { display: block; line-height: 0; }
.logo img { height: 44px; width: auto; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1.25;
  font-family: inherit;
  white-space: nowrap;
  text-align: center;
}
.btn:hover { filter: brightness(0.92); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); filter: none; }
.btn-whatsapp { background: #25d366; color: #0b2e17; }
.btn-instagram {
  background: linear-gradient(45deg, #f9a825 0%, #e1306c 50%, #833ab4 100%);
  color: #fff;
}

/* Kontakt-Buttons im Header */
.contact { display: flex; gap: 8px; flex: none; }
.contact .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
}
.contact .btn-ghost svg { color: var(--accent); }
.contact svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
/* Unter 960px nur Icons, unter 480px Header zweizeilig (Logo oben, Buttons darunter) */
@media (max-width: 960px) {
  .contact .btn { width: 42px; padding: 0; }
  .contact .btn span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* Main */
main { flex: 1; padding: 40px 0 56px; }

.intro h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 8px;
}
.intro h1 span { color: var(--accent); }
.intro h1:last-child { margin-bottom: 28px; }
.intro p { color: var(--muted); margin: 0 0 28px; max-width: 60ch; }

/* AutoScout24 */
.as24 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.as24 iframe {
  display: block;
  width: 100%;
  height: 1400px;
  border: 0;
  background: #fff;
}
.as24-consent {
  padding: 48px 24px;
  text-align: center;
}
.as24-consent h2 { margin: 0 0 8px; font-size: 1.3rem; }
.as24-consent p { color: var(--muted); max-width: 60ch; margin: 0 auto 20px; font-size: .95rem; }
.as24-consent .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.as24-consent label { display: block; margin-top: 16px; color: var(--muted); font-size: .9rem; }

/* Standort */
.location {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  margin-top: 48px;
  scroll-margin-top: 16px;
}
.location-info h2 { margin: 0 0 12px; font-size: 1.5rem; }
.location-info address { font-style: normal; margin-bottom: 12px; }
.location-info p { margin: 0 0 12px; }
.location-info .note { color: var(--muted); font-size: .9rem; }
.location-info .btn { margin-top: 4px; }
.as24.map iframe { height: 420px; }
.as24.map .as24-consent { padding: 40px 24px; }
@media (max-width: 760px) {
  .location { grid-template-columns: 1fr; }
  .as24.map iframe { height: 340px; }
}

/* Legal pages */
.legal > * { max-width: 800px; }
.legal h1 { margin-top: 0; }
.legal .back { margin: 0 0 16px; font-size: .9rem; }
.legal .back a { color: var(--muted); text-decoration: none; }
.legal .back a:hover { color: var(--accent); }
.legal h2 { margin-top: 2em; font-size: 1.25rem; color: var(--accent); }
.legal h3 { margin-top: 1.5em; font-size: 1.05rem; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
.legal .note { color: var(--muted); font-size: .9rem; }

@media (max-width: 480px) {
  .site-header .wrap { flex-direction: column; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
  .contact { width: 100%; justify-content: space-between; }
  .contact .btn { flex: 1; width: auto; max-width: 64px; }
}
@media (max-width: 600px) {
  .logo img { height: 32px; }
  .as24 iframe { height: 1800px; }
  .legal dl { grid-template-columns: 1fr; gap: 0; }
  .legal dd { margin-bottom: 10px; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Einwilligungs-Banner – beide Buttons bewusst gleichwertig gestaltet */
/* Ganzseitiges Overlay auf allen Seiten und Geräten */
.consent {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 11, 12, .6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overscroll-behavior: contain;
}
.consent[hidden] { display: none; }
html.consent-lock,
html.consent-lock body { overflow: hidden; }
/* Unschärfe direkt auf den Seiteninhalt – funktioniert auch ohne backdrop-filter */
html.consent-lock body > *:not(.consent):not(script) {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}
.consent-inner {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.consent-logo { display: block; height: 32px; width: auto; margin-bottom: 18px; }
.consent h2 { margin: 0 0 10px; font-size: 1.25rem; }
.consent p { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.consent p strong { color: var(--text); }
.consent-links { font-size: .85rem; }
.consent-actions { display: flex; gap: 12px; margin-top: 18px; }
.btn-consent { flex: 1; padding: 12px 18px; }
@media (max-width: 480px) {
  .consent-inner { padding: 22px 18px 18px; }
  .consent-actions { flex-direction: column; }
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
