/* ============================================================
   Klaus' Garage – Style v4
   Dark industrial / motorsport theme
   ============================================================ */

:root {
  --bg:        #0d0d0d;
  --bg-rgb:    13,13,13;
  --surface:   #161618;
  --border:    #242426;
  --fg:        #f0f0f0;
  --heading:   #ffffff;
  --muted:     #666;
  --primary:     #e63946;
  --primary-hover: #ff4455;
  --primary-rgb: 230,57,70;
  --on-primary: #ffffff;
  --secondary: #4a90c2;
  --on-secondary: #ffffff;
  --radius:    0px;
  --radius-sm: 0px;
  --shadow:    none;
  --logo-scale: 1;
  --font-head: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ── Light Theme (Petrol) ─────────────────────────────────────
   Activated via <html data-theme="light">, set globally by the admin
   in Einstellungen. All colors below override the dark defaults. */
html[data-theme="light"] {
  --radius:    0px;
  --radius-sm: 0px;
  --shadow:    none;
  --secondary: #1f6f9c;
  --on-secondary: #ffffff;
  --bg:        #f4f7f8;
  --bg-rgb:    244,247,248;
  --surface:   #ffffff;
  --border:    #dde4e6;
  --fg:        #1d2b30;
  --heading:   #102a33;
  --muted:     #6b7c82;
  --primary:     #0e7c86;
  --primary-hover: #0a99a6;
  --primary-rgb: 14,124,134;
  --on-primary: #ffffff;
}
html[data-theme="light"] body {
  background: var(--bg);
}
/* Hero / pillar background images are darker photos – keep a dark veil
   so light text inside hero/pillar sections stays readable */
html[data-theme="light"] .hero .veil {
  background: linear-gradient(160deg, rgba(16,42,51,.82) 0%, rgba(16,42,51,.55) 60%, rgba(16,42,51,.82) 100%);
}
html[data-theme="light"] .pillar-veil {
  background: linear-gradient(135deg, rgba(16,42,51,.78) 0%, rgba(16,42,51,.45) 50%, rgba(16,42,51,.7) 100%);
}
html[data-theme="light"] .hero .huge,
html[data-theme="light"] .pillar h2,
html[data-theme="light"] .pillar p {
  color: #ffffff;
}
html[data-theme="light"] .pillar p {
  color: rgba(255,255,255,.82);
}
/* Preloader stays dark/dramatic regardless of site theme */
html[data-theme="light"] #kg-preloader,
html[data-theme="light"] #kg-preloader * {
  color-scheme: dark;
}
/* Stripes / grid background patterns: lighten on light theme */
html[data-theme="light"] .hero .stripes,
html[data-theme="light"] .cta-box .stripes {
  opacity: .02;
}
/* Marquee logos: don't grayscale-invert on light bg */
html[data-theme="light"] .marquee-logo {
  filter: grayscale(1) opacity(.55);
}
html[data-theme="light"] .marquee-item:hover .marquee-logo {
  filter: grayscale(0) opacity(1);
}
/* Shadows look better softer on light backgrounds */
html[data-theme="light"] .listing:hover,
html[data-theme="light"] .service:hover {
  box-shadow: 0 4px 16px rgba(14,124,134,.08);
}

/* ── Racing Theme (Yellow / Cream) ──────────────────────────────
   Activated via <html data-theme="racing">, set globally by the admin
   in Einstellungen. Warm cream base with the bold racing yellow from
   the Klaus Garage logo as the accent. Rounded corners + soft shadows
   for a friendlier, more modern feel. */
html[data-theme="racing"] {
  --secondary: #2e247b;
  --secondary-hover: #423292;
  --on-secondary: #ffffff;
  --bg:        #fbf6ec;
  --bg-rgb:    251,246,236;
  --surface:   #ffffff;
  --border:    #ecdfc4;
  --fg:        #2c2620;
  --heading:   #1a1611;
  --muted:     #8a7e6c;
  --primary:     #ffcc00;
  --primary-hover: #ffd633;
  --primary-rgb: 255,204,0;
  --on-primary: #1a1611;
  --radius:    20px;
  --radius-sm: 10px;
  --shadow:    0 8px 24px rgba(44,38,32,.10);
}
html[data-theme="racing"] body {
  background: var(--bg);
}
/* Hero / pillar background images: warm dark-brown veil instead of red/petrol tint */
html[data-theme="racing"] .hero .veil {
  background: linear-gradient(160deg, rgba(26,22,17,.84) 0%, rgba(26,22,17,.55) 60%, rgba(26,22,17,.84) 100%);
}
html[data-theme="racing"] .pillar-veil {
  background: linear-gradient(135deg, rgba(26,22,17,.8) 0%, rgba(26,22,17,.45) 50%, rgba(26,22,17,.72) 100%);
}
html[data-theme="racing"] .hero .huge,
html[data-theme="racing"] .pillar h2,
html[data-theme="racing"] .pillar p {
  color: #fffaf0;
}
html[data-theme="racing"] .pillar p {
  color: rgba(255,250,240,.85);
}
/* Links use the logo-blue (secondary) for proper contrast against cream;
   yellow primary is reserved for buttons/CTAs with dark text */
html[data-theme="racing"] a {
  color: var(--secondary);
}
html[data-theme="racing"] a:hover {
  color: var(--secondary-hover);
}
/* USP icons and inline icons also use logo-blue for consistency */
html[data-theme="racing"] .usp-icon,
html[data-theme="racing"] .ico {
  color: var(--secondary);
}
/* Pillar "more" links sit on dark photo backgrounds - keep cream/yellow there */
html[data-theme="racing"] .pillar .more {
  color: #fffaf0;
  border-color: rgba(255,250,240,.4);
}
html[data-theme="racing"] .pillar .more:hover {
  color: var(--primary);
  border-color: var(--primary);
}
html[data-theme="racing"] .hero .stripes,
html[data-theme="racing"] .cta-box .stripes {
  opacity: .025;
}
/* Marquee logos: subtle on cream, full color on hover */
html[data-theme="racing"] .marquee-logo {
  filter: grayscale(1) opacity(.5);
}
html[data-theme="racing"] .marquee-item:hover .marquee-logo {
  filter: grayscale(0) opacity(1);
}
/* Soft warm shadows on hover */
html[data-theme="racing"] .listing:hover,
html[data-theme="racing"] .service:hover {
  box-shadow: var(--shadow);
}
/* Rounded site header + nav pill look */
html[data-theme="racing"] .nav a.active,
html[data-theme="racing"] .nav a:hover {
  border-radius: var(--radius-sm);
  background: rgba(var(--primary-rgb),.12);
}
/* Stat cells get a touch more breathing room with rounded corners */
html[data-theme="racing"] .stats {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
html[data-theme="racing"] .cell {
  border-radius: 0;
}
/* Preloader stays dark/dramatic regardless of site theme */
html[data-theme="racing"] #kg-preloader,
html[data-theme="racing"] #kg-preloader * {
  color-scheme: dark;
}

/* ── Garage Theme (Yellow + Blue, dark base) ────────────────────
   Activated via <html data-theme="garage">, set globally by the admin
   in Einstellungen. Dark base like Theme 1, with the two brand colors
   from the Klaus Garage logo used side-by-side: yellow for primary
   actions/buttons, blue for links, icons and secondary accents. */
html[data-theme="garage"] {
  --bg:        #0d0d0d;
  --bg-rgb:    13,13,13;
  --surface:   #161618;
  --border:    #242426;
  --fg:        #f0f0f0;
  --heading:   #ffffff;
  --muted:     #666;
  --primary:     #ffcc00;
  --primary-hover: #ffd633;
  --primary-rgb: 255,204,0;
  --on-primary: #1a1611;
  --secondary: #7c6ee0;
  --secondary-hover: #9b90ec;
  --secondary-deep: #2e247b;
  --on-secondary: #ffffff;
  --radius:    0px;
  --radius-sm: 0px;
  --shadow:    none;
  --logo-scale: 1.2;
}
html[data-theme="garage"] body {
  background: var(--bg);
}
/* Links, USP icons and inline icons use the blue secondary accent
   instead of the yellow primary, so both brand colors appear together */
html[data-theme="garage"] a {
  color: var(--secondary);
}
html[data-theme="garage"] a:hover {
  color: var(--secondary-hover);
}
html[data-theme="garage"] .usp-icon,
html[data-theme="garage"] .ico {
  color: var(--secondary);
}
html[data-theme="garage"] .usp {
  border-left-color: var(--secondary-deep);
}
/* Pillar "more" links: blue accent, yellow on hover */
html[data-theme="garage"] .pillar .more {
  border-color: var(--secondary);
  color: var(--secondary);
}
html[data-theme="garage"] .pillar .more:hover {
  border-color: var(--primary);
  color: var(--primary-hover);
}
/* Marquee logos stay as in the dark theme */
html[data-theme="garage"] .marquee-logo {
  filter: grayscale(1) brightness(1.6) opacity(.65);
}
html[data-theme="garage"] .marquee-item:hover .marquee-logo {
  filter: grayscale(0) brightness(1) opacity(1);
}
/* Listing prices use the blue accent for contrast against yellow buttons */
html[data-theme="garage"] .listing .price {
  color: var(--secondary);
}
/* Preloader stays dark/dramatic regardless of site theme */
html[data-theme="garage"] #kg-preloader,
html[data-theme="garage"] #kg-preloader * {
  color-scheme: dark;
}

/* ── Pure Theme (White base, Yellow + Blue) ─────────────────────
   Activated via <html data-theme="pure">, set globally by the admin
   in Einstellungen. Clean white background with both logo colors used
   side-by-side, like the Garage theme: yellow for primary actions/
   buttons, blue (logo-indigo) for links, icons and secondary accents.
   Sharp edges, classic look like Theme 1/2. */
html[data-theme="pure"] {
  --bg:        #ffffff;
  --bg-rgb:    255,255,255;
  --surface:   #f7f7f8;
  --border:    #e2e2e6;
  --fg:        #1d1d20;
  --heading:   #0d0d0f;
  --muted:     #74747c;
  --primary:     #ffcc00;
  --primary-hover: #ffd633;
  --primary-rgb: 255,204,0;
  --on-primary: #1a1611;
  --secondary: #2e247b;
  --secondary-hover: #423292;
  --on-secondary: #ffffff;
  --radius:    0px;
  --radius-sm: 0px;
  --shadow:    none;
  --logo-scale: 1;
}
html[data-theme="pure"] body {
  background: var(--bg);
}
/* Hero / pillar background images: neutral dark veil for clean contrast */
html[data-theme="pure"] .hero .veil {
  background: linear-gradient(160deg, rgba(13,13,15,.82) 0%, rgba(13,13,15,.55) 60%, rgba(13,13,15,.82) 100%);
}
html[data-theme="pure"] .pillar-veil {
  background: linear-gradient(135deg, rgba(13,13,15,.78) 0%, rgba(13,13,15,.45) 50%, rgba(13,13,15,.7) 100%);
}
html[data-theme="pure"] .hero .huge,
html[data-theme="pure"] .pillar h2,
html[data-theme="pure"] .pillar p {
  color: #ffffff;
}
html[data-theme="pure"] .pillar p {
  color: rgba(255,255,255,.82);
}
html[data-theme="pure"] .hero .stripes,
html[data-theme="pure"] .cta-box .stripes {
  opacity: .02;
}
/* Links use logo-blue for contrast on white; yellow stays reserved for buttons */
html[data-theme="pure"] a {
  color: var(--secondary);
}
html[data-theme="pure"] a:hover {
  color: var(--secondary-hover);
}
html[data-theme="pure"] .usp-icon,
html[data-theme="pure"] .ico {
  color: var(--secondary);
}
html[data-theme="pure"] .usp {
  border-left-color: var(--secondary);
}
/* Pillar "more" links sit on dark photo backgrounds - keep white/yellow there */
html[data-theme="pure"] .pillar .more {
  color: #ffffff;
  border-color: rgba(255,255,255,.4);
}
html[data-theme="pure"] .pillar .more:hover {
  color: var(--primary);
  border-color: var(--primary);
}
/* Marquee logos: subtle on white, full color on hover */
html[data-theme="pure"] .marquee-logo {
  filter: grayscale(1) opacity(.5);
}
html[data-theme="pure"] .marquee-item:hover .marquee-logo {
  filter: grayscale(0) opacity(1);
}
/* Listing prices use logo-blue for contrast against yellow buttons */
html[data-theme="pure"] .listing .price {
  color: var(--secondary);
}
/* Soft shadow on hover for a touch of depth on the white surface */
html[data-theme="pure"] .listing:hover,
html[data-theme="pure"] .service:hover {
  box-shadow: 0 4px 16px rgba(13,13,15,.07);
}
/* Preloader stays dark/dramatic regardless of site theme */
html[data-theme="pure"] #kg-preloader,
html[data-theme="pure"] #kg-preloader * {
  color-scheme: dark;
}

/* ── Blueprint Theme (Dark base + technical drawing hero bg) ────
   Activated via <html data-theme="blueprint">, set globally by the
   admin in Einstellungen. Identical color scheme to Theme 1 (dark
   default) - only the hero background image changes to a dark,
   inverted motorcycle blueprint/wireframe technical drawing. */
html[data-theme="blueprint"] {
  --bg:        #0d0d0d;
  --bg-rgb:    13,13,13;
  --surface:   #161618;
  --border:    #242426;
  --fg:        #f0f0f0;
  --heading:   #ffffff;
  --muted:     #666;
  --primary:     #e63946;
  --primary-hover: #ff4455;
  --primary-rgb: 230,57,70;
  --on-primary: #ffffff;
  --secondary: #4a90c2;
  --on-secondary: #ffffff;
  --radius:    0px;
  --radius-sm: 0px;
  --shadow:    none;
  --logo-scale: 1;
}
html[data-theme="blueprint"] body {
  background: var(--bg);
}
/* The blueprint drawing is dense/detailed, so it needs slightly higher
   opacity than the default .hero .bg (18%) to read clearly without
   overpowering the text - the veil gradient still keeps text readable. */
html[data-theme="blueprint"] .hero .bg {
  opacity: .3;
}
html[data-theme="blueprint"] #kg-preloader,
html[data-theme="blueprint"] #kg-preloader * {
  color-scheme: dark;
}

/* ── Model3D Theme (Dark base + 3D wireframe enduro) ────────────
   Activated via <html data-theme="model3d">, set globally by the
   admin in Einstellungen. Same dark base as Theme 1, plus an
   interactive drag-to-rotate wireframe motorcycle placed beside
   the hero text. */
html[data-theme="model3d"] {
  --bg:        #0d0d0d;
  --bg-rgb:    13,13,13;
  --surface:   #161618;
  --border:    #242426;
  --fg:        #f0f0f0;
  --heading:   #ffffff;
  --muted:     #666;
  --primary:     #e63946;
  --primary-hover: #ff4455;
  --primary-rgb: 230,57,70;
  --on-primary: #ffffff;
  --secondary: #ffc700;
  --secondary-hover: #ffd633;
  --on-secondary: #1a1611;
  --radius:    0px;
  --radius-sm: 0px;
  --shadow:    none;
  --logo-scale: 1;
}
html[data-theme="model3d"] body {
  background: var(--bg);
}
/* Preloader stays dark/dramatic regardless of site theme */
html[data-theme="model3d"] #kg-preloader,
html[data-theme="model3d"] #kg-preloader * {
  color-scheme: dark;
}
/* 3D viewer container placed beside the hero text */
.bike3d-wrap {
  position: relative;
  width: 100%;
  min-width: 200px;
  height: 340px;
  min-height: 280px;
}
.bike3d-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
  /* V48: Das Hero-Video wird per JS auf dieses Canvas kopiert (Browser
     rendern <video> in einer eigenen GPU-Ebene, auf die CSS-Effekte nicht
     wirken). WICHTIG: mix-blend-mode funktioniert hier grundsaetzlich NICHT,
     weil .hero .content einen isolierenden Stacking-Context erzeugt - das
     Blending "sieht" den Seitenhintergrund nie (bewiesen per Testseite).
     Stattdessen wandelt der SVG-Filter #kg-luma-alpha (in index.php)
     Helligkeit in ECHTE Transparenz um: Schwarz -> durchsichtig, Neon-
     Linien -> sichtbar. Echte Transparenz ist von Stacking-Contexts
     unabhaengig und funktioniert auch auf dem Handy. Die weiche Radial-
     maske nimmt zusaetzlich jede Restkante weg. */
  filter: url(#kg-luma-alpha);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, #000 45%, transparent 92%);
  mask-image: radial-gradient(ellipse 80% 80% at center, #000 45%, transparent 92%);
}
.bike3d-wrap video {
  /* mix-blend-mode:screen macht echtes Schwarz (#000) transparent, da es
     mit dem dunkelgrauen Seitenhintergrund verschmilzt; nur die hellen
     Neon-Linien des Wireframes bleiben sichtbar. */
  mix-blend-mode: screen;
  /* V47-FIX: Das Video ist TV-Range-kodiert (16-235) - je nach Browser/GPU
     wird sein "Schwarz" als Dunkelgrau (~#161616) gerendert. Screen-Blending
     hellte das zusätzlich auf -> sichtbarer grauer Kasten statt schwebendem
     Modell. Der Kontrast-Filter drückt die dunklen Werte auf echtes #000
     (Filter wird VOR dem Blending angewendet), saturate gleicht die
     Neon-Farben wieder aus. */
  filter: contrast(1.35) brightness(0.95) saturate(1.15);
  /* V47: Randmaske deutlich weicher - der Verlauf endet klar VOR der
     Videokante, damit auch bei abweichender Blending-Darstellung nie eine
     rechteckige Kante sichtbar wird. */
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, #000 45%, transparent 92%);
  mask-image: radial-gradient(ellipse 80% 80% at center, #000 45%, transparent 92%);
}
.bike3d-hint {
  position: absolute;
  bottom: .75rem;
  right: .75rem;
  font-family: var(--font-head);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  opacity: .8;
  display: flex;
  align-items: center;
  gap: .4rem;
}
@media (max-width: 768px) {
  .bike3d-wrap { height: 260px; margin-top: 1.5rem; }
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--fg);
       font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ── Container / Layout ─────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.row { display: flex; align-items: center; gap: 1rem; }
.cols { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
@media (max-width: 860px)  { .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px)  { .cols { grid-template-columns: 1fr; } }

/* ── Navigation ─────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(var(--bg-rgb),.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
  height: 4rem;
}
.site-header.scrolled { border-color: var(--border); }
.site-header .container { height: 100%; }
.site-header .row { height: 100%; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--fg); font-family: var(--font-head); font-size: 1.1rem; letter-spacing: .08em; }
.brand img { height: calc(2rem * var(--logo-scale)); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--muted); font-family: var(--font-head); font-size: .85rem;
          letter-spacing: .08em; text-transform: uppercase; padding: .4rem .75rem;
          transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--fg); }
.admin-link { color: var(--primary) !important; }
.menu-toggle { display: none; background: none; border: none; color: var(--fg); cursor: pointer; padding: .4rem; font-size: 1.4rem; }

/* Mobile nav */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; flex-direction: column; align-items: flex-start;
    position: absolute; top: 4rem; left: 0; right: 0;
    background: rgba(var(--bg-rgb),.98); border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem 1rem; gap: 0;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: .65rem .25rem; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em;
  font-size: .85rem; padding: .65rem 1.5rem; cursor: pointer;
  border: 2px solid transparent; transition: all .18s; white-space: nowrap;
  border-radius: var(--radius-sm);
}
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: transparent; color: #f87171; border-color: #f87171; }
.btn-danger:hover { background: #f87171; color: #000; }
.btn-sm { padding: .4rem .9rem; font-size: .75rem; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 78vh;
  display: flex; align-items: flex-end;
  padding-top: 4rem; overflow: hidden;
}
/* Cap the hero height only on larger screens, where vh-based sizing can
   otherwise grow unreasonably large (e.g. at low browser zoom levels or
   on very tall 4K/ultrawide monitors). Mobile devices need the full
   available height for the stacked hero content (badge, two heading
   lines, description, two buttons) and must not be capped here. */
@media (min-width: 769px) {
  .hero { max-height: 860px; }
}
.hero .bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .18; z-index: 0;
}
.hero .veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(160deg, rgba(13,13,13,.85) 0%, rgba(13,13,13,.6) 60%, rgba(13,13,13,.85) 100%);
}
.hero .stripes {
  position: absolute; inset: 0; z-index: 1; opacity: .04;
  background-image: linear-gradient(rgba(var(--primary-rgb),.5) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(var(--primary-rgb),.5) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero .content { position: relative; z-index: 2; padding: 4rem 0 5rem; }
.hero .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 768px) { .hero .grid { grid-template-columns: 1fr; } .hero { min-height: 82vh; } }

.eyebrow { font-family: var(--font-head); font-size: .75rem; letter-spacing: .3em;
            text-transform: uppercase; color: var(--primary); margin-bottom: 1rem;
            display: flex; align-items: center; gap: .5rem; }
.dot { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; display: inline-block; }
.huge { font-family: var(--font-head); font-size: clamp(3.5rem, 9vw, 7rem);
         line-height: .95; text-transform: uppercase; color: var(--heading); margin-bottom: 1.25rem; }
.huge .red { color: var(--primary); }
.lead { font-size: 1rem; color: var(--muted); max-width: 34rem; margin-bottom: 2rem; line-height: 1.7; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Stats grid */
.stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); }
.cell {
  padding: 1.75rem 1.25rem; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border); text-align: center;
  display: flex; flex-direction: column; align-items: center;
  border-radius: var(--radius-sm);
}
.cell:nth-child(even) { border-right: none; }
.cell:nth-child(n+3) { border-bottom: none; }
.v { font-family: var(--font-head); font-size: 2.2rem; color: var(--primary); line-height: 1; }
.l { font-size: .65rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); margin-top: .35rem; }

/* ── Pillars ─────────────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); }
@media (min-width: 768px) { .pillars { grid-template-columns: 1fr 1fr; } }

.pillar {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 3.5rem 2.5rem; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  min-height: 380px;
  border-radius: var(--radius);
}
.pillar img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .22; transition: opacity .3s; z-index: 0;
}
.pillar:hover img.bg { opacity: .32; }
.pillar-veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(13,13,13,.75) 0%, rgba(13,13,13,.45) 50%, rgba(13,13,13,.65) 100%);
}
.pillar .content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; width: 100%; max-width: 380px; margin: 0 auto;
}
.pillar-icon { width: 2.25rem; height: 2.25rem; color: var(--primary); display: block; margin: 0 auto .5rem; }
.pillar h2 { font-family: var(--font-head); font-size: clamp(2rem,4vw,2.8rem); text-transform: uppercase; color: var(--heading); margin-top: 1rem; line-height: 1; text-align: center; }
.pillar p { margin-top: 1rem; color: rgba(240,240,240,.7); font-size: .9rem; line-height: 1.7; text-align: center; max-width: 26rem; }
.pillar .more {
  margin-top: 1.75rem; display: inline-flex; align-items: center; gap: .4rem;
  color: var(--primary); font-family: var(--font-head); font-size: .82rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  border-bottom: 1px solid rgba(var(--primary-rgb),.35); padding-bottom: .2rem;
  transition: border-color .2s, color .2s; align-self: center;
}
.pillar .more:hover { border-color: var(--primary); color: var(--primary-hover); }

/* ── Sections ────────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-eyebrow { font-family: var(--font-head); font-size: .72rem; letter-spacing: .25em;
                    text-transform: uppercase; color: var(--primary); margin-bottom: .5rem; }
.text-center { text-align: center; }
.section-title { font-family: var(--font-head); font-size: clamp(2rem,5vw,3rem);
                  text-transform: uppercase; color: var(--heading); line-height: 1; }
.bg-surface { background: var(--surface); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

/* ── USPs ────────────────────────────────────────────────────── */
.usps { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .usps { grid-template-columns: repeat(3,1fr); } }
.usp { border-left: 2px solid var(--primary); padding-left: 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.usp-icon { color: var(--primary); font-size: 1.4rem; margin-bottom: .6rem; display: flex; align-items: center; }
.usp h3 { font-family: var(--font-head); font-size: 1.2rem; text-transform: uppercase; letter-spacing: .06em; color: var(--heading); margin-bottom: .4rem; }
.usp p { color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* ── Partners marquee ───────────────────────────────────────── */
.partner-section { overflow: hidden; }
.marquee-wrap {
  overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee-track {
  display: flex; align-items: center; width: max-content;
  animation: marquee-scroll 22s linear infinite; will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee-item {
  font-family: var(--font-head); font-size: 1.6rem; letter-spacing: .08em;
  color: var(--muted); white-space: nowrap; padding: 0 3.5rem;
  transition: color .2s; position: relative; text-decoration: none;
  display: inline-flex; align-items: center; gap: .6rem;
}
.marquee-item:hover { color: var(--fg); }
.marquee-item::after { content: '·'; position: absolute; right: 0; transform: translateX(50%); color: var(--border); }
.marquee-logo {
  height: 2.1rem; width: auto; max-width: 7rem; object-fit: contain;
  filter: grayscale(1) brightness(1.6) opacity(.65);
  transition: filter .2s;
}
.marquee-item:hover .marquee-logo { filter: grayscale(0) brightness(1) opacity(1); }

/* ── Gallery ─────────────────────────────────────────────────── */
.gallery {
  display: grid; grid-template-columns: repeat(4,1fr);
  grid-auto-rows: 180px; gap: 4px;
}
.gallery figure {
  overflow: hidden; position: relative; cursor: pointer;
  background: var(--surface);
  border-radius: var(--radius-sm);
}
.gallery figure.span-2 { grid-column: span 2; }
.gallery figure.row-2  { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; inset: 0; background: rgba(0,0,0,0);
  display: flex; align-items: flex-end; padding: .75rem;
  font-size: .72rem; color: transparent; transition: all .25s;
}
.gallery figure:hover figcaption { background: rgba(0,0,0,.45); color: rgba(255,255,255,.8); }
@media (max-width: 768px) { .gallery { grid-template-columns: repeat(2,1fr); grid-auto-rows: 140px; } }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; } }

/* ── CTA box ─────────────────────────────────────────────────── */
.cta-box {
  position: relative; padding: 3rem 2.5rem; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cta-box .stripes {
  position: absolute; inset: 0; opacity: .03;
  background-image: repeating-linear-gradient(45deg, var(--primary) 0, var(--primary) 1px, transparent 0, transparent 50%);
  background-size: 12px 12px;
}
.cta-box .grid { position: relative; z-index: 1; display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .cta-box .grid { grid-template-columns: 1fr 1fr; align-items: center; } }

/* ── Contact ─────────────────────────────────────────────────── */
.icon-line { display: flex; align-items: flex-start; gap: 1rem; }
.ico { color: var(--primary); flex-shrink: 0; font-size: 1.15rem; display: flex; align-items: center; margin-top: .1rem; }

/* ── Services grid ───────────────────────────────────────────── */
.services-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .services-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3,1fr); } }

.service {
  padding: 1.75rem; background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  border-radius: var(--radius);
}
.service:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.service .icon { color: var(--primary); font-size: 1.75rem; margin-bottom: .75rem; display: flex; align-items: center; }
.service h3 { font-family: var(--font-head); font-size: 1.15rem; text-transform: uppercase;
               letter-spacing: .06em; color: var(--heading); margin-bottom: .4rem; }
.service p { color: var(--muted); font-size: .85rem; line-height: 1.6; }

/* ── Forms ───────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: .9rem; }
.form label { display: flex; flex-direction: column; gap: .35rem; }
.lbl { font-family: var(--font-head); font-size: .72rem; text-transform: uppercase;
        letter-spacing: .12em; color: var(--muted); }
.help { font-size: .72rem; color: var(--muted); margin-top: .15rem; }
.form input, .form select, .form textarea {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--fg); font-family: var(--font-body); font-size: .9rem;
  padding: .6rem .85rem; width: 100%; transition: border-color .2s;
  border-radius: var(--radius-sm);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--primary);
}
.form textarea { resize: vertical; min-height: 100px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
.flash { padding: .85rem 1.1rem; font-size: .88rem; display: flex; align-items: center; gap: .5rem; border-radius: var(--radius-sm); }
.flash.success { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.25); color: #4ade80; }
.flash.error   { background: rgba(var(--primary-rgb),.08);  border: 1px solid rgba(var(--primary-rgb),.25);  color: #f87171; }
.panel { background: var(--surface); border: 1px solid var(--border); padding: 1.75rem; border-radius: var(--radius); }

/* ── Shop / Filterbar ────────────────────────────────────────── */
.filterbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.25rem 0; position: sticky; top: 4rem; z-index: 50; }
.type-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.type-tab {
  font-family: var(--font-head); font-size: .75rem; text-transform: uppercase;
  letter-spacing: .08em; padding: .35rem .85rem;
  border: 1px solid var(--border); color: var(--muted); transition: all .15s; white-space: nowrap;
  border-radius: var(--radius-sm);
}
.type-tab:hover { border-color: var(--primary); color: var(--primary); }
.type-tab.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
@media (max-width: 640px) { .type-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .type-tabs::-webkit-scrollbar { display: none; } }

/* Listings grid */
.listings { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .listings { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .listings { grid-template-columns: repeat(3,1fr); } }

.listing {
  background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; cursor: pointer;
  border-radius: var(--radius);
}
.listing:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.listing .imgwrap {
  position: relative; display: block; aspect-ratio: 16/9;
  overflow: hidden; background: var(--bg); border: none; width: 100%; padding: 0; cursor: pointer;
}
.listing .imgwrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.listing:hover .imgwrap img { transform: scale(1.04); }
.badge {
  position: absolute; font-family: var(--font-head); font-size: .65rem;
  text-transform: uppercase; letter-spacing: .1em; padding: .2rem .55rem;
  border-radius: var(--radius-sm);
}
.badge.cond { top: .6rem; left: .6rem; background: var(--primary); color: var(--on-primary); }
.badge.type { bottom: .6rem; right: .6rem; background: rgba(13,13,13,.8); color: var(--muted); border: 1px solid var(--border); }
.listing .body { padding: 1.25rem; }
.listing .body h3 { font-family: var(--font-head); font-size: 1.25rem; text-transform: uppercase; color: var(--heading); margin-bottom: .4rem; }
.listing .price { font-family: var(--font-head); font-size: 1.6rem; color: var(--primary); margin-bottom: .5rem; }
.listing .desc { font-size: .82rem; color: var(--muted); line-height: 1.5; margin-bottom: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing .specs { display: flex; flex-wrap: wrap; gap: .35rem; }
.listing .specs div { font-size: .72rem; background: var(--bg); border: 1px solid var(--border); padding: .2rem .5rem; color: var(--muted); }
.listing .specs b { color: var(--fg); display: block; font-size: .78rem; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 0; }
.site-footer .cols { padding: 4rem 0 2rem; align-items: start; }
.site-footer h4 { font-family: var(--font-head); font-size: .85rem; text-transform: uppercase;
                   letter-spacing: .12em; color: var(--heading); margin-bottom: .75rem; }
.site-footer ul { list-style: none; }
.site-footer li { font-size: .85rem; color: var(--muted); line-height: 1.9; }
.site-footer li a { color: var(--muted); transition: color .15s; }
.site-footer li a:hover { color: var(--primary); }
.site-footer p { font-size: .85rem; color: var(--muted); line-height: 1.8; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary); }
.footer-logo { height: calc(2rem * var(--logo-scale)); margin-bottom: .75rem; }
.bottom { border-top: 1px solid var(--border); padding: 1.25rem 0; display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--muted); }
@media (max-width: 768px) { .bottom { flex-direction: column; gap: .5rem; text-align: center; } }

/* ── SVG icons ───────────────────────────────────────────────── */
.svg-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; flex-shrink: 0; }
.icon-xs  { font-size: .9rem; }
.icon-sm  { font-size: 1.1rem; }
.icon-md  { font-size: 1.4rem; }
.icon-lg  { font-size: 1.8rem; }
.icon-xl  { font-size: 2.2rem; }
.icon-2xl { font-size: 2.8rem; }

/* ── Admin table ─────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .85rem; border-radius: var(--radius-sm); overflow: hidden; }
.admin-table th, .admin-table td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { font-family: var(--font-head); font-size: .72rem; text-transform: uppercase;
                   letter-spacing: .1em; color: var(--muted); background: var(--bg); white-space: nowrap; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.admin-grid.three { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1rem; }
.admin-grid .card { background: var(--surface); border: 1px solid var(--border); overflow: hidden; padding: .75rem; }
.admin-grid .card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: .5rem; }

/* ── Stat SVG animations (homepage) ─────────────────────────── */
.stat-svg-wrap { width:80px; height:60px; display:flex; align-items:center; justify-content:center; margin:0 auto .5rem; }
.stat-svg { width:80px; height:60px; overflow:visible; }
.lift-platform { transform-origin:40px 62px; animation:lift-up-down 4.5s ease-in-out infinite; }
@keyframes lift-up-down { 0%{transform:translateY(0)} 40%{transform:translateY(-16px)} 60%{transform:translateY(-16px)} 100%{transform:translateY(0)} }
.spanner-spin { transform-origin:40px 35px; animation:spanner-rotate 9s linear infinite; }
@keyframes spanner-rotate { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.star-fill { opacity:0; animation:star-bloom 3.2s ease-out infinite; }
@keyframes star-bloom { 0%{opacity:0;transform:scale(0.3)} 20%{opacity:1;transform:scale(1.15)} 35%{transform:scale(0.95)} 80%{opacity:1;transform:scale(1)} 100%{opacity:0;transform:scale(1)} }
.tacho-needle { transform-origin:40px 58px; animation:tacho-max .55s ease-in-out infinite; }
@keyframes tacho-max { 0%{transform:rotate(0deg)} 15%{transform:rotate(8deg)} 30%{transform:rotate(-3deg)} 45%{transform:rotate(10deg)} 60%{transform:rotate(2deg)} 78%{transform:rotate(9deg)} 100%{transform:rotate(0deg)} }

/* ── Piston animation (homepage stats) ──────────────────────── */
.piston-move {
  animation: piston-stroke 1.8s cubic-bezier(.4,0,.6,1) infinite;
  transform-box: fill-box;
  transform-origin: center bottom;
}
@keyframes piston-stroke {
  0%   { transform: translateY(0px); }
  45%  { transform: translateY(-13px); }
  55%  { transform: translateY(-13px); }
  100% { transform: translateY(0px); }
}
.piston-glow {
  animation: piston-flash 1.8s ease-in-out infinite;
}
@keyframes piston-flash {
  0%,43%,57%,100% { opacity: 0; }
  50%              { opacity: 0.6; }
}

/* ════════════════════════════════════════════════════════════
   Kupfer Theme – warmes Espresso-Dark mit gebürstetem Kupfer
   Aktiviert über <html data-theme="copper"> (Admin → Einstellungen)
   ════════════════════════════════════════════════════════════ */
html[data-theme="copper"] {
  --radius:    0px;
  --radius-sm: 0px;
  --shadow:    none;
  --bg:        #17120f;
  --bg-rgb:    23,18,15;
  --surface:   #211a15;
  --border:    #38291f;
  --fg:        #efe6db;
  --heading:   #fbf4ea;
  --muted:     #9c8a78;
  --primary:       #c87a45;
  --primary-hover: #dd8d52;
  --primary-rgb:   200,122,69;
  --on-primary:    #1a110a;
  --secondary:     #9c7b50;
  --on-secondary:  #1a110a;
}
html[data-theme="copper"] body { background: var(--bg); }
/* Warm getönter Schleier, damit Hero-/Pillar-Text auf dunklen Fotos lesbar bleibt */
html[data-theme="copper"] .hero .veil {
  background: linear-gradient(160deg, rgba(20,14,10,.88) 0%, rgba(30,19,12,.55) 55%, rgba(20,14,10,.9) 100%);
}
html[data-theme="copper"] .pillar-veil {
  background: linear-gradient(135deg, rgba(20,14,10,.82) 0%, rgba(30,19,12,.4) 50%, rgba(20,14,10,.8) 100%);
}
html[data-theme="copper"] a:hover { color: var(--primary-hover); }
html[data-theme="copper"] .usp-icon,
html[data-theme="copper"] .ico { color: var(--primary); }
html[data-theme="copper"] .nav a.active,
html[data-theme="copper"] .nav a:hover { color: var(--primary); }
html[data-theme="copper"] .hero .stripes,
html[data-theme="copper"] .cta-box .stripes { opacity: .05; }
html[data-theme="copper"] .marquee-logo { filter: grayscale(1) brightness(1.7) opacity(.5); }
html[data-theme="copper"] .marquee-item:hover .marquee-logo { filter: grayscale(0) opacity(1); }
html[data-theme="copper"] .listing:hover,
html[data-theme="copper"] .service:hover {
  box-shadow: 0 6px 26px rgba(200,122,69,.16);
  border-color: rgba(200,122,69,.42);
}

/* ════════════════════════════════════════════════════════════
   Salbei Theme – ruhiger Stein-/Hafer-Ton mit gedecktem Salbeigrün
   Aktiviert über <html data-theme="sage"> (Admin → Einstellungen)
   ════════════════════════════════════════════════════════════ */
html[data-theme="sage"] {
  --radius:    3px;
  --radius-sm: 3px;
  --shadow:    none;
  --bg:        #ecebe3;
  --bg-rgb:    236,235,227;
  --surface:   #f7f6f0;
  --border:    #d9d6cb;
  --fg:        #232a25;
  --heading:   #161d19;
  --muted:     #6f7068;
  --primary:       #5c7d6a;
  --primary-hover: #6f9580;
  --primary-rgb:   92,125,106;
  --on-primary:    #ffffff;
  --secondary:     #3f5a4c;
  --on-secondary:  #ffffff;
}
html[data-theme="sage"] body { background: var(--bg); }
/* Hero-/Pillar-Hintergründe sind dunkle Fotos – dunkler, leicht grüner Schleier
   hält die hellen Überschriften darauf lesbar */
html[data-theme="sage"] .hero .veil {
  background: linear-gradient(160deg, rgba(22,29,25,.82) 0%, rgba(22,29,25,.5) 60%, rgba(22,29,25,.82) 100%);
}
html[data-theme="sage"] .pillar-veil {
  background: linear-gradient(135deg, rgba(22,29,25,.78) 0%, rgba(22,29,25,.42) 50%, rgba(22,29,25,.7) 100%);
}
html[data-theme="sage"] .hero .huge,
html[data-theme="sage"] .pillar h2,
html[data-theme="sage"] .pillar p { color: #ffffff; }
html[data-theme="sage"] .pillar p { color: rgba(255,255,255,.82); }
html[data-theme="sage"] #kg-preloader,
html[data-theme="sage"] #kg-preloader * { color-scheme: dark; }
html[data-theme="sage"] .hero .stripes,
html[data-theme="sage"] .cta-box .stripes { opacity: .025; }
html[data-theme="sage"] .marquee-logo { filter: grayscale(1) opacity(.5); }
html[data-theme="sage"] .marquee-item:hover .marquee-logo { filter: grayscale(0) opacity(1); }
html[data-theme="sage"] .nav a.active,
html[data-theme="sage"] .nav a:hover { color: var(--primary); }
html[data-theme="sage"] .listing:hover,
html[data-theme="sage"] .service:hover { box-shadow: 0 6px 22px rgba(92,125,106,.14); }
