/* ============================================================
   AUTOHAUS STEINBERG, Design System
   Dunkel, edel, Nachtblau mit Violett. Keine externen Requests.
   ============================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/space-grotesk-v22-latin-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/space-grotesk-v22-latin-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/space-grotesk-v22-latin-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/space-grotesk-v22-latin-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* Hausfarben: Schwarz wie die Fassade, Erdton #B1AF9B wie die Waende und das Logo */
  --bg: #121211;
  --bg2: #191917;
  --panel: #1e1e1b;
  --panel2: #26261f;
  --line: rgba(177,175,155,.15);
  --line2: rgba(177,175,155,.28);
  --text: #f0efe9;
  --muted: #a9a69a;
  --muted2: #8b887c;
  --gold: #b1af9b;
  --gold2: #97957f;
  --gold-soft: rgba(177,175,155,.16);
  --on-accent: #121211;
  --sand: #b1af9b;
  --blue: #26261f;
  --green: #4cd98a;
  --red: #e46a6a;
  --radius: 18px;
  --radius-sm: 12px;
  --font-d: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-b: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --ease: cubic-bezier(.22,.9,.28,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--gold); color: var(--on-accent); }

h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Scroll progress ---------- */
#scrollbar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold2), var(--gold));
  z-index: 1002; transition: width .08s linear;
}

/* ---------- Preloader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  transition: opacity .7s var(--ease), visibility .7s;
}
#loader.done { opacity: 0; visibility: hidden; }
/* Die Wortmarke steht sofort und ruhig, darunter laeuft ein feiner Fortschritt */
#loader .lmark { width: min(210px, 56vw); height: auto; animation: lmarkin .55s var(--ease) both; }
#loader .lbar {
  width: min(200px, 54vw); height: 2px; border-radius: 2px;
  background: rgba(177,175,155,.18); overflow: hidden; position: relative;
}
#loader .lbar::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, rgba(177,175,155,.45), var(--gold));
  transform: scaleX(0); transform-origin: left;
  animation: lbarfill 1.35s var(--ease) forwards;
}
@keyframes lmarkin { from { opacity: 0; transform: translateY(9px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes lbarfill { to { transform: scaleX(1); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
header { background: linear-gradient(180deg, rgba(18,18,17,.72), rgba(18,18,17,0)); }
header.scrolled {
  background: rgba(18,18,17,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; max-width: 1360px; margin: 0 auto; padding: 0 28px;
}
.brand { display: flex; align-items: center; transition: opacity .25s; }
.brand:hover { opacity: .82; }
.brand img { height: 46px; width: auto; }
nav.menu { display: flex; gap: 26px; }
nav.menu a {
  font-family: var(--font-d); font-size: 13.5px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); position: relative; padding: 6px 0;
  transition: color .25s;
}
nav.menu a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--gold); transition: width .3s var(--ease);
}
nav.menu a:hover, nav.menu a.active { color: var(--text); }
nav.menu a:hover::after, nav.menu a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  border: 1px solid var(--line2); border-radius: 999px; padding: 7px 14px;
  color: var(--muted); white-space: nowrap;
}
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
.status-chip.closed .dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
@keyframes pulse { 50% { opacity: .4; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-d); font-weight: 600; font-size: 14px; letter-spacing: .05em;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--on-accent); box-shadow: 0 8px 30px rgba(177,175,155,.22); }
.btn-gold:hover { box-shadow: 0 14px 40px rgba(177,175,155,.35); }
.btn-ghost { border-color: var(--line2); color: var(--text); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-dark { background: var(--panel2); color: var(--text); border-color: var(--line); }
.btn-dark:hover { border-color: var(--gold); }
#burger { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; z-index: 1102; }
#burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px auto; transition: .3s var(--ease); }
#burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#burger.open span:nth-child(2) { opacity: 0; }
#burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobilemenu {
  position: fixed; inset: 0; background: #0e0e0d; z-index: 1100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  opacity: 0; visibility: hidden; transition: .4s var(--ease);
}
#mobilemenu.open { opacity: 1; visibility: visible; }
/* Logo bleibt beim Oeffnen an Ort und Stelle stehen */
#mobilemenu .mm-logo { position: absolute; top: 14px; left: 28px; height: 46px; width: auto; }
#mobilemenu a { font-family: var(--font-d); font-size: 26px; font-weight: 600; padding: 10px; color: var(--text); }
#mobilemenu a:active { color: var(--gold); }

/* ---------- Hero ---------- */
#hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  overflow: hidden; perspective: 900px;
}
.hero-bg, .hero-bg::after { position: absolute; inset: -6%; }
.hero-bg {
  background: url('../assets/img/1G6A8654_HDR.jpg') center 38% / cover no-repeat;
  transform: translate3d(0,0,0) scale(1.06);
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns { from { transform: scale(1.06) translate3d(0,0,0); } to { transform: scale(1.14) translate3d(-1.2%, -1%, 0); } }
.hero-bg::after {
  content: ''; inset: 0; position: absolute;
  background:
    linear-gradient(180deg, rgba(18,18,17,.55) 0%, rgba(18,18,17,.18) 38%, rgba(18,18,17,.62) 74%, var(--bg) 100%),
    radial-gradient(60% 50% at 70% 40%, transparent, rgba(18,18,17,.35));
}
#particles { position: absolute; inset: 0; pointer-events: none; opacity: .7; }

/* Markenglow und Lichtstrahl im Hero */
.hero-glow {
  position: absolute; z-index: 2; pointer-events: none;
  left: -14%; top: 12%; width: 78%; height: 76%;
  background: radial-gradient(closest-side, rgba(177,175,155,.45), rgba(177,175,155,.12) 55%, transparent 78%);
  filter: blur(30px);
  animation: glowpulse 9s ease-in-out infinite;
}
@keyframes glowpulse { 50% { opacity: .58; transform: scale(1.08); } }
.hero-beam {
  position: absolute; z-index: 2; pointer-events: none;
  top: -60%; left: -30%; width: 60%; height: 220%;
  background: linear-gradient(100deg, transparent 42%, rgba(177,175,155,.14) 50%, transparent 58%);
  transform: rotate(14deg);
  animation: beamsweep 11s ease-in-out infinite;
}
@keyframes beamsweep {
  0%, 100% { transform: rotate(14deg) translateX(0); opacity: .5; }
  50% { transform: rotate(14deg) translateX(150%); opacity: .95; }
}
.hero-inner {
  position: relative; z-index: 3; width: 100%;
  max-width: 1240px; margin: 0 auto; padding: 150px 24px 90px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-d); font-size: 12.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  color: var(--text); margin-bottom: 22px; text-shadow: 0 1px 12px rgba(18,18,17,.8);
}
.hero-tag::before { content: ''; width: 44px; height: 1px; background: var(--gold); }
#hero h1 {
  font-size: clamp(44px, 7.4vw, 96px); font-weight: 700; color: #fff;
  text-wrap: balance; max-width: 900px;
}
#hero h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px rgba(244,242,236,.85); }
.hero-sub { max-width: 560px; margin-top: 22px; color: var(--text); font-size: 17.5px; text-shadow: 0 1px 14px rgba(18,18,17,.7); }
.hero-ctas { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta {
  display: flex; gap: 14px; margin-top: 54px; flex-wrap: wrap;
  perspective: 800px;
}
.hero-meta .hm {
  padding: 16px 26px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 15px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .4s var(--ease), border-color .4s, background .4s, box-shadow .4s;
  transform-style: preserve-3d;
}
.hero-meta .hm:hover {
  transform: translateY(-7px) rotateX(8deg) scale(1.03);
  border-color: rgba(177,175,155,.55);
  background: rgba(177,175,155,.16);
  box-shadow: 0 20px 45px rgba(6,6,5,.55), 0 0 30px rgba(177,175,155,.28);
}
.hero-meta .hm b {
  font-family: var(--font-d); font-size: 30px; font-weight: 700; color: #fff; display: block;
  line-height: 1.1;
}
.hero-meta .hm b .cnt { color: var(--gold); text-shadow: 0 0 22px rgba(177,175,155,.55); }
/* Nur das direkte Kind, sonst schrumpft der Zaehler im b-Element mit */
.hero-meta .hm > span { font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.hero-meta .hm b .cnt { font-size: inherit; letter-spacing: 0; text-transform: none; }
.scroll-hint {
  position: absolute; bottom: 26px; left: 34px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-hint .line { width: 1px; height: 54px; background: linear-gradient(180deg, var(--gold), transparent); animation: scrolldrop 2s var(--ease) infinite; }
@keyframes scrolldrop { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Ticker ---------- */
#ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg2); overflow: hidden; padding: 18px 0;
  position: relative; z-index: 4;
}
.ticker-track { display: flex; gap: 54px; width: max-content; animation: ticker 36s linear infinite; }
#ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--font-d); font-size: 14px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 54px; white-space: nowrap;
}
.ticker-track span::after { content: '✦'; color: var(--gold); font-size: 11px; }
@keyframes ticker {
  from { transform: rotateX(9deg) translateX(0); }
  to { transform: rotateX(9deg) translateX(-50%); }
}

/* ---------- Sections ---------- */
section { position: relative; }
.sec { padding: 110px 0; }
.sec-head { margin-bottom: 54px; }
.sec-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-d); font-size: 12px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.sec-tag::before { content: ''; width: 34px; height: 1px; background: var(--gold); }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 52px); max-width: 720px; text-wrap: balance; }
.sec-head p.lead { margin-top: 16px; max-width: 640px; color: var(--muted); font-size: 17px; }
.sec-head.center { text-align: center; }
.sec-head.center h2, .sec-head.center p.lead { margin-left: auto; margin-right: auto; }
.sec-head.center .sec-tag::before { display: none; }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; } .rv-d3 { transition-delay: .24s; }
.rv-d4 { transition-delay: .32s; } .rv-d5 { transition-delay: .4s; }

/* ---------- Standort / Gebäude ---------- */
#standort { background: var(--bg2); border-bottom: 1px solid var(--line); }
.standort-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.st-media { position: relative; perspective: 1200px; }
.st-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transform-style: preserve-3d; transition: transform .5s var(--ease);
  border: 1px solid var(--line);
}
.st-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.st-card.back {
  position: absolute; width: 58%; right: -22px; bottom: -46px; z-index: 2;
  border: 1px solid var(--line2);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.st-card.back img { aspect-ratio: 16/10; }
.st-badge {
  position: absolute; top: -20px; left: -14px; z-index: 3;
  background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--on-accent);
  font-family: var(--font-d); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 10px 30px rgba(177,175,155,.4);
  animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-8px); } }
.st-text h2 { font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 20px; }
.st-text p { color: var(--muted); margin-bottom: 16px; }
.st-text p strong { color: var(--text); font-weight: 600; }
.st-points { list-style: none; margin: 26px 0 34px; display: grid; gap: 13px; }
.st-points li { display: flex; gap: 13px; align-items: flex-start; color: var(--text); }
.st-points li svg { flex: 0 0 20px; margin-top: 3px; color: var(--gold); }

/* ---------- Fahrzeuge ---------- */
#fahrzeuge .sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.live-pill {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; letter-spacing: .08em;
  color: var(--muted); border: 1px solid var(--line2); padding: 8px 16px; border-radius: 999px;
}
.live-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.inv-controls {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 36px;
}
.chip {
  font-family: var(--font-d); font-size: 13px; font-weight: 500; letter-spacing: .05em;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line2);
  background: transparent; color: var(--muted); transition: .25s;
}
.chip:hover { color: var(--text); border-color: var(--gold); }
.chip.active { background: var(--gold); border-color: var(--gold); color: var(--on-accent); font-weight: 600; }
.inv-search {
  flex: 1; min-width: 190px; max-width: 320px; margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line2); border-radius: 999px; padding: 9px 18px; background: rgba(255,255,255,.02);
}
.inv-search svg { color: var(--muted2); flex: 0 0 16px; }
.inv-search input {
  background: none; border: 0; outline: 0; color: var(--text); font-family: var(--font-b); font-size: 14px; width: 100%;
}
.inv-search input::placeholder { color: var(--muted2); }
select.inv-sort {
  background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 999px;
  font-family: var(--font-d); font-size: 13px; padding: 9px 16px; outline: none; cursor: pointer;
}
.inv-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px;
  perspective: 1100px;
}
.inv-stand { margin-top: 22px; text-align: center; font-size: 12px; color: var(--muted2); }
.car-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; position: relative;
  transform-style: preserve-3d; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s, opacity .4s;
  will-change: transform;
}
.car-card:hover { border-color: rgba(177,175,155,.5); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.cc-media { position: relative; }
.car-card .cc-img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--panel2); border-radius: var(--radius) var(--radius) 0 0; }
.car-card .cc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.car-card:hover .cc-img img { transform: scale(1.06); }
.cc-price {
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(18,18,17,.82); backdrop-filter: blur(8px);
  border: 1px solid rgba(177,175,155,.5);
  color: var(--gold); font-family: var(--font-d); font-weight: 700; font-size: 16px;
  padding: 8px 15px; border-radius: 12px;
}
.cc-tag {
  position: absolute; left: 14px; top: 14px;
  background: rgba(18,18,17,.75); backdrop-filter: blur(8px); border: 1px solid var(--line2);
  color: var(--text); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
/* Frisch eingestellte Fahrzeuge heben sich ab, die Kennzeichnung kommt von mobile.de. */
.cc-tag.neu {
  background: var(--gold); border-color: var(--gold); color: var(--on-accent); font-weight: 600;
}
.car-card.neu { border-color: rgba(177,175,155,.34); }
.cc-body { padding: 20px 22px 22px; }
.cc-body h3 { font-size: 18.5px; font-weight: 600; margin-bottom: 4px; }
.cc-body .cc-sub { color: var(--muted2); font-size: 13px; margin-bottom: 16px; min-height: 20px; }
.cc-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-specs span {
  font-size: 12px; color: var(--muted); background: rgba(255,255,255,.045);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
  display: inline-flex; align-items: center; gap: 6px;
}
.cc-specs svg { width: 13px; height: 13px; color: var(--gold); }
.cc-cta {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-d); font-size: 13.5px; font-weight: 600; color: var(--gold);
  letter-spacing: .05em;
}
.cc-cta svg { transition: transform .3s var(--ease); }
.car-card:hover .cc-cta svg { transform: translateX(6px); }
.inv-empty {
  text-align: center; color: var(--muted); padding: 70px 20px; border: 1px dashed var(--line2);
  border-radius: var(--radius); grid-column: 1/-1;
}
.inv-foot { margin-top: 34px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------- Fahrzeug-Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden; transition: .35s var(--ease);
}
.modal.open { opacity: 1; visibility: visible; }
.modal-bg { position: absolute; inset: 0; background: rgba(6,6,5,.85); backdrop-filter: blur(10px); }
.modal-card {
  position: relative; background: var(--bg2); border: 1px solid var(--line2); border-radius: 22px;
  width: min(1060px, 100%); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(30px) scale(.98); transition: transform .35s var(--ease);
  scrollbar-width: thin; scrollbar-color: rgba(177,175,155,.3) transparent;
}
.modal.open .modal-card { transform: none; }
/* Kein float, sonst weicht das Raster aus und wird 44px schmaler */
.modal-close {
  position: sticky; top: 0; margin: 0 0 -44px auto; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 0 0 0 14px; background: rgba(18,18,17,.8); border: 0; color: var(--text);
  z-index: 6; backdrop-filter: blur(6px);
}
.modal-close:hover { color: var(--gold); }
.md-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 0; align-items: start; }
.md-gallery { position: sticky; top: 0; background: var(--bg2); align-self: stretch; }
/* Quelle liefert nur 640px, darum nicht hochskalieren, sonst wird das Bild weich */
.md-gallery .md-main { aspect-ratio: 4/3; width: 100%; max-width: 640px; margin: 0 auto; object-fit: cover; }
.md-thumbs { display: flex; gap: 8px; padding: 12px; background: var(--panel); flex-wrap: wrap; }
.md-thumbs img {
  width: 74px; height: 54px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; opacity: .6; transition: .25s;
}
.md-thumbs img.active, .md-thumbs img:hover { opacity: 1; border-color: var(--gold); }
.md-info { padding: 34px 34px 28px; }
.md-info h3 { font-size: 26px; margin-bottom: 6px; }
.md-info .md-sub { color: var(--muted2); font-size: 14px; margin-bottom: 20px; }
.md-price { font-family: var(--font-d); font-size: 34px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.md-price small { font-size: 13px; color: var(--muted2); font-weight: 400; font-family: var(--font-b); display: block; }
.md-specs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 22px 0; }
.md-specs div { background: var(--panel); padding: 13px 16px; overflow-wrap: anywhere; }
/* Bei ungerader Anzahl fuellt die letzte Zelle beide Spalten, sonst bleibt ein leerer Kasten */
.md-specs div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.md-specs b { display: block; font-family: var(--font-d); font-size: 15px; font-weight: 600; }
.md-specs span { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); }
.md-feats { margin: 6px 0 22px; }
.md-feats summary {
  font-family: var(--font-d); font-weight: 600; font-size: 14.5px; cursor: pointer; color: var(--text);
  padding: 12px 0; border-top: 1px solid var(--line); list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.md-feats summary::-webkit-details-marker { display: none; }
.md-feats summary::after { content: '+'; color: var(--gold); font-size: 20px; transition: transform .3s; }
.md-feats[open] summary::after { transform: rotate(45deg); }
.md-feats ul { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 16px; padding-bottom: 14px; }
.md-feats li { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.md-feats li::before { content: '✓'; color: var(--gold); font-size: 11px; }
.md-ctas { display: grid; gap: 10px; }
.md-note { font-size: 11.5px; color: var(--muted2); margin-top: 14px; }

/* ---------- Digital / Automationen ---------- */
#digital { background: linear-gradient(180deg, var(--bg2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dg-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.dg-card:hover { transform: translateY(-6px); border-color: rgba(177,175,155,.4); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.dg-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: .4s;
}
.dg-card:hover::before { opacity: 1; }
.dg-ico {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft); color: var(--gold); margin-bottom: 20px;
}
.dg-card h3 { font-size: 20px; margin-bottom: 10px; }
.dg-card > p { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }

/* Wizard */
.wiz-step { display: none; }
.wiz-step.on { display: block; animation: fadeup .45s var(--ease); }
.wiz-q { font-family: var(--font-d); font-weight: 600; font-size: 15px; margin-bottom: 13px; }
.wiz-opts { display: flex; flex-wrap: wrap; gap: 9px; }
.wiz-opts button {
  font-size: 13px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line2);
  background: transparent; color: var(--muted); transition: .2s; font-family: var(--font-d);
}
.wiz-opts button:hover { border-color: var(--gold); color: var(--text); }
.wiz-result { font-size: 14px; color: var(--muted); }
.wiz-result b { color: var(--gold); font-size: 22px; font-family: var(--font-d); display: block; margin-bottom: 6px; }
.wiz-reset { background: none; border: 0; color: var(--muted2); font-size: 12.5px; text-decoration: underline; margin-top: 12px; }
.wiz-reset:hover { color: var(--gold); }

/* Finanzierungsrechner */
.fin-row { margin-bottom: 18px; }
.fin-row label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.fin-row label output { color: var(--text); font-weight: 600; font-family: var(--font-d); }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) var(--p, 50%), rgba(177,175,155,.18) var(--p, 50%)) center / 100% 4px no-repeat;
  outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); border: 3px solid #1a1a17; box-shadow: 0 0 0 2px var(--gold); cursor: grab;
}
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 3px solid #1a1a17; box-shadow: 0 0 0 2px var(--gold); cursor: grab;
}
.fin-out {
  background: var(--bg); border: 1px solid rgba(177,175,155,.3); border-radius: 14px;
  padding: 18px 20px; text-align: center; margin-top: 20px;
}
.fin-out b { font-family: var(--font-d); font-size: 30px; color: var(--gold); }
.fin-out span { display: block; font-size: 12px; color: var(--muted2); letter-spacing: .06em; }
.fin-note { font-size: 12px; color: var(--muted2); margin-top: 12px; line-height: 1.5; }

/* Ankauf */
.ank-field { margin-bottom: 12px; }
.ank-field input, .ank-field select {
  width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px;
  color: var(--text); font-family: var(--font-b); font-size: 14px; padding: 12px 14px; outline: none;
  transition: border-color .25s;
}
.ank-field input:focus, .ank-field select:focus { border-color: var(--gold); }
.ank-field input::placeholder { color: var(--muted2); }

/* ---------- Services ---------- */
.sv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; perspective: 1100px; }
.sv-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 26px 24px; transition: transform .3s var(--ease), border-color .3s, background .3s;
  position: relative; overflow: hidden;
}
.sv-card:hover { transform: translateY(-5px); border-color: rgba(177,175,155,.4); background: var(--panel2); }
.sv-card .num {
  font-family: var(--font-d); font-size: 13px; font-weight: 700; color: var(--gold);
  letter-spacing: .1em; display: block; margin-bottom: 14px;
}
.sv-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.sv-card p { font-size: 13.5px; color: var(--muted); }

/* ---------- Galerie ---------- */
#galerie { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gal-scroller {
  display: flex; gap: 20px; overflow-x: auto; padding: 10px 24px 26px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgba(177,175,155,.3) transparent;
  max-width: 1500px; margin: 0 auto;
}
.gal-item {
  flex: 0 0 380px; scroll-snap-align: center; border-radius: var(--radius); overflow: hidden;
  position: relative; cursor: pointer; border: 1px solid var(--line);
  transform-style: preserve-3d; transition: transform .4s var(--ease), border-color .4s;
}
.gal-item:hover { border-color: rgba(177,175,155,.5); }
.gal-item img { width: 100%; height: 260px; object-fit: cover; transition: transform .6s var(--ease); }
.gal-item:hover img { transform: scale(1.07); }
.gal-item .gl {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px;
  background: linear-gradient(180deg, transparent, rgba(6,6,5,.85));
  font-family: var(--font-d); font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text);
}

/* Lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 1600; background: rgba(5,5,4,.94);
  display: flex; align-items: center; justify-content: center; padding: 30px;
  opacity: 0; visibility: hidden; transition: .3s;
}
#lightbox.open { opacity: 1; visibility: visible; }
#lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
#lightbox .lb-close { position: absolute; top: 22px; right: 26px; background: none; border: 0; color: #fff; }
#lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid var(--line2); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: .25s;
}
#lightbox .lb-nav:hover { background: var(--gold); color: var(--on-accent); border-color: var(--gold); }
#lightbox .lb-prev { left: 26px; } #lightbox .lb-next { right: 26px; }

/* ---------- Über uns ---------- */
.ueber-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 60px; align-items: center; }
.ueber-media { position: relative; perspective: 1000px; }
.ueber-media .um-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ueber-media .um-main img { aspect-ratio: 4/3.4; object-fit: cover; width: 100%; }
.ueber-quote {
  position: absolute; right: -18px; bottom: -26px; max-width: 300px;
  background: var(--panel2); border: 1px solid rgba(177,175,155,.35); border-radius: 16px;
  padding: 20px 22px; box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.ueber-quote p { font-family: var(--font-d); font-size: 15px; font-weight: 500; line-height: 1.5; }
.ueber-quote span { display: block; margin-top: 10px; font-size: 12px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.ueber-text p { color: var(--muted); margin-bottom: 16px; }
.ueber-text p strong { color: var(--text); }

/* ---------- Kontakt ---------- */
#kontakt { background: var(--bg2); border-top: 1px solid var(--line); }
.kt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.kt-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; margin-bottom: 20px;
}
.kt-card h3 { font-size: 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 11px; }
.kt-card h3 svg { color: var(--gold); }
.oz-table { width: 100%; border-collapse: collapse; }
.oz-table td { padding: 9px 0; font-size: 14.5px; border-bottom: 1px solid var(--line); color: var(--muted); }
.oz-table tr:last-child td { border-bottom: 0; }
.oz-table td:last-child { text-align: right; color: var(--text); font-weight: 500; }
.oz-table tr.today td { color: var(--gold); font-weight: 600; }
.oz-status { margin-top: 16px; }
.kt-lines { display: grid; gap: 13px; }
.kt-lines a, .kt-lines .kt-line {
  display: flex; align-items: center; gap: 13px; font-size: 15px; color: var(--muted); transition: color .25s;
}
.kt-lines a:hover { color: var(--gold); }
.kt-lines svg { flex: 0 0 18px; color: var(--gold); }
.kt-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kt-form textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px;
  color: var(--text); font-family: var(--font-b); font-size: 14px; padding: 12px 14px; outline: none;
  min-height: 120px; resize: vertical; transition: border-color .25s;
}
.kt-form textarea:focus { border-color: var(--gold); }
.kt-form .fine { font-size: 12px; color: var(--muted2); margin: 10px 0 16px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 60px 0 34px; background: var(--bg); }
.ft-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 46px; }
.ft-brand img { width: 176px; height: auto; margin-bottom: 22px; }
.ft-brand p { color: var(--muted2); font-size: 13.5px; max-width: 280px; }
.ft-col h4 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted2); margin-bottom: 18px; font-weight: 600; }
.ft-col a { display: block; color: var(--muted); font-size: 14.5px; padding: 5px 0; transition: color .25s; }
.ft-col a:hover { color: var(--gold); }
/* Sieht aus wie die Links daneben, ist aber ein Knopf, weil er kein Ziel oeffnet */
.ft-knopf {
  display: block; background: none; border: 0; padding: 5px 0; text-align: left;
  font: inherit; font-size: 14.5px; color: var(--muted); cursor: pointer;
  transition: color .25s;
}
.ft-knopf:hover { color: var(--gold); }
.ft-bottom {
  border-top: 1px solid var(--line); padding-top: 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted2);
}
.ft-social { display: flex; gap: 12px; }
.ft-social a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2);
  display: flex; align-items: center; justify-content: center; color: var(--muted); transition: .25s;
}
.ft-social a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }

/* ---------- Assistent ---------- */
#assist-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 1200;
  width: 60px; height: 60px; border-radius: 50%; border: 1px solid rgba(177,175,155,.5);
  background: linear-gradient(135deg, #26261f, #1e1e1b); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 0 rgba(177,175,155,.35);
  animation: assistpulse 3s infinite; transition: transform .3s var(--ease);
}
#assist-btn:hover { transform: scale(1.08); }
@keyframes assistpulse {
  0% { box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 0 rgba(177,175,155,.35); }
  60% { box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 16px rgba(177,175,155,0); }
  100% { box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 0 rgba(177,175,155,0); }
}
#assist-btn .ab-dot {
  position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--green); border: 2.5px solid var(--bg);
}
#assist {
  position: fixed; right: 22px; bottom: 96px; z-index: 1200;
  width: min(370px, calc(100vw - 40px));
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
  overflow: hidden; transform-origin: bottom right;
  transform: scale(.92) translateY(14px); opacity: 0; visibility: hidden;
  transition: .35s var(--ease);
}
#assist.open { transform: none; opacity: 1; visibility: visible; }
.as-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  background: linear-gradient(135deg, #26261f, #1a1a17); border-bottom: 1px solid var(--line);
}
.as-head .as-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center; color: var(--gold);
}
.as-head b { font-family: var(--font-d); font-size: 14.5px; display: block; }
.as-head span { font-size: 11.5px; color: var(--green); display: flex; align-items: center; gap: 6px; }
.as-head span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.as-close { margin-left: auto; background: none; border: 0; color: var(--muted); padding: 6px; }
.as-close:hover { color: var(--text); }
.as-body { padding: 16px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.as-msg {
  max-width: 86%; padding: 11px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--panel2); font-size: 13.5px; line-height: 1.5; color: var(--text);
  animation: fadeup .4s var(--ease);
}
.as-msg.user { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--gold-soft); color: var(--gold); }
.as-typing { display: inline-flex; gap: 4px; padding: 13px 15px; }
.as-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted2); animation: blink 1.2s infinite; }
.as-typing i:nth-child(2) { animation-delay: .2s; } .as-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.as-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 16px; }
.as-quick button {
  font-size: 12.5px; font-family: var(--font-d); font-weight: 500;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line2);
  background: transparent; color: var(--muted); transition: .2s;
}
.as-quick button:hover { border-color: var(--gold); color: var(--gold); }
.as-input {
  display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.as-input input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line2); border-radius: 999px;
  color: var(--text); font-family: var(--font-b); font-size: 13.5px; padding: 10px 15px; outline: none;
  transition: border-color .25s;
}
.as-input input:focus { border-color: var(--gold); }
.as-input input::placeholder { color: var(--muted2); }
.as-input button {
  flex: 0 0 40px; height: 40px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.as-input button:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(177,175,155,.5); }
/* Fahrzeug-Treffer im Chat */
.as-cars { display: grid; gap: 7px; margin-top: 9px; }
.as-car {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: rgba(255,255,255,.05); border: 1px solid var(--line2); border-radius: 11px;
  padding: 8px 10px; color: var(--text); transition: border-color .25s, background .25s, transform .25s;
}
.as-car:hover { border-color: var(--gold); background: rgba(177,175,155,.2); transform: translateX(3px); }
.as-car img { width: 52px; height: 38px; object-fit: cover; border-radius: 7px; flex: 0 0 52px; }
.as-car .asc-ph {
  width: 52px; height: 38px; border-radius: 7px; flex: 0 0 52px;
  background: linear-gradient(145deg, #26261f, #1a1a17);
  display: flex; align-items: center; justify-content: center;
}
.as-car b { display: block; font-family: var(--font-d); font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.as-car span { font-size: 11.5px; color: var(--muted); }
.as-car .asc-p { margin-left: auto; color: var(--gold); font-family: var(--font-d); font-weight: 700; font-size: 12.5px; white-space: nowrap; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 80px); z-index: 1700;
  background: var(--panel2); border: 1px solid rgba(177,175,155,.4); color: var(--text);
  padding: 13px 22px; border-radius: 999px; font-size: 13.5px;
  transition: transform .4s var(--ease); box-shadow: 0 16px 50px rgba(0,0,0,.5);
}
#toast.show { transform: translate(-50%, 0); }

/* ---------- Unterseiten (Impressum/Datenschutz) ---------- */
.legal { padding: 150px 24px 90px; max-width: 748px; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 10px; }
.legal .upd { color: var(--muted2); font-size: 13px; margin-bottom: 40px; }
.legal h2 { font-size: 21px; margin: 38px 0 12px; color: var(--gold); }
.legal h3 { font-size: 16.5px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--gold); }
.legal .backlink { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px; color: var(--muted); font-size: 14px; }
.legal .backlink:hover { color: var(--gold); }

/* ============================================================
   3D, Glanz und Tiefe
   ============================================================ */

/* Lichtreflex, der dem Zeiger folgt */
.car-card, .sv-card, .dg-card, .kt-card { position: relative; }
.car-card::after, .sv-card::after, .dg-card::after, .kt-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(177,175,155,.20), transparent 62%);
  opacity: 0; transition: opacity .4s var(--ease); z-index: 1;
}
.car-card:hover::after, .sv-card:hover::after, .dg-card:hover::after, .kt-card:hover::after { opacity: 1; }
.car-card > *, .sv-card > *, .dg-card > *, .kt-card > * { position: relative; z-index: 2; }

/* Tiefe schon im Ruhezustand, damit die Seite auch ohne Zeiger plastisch wirkt */
.car-card, .sv-card, .dg-card {
  box-shadow: 0 10px 30px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.07);
}
.dg-card::before { opacity: .45; }

/* Fahrzeugkarten: Tiefe beim Schweben */
.car-card { transform-style: preserve-3d; }
.car-card .cc-price, .car-card .cc-tag {
  transition: transform .4s var(--ease), box-shadow .4s;
}
.car-card:hover .cc-price {
  transform: translateZ(38px) scale(1.06);
  box-shadow: 0 12px 28px rgba(6,6,5,.6), 0 0 26px rgba(177,175,155,.45);
}
.car-card:hover .cc-tag { transform: translateZ(24px); }
.car-card .cc-img::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(18,18,17,.55));
}

/* Digital-Karten: Icon hebt ab */
.dg-ico { transition: transform .45s var(--ease), box-shadow .45s, background .45s; }
.dg-card:hover .dg-ico {
  transform: translateY(-4px) rotate(-6deg) scale(1.08);
  background: rgba(177,175,155,.35);
  box-shadow: 0 12px 30px rgba(177,175,155,.4);
}

/* Service-Karten: Nummer wird zur Tiefenebene */
.sv-card { transform-style: preserve-3d; transition: transform .4s var(--ease), border-color .4s, background .4s, box-shadow .4s; }
.sv-card:hover { box-shadow: 0 22px 50px rgba(6,6,5,.55); }
.sv-card .num { transition: transform .4s var(--ease), color .4s; }
.sv-card:hover .num { transform: translateZ(26px) scale(1.15); }

/* Buttons: Glanz-Sweep */
.btn-gold { position: relative; overflow: hidden; isolation: isolate; }
.btn-gold::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.4) 50%, transparent 68%);
  transform: translateX(-120%);
  transition: none;
}
/* Transition nur im Hover, sonst laeuft der Glanz beim Verlassen rueckwaerts zurueck */
.btn-gold:hover::before { transform: translateX(120%); transition: transform .7s var(--ease); }

/* Galerie: 3D-Coverflow. Deckkraft laeuft ueber --cf-op, damit die Einblendung nicht ueberschrieben wird */
.gal-scroller { perspective: 1400px; }
.gal-item {
  transform-style: preserve-3d;
  transition: transform .12s linear, border-color .4s, box-shadow .45s;
  will-change: transform;
}
.gal-item.in, .gal-scroller .gal-item:not(.rv) { opacity: var(--cf-op, 1); }
.gal-item:hover { box-shadow: 0 26px 60px rgba(6,6,5,.6); }

/* Ticker mit leichter Perspektive */
#ticker { perspective: 700px; }
.ticker-track { transform: rotateX(9deg); transform-origin: center bottom; }

/* Abschnittsglanz oben */
.sec-tag::after {
  content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 12px var(--gold); margin-left: 2px;
}
.sec-head h2 { text-shadow: 0 2px 30px rgba(6,6,5,.5); }

/* Standort- und Ueber-uns-Bilder: Rahmenglanz */
.st-card, .um-main { position: relative; }
.st-card::after, .um-main::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -60px 80px -60px rgba(177,175,155,.5);
}

section[id], #ticker, #ankauf { scroll-margin-top: 80px; }

/* Aktive Fahrzeug-Finder-Filter */
.inv-active { margin-top: -22px; }
.inv-active-label { font-size: 13px; color: var(--muted); margin-right: 4px; }

/* Sichtbare Fokus-Zustaende */
select.inv-sort:focus-visible { border-color: var(--gold); outline: none; }
.inv-search:focus-within { border-color: var(--gold); }
a:focus-visible, button:focus-visible, .car-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Ueberschrift der Ueber-uns-Sektion, analog zur Standort-Sektion */
.ueber-h2 { font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 20px; }

/* Chat-Knopf: unter dem Mobilmenue und ohne Kollision mit Inhalt */
body.menu-open #assist-btn { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1300px) {
  .scroll-hint { display: none; }
}
@media (max-width: 1180px) {
  /* Unten rechts Platz fuer den schwebenden Knopf freihalten */
  footer { padding-bottom: 100px; }
  .inv-foot, .inv-stand { padding-right: 76px; }
}
@media (hover: none), (max-width: 940px) {
  /* Touch: Bedienelemente auf Daumengroesse */
  .chip { min-height: 44px; padding: 11px 18px; }
  .wiz-opts button { min-height: 44px; padding: 11px 16px; }
  .as-quick button { min-height: 40px; padding: 10px 15px; }
  .inv-search { min-height: 44px; }
  select.inv-sort { min-height: 44px; }
  .ft-col a { padding: 10px 0; }
  .kt-lines a, .kt-lines .kt-line { padding: 7px 0; }
  #burger { width: 44px; height: 44px; }
  .as-input input, .as-input button { min-height: 44px; }
  .as-input button { flex-basis: 44px; }
  #lightbox .lb-close { padding: 10px; }
  input[type=range] { height: 44px; }
  input[type=range]::-webkit-slider-thumb { width: 24px; height: 24px; }
  input[type=range]::-moz-range-thumb { width: 20px; height: 20px; }
  /* iOS zoomt bei Feldern unter 16px in die Seite hinein */
  input, select, textarea { font-size: 16px !important; }
}
@media (max-width: 1080px) {
  .sv-grid { grid-template-columns: repeat(2, 1fr); }
  .dg-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .ft-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 940px) {
  nav.menu, .nav-cta .btn:not(.btn-back), .nav-cta .status-chip { display: none; }
  #burger { display: block; }
  .standort-grid, .ueber-grid, .kt-grid { grid-template-columns: 1fr; gap: 44px; }
  .st-card.back { right: 6px; bottom: -30px; }
  .md-grid { grid-template-columns: 1fr; }
  .md-gallery { position: relative; }
  .hero-meta .hm { padding-right: 26px; margin-right: 26px; }
  .ueber-quote { right: 6px; bottom: -20px; }
}
@media (max-width: 940px) {
  /* Assistent darf nie ueber den Bildschirm hinauslaufen */
  #assist { max-height: calc(100svh - 110px); display: flex; flex-direction: column; }
  .as-body { max-height: none; flex: 1 1 auto; }
  #assist-btn { width: 52px; height: 52px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  /* Kennzahlen im Hero kompakt und gleich breit */
  .hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 40px; }
  .hero-meta .hm { padding: 12px 10px 10px; text-align: center; }
  .hero-meta .hm b { font-size: 24px; }
  .hero-meta .hm > span { font-size: 9.5px; letter-spacing: .05em; line-height: 1.35; display: block; }
}
@media (max-width: 640px) {
  .sec { padding: 76px 0; }
  .oz-table td { font-size: 13.5px; }
  .oz-table td:last-child { white-space: nowrap; }
  .inv-foot, .inv-stand { padding-right: 0; }
  .sv-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 130px 20px 70px; }
  .hero-meta .hm b { font-size: 24px; }
  .scroll-hint { display: none; }
  .gal-item { flex-basis: 300px; }
  .gal-item img { height: 210px; }
  .md-info { padding: 26px 22px; }
  .md-specs, .md-feats ul { grid-template-columns: minmax(0, 1fr); }
  .kt-form .row2 { grid-template-columns: 1fr; }
  .ft-bottom { justify-content: center; text-align: center; }
  .inv-search { max-width: none; margin-left: 0; flex-basis: 100%; order: 10; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Unterseiten: eigener Seitenkopf, Galerie-Raster, Abschnitte der Einzelseiten
   ========================================================================== */

/* ---------- Seitenkopf der Unterseiten ---------- */
.page-head {
  position: relative; overflow: hidden;
  padding: 168px 0 74px;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.page-head .ph-bg { position: absolute; inset: 0; z-index: -2; }
.page-head .ph-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.page-head::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(18,18,17,.94) 0%, rgba(18,18,17,.72) 46%, rgba(18,18,17,.97) 100%),
    linear-gradient(90deg, rgba(18,18,17,.9) 0%, rgba(18,18,17,.3) 62%, rgba(18,18,17,.55) 100%);
}
.page-head::after {
  content: ''; position: absolute; left: 50%; top: -220px; width: 780px; height: 480px;
  transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(177,175,155,.16), transparent 72%);
}
.ph-inner { position: relative; }
.page-head h1 {
  font-size: clamp(34px, 5.6vw, 66px); line-height: 1.03; text-wrap: balance;
  text-shadow: 0 4px 40px rgba(6,6,5,.6);
}
.ph-lead { margin-top: 18px; max-width: 620px; color: var(--muted); font-size: 17px; line-height: 1.65; }

/* ---------- Abschnittskopf mit Knopf oder Zaehler rechts ---------- */
.sec-head.split {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
}
.sec-head.split > div { flex: 1 1 420px; }
.sec-head.split > .btn, .sec-head.split > .live-pill { flex: 0 0 auto; margin-bottom: 6px; }

/* ---------- Galerie als Raster (eigene Seite) ---------- */
.gal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  perspective: 1400px;
}
.gal-tile {
  position: relative; overflow: hidden; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--line); background: var(--panel);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
}
.gal-tile img { width: 100%; height: 250px; object-fit: cover; display: block; transition: transform .7s var(--ease); }
.gal-tile:hover { transform: translateY(-6px); border-color: rgba(177,175,155,.5); box-shadow: 0 26px 60px rgba(6,6,5,.6); }
.gal-tile:hover img { transform: scale(1.07); }
.gal-tile .gl {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  font-family: var(--font-d); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text); text-shadow: 0 2px 14px rgba(6,6,5,.9);
}
.gal-tile::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(6,6,5,.78) 100%);
}
.gal-hinweis { margin-top: 34px; text-align: center; font-size: 13px; color: var(--muted2); }

/* ---------- Finanzierung und Ankauf: zwei Spalten ---------- */
.fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.fin-text h2 { font-size: clamp(27px, 3.4vw, 40px); margin-bottom: 28px; text-wrap: balance; }
.fin-hinweis { margin-top: 26px; font-size: 12.5px; color: var(--muted2); line-height: 1.6; }
.dg-grid.dg-single { grid-template-columns: minmax(0, 620px); justify-content: center; }

/* Nummerierter Ablauf */
.ablauf { list-style: none; counter-reset: schritt; display: grid; gap: 22px; }
.ablauf li {
  counter-increment: schritt; position: relative; padding-left: 58px;
}
.ablauf li::before {
  content: counter(schritt, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 13px; font-weight: 600; color: var(--gold);
  border: 1px solid var(--line2); background: var(--panel);
}
.ablauf li b { display: block; font-size: 16.5px; margin-bottom: 5px; }
.ablauf li span { color: var(--muted); font-size: 14.5px; line-height: 1.62; }

/* Pluspunkte beim Ankauf */
.ank-plus { display: grid; gap: 12px; margin: 28px 0 30px; }
.ank-plus div { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-size: 14.5px; }
.ank-plus div svg { flex: 0 0 20px; margin-top: 2px; color: var(--gold); }

/* ---------- Anfahrt ---------- */
.anfahrt-karte {
  position: relative; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
}
.anfahrt-karte > img { width: 100%; height: clamp(280px, 42vw, 460px); object-fit: cover; display: block; }
.anfahrt-box {
  position: absolute; left: 26px; bottom: 26px; z-index: 2;
  background: rgba(18,18,17,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line2); border-radius: 14px; padding: 22px 24px;
  display: grid; gap: 10px; max-width: 320px;
}
.anfahrt-box b { font-family: var(--font-d); font-size: 17px; }
.anfahrt-box span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.anfahrt-box .btn { margin-top: 6px; justify-content: center; }

/* ---------- Abschluss-Band ---------- */
.cta-band { padding: 0 0 110px; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r);
  background:
    radial-gradient(120% 180% at 12% 0%, rgba(177,175,155,.13), transparent 62%),
    linear-gradient(150deg, var(--panel2), var(--panel));
  padding: 46px 48px;
}
.cta-inner h2 { font-size: clamp(24px, 3vw, 34px); text-wrap: balance; }
.cta-inner p { margin-top: 12px; color: var(--muted); font-size: 15.5px; max-width: 520px; }
.cta-knoepfe { display: flex; gap: 13px; flex-wrap: wrap; }

/* ---------- Einwilligung ----------
   Bewusst eine Leiste am unteren Rand statt eines Sperrbildschirms: Die Seite
   speichert nichts ohne Zustimmung, es gibt also nichts zu blockieren. Beide
   Knoepfe sind gleich gross und gleich leicht erreichbar, Ablehnen darf nicht
   schwerer sein als Zustimmen. */
#consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2200;
  background: rgba(18,18,17,.93);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line2);
  box-shadow: 0 -18px 60px rgba(0,0,0,.5);
  transform: translateY(100%);
  transition: transform .5s var(--ease);
}
#consent.sichtbar { transform: none; }
.cs-inner {
  max-width: 1240px; margin: 0 auto; padding: 22px 24px 24px;
  display: flex; align-items: center; gap: 34px; flex-wrap: wrap;
}
.cs-text { flex: 1 1 460px; }
.cs-text h2 {
  font-family: var(--font-d); font-size: 16px; font-weight: 600;
  letter-spacing: .02em; margin-bottom: 8px;
}
.cs-text p { color: var(--muted); font-size: 13.5px; line-height: 1.6; max-width: 760px; }
.cs-text p strong { color: var(--text); font-weight: 600; }
.cs-links { margin-top: 10px; display: flex; gap: 12px; align-items: center; }
.cs-links a { color: var(--gold); font-size: 13px; }
.cs-links a:hover { text-decoration: underline; }
.cs-links span { color: var(--muted2); }
.cs-knoepfe { flex: 0 0 auto; display: flex; gap: 12px; flex-wrap: wrap; }
.cs-knoepfe .btn { min-width: 178px; justify-content: center; }
/* Der schwebende Knopf des Beraters wuerde sonst auf der Leiste liegen */
body.consent-offen #assist-btn, body.consent-offen #assist { display: none; }

@media (max-width: 860px) {
  .cs-inner { padding: 18px 20px 20px; gap: 18px; }
  .cs-text p { font-size: 13px; }
  .cs-knoepfe { width: 100%; }
  .cs-knoepfe .btn { flex: 1 1 140px; min-width: 0; }
}

/* ---------- Kopfzeile: sieben Menuepunkte brauchen mehr Luft ---------- */
/* Der Status-Chip ist der laengste Teil und weicht als Erstes. Seine Angabe
   steht auf der Kontaktseite ohnehin vollstaendig. */
@media (max-width: 1400px) { .nav-cta .status-chip { display: none; } }
@media (max-width: 1160px) { nav.menu { gap: 18px; } nav.menu a { font-size: 12.8px; } }
@media (max-width: 1080px) {
  nav.menu, .nav-cta .btn:not(.btn-back) { display: none; }
  #burger { display: block; }
}

/* ---------- Responsive der neuen Blöcke ---------- */
@media (max-width: 1080px) {
  .gal-grid { grid-template-columns: repeat(2, 1fr); }
  .fin-grid { grid-template-columns: 1fr; gap: 40px; max-width: 620px; margin: 0 auto; }
}
@media (max-width: 940px) {
  .page-head { padding: 138px 0 58px; }
  .cta-inner { padding: 36px 30px; }
}
@media (max-width: 640px) {
  .page-head { padding: 124px 0 50px; }
  .ph-lead { font-size: 15.5px; }
  .gal-grid { grid-template-columns: 1fr; gap: 16px; }
  .gal-tile img { height: 230px; }
  .cta-band { padding-bottom: 76px; }
  .cta-inner { padding: 30px 22px; }
  .cta-knoepfe { width: 100%; }
  .cta-knoepfe .btn { flex: 1 1 100%; justify-content: center; }
  .anfahrt-box { position: static; max-width: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .ablauf li { padding-left: 50px; }
  .ablauf li::before { width: 34px; height: 34px; font-size: 12px; }
}
