/* ==========================================================================
   premium-template — Autaxo webgen
   Vanilla CSS design system. Brand accent + fonts are injected at generation
   time (#b5822e / 'Inter', sans-serif / 'Inter', sans-serif — CSS-safe tokens).
   Web font is served from the central webgen asset CDN (no external trackers).
   ========================================================================== */

/* --- Web font (central webgen asset CDN — first-party, no cookies) --------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://webgenassets.garage.infra.autaxo.de/fonts/inter/inter-latin-wght-normal.woff2') format('woff2');
}

/* --- Design tokens -------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --accent: #b5822e;
  /* Darkened accent for text-on-light and white-text-on-accent so contrast meets
     WCAG AA (the raw accent — e.g. the default #d97706 — is only ~3.2:1 on white). */
  --accent-strong: color-mix(in srgb, var(--accent) 72%, #000);
  /* Lightened accent for accent-as-text on dark surfaces (hero, dark scheme). */
  --accent-soft: color-mix(in srgb, var(--accent) 55%, #fff);
  /* Role token: accent-colored TEXT on the current scheme's surfaces — strong on
     light, remapped to soft in the dark block below. */
  --accent-text: var(--accent-strong);
  --accent-fg: #ffffff;

  --font-heading: 'Inter', sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: 'Inter', sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --ink: #0f172a;      /* slate-900 — headings */
  --body: #475569;     /* slate-600 — body text */
  --muted: #64748b;    /* slate-500 */
  --line: #e2e8f0;     /* slate-200 — borders */
  --bg: #ffffff;
  --bg-soft: #f8fafc;  /* slate-50 — alt sections */
  --bg-dark: #0f172a;  /* slate-900 — dark sections/footer */
  --bg-dark-soft: #1e293b;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, .10), 0 8px 10px -6px rgba(15, 23, 42, .06);
  --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, .25);

  /* Web-component theming (inherits through each widget's shadow DOM) */
  --autaxo-inventory-bg: transparent;
  --autaxo-inventory-text: var(--ink);
  --autaxo-inventory-title: var(--ink);
  --autaxo-inventory-muted: var(--muted);
  --autaxo-inventory-price-text: var(--ink);
  --autaxo-inventory-card-bg: var(--bg);
  --autaxo-inventory-card-hover-border: var(--accent);
  --autaxo-inventory-image-bg: var(--bg-soft);
  --autaxo-inventory-header-bg: transparent;
  --autaxo-inventory-input-bg: var(--bg);
  --autaxo-inventory-input-border: var(--line);
  --autaxo-inventory-input-text: var(--ink);
  --autaxo-inventory-input-focus: var(--accent-strong);
  --autaxo-inventory-btn-border: var(--line);
  --autaxo-inventory-btn-text: var(--ink);
  --autaxo-inventory-btn-hover-bg: var(--bg-soft);
  --autaxo-inventory-table-border: var(--line);

  --autaxo-detail-bg: var(--bg);
  --autaxo-detail-text: var(--ink);
  --autaxo-detail-muted: var(--muted);
  --autaxo-detail-accent: var(--accent-strong);
  --autaxo-detail-accent-fg: var(--accent-fg);
  --autaxo-detail-border: var(--line);
  --autaxo-detail-image-bg: var(--bg-soft);
  --autaxo-detail-price-text: var(--ink);

  --autaxo-contact-bg: transparent;
  --autaxo-contact-fg: var(--ink);
  --autaxo-contact-muted: var(--muted);
  --autaxo-contact-accent: var(--accent-strong);
  --autaxo-contact-accent-fg: var(--accent-fg);
  --autaxo-contact-border: var(--line);
  --autaxo-contact-border-focus: var(--accent-strong);
  --autaxo-contact-field-bg: var(--bg);
  --autaxo-inventory-font: var(--font-body);
  --autaxo-detail-font: var(--font-body);
  --autaxo-contact-font: var(--font-body);
  --autaxo-radius: var(--radius-sm);
}

/* --- Dark scheme (auto via OS preference; no JS, no storage) ---------------- */
/* Only the semantic tokens are remapped — the whole page AND the Shadow-DOM
   widgets (whose --autaxo-* mappings reference these tokens) follow. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f5f9;
    --body: #cbd5e1;
    --muted: #94a3b8;
    --line: #26334a;
    --bg: #0b1220;
    --bg-soft: #101a2e;
    --bg-dark: #050b18;
    --bg-dark-soft: #0f172a;

    /* Accent text needs the LIGHT variant on dark surfaces. */
    --accent-text: var(--accent-soft);
    --autaxo-inventory-input-focus: var(--accent-soft);
    --autaxo-contact-border-focus: var(--accent-soft);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, .55), 0 8px 10px -6px rgba(0, 0, 0, .45);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, .7);
  }
  /* Dealer logos are often dark-on-transparent — keep them legible on the dark
     header with a subtle light chip. */
  .brand img { background: #ffffff; border-radius: 8px; padding: 4px 8px; }
}

/* --- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--ink); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { text-wrap: pretty; }
strong { color: var(--ink); font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --- Layout --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #cbd5e1; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.narrow { max-width: 760px; }
.center { text-align: center; margin-inline: auto; }

/* --- Eyebrow + section heads ---------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; }
.section-head p { margin-top: 14px; font-size: 1.1rem; color: var(--muted); }
.lead { font-size: 1.18rem; color: var(--muted); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent-strong); color: var(--accent-fg); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent-strong) 55%, transparent); }
.btn--primary:hover { box-shadow: 0 12px 26px -6px color-mix(in srgb, var(--accent-strong) 60%, transparent); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn--light { background: #fff; color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--ghost-light:hover { background: rgba(255,255,255,.10); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-heading); font-weight: 600; font-size: .98rem; color: var(--ink);
  padding: 10px 14px; border-radius: 8px; transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--accent-text); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--accent-text); }
.nav .btn { padding: 11px 20px; }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 16px var(--gutter) 24px;
    box-shadow: var(--shadow-md); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease;
  }
  .nav a { padding: 13px 12px; font-size: 1.05rem; }
  .nav .btn { margin-top: 8px; }
  .nav-cta { margin-left: 0; }
  body.nav-open .nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(15,23,42,.2);
}
.hero__inner { position: relative; padding-block: clamp(90px, 16vw, 168px); max-width: 720px; }
.hero .eyebrow { color: var(--accent-soft); }
.hero h1 { color: #fff; }
.hero__tagline { margin-top: 20px; font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: #e2e8f0; max-width: 560px; }
.hero .btn-row { margin-top: 34px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 56px); margin-top: 48px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.15); }
.hero__stat b { display: block; font-family: var(--font-heading); font-size: 1.9rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hero__stat span { font-size: .92rem; color: #cbd5e1; }

/* --- Hero slider ---------------------------------------------------------- */
.hero__slider { position: absolute; inset: 0; z-index: -3; }
.hero__slider img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 60%;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero__slider img.active { opacity: 1; }

/* --- Trust bar ------------------------------------------------------------ */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
.trust__item { display: flex; gap: 14px; align-items: flex-start; }
.trust__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); display: grid; place-items: center; }
.trust__icon svg { width: 22px; height: 22px; }
.trust__item h3 { font-size: 1.02rem; margin-bottom: 2px; }
.trust__item p { font-size: .95rem; color: var(--muted); }

/* --- Featured inventory --------------------------------------------------- */
.inventory-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.inventory-head .section-head { margin-bottom: 0; }

/* --- Services ------------------------------------------------------------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.service-box {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.service-box::before {
  content: ""; display: block; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l1.5-4.5A2 2 0 0 1 8.4 7h7.2a2 2 0 0 1 1.9 1.5L19 13'/%3E%3Cpath d='M4 13h16v4a1 1 0 0 1-1 1h-1a2 2 0 0 1-4 0h-4a2 2 0 0 1-4 0H5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E") center / 24px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l1.5-4.5A2 2 0 0 1 8.4 7h7.2a2 2 0 0 1 1.9 1.5L19 13'/%3E%3Cpath d='M4 13h16v4a1 1 0 0 1-1 1h-1a2 2 0 0 1-4 0h-4a2 2 0 0 1-4 0H5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E") center / 24px no-repeat;
  background-color: var(--accent);
}
.service-title { font-size: 1.15rem; margin-bottom: 8px; }
.service-text { font-size: .97rem; color: var(--muted); }

/* --- Split (about / feature) --------------------------------------------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.split__body p + p { margin-top: 16px; }
.split__body .btn-row { margin-top: 28px; }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.checklist li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 999px; margin-top: 2px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* --- Stats band ----------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; text-align: center; }
.stats__item b { display: block; font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.stats__item span { color: var(--muted); font-weight: 500; }

/* --- CTA band ------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--bg-dark); color: #fff; padding: clamp(40px, 6vw, 68px); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(1000px circle at 100% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 55%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; max-width: 620px; }
.cta-band p { margin-top: 14px; color: #cbd5e1; max-width: 560px; }
.cta-band .btn-row { margin-top: 30px; }

/* --- Contact -------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ci { flex: none; width: 42px; height: 42px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); display: grid; place-items: center; }
.contact-list .ci svg { width: 20px; height: 20px; }
.contact-list dt { font-family: var(--font-heading); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-list dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; font-style: normal; }
.contact-list a { color: var(--ink); }
.contact-list a:hover { color: var(--accent-text); }
.hours { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.hours h3 { font-size: .95rem; margin-bottom: 12px; }
.hours table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours td { padding: 5px 0; color: var(--body); }
.hours td:last-child { text-align: right; color: var(--ink); font-weight: 600; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* --- Legal / prose -------------------------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 40px; margin-bottom: 12px; }
.prose h2:first-of-type { margin-top: 24px; }
.prose h3 { margin-top: 26px; margin-bottom: 8px; }
.prose p { margin-bottom: 14px; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.data-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; }
.data-table th, .data-table td { text-align: left; padding: 9px 12px; border: 1px solid var(--line); font-size: .96rem; vertical-align: top; }
.data-table th { background: var(--bg-soft); font-family: var(--font-heading); color: var(--ink); font-weight: 700; width: 42%; }

/* --- Page hero (sub-pages) ------------------------------------------------ */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding-block: clamp(48px, 7vw, 88px); }
.breadcrumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--accent-text); }
.breadcrumbs span[aria-current] { color: var(--ink); }
.page-hero p { margin-top: 14px; font-size: 1.12rem; color: var(--muted); max-width: 640px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--bg-dark); color: #94a3b8; padding-block: clamp(48px, 6vw, 72px) 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 5vw, 56px); }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; font-weight: 700; }
.footer-name { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.footer-brand p { margin-top: 16px; font-size: .95rem; max-width: 320px; color: #94a3b8; }
.footer-brand address { font-style: normal; margin-top: 16px; font-size: .95rem; line-height: 1.7; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { color: #cbd5e1; font-size: .96rem; }
.footer-links a:hover { color: #fff; }
.footer-contact a { color: #cbd5e1; }
.footer-contact a:hover { color: #fff; }
.footer-bottom { margin-top: clamp(36px, 5vw, 52px); padding-top: 24px; border-top: 1px solid rgba(255,255,255,.10); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; font-size: .88rem; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* --- Utilities ------------------------------------------------------------ */
.stack-sm > * + * { margin-top: 10px; }
.mt-l { margin-top: clamp(40px, 6vw, 72px); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent-strong); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
