/* ==========================================================
   DBG International Cars – Stylesheet
   ========================================================== */

:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --bg-2: #121212;
  --line: #262626;
  --line-strong: #3a3a3a;
  --text: #ececec;
  --muted: #9b9b9b;
  --accent: #f2f2f2;
  --accent-hover: #ffffff;
  --danger: #e5604f;
  --success: #6fbf73;
  --container: 1200px;
  --header-h: 80px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 6.5vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.muted { color: var(--muted); }

.section { padding: clamp(72px, 10vw, 130px) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-2); }

/* Zweispaltiger Abschnittskopf: Überschrift links, Text rechts */
.section__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.section__head p { margin: 0; color: var(--muted); max-width: 480px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: 1.05em 1.9em;
  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--accent); color: #0b0b0b; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--line { border-color: var(--line-strong); color: var(--text); }
.btn--line:hover { border-color: var(--text); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.header.is-scrolled,
.header--solid { background: var(--bg); border-color: var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a { text-decoration: none; font-size: .93rem; color: var(--muted); transition: color .15s ease; }
.nav a:hover { color: var(--text); }
.nav .nav__cta { color: var(--text); font-weight: 600; padding-bottom: 2px; border-bottom: 1px solid var(--accent); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform .2s ease, top .2s ease;
  content: "";
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--header-h);
  background:
    linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,.8) 60%, var(--bg) 100%),
    url("../img/hero-bg.jpg") 70% center / cover no-repeat;
}
.hero__content { padding: 60px 0 72px; max-width: 960px; }
.hero h1 span { display: block; margin-top: .45em; font-size: .5em; letter-spacing: -.01em; color: var(--muted); font-weight: 400; }
.hero__lead { font-size: 1.15rem; color: #cfcfcf; max-width: 560px; margin: 32px 0 40px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.facts div { padding: 26px 24px 30px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts strong { display: block; font-size: 1rem; font-weight: 600; }
.facts span { font-size: .92rem; color: var(--muted); }

/* ---------- Leistungen (Liste mit Linien) ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 90px 1fr 1.3fr;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.row__num { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.row p { margin: 0; color: var(--muted); }

/* ---------- Ablauf ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; list-style: none; margin: 0; padding: 0; }
.steps li { border-top: 2px solid var(--line-strong); padding-top: 28px; }
.steps li:first-child { border-top-color: var(--accent); }
.steps__num { display: block; font-size: 3.2rem; font-weight: 300; line-height: 1; color: var(--muted); margin-bottom: 26px; }
.steps h3 { margin-bottom: 10px; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- Was wir kaufen ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
.split__text p { color: var(--muted); max-width: 460px; }
.split__text h2 { margin-bottom: 28px; }
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  border-top: 1px solid var(--line);
}
.list li { padding: 16px 0; border-bottom: 1px solid var(--line); }

/* ---------- Formular ---------- */
.sell { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.sell__info { position: sticky; top: calc(var(--header-h) + 32px); }
.sell__info h2 { margin-bottom: 28px; }
.sell__info p { color: var(--muted); }
.sell__contact { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); font-size: .95rem; }
.sell__contact p { margin: 0 0 4px; }
.sell__contact a { text-decoration: none; color: var(--text); }
.sell__contact a:hover { color: var(--accent); }

.form fieldset { border: 0; padding: 0; margin: 0 0 48px; }
.form legend {
  width: 100%;
  padding: 0 0 14px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 24px; }
.form-grid .full { grid-column: 1 / -1; }

.field label { display: block; font-size: .88rem; margin-bottom: 8px; color: #cfcfcf; }
.field label .req { color: var(--accent); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .85em 1em;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #151515;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  transition: border-color .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9b9b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  background-size: 16px;
  padding-right: 2.8em;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #5f5f5f; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--danger); }
.field__error { display: none; color: var(--danger); font-size: .82rem; margin-top: 6px; }
.field.is-invalid .field__error { display: block; }

.checkbox { display: flex; gap: 14px; align-items: flex-start; font-size: .9rem; color: var(--muted); cursor: pointer; margin-bottom: 32px; }
.checkbox input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.checkbox a { color: var(--text); }
.checkbox.is-invalid { color: var(--danger); }

.details { animation: details-in .2s ease; }
.details[hidden] { display: none; }
@keyframes details-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.upload {
  position: relative;
  display: block;
  padding: 28px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: #151515;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.upload:hover,
.upload.is-dragover { border-color: var(--accent); background: #191919; }
.upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload__text { display: block; color: #cfcfcf; }
.upload__text strong { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.upload__hint { display: block; margin-top: 6px; font-size: .82rem; color: var(--muted); }
.upload__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.upload__list:empty { display: none; }
.upload__list li { position: relative; aspect-ratio: 1; border: 1px solid var(--line); background: #151515; overflow: hidden; }
.upload__list img { width: 100%; height: 100%; object-fit: cover; }
.upload__list button {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 2px; background: rgba(0,0,0,.75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
#bilder-error:not(:empty) { display: block; }
.field label .muted { color: var(--muted); font-weight: 400; }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: .88rem; color: var(--muted); margin: 18px 0 0; }

.form-status { display: none; margin-top: 20px; padding: 16px 18px; border-left: 2px solid; font-size: .95rem; }
.form-status.is-success { display: block; border-color: var(--success); color: var(--success); background: rgba(111, 191, 115, .06); }
.form-status.is-error { display: block; border-color: var(--danger); color: var(--danger); background: rgba(229, 96, 79, .06); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 48px 24px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: var(--muted);
  transition: transform .2s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details p { margin: 0; padding: 0 48px 26px 0; color: var(--muted); }

/* ---------- Kontakt ---------- */
.contact { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.contact > div { padding: 32px 32px 0 0; }
.contact > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.contact h3 { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.contact p { margin: 0; }
.contact a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.contact a:hover { border-color: var(--accent); }
.contact .big { font-size: 1.35rem; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: .88rem; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__logo { height: 36px; width: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 28px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- Rechtstexte ---------- */
.legal { padding: calc(var(--header-h) + 72px) 0 110px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 48px; }
.legal h2 { font-size: 1.2rem; margin: 2.6em 0 .8em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.legal h3 { font-size: 1rem; margin: 1.8em 0 .6em; }
.legal p,
.legal li { color: #c9c9c9; }
.legal a { color: var(--text); }
.legal address { font-style: normal; color: #c9c9c9; }
.legal .note { color: var(--muted); font-size: .9rem; margin-top: 3em; }

/* ---------- Responsive ---------- */
.row--compact { grid-template-columns: 50px 1fr; gap: 8px 16px; padding: 22px 0; }
.row--compact p { grid-column: 2; }

@media (max-width: 1024px) {
  .sell { grid-template-columns: 1fr; }
  .sell__info { position: static; }
  .row { grid-template-columns: 60px 1fr; }
  .row p { grid-column: 2; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .header__logo img { height: 36px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1rem; color: var(--text); }
  .nav .nav__cta { border-bottom: 1px solid var(--line); color: var(--accent); }
  .nav-open .nav { display: flex; }
  .nav-open .header { background: var(--bg); border-color: var(--line); }

  .section__head,
  .split { grid-template-columns: 1fr; gap: 20px; }
  .split { gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .contact { grid-template-columns: 1fr; }
  .contact > div,
  .contact > div + div { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts div,
  .facts div + div { padding: 18px 0; border-left: 0; }
  .facts div + div { border-top: 1px solid var(--line); }
  .form-grid,
  .list { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .row { grid-template-columns: 1fr; gap: 6px; padding: 24px 0; }
  .row p { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Danke-Seite ---------- */
.thanks { min-height: 72vh; }
.thanks p { font-size: 1.1rem; max-width: 560px; }
