/* Mechatronik Flucher-Zrelec — Design System v2
   Schriften: Systemschriften (kein externer Request, DSGVO-freundlich)
   Farben: Anthrazit (Marke) + Orange (Akzent/CTA)
   Ziel v2: engere Typo-Skala, einheitliche Abstände, weniger Scrollweg */

:root {
  /* Farben */
  --dark: #22262b;
  --dark-2: #2f343b;
  --dark-3: #1b1f24;
  --border: #e4e6e9;
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --accent: #ff8c00;
  --accent-dark: #b35f00;
  --accent-soft: rgba(255, 140, 0, 0.12);
  --text: #23272c;
  --text-muted: #5a5f66;
  --on-dark: #e6e8ea;
  --on-dark-muted: #a9aeb5;

  /* Typo-Skala (kompakt) */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lead: 1.0625rem;
  --fs-h3: 1.0625rem;
  --fs-h2: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem);
  --fs-h1: clamp(1.75rem, 1.35rem + 1.9vw, 2.5rem);

  /* Abstände (8er-Raster) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --section-y: 64px;
  --section-y-sm: 44px;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 28, 0.06), 0 1px 3px rgba(20, 24, 28, 0.05);
  --shadow-md: 0 6px 18px rgba(20, 24, 28, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 1120px;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--dark);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: 0; }
h4 { font-size: var(--fs-base); letter-spacing: 0; }
p { margin: 0 0 0.85em; color: var(--text-muted); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); }
ul { margin: 0 0 1em; padding-left: 1.15em; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: var(--section-y) 0; }
.section-tight { padding: var(--section-y-sm) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark p { color: var(--on-dark-muted); }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.measure { max-width: 62ch; }
.text-center { text-align: center; }
.section-head { max-width: 60ch; margin-bottom: var(--s6); }
.section-head.text-center { margin-left: auto; margin-right: auto; }
.section-head p { font-size: var(--fs-md); }

.eyebrow {
  display: block;
  margin-bottom: var(--s2);
  color: var(--accent-dark);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-dark .eyebrow, .hero .eyebrow, .page-header .eyebrow { color: var(--accent); }
.lead { font-size: var(--fs-lead); line-height: 1.5; }

.grid { display: grid; gap: var(--s5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: center; }
.split img {
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
}
.split-media-first > .split-text { order: 2; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-sm { padding: 8px 14px; font-size: var(--fs-sm); }
.btn-primary { background: var(--accent); color: #241000; }
.btn-primary:hover { background: #e67c00; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--dark); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.45); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.btn-row:first-child { margin-top: 0; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: var(--fs-sm); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { height: 56px; width: auto; }
.main-nav ul { display: flex; align-items: center; gap: var(--s5); margin: 0; padding: 0; list-style: none; }
.main-nav a { color: var(--dark); font-weight: 600; }
.main-nav a:hover { color: var(--accent-dark); text-decoration: none; }
.main-nav .current { color: var(--accent-dark); }
.nav-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dark);
  color: #fff !important;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700 !important;
}
.nav-highlight:hover { background: #000; }
.nav-highlight .bolt { color: var(--accent); }
.nav-highlight.current { background: var(--dark); box-shadow: inset 0 0 0 1px var(--accent); }
.header-cta { display: flex; align-items: center; gap: var(--s4); }
.header-mail { font-size: var(--fs-sm); color: var(--dark); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 4px 0; background: var(--dark); }

/* Hero */
.hero { background: var(--dark-3); color: #fff; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s7);
  align-items: center;
  padding-top: var(--s8);
  padding-bottom: var(--s8);
}
.hero h1 { color: #fff; max-width: 22ch; }
.hero .lead { color: #c5c9ce; max-width: 48ch; }
.hero-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.hero-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.hero-badge {
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: var(--fs-sm);
  color: #dfe2e5;
}

/* Fakten-Leiste */
.facts { border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.facts .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s5);
  padding-top: var(--s5);
  padding-bottom: var(--s5);
}
.fact strong { display: block; color: var(--dark); font-size: var(--fs-md); }
.fact span { font-size: var(--fs-sm); color: var(--text-muted); }

/* Hinweis-Streifen */
.strip { background: var(--accent); color: #241000; }
.strip .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
  padding-top: var(--s3);
  padding-bottom: var(--s3);
  font-weight: 650;
  font-size: var(--fs-base);
}
.strip a { color: #241000; text-decoration: underline; }

/* Karten & Tiles */
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: #cfd3d8; box-shadow: var(--shadow-sm); }
.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s5); }
.card-body p { font-size: var(--fs-base); flex: 1; }
.card-body .link-arrow { margin-top: var(--s4); }

.icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: var(--s3);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  flex-shrink: 0;
}
.section-dark .icon-badge { background: rgba(255,140,0,0.18); color: var(--accent); }

/* Check-Liste */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex;
  gap: var(--s3);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.check-list li:last-child { border-bottom: 0; }
.check-list svg { flex-shrink: 0; margin-top: 4px; color: var(--accent-dark); }
.section-dark .check-list li { border-color: rgba(255,255,255,0.12); color: var(--on-dark); }
.section-dark .check-list svg { color: var(--accent); }

/* Ablauf */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
.step h3 { margin-bottom: 0.3em; }
.step p { font-size: var(--fs-sm); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: var(--s3);
  border-radius: 50%;
  background: var(--accent);
  color: #241000;
  font-size: var(--fs-sm);
  font-weight: 800;
}

/* CTA-Band */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s5);
  padding: var(--s6) var(--s7);
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: #fff;
}
.cta-band h2 { color: #fff; margin-bottom: 0.25em; }
.cta-band p { color: #c5c9ce; }
.cta-band .btn-row { margin-top: 0; }

/* Feature-Band (Fern-Diagnose) */
.feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}
.feature-text { padding: var(--s7); }
.feature-text h2 { color: #fff; }
.feature-text p { color: #c5c9ce; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-list { list-style: none; margin: var(--s4) 0 0; padding: 0; }
.feature-list li { display: flex; gap: var(--s2); padding: 5px 0; font-size: var(--fs-sm); color: var(--on-dark); }

/* Einsatzgebiet */
.pill-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pill {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--dark);
}

/* Bildraster */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.photo-grid img {
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04) brightness(0.98);
}

/* Seitenkopf (Unterseiten) */
.page-header { background: var(--dark); color: #fff; padding: var(--s6) 0 var(--s7); }
.page-header h1 { color: #fff; margin-bottom: 0.3em; }
.page-header p { color: #c5c9ce; max-width: 62ch; font-size: var(--fs-lead); }
.breadcrumb { font-size: var(--fs-sm); color: #9aa0a6; margin-bottom: var(--s4); }
.breadcrumb a { color: #9aa0a6; }
.breadcrumb a:hover { color: #fff; }

/* Sprungnavigation Unterseiten */
.subnav { border-bottom: 1px solid var(--border); background: #fff; }
.subnav .container { display: flex; gap: var(--s5); overflow-x: auto; padding-top: var(--s3); padding-bottom: var(--s3); }
.subnav a { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.subnav a:hover { color: var(--accent-dark); text-decoration: none; }

/* Formular-Slot */
.form-slot {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s7) var(--s5);
  border: 1px dashed #cfd3d8;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  text-align: center;
}
.form-slot p { max-width: 52ch; margin: 0 auto var(--s5); font-size: var(--fs-sm); }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--s7); align-items: start; }
.panel {
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}
.contact-method { display: flex; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--border); }
.contact-method:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-method .icon-badge { margin-bottom: 0; }
.contact-method strong { display: block; color: var(--dark); }
.contact-method span, .contact-method a { font-size: var(--fs-base); }
.info-box {
  padding: var(--s4) var(--s5);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: var(--fs-base);
}

/* Rechtstexte */
.legal { max-width: 70ch; }
.legal h2 { margin-top: 1.8em; font-size: 1.15rem; }
.legal h2:first-child { margin-top: 0; }
.legal ul { color: var(--text-muted); }
.legal li { margin-bottom: 6px; }
.legal .info-box { margin: var(--s5) 0; }

/* Footer */
.site-footer { background: var(--dark); color: var(--on-dark-muted); padding: var(--s7) 0 0; font-size: var(--fs-sm); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s6);
  padding-bottom: var(--s6);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 { color: #fff; margin-bottom: var(--s3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 7px; }
.footer-grid a { color: var(--on-dark-muted); }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 40px; width: auto; margin-bottom: var(--s3); }
.footer-logo {
  display: inline-flex;
  padding: 8px 12px;
  margin-bottom: var(--s3);
  border-radius: var(--radius);
  background: #fff;
}
.footer-logo img { height: 40px; width: auto; margin: 0; }
.footer-brand p { color: #8f959c; max-width: 34ch; font-size: var(--fs-sm); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
  padding: var(--s4) 0;
  color: #82888f;
  font-size: var(--fs-xs);
}
.footer-bottom a { color: #82888f; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom ul { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; }

/* Mobile Aktionsleiste */
.mobile-bar { display: none; }

/* Skip-Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #241000;
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Responsive */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; padding-top: var(--s7); padding-bottom: var(--s7); }
  .hero-media { order: -1; }
  .hero-media img { aspect-ratio: 16/9; }
  .facts .container { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .split, .feature, .contact-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .split-media-first > .split-text { order: 0; }
  .feature-media { order: -1; }
  .feature-media img { aspect-ratio: 16/9; }
  .feature-text { padding: var(--s6); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --section-y: 44px; --section-y-sm: 32px; }
  body { padding-bottom: 68px; }
  .mobile-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s2);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 10px 12px;
    background: rgba(255,255,255,0.97);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
  }
  .mobile-bar .btn { justify-content: center; }
  .main-nav ul { display: none; }
  .header-mail { display: none; }
  .nav-toggle { display: block; order: 3; }
  .main-nav.open ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--s3) 20px var(--s4);
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .main-nav.open ul li { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .main-nav.open ul li:last-child { border-bottom: 0; }
  .nav-highlight { display: inline-block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: var(--s4); }
  .cta-band { padding: var(--s6) var(--s5); }
  .header-cta .btn { padding: 9px 14px; font-size: var(--fs-sm); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .strip, .subnav, .btn { display: none !important; }
  body { color: #000; }
}
