/* ==========================================================================
   style.css – gemeinsames Stylesheet für alle Seiten
   Thema: Systemintegration – Industrie, Software und KI verbinden

   Gestaltungsidee: konservativ-modern. Ruhige Flächen, eine Akzentfarbe
   (Kobaltblau), klare Linien. Bewegung gibt es nur dort, wo sie erklärt,
   wie Daten fließen: im Leistungsschema, in den Datenwegen der typischen
   Fälle, in den simulierten Ergebnissen und im Projektablauf.

   Helles und dunkles Design über light-dark(). Ohne JavaScript folgt die
   Seite der Systemeinstellung; main.js ergänzt den Umschalter und startet
   Animationen erst, wenn ein Bereich sichtbar wird.

   Inhalt
   01  Schriften
   02  Design-Tokens (hell und dunkel)
   03  Basis & Reset
   04  Barrierefreiheit
   05  Layout
   06  Buttons, Tags
   07  Header, Navigation, Design-Umschalter
   08  Hero
   09  Leistungsschema (Signature-Element)
   10  Spalten, Leistungszeilen, Passung
   11  Beispiele (dunkel abgesetzt) und simulierte Abläufe
   12  Listen und Schritte
   13  Über mich
   14  FAQ
   15  Kontakt
   16  Footer
   17  Unterseiten: Projekte, Rechtstexte, weitere Komponenten
   18  Animationen beim Sichtbarwerden
   19  Responsiv
   20  Reduzierte Bewegung
   ========================================================================== */


/* 01  Schriften – lokal gehostet ----------------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}


/* 02  Design-Tokens – erster Wert hell, zweiter Wert dunkel -------------- */

:root {
  color-scheme: light dark;

  --bg:            light-dark(#ffffff, #0e1319);
  --bg2:           light-dark(#f4f6f9, #121921);
  --card:          light-dark(#ffffff, #17202a);
  --card2:         light-dark(#f8f9fb, #1b2531);
  --border:        light-dark(#e2e6eb, #243040);
  --border2:       light-dark(#c8cfd8, #34445a);

  --text:          light-dark(#141b24, #e8eef4);
  --text2:         light-dark(#4a5563, #a6b3c1);
  --text3:         light-dark(#8b95a1, #66768a);   /* nur Dekor, nicht für Fließtext */

  --accent:        light-dark(#1f55c2, #7ba7ff);
  --accent-hover:  light-dark(#17449e, #9dbdff);
  --accent-ink:    light-dark(#ffffff, #0a1426);
  --accent-dim:    light-dark(rgba(31, 85, 194, 0.07), rgba(123, 167, 255, 0.12));
  --accent-border: light-dark(rgba(31, 85, 194, 0.35), rgba(123, 167, 255, 0.40));

  --amber:         light-dark(#9a4a06, #f2a65e);     /* Ist-Zustand, Stillstand, Warnung */
  --amber-dim:     light-dark(rgba(154, 74, 6, 0.08), rgba(242, 166, 94, 0.12));
  --amber-border:  light-dark(rgba(154, 74, 6, 0.35), rgba(242, 166, 94, 0.40));

  --violet:        light-dark(#4a5590, #a9b0f2);     /* nur Unterseiten */
  --violet-dim:    light-dark(rgba(74, 85, 144, 0.07), rgba(169, 176, 242, 0.12));
  --violet-border: light-dark(rgba(74, 85, 144, 0.32), rgba(169, 176, 242, 0.38));

  --grid-dot:      light-dark(rgba(20, 27, 36, 0.13), rgba(255, 255, 255, 0.09));
  --grid-line:     light-dark(rgba(20, 27, 36, 0.05), rgba(255, 255, 255, 0.05));
  --header-bg:     light-dark(rgba(255, 255, 255, 0.95), rgba(14, 19, 25, 0.88));
  --shadow-color:  light-dark(rgba(20, 35, 60, 0.18), rgba(0, 0, 0, 0.55));

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: var(--font-body);
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 7px;
  --header-h: 72px;
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }


/* 03  Basis & Reset ------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

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

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p, dl, dd, figure { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
  line-height: 1.2;
}

strong { font-weight: 600; color: var(--text); }
.mono { font-family: var(--font-mono); font-size: 0.9em; }


/* 04  Barrierefreiheit ---------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-color: var(--accent); }


/* 05  Layout -------------------------------------------------------------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 6rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.section--alt { background: var(--bg2); }

.section-head { margin-bottom: 3rem; max-width: 62ch; }

.eyebrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  max-width: 24ch;
  text-wrap: balance;
}

.section-lede {
  font-size: 17.5px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 62ch;
}
.section-lede + .section-lede { margin-top: 1rem; }

.section-foot {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }


/* 06  Buttons, Tags ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  line-height: 1.3;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px -8px var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost { background: var(--card); border-color: var(--border2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

.tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 5px;
  padding: 1px 8px;
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent);
}
.tag--amber { color: var(--amber); background: var(--amber-dim); border-color: var(--amber-border); }
.tag--violet { color: var(--violet); background: var(--violet-dim); border-color: var(--violet-border); }
.tag--neutral { color: var(--text2); background: var(--bg2); border-color: var(--border2); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }


/* 07  Header, Navigation, Design-Umschalter ------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
/* Unschärfe auf einem Pseudo-Element: backdrop-filter am Header selbst würde
   das Vollbild-Menü (position: fixed) im Header einsperren */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo-sub { color: var(--text2); font-weight: 400; font-size: 14px; }

/* Statusanzeige (nur Unterseiten) – statisch */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.main-nav { display: flex; align-items: center; gap: 1.25rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-right: 0.5rem;
  font-size: 15px;
  color: var(--text2);
}
.nav-links a { padding: 6px 0; border-bottom: 2px solid transparent; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* Umschalter nur mit JavaScript sichtbar – ohne JS gilt die Systemeinstellung */
.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 19px; height: 19px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.menu-toggle,
.menu-close {
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.burger-icon,
.burger-icon::before,
.burger-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
}
.burger-icon { position: relative; }
.burger-icon::before,
.burger-icon::after { content: ''; position: absolute; left: 0; }
.burger-icon::before { top: -5px; }
.burger-icon::after { top: 5px; }

.close-icon { position: relative; width: 16px; height: 16px; }
.close-icon::before,
.close-icon::after {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
}
.close-icon::before { transform: rotate(45deg); }
.close-icon::after { transform: rotate(-45deg); }

.mobile-menu { display: none; }
.mobile-menu:target {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  overflow-y: auto;
}
.mobile-menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .menu-close { display: inline-flex; }
.mobile-menu-links { display: flex; flex-direction: column; padding: 1rem 24px 0; }
.mobile-menu-links a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.mobile-menu-links a:hover { color: var(--accent); }
.mobile-menu-cta { padding: 2rem 24px 2.5rem; margin-top: auto; }
.mobile-menu-cta .btn { width: 100%; }
.mobile-menu-meta { margin-top: 1rem; font-size: 15px; color: var(--text2); text-align: center; }


/* 08  Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 5.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
/* Feines Punktraster hinter dem Schema – Bezug: technische Zeichnung */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 55% 75% at 78% 45%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 75% at 78% 45%, #000 15%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
  max-width: 22ch;
  text-wrap: balance;
}

.hero-sub {
  font-size: 19px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 44ch;
  margin-bottom: 2.25rem;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-proof {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--text2);
  max-width: 44ch;
}


/* 09  Leistungsschema (Signature-Element) -------------------------------- */

.svc {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 30px 70px -35px var(--shadow-color);
}

.svc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 16px 20px 12px;
}
.svc-title { font-weight: 600; font-size: 15px; }
.svc-note { font-size: 14px; color: var(--text2); }

/* Segmentschalter mit gleitender Markierung */
.svc-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  min-width: 0;
  margin: 0 20px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
}
.svc-tabs::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 16px) / 3);
  border-radius: var(--radius-sm);
  background: var(--accent);
  box-shadow: 0 6px 16px -8px var(--accent);
  transition: transform 0.4s var(--ease);
}
.svc:has(#svc-md:checked) .svc-tabs::before { transform: translateX(calc(100% + 4px)); }
.svc:has(#svc-ki:checked) .svc-tabs::before { transform: translateX(calc(200% + 8px)); }

.svc-tabs label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text2);
  cursor: pointer;
  transition: color 0.25s ease;
}
.svc-tabs label:hover { color: var(--text); }
.svc-tabs input:checked + label { color: var(--accent-ink); }
.svc-tabs input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

@supports not selector(:has(a)) {
  .svc-tabs::before { display: none; }
  .svc-tabs input:checked + label { background: var(--accent); }
}

/* Datenwege: Quellen – Integration – Ziele.
   Feste Zeilenhöhen (5 × 40 px links, 4 × 40 px rechts auf 240 px) und
   28 px breite SVG-Spalten: Linien und Datenpakete treffen exakt und werden
   nicht verzerrt. */
.map {
  display: grid;
  grid-template-columns: 1fr 28px 84px 28px 1fr;
  height: 240px;
  margin: 1.5rem 20px 1.25rem;
}
.map-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.map-col li {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 14px;
  line-height: 1.2;
  color: var(--text2);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.map-lines { width: 28px; height: 240px; overflow: visible; }
.map-lines path {
  fill: none;
  stroke: var(--border2);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.3s ease;
}
.map-lines .pkt { fill: var(--accent); opacity: 0; transition: opacity 0.3s ease; }

.map-hub {
  align-self: center;
  height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 0 0 6px var(--accent-dim);
}
.map-hub svg { width: 24px; height: 24px; }

/* Aktiver Bereich – Standard ist „Software verbinden" */
.svc:not(:has(#svc-md:checked, #svc-ki:checked)) .map-col .s-sw,
.svc:has(#svc-md:checked) .map-col .s-md,
.svc:has(#svc-ki:checked) .map-col .s-ki {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--text);
  font-weight: 600;
}
.svc:not(:has(#svc-md:checked, #svc-ki:checked)) .map-lines path.s-sw,
.svc:has(#svc-md:checked) .map-lines path.s-md,
.svc:has(#svc-ki:checked) .map-lines path.s-ki {
  stroke: var(--accent);
  stroke-width: 2;
}
.svc:not(:has(#svc-md:checked, #svc-ki:checked)) .map-lines .pkt.s-sw,
.svc:has(#svc-md:checked) .map-lines .pkt.s-md,
.svc:has(#svc-ki:checked) .map-lines .pkt.s-ki { opacity: 1; }

/* Erklärung zum gewählten Bereich */
.svc-panels {
  margin: 0 20px;
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--border);
  min-height: 9.75rem;   /* längster Text – verhindert Springen beim Umschalten */
}
.svc-panel { display: none; }
.svc-panel.p-sw { display: block; }
.svc:has(#svc-md:checked, #svc-ki:checked) .svc-panel.p-sw { display: none; }
.svc:has(#svc-md:checked) .svc-panel.p-md,
.svc:has(#svc-ki:checked) .svc-panel.p-ki { display: block; animation: panel-in 0.35s var(--ease); }

.svc-panel > p:first-child { font-size: 16px; color: var(--text); line-height: 1.6; }
.svc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 8px;
  margin-top: 0.75rem;
  font-size: 15px;
}
.svc-meta .mono {
  padding: 1px 8px;
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
}
.svc-meta .text-link { margin-left: auto; font-weight: 600; }

.svc-caption {
  padding: 12px 20px 14px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--bg2);
  font-size: 14px;
  color: var(--text2);
}


/* 10  Spalten, Leistungszeilen, Passung ---------------------------------- */

.columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.column {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border2);
}
.column::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.column h3 { font-size: 19px; line-height: 1.35; }
.column p { font-size: 16px; color: var(--text2); line-height: 1.65; }
.column-label { font-size: 14px; font-weight: 600; color: var(--accent); }

/* Leistungen: drei Bereiche, unten jeweils die verwendeten Verfahren */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.service {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.service h3 { font-size: 20px; line-height: 1.3; margin-bottom: 0.75rem; text-wrap: balance; }
.service > p { font-size: 16px; color: var(--text2); line-height: 1.65; }
.service .check-list li { color: var(--text); font-size: 15.5px; }
.service-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 1.25rem;
}
.service-tech .mono,
.example-text .mono {
  padding: 1px 8px;
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
}
.service:target { border-color: var(--accent); }

.fit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border2);
}
.fit-col { padding: 1.75rem 2.5rem 0 0; }
.fit-col + .fit-col { padding: 1.75rem 0 0 2.5rem; border-left: 1px solid var(--border2); }
.fit-col h3 { font-size: 19px; }




/* 11  Beispiele: dunkel abgesetzter Bereich mit simulierten Abläufen ----- */

/* Der Bereich bleibt in beiden Designs dunkel: color-scheme: dark lässt alle
   light-dark()-Tokens innerhalb des Bereichs ihren dunklen Wert annehmen. */
.section--ink {
  color-scheme: dark;
  position: relative;
  background: #090d12;
  border-bottom-color: #1c2633;
  color: var(--text);
}
.section--ink::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 420px);
  mask-image: linear-gradient(to bottom, #000, transparent 420px);
  pointer-events: none;
}
.section--ink .container { position: relative; }

.example {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 2rem 4rem;
  align-items: start;
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.example:last-child { padding-bottom: 0; }
.example-kicker { font-size: 14px; font-weight: 600; color: var(--accent); }
.example h3 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0.6rem 0 1rem;
  text-wrap: balance;
}
.example-text > p { font-size: 17px; color: var(--text2); line-height: 1.7; }
.example-facts { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.example-facts > div { padding-left: 1rem; border-left: 2px solid var(--accent-border); }
.example-facts dt { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.example-facts dd { font-size: 15.5px; color: var(--text2); line-height: 1.6; }

/* Demo-Fenster */
.demo {
  padding: 1.25rem 1.35rem 0.9rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.demo-title { font-size: 15px; font-weight: 600; }

.state {
  display: inline-block;
  padding: 1px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.state--warn, .state--wait { border-color: var(--amber-border); background: var(--amber-dim); color: var(--amber); }

/* Ablauf des Agenten als Zeitleiste */
.agent-steps {
  position: relative;
  display: grid;
  gap: 1rem;
  margin: 1.1rem 0 1.25rem;
  padding-left: 26px;
}
.agent-steps::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 1px;
  background: var(--border2);
}
.agent-steps li { position: relative; }
.agent-steps li::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 4px var(--card);
}
.agent-steps li:last-child::before { background: var(--accent); }
.agent-time { font-family: var(--font-mono); font-size: 12.5px; color: var(--text2); }
.agent-what { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; }
.agent-detail { font-size: 14.5px; color: var(--text2); line-height: 1.55; }

.spark { display: block; width: 100%; max-width: 280px; height: 44px; margin-top: 8px; overflow: visible; }
.spark-limit { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* Freigabe: beide Zustände liegen übereinander, sichtbar ist der Endzustand */
.approval { display: grid; justify-items: start; margin-top: 8px; }
.approval .state { grid-area: 1 / 1; }
.approval .state--wait { opacity: 0; }

/* Dialog mit dem Assistenten */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.msg {
  max-width: 90%;
  padding: 10px 13px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.55;
}
.msg--q {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 3px;
}
.msg-who { display: block; font-size: 12px; font-weight: 600; opacity: 0.75; }
.msg-slot { position: relative; }
.msg--a {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
  color: var(--text);
}
.msg--typing {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 5px;
  padding: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  opacity: 0;
}
.msg--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text2);
  animation: typing 1s ease-in-out infinite;
}
.msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.msg--typing span:nth-child(3) { animation-delay: 0.3s; }
.msg-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-sources span {
  padding: 1px 8px;
  border: 1px solid var(--border2);
  border-radius: 5px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--text2);
}

/* Datenweg ERP – Prüfung – Fertigung mit Rückmeldung */
.flow3 { margin: 1.5rem 0 1.25rem; }
.flow3-row {
  display: grid;
  grid-template-columns: auto minmax(20px, 1fr) auto minmax(20px, 1fr) auto;
  align-items: center;
}
.node {
  padding: 7px 13px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--card2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.node--own { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.lane { position: relative; height: 2px; margin: 0 6px; background: var(--border2); }
.lane-pkt {
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
  animation: lane-x 2.4s linear infinite;
}
.lane-pkt--late { animation-delay: 1.2s; }
.flow3-back { margin-top: 16px; text-align: center; }
.lane--back {
  display: block;
  height: 0;
  margin: 0 22px;
  background: none;
  border-top: 2px dashed var(--border2);
}
.lane--back .lane-pkt { top: -5px; animation: lane-x-back 3.6s linear infinite 0.6s; opacity: 0; }
.flow3-label { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--text2); }

/* Protokoll der Übertragung */
.log { display: flex; flex-direction: column; gap: 6px; }
.log li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  font-size: 14px;
  color: var(--text);
}
.log-time { font-family: var(--font-mono); font-size: 13px; color: var(--text2); }
.log-ok,
.log-warn {
  padding: 0 8px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.log-warn { border-color: var(--amber-border); background: var(--amber-dim); color: var(--amber); }

.demo-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.sim-note { font-size: 13px; color: var(--text2); }
.replay {
  display: none;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: 600 14px/1 var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.replay:hover { border-color: var(--accent); }
.js .replay { display: inline-flex; }


/* 12  Listen und Schritte ------------------------------------------------- */

.check-list { display: flex; flex-direction: column; gap: 10px; margin-top: 1.25rem; }
.check-list li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  color: var(--text2);
  line-height: 1.55;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  width: 6px;
  height: 11px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-list--negative li::before {
  top: 11px;
  left: 2px;
  width: 12px;
  height: 2px;
  border: 0;
  background: var(--text2);
  transform: none;
}

/* Datenfluss als Kette (Unterseiten) */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; }
.chain li {
  position: relative;
  padding: 2px 9px;
  border: 1px solid var(--border2);
  border-radius: 5px;
  background: var(--card);
  font-size: 14px;
  color: var(--text);
}
.chain li:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -20px;
  color: var(--text2);
}

/* Projektablauf – echter Ablauf, daher nummeriert */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.step { position: relative; padding-top: 0.25rem; }
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: calc(0.25rem + 19px);
  left: 52px;
  right: -1.25rem;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  background: var(--accent);
  transform-origin: left center;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 2px solid var(--accent);
  margin-bottom: 1rem;
}
.step h3 { font-size: 18px; margin-bottom: 0.4rem; }
.step p { font-size: 16px; color: var(--text2); line-height: 1.6; }

.hint {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--card);
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
}


/* 13  Über mich ----------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: start;
}

.about-quote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  font-size: 18.5px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 58ch;
}

.about-facts { margin-top: 2rem; border-top: 1px solid var(--border2); }
.about-facts > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.about-facts dt { font-size: 15px; color: var(--text2); }
.about-facts dd { font-size: 15.5px; font-weight: 600; color: var(--text); }

.portrait {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}
.portrait img { width: 100%; height: auto; }
.portrait figcaption { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.portrait-name { font-weight: 600; font-size: 17px; }
.portrait-role { font-size: 15px; color: var(--text2); }


/* 14  FAQ ----------------------------------------------------------------- */

.faq { max-width: 840px; border-top: 1px solid var(--border2); }

.faq-item { border-bottom: 1px solid var(--border2); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }
.faq-item summary h3 { font-size: 18px; line-height: 1.4; letter-spacing: -0.01em; transition: color 0.15s ease; }
.faq-item summary:hover h3 { color: var(--accent); }

.faq-item summary::after {
  content: '+';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border2);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease), border-color 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); border-color: var(--accent); }

.faq-answer {
  padding: 0 0 1.35rem;
  font-size: 16.5px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 66ch;
}


/* 15  Kontakt ------------------------------------------------------------- */

.cta-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}
.cta-grid .check-list { margin-top: 1.5rem; }
.cta-grid .check-list li { color: var(--text); }

.contact-list { display: flex; flex-direction: column; gap: 12px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.contact-item:hover { border-color: var(--accent); box-shadow: 0 10px 30px -20px var(--shadow-color); }

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; }

.contact-label { display: block; font-size: 14px; color: var(--text2); }
.contact-note { font-size: 15px; color: var(--text2); line-height: 1.65; margin-top: 0.5rem; }


/* 16  Footer -------------------------------------------------------------- */

.site-footer { padding: 3.5rem 0 2rem; background: var(--bg); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand p { font-size: 15px; color: var(--text2); line-height: 1.65; margin-top: 1rem; max-width: 38ch; }

.footer-col h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--text); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 15px; color: var(--text2); }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 14px;
  color: var(--text2);
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a:hover { color: var(--accent); }


/* 17  Unterseiten: Projekte, Rechtstexte, weitere Komponenten ------------- */

.page-hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.page-hero h1 {
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 24ch;
  margin-bottom: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card h3 { font-size: 18px; margin-bottom: 0.6rem; }
.card p { font-size: 16px; color: var(--text2); line-height: 1.65; }
.card p + p { margin-top: 0.75rem; }
.card .tag-row, .card > .tag { margin-bottom: 1rem; }
.card .card-benefit { margin-top: 1.25rem; padding-top: 0.9rem; border-top: 1px solid var(--border); color: var(--text); }

.compare-card { border-top-width: 3px; }
.compare-card--before { border-top-color: var(--amber); }
.compare-card--after { border-top-color: var(--accent); }

.problem-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
  background: var(--accent-dim);
  color: var(--accent);
}
.problem-icon svg { width: 20px; height: 20px; }

.project-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.project-card--featured { grid-column: 1 / -1; }

.project-visual {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg2);
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--accent);
}
.project-visual svg { width: 44px; height: 44px; }
.project-visual--amber { color: var(--amber); }
.project-visual--violet { color: var(--violet); }

.project-body { padding: 1.6rem 1.75rem 1.75rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.project-body h3 { font-size: 19px; margin: 0; }
.project-card--featured .project-body h3 { font-size: 22px; }

.project-flow { display: grid; gap: 0.9rem; }
.project-card--featured .project-flow { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.project-step dt { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.project-step:first-child dt { color: var(--amber); }
.project-step dd { font-size: 16px; color: var(--text2); line-height: 1.6; }

.project-link { margin-top: auto; font-size: 15px; font-weight: 600; color: var(--accent); align-self: flex-start; }
.project-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.project-card--placeholder { background: transparent; border-style: dashed; border-color: var(--border2); }
.project-card--placeholder .project-visual { color: var(--text3); }
.project-card--placeholder h3 { color: var(--text2); }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 15.5px;
  color: var(--text2);
  line-height: 1.65;
}
.notice svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); margin-top: 3px; }

.example-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--amber);
  border: 1px dashed var(--amber-border);
  border-radius: 5px;
  padding: 2px 9px;
}

.board, .result-panel, .chat-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.board-body, .result-panel { padding: 1.5rem 1.75rem; }
.board-head, .result-panel-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1rem; margin-bottom: 1rem;
}
.board-head h3, .result-panel-head h3 { font-size: 17px; }

.timeline { display: flex; height: 16px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--bg2); }
.tl-seg { min-width: 4px; }
.tl-seg--run { background: var(--accent); }
.tl-seg--stop { background: var(--amber); }
.tl-seg--warn { background: var(--violet); }
.w-2 { flex: 2; }   .w-3 { flex: 3; }   .w-4 { flex: 4; }   .w-5 { flex: 5; }
.w-6 { flex: 6; }   .w-8 { flex: 8; }   .w-10 { flex: 10; } .w-12 { flex: 12; }
.w-14 { flex: 14; } .w-18 { flex: 18; } .w-20 { flex: 20; }
.timeline-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--text2); }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0.75rem 0 0; font-size: 14px; color: var(--text2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; }
.legend-swatch--run { background: var(--accent); }
.legend-swatch--stop { background: var(--amber); }
.legend-swatch--warn { background: var(--violet); }

.kpi-grid, .kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.kpi dt, .kpi-row dt { font-size: 13.5px; color: var(--text2); margin-bottom: 2px; }
.kpi dd, .kpi-row dd { font-size: 16px; font-weight: 600; color: var(--text); }
.is-mint { color: var(--accent); }
.is-amber { color: var(--amber); }
.is-violet { color: var(--violet); }

.result-note, .board-alert {
  margin-top: 1rem;
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
}
.result-note .tag, .board-alert .tag { flex-shrink: 0; }

.chat-panel, .chat-body { display: flex; flex-direction: column; gap: 14px; padding: 1.5rem; }
.chat-panel .example-note, .chat-body .example-note { align-self: flex-start; }
.chat-msg { max-width: 88%; padding: 12px 15px; border-radius: var(--radius); font-size: 15.5px; line-height: 1.6; color: var(--text); }
.chat-msg--q { align-self: flex-end; background: var(--bg2); border: 1px solid var(--border2); }
.chat-msg--a { align-self: flex-start; background: var(--accent-dim); border: 1px solid var(--accent-border); }
.chat-who { display: block; font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.chat-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-source { font-size: 13px; color: var(--text2); background: var(--card); border: 1px solid var(--border2); border-radius: 5px; padding: 1px 8px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }

/* Rechtstexte: Inhaltsverzeichnis links (mitlaufend), Text rechts */
.page-hero .section-lede { margin-bottom: 0; }
.legal-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.legal-facts dt { font-size: 13.5px; color: var(--text2); }
.legal-facts dd { font-size: 15.5px; font-weight: 600; color: var(--text); }

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.toc-box summary {
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  padding: 0 0 0.75rem;
  pointer-events: none;           /* auf großen Bildschirmen immer offen */
}
.toc-box summary::-webkit-details-marker { display: none; }
.toc-list { border-left: 1px solid var(--border2); }
.toc-list ol { margin: 2px 0 6px; }
.toc-list a {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text2);
  transition: color 0.15s ease, border-color 0.2s ease;
}
.toc-list > li > a { font-weight: 600; color: var(--text); }
.toc-list ol a { padding-left: 32px; font-size: 14px; }
.toc-list a:hover { color: var(--accent); }
.toc-list a[aria-current="location"] { color: var(--accent); border-left-color: var(--accent); }
.toc-list .num { min-width: 1ch; color: var(--accent); }

.legal { max-width: 72ch; min-width: 0; overflow-wrap: break-word; }
.legal > section + section { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.legal h2, .legal h3, .legal h4 { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.legal h2 {
  display: flex;
  gap: 0.75rem;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.legal h3 { display: flex; gap: 0.6rem; font-size: 1.2rem; letter-spacing: -0.01em; margin: 2.75rem 0 0.9rem; }
.legal h4 { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; font-size: 1.05rem; margin: 2rem 0 0.6rem; }
.legal h5 { font-size: 15px; font-weight: 600; color: var(--text); margin: 1.5rem 0 0.4rem; }
.legal .num { color: var(--accent); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.legal p, .legal li { font-size: 16.5px; color: var(--text2); line-height: 1.75; }
.legal p + p { margin-top: 0.9rem; }
.legal strong { color: var(--text); }

.legal-list { margin: 0.75rem 0 1.25rem; display: grid; gap: 4px; }
.legal-list li { position: relative; padding-left: 20px; }
.legal-list li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.legal-list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }

.legal-alpha { margin: 1rem 0 1.25rem; counter-reset: alpha; display: grid; gap: 0.6rem; }
.legal-alpha li { position: relative; padding-left: 2.25rem; counter-increment: alpha; }
.legal-alpha li::before {
  content: counter(alpha, lower-alpha) ")";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.6rem;
  font-weight: 600;
  color: var(--accent);
}

.legal-address {
  margin: 0.75rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg2);
  font-style: normal;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
}

/* Ein Block pro Dienstleister – Name und Kurzinfo stehen vorn, damit man gezielt suchen kann */
.provider {
  margin: 1.25rem 0 0;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.provider + .provider { margin-top: 1rem; }
.provider-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.legal .provider-head h4 { margin: 0; font-size: 1.1rem; }
.provider .tag { font-size: 12.5px; }
.provider p, .provider li { font-size: 15.5px; }
.provider-link { padding-top: 0.75rem; }

.legal-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.legal-pair h5 { margin-top: 0.5rem; }

.rights { display: grid; gap: 0.75rem; margin-top: 1rem; }
.right {
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.legal .right h4 { margin: 0 0 0.4rem; align-items: baseline; }
.right-ref {
  margin-left: auto;
  padding: 0 7px;
  border: 1px solid var(--border2);
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}
.right p { font-size: 15.5px; }

.legal-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
}
.legal-cta p { color: var(--text); }

/* Impressum: einspaltig, Anbieter und Kontakt als zwei Angaben nebeneinander */
.legal-single { padding-top: 3.5rem; padding-bottom: 5rem; }
.legal-single .legal { max-width: 72ch; }
.legal-single .legal > section { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.legal-single .legal h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }

.imprint-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.legal .imprint-card {
  margin: 0;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.legal .imprint-card h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.imprint-card address { font-style: normal; font-size: 16.5px; line-height: 1.7; color: var(--text); }
.imprint-contact { display: grid; gap: 0.9rem; }
.legal .imprint-contact li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.imprint-contact .contact-label { line-height: 1.3; }

.legal .placeholder-hint { font-size: 14px; font-weight: 600; color: var(--amber); }
.legal-meta { font-size: 14px; color: var(--text2); margin-top: 2rem; }
.legal p.legal-meta { font-size: 14px; }

.footer-col a[aria-current="page"], .footer-legal a[aria-current="page"] { color: var(--text); }

@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
  .toc { position: static; max-height: none; overflow: visible; }
  .toc-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
  }
  .toc-box summary {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 1.1rem;
    cursor: pointer;
    font-size: 15px;
    color: var(--text);
  }
  .toc-box summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--accent);
    transition: transform 0.3s var(--ease);
  }
  .toc-box[open] summary::after { transform: rotate(45deg); }
  .toc-list { margin: 0 1.1rem 1rem; }
  .legal { max-width: none; }
}

@media (max-width: 600px) {
  .legal-list--cols, .legal-pair, .imprint-cards { grid-template-columns: 1fr; }
  .legal-single { padding-top: 2rem; }
  .provider { padding: 1.1rem 1.1rem 1.25rem; }
  .legal > section + section { margin-top: 3rem; padding-top: 2.25rem; }
  .right-ref { margin-left: 0; }
  .legal-cta .btn { width: 100%; }
}


/* 18  Animationen --------------------------------------------------------- */

@keyframes lane-x {
  0%        { left: 0; opacity: 0; }
  5%        { opacity: 1; }
  45%       { left: calc(100% - 8px); opacity: 1; }
  50%, 100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes lane-x-back {
  0%        { left: calc(100% - 8px); opacity: 0; }
  5%        { opacity: 1; }
  45%       { left: 0; opacity: 1; }
  50%, 100% { left: 0; opacity: 0; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fill-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes show-hide { 0% { opacity: 0; } 12%, 88% { opacity: 1; } 100% { opacity: 0; } }

/* Erklärende Abläufe starten, sobald der Bereich sichtbar wird (main.js setzt .is-visible).
   Ohne JavaScript oder bei reduzierter Bewegung wird sofort der Endzustand gezeigt. */
@media (prefers-reduced-motion: no-preference) {
  /* KI-Agent: Meldung, Daten, Unterlagen, Vorschlag, Freigabe, Rückfrage im Chat */
  .js .demo[data-animate]:not(.is-visible) :is(.agent-steps li, .approval .state--ok, .msg--q, .msg--a, .log li) { opacity: 0; }
  .demo.is-visible .agent-steps li { animation: rise 0.45s var(--ease) both; }
  .demo.is-visible .agent-steps li:nth-child(1) { animation-delay: 0.3s; }
  .demo.is-visible .agent-steps li:nth-child(2) { animation-delay: 1.3s; }
  .demo.is-visible .agent-steps li:nth-child(3) { animation-delay: 2.9s; }
  .demo.is-visible .agent-steps li:nth-child(4) { animation-delay: 4.1s; }
  .demo.is-visible .spark { animation: fill-x 1.3s var(--ease) both 1.6s; }
  .demo.is-visible .approval .state--wait { animation: show-hide 2s ease both 4.4s; }
  .demo.is-visible .approval .state--ok { animation: rise 0.4s var(--ease) both 6.3s; }
  .demo.is-visible .msg--q { animation: rise 0.45s var(--ease) both 7s; }
  .demo.is-visible .msg--typing { animation: show-hide 1.4s ease both 7.5s; }
  .demo.is-visible .msg--a { animation: rise 0.5s var(--ease) both 8.9s; }

  /* ERP: Protokollzeilen erscheinen nacheinander, die Rückmeldung zuletzt */
  .demo.is-visible .log li { animation: rise 0.45s var(--ease) both; }
  .demo.is-visible .log li:nth-child(1) { animation-delay: 0.8s; }
  .demo.is-visible .log li:nth-child(2) { animation-delay: 1.4s; }
  .demo.is-visible .log li:nth-child(3) { animation-delay: 2.2s; }
  .demo.is-visible .log li:nth-child(4) { animation-delay: 3.6s; }

  /* Projektablauf: Schritte werden der Reihe nach erreicht */
  .js .steps[data-animate]:not(.is-visible) .step::after { transform: scaleX(0); }
  .js .steps[data-animate]:not(.is-visible) .step-num { background: var(--card); color: var(--accent); }
  .steps.is-visible .step::after { transition: transform 0.55s var(--ease); }
  .steps.is-visible .step-num { transition: background-color 0.3s ease, color 0.3s ease; }
  .steps.is-visible .step:nth-child(1)::after { transition-delay: 0.3s; }
  .steps.is-visible .step:nth-child(2)::after { transition-delay: 0.9s; }
  .steps.is-visible .step:nth-child(3)::after { transition-delay: 1.5s; }
  .steps.is-visible .step:nth-child(2) .step-num { transition-delay: 0.8s; }
  .steps.is-visible .step:nth-child(3) .step-num { transition-delay: 1.4s; }
  .steps.is-visible .step:nth-child(4) .step-num { transition-delay: 2s; }
}


/* 19  Responsiv ----------------------------------------------------------- */

@media (min-width: 861px) {
  .mobile-menu:target { display: none; }
}

@media (max-width: 1080px) {
  .nav-links { gap: 1.2rem; font-size: 14.5px; }
  .grid-4, .kpi-grid, .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .step:nth-child(2)::after { display: none; }
  .hero-inner { gap: 3rem; }
  .services { grid-template-columns: 1fr 1fr; }
  .services .service:last-child { grid-column: 1 / -1; }
  .example { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 860px) {
  .section { padding: 4rem 0; }
  .hero { padding: 3rem 0 3.5rem; }
  .hero::before { -webkit-mask-image: radial-gradient(ellipse 90% 50% at 50% 75%, #000 15%, transparent 75%); mask-image: radial-gradient(ellipse 90% 50% at 50% 75%, #000 15%, transparent 75%); }
  .page-hero { padding: 3rem 0 2.75rem; }

  .nav-links, .main-nav > .btn { display: none; }
  .main-nav { gap: 8px; }
  .menu-toggle { display: inline-flex; }

  .hero-inner, .about-grid, .cta-grid, .grid-2, .grid-3, .grid-4,
  .columns, .services, .example, .fit, .split, .footer-grid { grid-template-columns: 1fr; }

  .hero-inner, .about-grid, .cta-grid { gap: 2.5rem; }
  .columns { gap: 2.25rem; }
  .example { padding: 2.5rem 0; }

  .fit-col, .fit-col + .fit-col { padding: 1.5rem 0 0; border-left: 0; }
  .fit-col + .fit-col { margin-top: 1.5rem; border-top: 1px solid var(--border2); }

  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 0 0 1.75rem 56px; }
  .step-num { position: absolute; left: 0; top: 0; margin: 0; }
  .step:not(:last-child)::after {
    top: 44px; bottom: 6px; left: 18px; right: auto;
    width: 2px; height: auto; margin-top: 0;
    transform-origin: center top;
  }
  .step:nth-child(2)::after { display: block; }

  .project-card--featured .project-flow { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .chat-msg { max-width: 100%; }
}

@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .js .steps[data-animate]:not(.is-visible) .step::after { transform: scaleY(0); }
}

@media (max-width: 480px) {
  .container, .header-inner { padding-left: 20px; padding-right: 20px; }
  .hero-cta .btn { width: 100%; }
  .svc-head, .svc-caption { padding-left: 14px; padding-right: 14px; }
  .svc-note { display: none; }
  .svc-tabs, .svc-panels { margin-left: 14px; margin-right: 14px; }
  .svc-tabs label { font-size: 14px; padding: 6px 2px; hyphens: auto; }
  .svc-panels { min-height: 14.75rem; }
  .map { grid-template-columns: 1fr 28px 64px 28px 1fr; margin-left: 14px; margin-right: 14px; }
  .map-col li { padding: 0 7px; font-size: 13px; hyphens: auto; }
  .map-hub { font-size: 11.5px; }
  .svc-meta .text-link { margin-left: 0; flex-basis: 100%; }
  .demo { padding: 1rem 1rem 0.75rem; }
  .service { padding: 1.4rem 1.25rem 1.25rem; }
  .node { padding: 6px 9px; font-size: 13px; }
  .lane { margin: 0 4px; }
  .log li { grid-template-columns: auto 1fr; }
  .log li > :last-child { grid-column: 2; justify-self: start; }
  .about-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .kpi-grid, .kpi-row { grid-template-columns: 1fr; }
  .logo-sub { display: none; }
}


/* Sehr schmale Geräte: Menü-Schalter nur als Symbol, Beschriftung bleibt für Screenreader */
@media (max-width: 380px) {
  .menu-toggle { padding: 0 13px; }
  .menu-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .svc-panels { min-height: 16.5rem; }
}


/* 20  Reduzierte Bewegung ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .map-lines .pkt, .lane-pkt { display: none; }
  .replay { display: none !important; }
}
