/* OFFICETECH – Website auf Basis von Entwurf B, Version 2
   Signalblau und Signalrot, DIN-artige Schrift, Büro-Netzwerkschema als Leitmotiv.
   Heller Hero, weichere Ecken, Betreuung vor Technik. Keine Webfonts, keine externen Ressourcen. */

:root {
  --blue: #1748c9;
  --blue-deep: #10265a;
  --blue-mid: #2c5bd3;
  --red: #d8232c;
  --red-dark: #b01a22;
  --morning: #f3f6fb;
  --sky: #e3ebfa;
  --line: #cfd8e8;
  --text: #1a2440;
  --muted: #4b5873;
  --white: #ffffff;

  --display: Bahnschrift, "DIN Alternate", "DIN 2014", "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", "Nimbus Sans Narrow", sans-serif;
  --sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Typografische Skala, Verhältnis ca. 1,25 */
  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.6rem);
  --step-4: clamp(2.5rem, 5.6vw, 4.4rem);
  --step-4s: clamp(2.2rem, 4.4vw, 3.5rem);

  --wrap: 75rem;
  --space: clamp(4rem, 8vw, 6.5rem);
  --radius: 10px;
  --header-h: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 1rem; color: var(--blue-deep); text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: var(--step-3); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 1rem; max-width: 62ch; }
ul, ol { max-width: 66ch; }
strong { font-weight: 650; }

a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; left: 1rem; top: -5rem; z-index: 30; background: var(--blue-deep); color: var(--white); padding: .7rem 1.1rem; border-radius: 6px; font-weight: 600; }
.skip:focus { top: 1rem; color: var(--white); }

/* Entwurfskennzeichnung: vor Veröffentlichung entfernen */
.draft-bar { margin: 0; max-width: none; background: var(--blue-deep); color: #c9d6f2; font-size: var(--step--1); line-height: 1.4; padding-block: .5rem; }

/* Offene Angaben: sichtbar und eindeutig, damit nichts versehentlich veröffentlicht wird */
.todo {
  display: inline-block; font-family: var(--sans); font-style: normal; font-size: .92em; font-weight: 600; line-height: 1.35;
  color: var(--red-dark); background: #fdeced; border: 1px dashed var(--red); border-radius: 6px; padding: .1rem .45rem;
}
.todo::before { content: "TODO: "; font-weight: 800; }
p.todo, li.todo, div.todo { display: block; padding: .6rem .8rem; }
.todo-block { border: 2px dashed var(--red); background: #fff6f6; border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1.5rem; max-width: 62ch; }
.todo-block > :last-child { margin-bottom: 0; }
.todo-block strong { color: var(--red-dark); }

/* Kopfbereich */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255,255,255,.9); backdrop-filter: blur(8px); }
}
.header-inner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 1rem 1.5rem; min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { display: block; width: 196px; height: auto; }
.logo-flag {
  font-size: .72rem; font-weight: 600; line-height: 1; color: var(--muted);
  border: 1px dashed var(--muted); border-radius: 999px; padding: .3rem .55rem; white-space: nowrap;
}

summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* Hauptnavigation Desktop */
.nav-list { display: flex; justify-content: flex-end; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; max-width: none; }
.nav-list > li { position: relative; }
.nav-list > li > a, .sub > summary {
  display: block; font-family: var(--display); font-size: 1.02rem; color: var(--blue-deep);
  text-decoration: none; padding: .55rem .75rem; border-radius: 6px; white-space: nowrap; position: relative;
}
.nav-list > li > a:hover, .sub > summary:hover, .sub[open] > summary { background: var(--sky); color: var(--blue); }
.sub > summary { padding-right: 1.9rem; }
.sub > summary::after {
  content: ""; position: absolute; right: .8rem; top: 50%; width: .45rem; height: .45rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg);
}
.sub[open] > summary::after { transform: translateY(-25%) rotate(225deg); }
.sub-panel {
  position: absolute; top: calc(100% + .5rem); left: 0; min-width: 19rem; z-index: 25;
  list-style: none; margin: 0; padding: .5rem; background: var(--white);
  border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 14px 30px -12px rgba(16,38,90,.35);
}
.sub-panel a { display: block; padding: .6rem .75rem; border-radius: 6px; text-decoration: none; color: var(--blue-deep); font-family: var(--display); font-size: 1.02rem; }
.sub-panel a:hover { background: var(--sky); color: var(--blue); }
.sub-panel .sub-all { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .35rem; }
.sub-panel .sub-all a { color: var(--muted); font-size: .95rem; }

/* Aktive Seite: roter Strich, wie die Betreuungsklammer */
.nav-list a[aria-current="page"], .sub.is-active > summary { color: var(--blue); }
.nav-list > li > a[aria-current="page"]::after, .sub.is-active > summary::before {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .2rem; height: 3px; border-radius: 2px; background: var(--red);
}
.sub.is-active > summary::before { right: 1.9rem; }
.sub-panel a[aria-current="page"] { background: var(--sky); box-shadow: inset 3px 0 0 var(--red); }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  font-family: var(--display); font-size: 1.08rem; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  padding: .8rem 1.5rem; border: 2px solid transparent; border-radius: 8px;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-deep); color: var(--white); }
.btn-ghost { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-ghost:hover { background: var(--blue); color: var(--white); }
.btn-light { border-color: rgba(255,255,255,.7); color: var(--white); background: transparent; }
.btn-light:hover { background: var(--white); color: var(--blue-deep); }
.header-cta { min-height: 2.6rem; padding: .5rem 1.15rem; font-size: 1rem; }
.header-cta[aria-current="page"] { background: var(--blue-deep); box-shadow: inset 0 -3px 0 var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

/* Mobiles Menü: ausklappbar ohne Skript (details/summary) */
.menu { display: none; }
.menu > summary {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .45rem .85rem;
  font-family: var(--display); font-size: 1rem; font-weight: 600; color: var(--blue-deep);
  border: 2px solid var(--blue-deep); border-radius: 8px;
}
.burger { position: relative; width: 1.1rem; height: 2px; background: currentColor; border-radius: 1px; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 1px; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.menu[open] > summary { background: var(--blue-deep); color: var(--white); }
.menu[open] .burger { background: transparent; }
.menu[open] .burger::before { top: 0; transform: rotate(45deg); }
.menu[open] .burger::after { top: 0; transform: rotate(-45deg); }
.menu-label-close { display: none; }
.menu[open] .menu-label-open { display: none; }
.menu[open] .menu-label-close { display: inline; }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - var(--header-h) - 1rem); max-height: calc(100dvh - var(--header-h) - 1rem); overflow-y: auto;
  background: var(--white); border-bottom: 4px solid var(--blue); box-shadow: 0 18px 30px -18px rgba(16,38,90,.45);
  padding: .5rem 0 1.25rem;
}
.menu-panel ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.menu-panel > ul { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.menu-panel li:last-child > a { border-bottom: 0; }
.menu-panel a {
  display: flex; align-items: center; min-height: 3rem; padding: .5rem 0;
  font-family: var(--display); font-size: 1.15rem; color: var(--blue-deep); text-decoration: none; border-bottom: 1px solid var(--line);
}
.menu-panel a[aria-current="page"] { color: var(--blue); box-shadow: inset 4px 0 0 var(--red); padding-left: .9rem; }
.menu-group { padding-top: 1rem; font-family: var(--display); font-size: .95rem; font-weight: 600; color: var(--muted); }
.menu-group ul a { padding-left: 1rem; font-size: 1.08rem; }
.menu-group ul a[aria-current="page"] { padding-left: 1.4rem; }
.menu-panel .btn { margin-top: 1.25rem; width: 100%; border-bottom: 0; color: var(--white); }

/* Hero Startseite */
.hero {
  background-color: var(--morning);
  background-image: radial-gradient(circle, rgba(23,72,201,.13) 1.2px, transparent 1.4px);
  background-size: 26px 26px;
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 11ch; }
.lead { font-size: var(--step-1); line-height: 1.55; }
.hero .lead, .page-hero .lead { color: var(--text); max-width: 36rem; }
.hero-points { list-style: none; margin: 2.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--muted); font-size: .98rem; }
.hero-points li { display: flex; align-items: center; gap: .55rem; }
.hero-points li::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--sky); }

/* Hero Unterseiten: gleiches Punktraster, kompakter */
.page-hero {
  background-color: var(--morning);
  background-image: radial-gradient(circle, rgba(23,72,201,.13) 1.2px, transparent 1.4px);
  background-size: 26px 26px;
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.25rem, 5vw, 4rem) clamp(2.75rem, 6vw, 4.5rem);
}
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.page-hero.is-text .page-hero-grid { grid-template-columns: minmax(0, 1fr); }
.page-hero h1 { font-size: var(--step-4s); max-width: 17ch; }
.page-hero.is-legal h1 { max-width: none; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; font-size: var(--step--1); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: #8b97b0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs [aria-current="page"] { color: var(--blue-deep); font-weight: 600; }

/* Sprungmarken innerhalb einer Seite */
.toc { border-bottom: 1px solid var(--line); background: var(--white); }
.toc ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; list-style: none; margin: 0; padding: .65rem 0; max-width: none; }
.toc p { margin: 0; font-family: var(--display); font-weight: 600; color: var(--muted); }
.toc-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; }
.toc a { display: inline-flex; align-items: center; min-height: 2.75rem; font-family: var(--display); font-size: 1.02rem; color: var(--blue-deep); text-decoration: none; }
.toc a:hover { color: var(--blue); text-decoration: underline; }

/* Büro-Schema */
.office { margin: 0; }
.office svg { display: block; width: 100%; height: auto; overflow: visible; }
.office text { font-family: var(--display); font-size: 16px; text-anchor: middle; fill: var(--blue-deep); }
.office-area { fill: var(--white); }
.office-edge { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: .012 .008; }
.office .links path { stroke: #7f9ddf; stroke-width: 2; stroke-linejoin: round; }
.office .node rect { fill: var(--white); stroke: #9fb4e3; stroke-width: 1.5; }
.office .node-out rect { fill: var(--morning); stroke-dasharray: 4 4; }
.office .node-gate rect { fill: var(--blue-deep); stroke: var(--blue-deep); }
.office .node-gate text { fill: var(--white); font-weight: 600; }
.office .node-hub rect { fill: var(--sky); stroke: var(--blue); }
.office .node-backup rect { stroke: var(--blue); stroke-width: 2; }
.office .desks rect { fill: var(--blue); }
.office .desks path { stroke: var(--blue); stroke-width: 3; stroke-linecap: round; fill: none; }
.office .link-ki { stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 6 5; }
.office .node-ki circle { fill: var(--red); }
.office .ki-mark { fill: var(--white); font-weight: 700; font-size: 17px; }
.office .ki-label { fill: var(--red-dark); font-weight: 600; font-size: 15px; }
.office .care rect { fill: var(--blue); }
.office .care text { fill: var(--white); font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.office figcaption { margin-top: 1rem; color: var(--muted); font-size: .95rem; text-align: center; }

/* Unterseiten: dasselbe Büro, der jeweilige Bereich ist hervorgehoben */
.office-mini { max-width: 30rem; justify-self: end; width: 100%; }
.office-mini .part:not(.is-focus) { opacity: .3; }
.office-mini .links.is-focus path { stroke: var(--blue); stroke-width: 2.5; }
.office-mini .node.is-focus rect { stroke: var(--red); stroke-width: 3; }
.office-mini .node-gate.is-focus rect { fill: var(--blue-deep); }
.office-mini .node-hub.is-focus rect { fill: var(--sky); }
.office-mini .desks.is-focus rect { fill: var(--blue); stroke: var(--red); stroke-width: 2.5; }
.office-mini .office-edge.is-focus { stroke: var(--red); stroke-width: 3; }

/* Fertigungsschema (Individuelle Lösungen) */
.plant text { font-family: var(--display); font-size: 16px; text-anchor: middle; fill: var(--blue-deep); }
.plant .zone { fill: var(--white); stroke: var(--blue); stroke-width: 2; stroke-dasharray: 7 5; }
.plant .zone-shop { fill: #fbfcfe; stroke: var(--blue-deep); }
.plant .zone-label { font-size: 14px; font-weight: 600; fill: var(--muted); text-anchor: start; }
.plant .node rect { fill: var(--white); stroke: #9fb4e3; stroke-width: 1.5; }
.plant .node-gate rect { fill: var(--blue-deep); stroke: var(--blue-deep); }
.plant .node-gate text { fill: var(--white); font-weight: 600; }
.plant .node-machine rect { fill: var(--sky); stroke: var(--blue); stroke-width: 2; }
.plant .wire { fill: none; stroke: #7f9ddf; stroke-width: 2; stroke-linejoin: round; }
.plant .wire-dnc { stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 6 5; }
.plant .dnc-label { fill: var(--red-dark); font-weight: 600; font-size: 14px; }

/* Einziger Bewegungsmoment (nur Startseite): das Büro baut sich beim Laden einmal auf */
@media (prefers-reduced-motion: no-preference) {
  .office-anim .office-edge { animation: edge 1.6s .1s ease-out both; }
  .office-anim .links path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s ease-out forwards; }
  .office-anim .links path:nth-child(1) { animation-delay: .2s; }
  .office-anim .links path:nth-child(2) { animation-delay: .5s; }
  .office-anim .links path:nth-child(n+3) { animation-delay: .8s; }
  .office-anim .links path:nth-child(n+5) { animation-delay: 1.1s; }
  .office-anim .link-ki, .office-anim .node-ki { opacity: 0; animation: appear .5s 1.9s ease-out forwards; }
  .office-anim .care { opacity: 0; animation: appear .5s 1.5s ease-out forwards; }
}
@keyframes edge { from { stroke-dasharray: 1 1; stroke-dashoffset: 1; } 70% { stroke-dasharray: 1 1; stroke-dashoffset: 0; } to { stroke-dasharray: .012 .008; stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Abschnitte */
.section { padding-block: var(--space); }
.section-tint { background: var(--morning); border-block: 1px solid var(--line); }
.section-tint + .section-tint { border-top: 0; }
.section-head { margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.lead-dark { font-size: var(--step-1); line-height: 1.5; color: var(--blue-deep); }
.muted { color: var(--muted); }
.more { margin: 1.75rem 0 0; }
.more a { font-family: var(--display); font-weight: 600; font-size: 1.08rem; }

/* Zweispaltig: Einleitung links, Inhalt rechts */
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 2rem clamp(2rem, 6vw, 5.5rem); align-items: start; }
.split > :first-child > :last-child { margin-bottom: 0; }

/* Betreuung & Support */
.support-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.support-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.support-intro > p:not(.lead-dark):not(.more) { color: var(--muted); }
.care-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: none; }
.care-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1.25rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.care-list h3 { margin-bottom: .35rem; }
.care-list p { margin: 0; color: var(--muted); }
.icon {
  width: 3rem; height: 3rem; padding: .6rem; border-radius: 12px; background: var(--sky);
  fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Leistungsdetails: Liste mit Trennlinien statt Kartenraster */
.details { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); max-width: none; }
.details.details-single { grid-template-columns: minmax(0, 1fr); }
.details-single > li:first-child { padding-top: 0; border-top: 0; }
.details > li { padding: 1.6rem 0 1.7rem; border-top: 1px solid var(--line); }
.details h3 { margin-bottom: .5rem; }
.details p { color: var(--muted); margin-bottom: .6rem; }
.details ul { margin: 0; padding-left: 1.1rem; color: var(--text); font-size: 1rem; }
.details ul li { margin-bottom: .25rem; }
.details ul li::marker { color: var(--blue); }

/* Kennen Sie das? – Ausgangslagen aus Kundensicht */
.ticks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: none; }
.ticks li { position: relative; padding: .95rem 0 .95rem 2rem; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.45rem; width: 1rem; height: 2px; background: var(--red); }

/* Hinweis- und Grenzenkasten */
.note { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--blue-deep); border-radius: 4px var(--radius) var(--radius) 4px; padding: 1.4rem 1.6rem; max-width: 62ch; }
.note h3 { margin-bottom: .5rem; }
.note > :last-child { margin-bottom: 0; }
.note .note-title { font-size: var(--step-1); margin-bottom: .5rem; }
.note-red { border-left-color: var(--red); }
.stack-notes > * { margin-top: 0; margin-bottom: 0; }
.stack-notes > * + * { margin-top: 1rem; }

/* Schichtenmodell */
.services { background: var(--morning); border-block: 1px solid var(--line); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1rem; }
.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-width: none; }
.layer {
  display: grid; grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr); gap: .4rem 2rem; align-items: baseline;
  background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--blue);
  border-radius: 4px var(--radius) var(--radius) 4px; padding: 1.35rem 1.75rem;
}
.layer h3 { margin: 0; }
.layer h3 a { color: var(--blue-deep); text-decoration: none; }
.layer h3 a:hover { color: var(--blue); text-decoration: underline; }
.layer p { margin: 0; color: var(--muted); }
.layer:nth-child(1) { border-left-color: #6d8fe0; }
.layer:nth-child(2) { border-left-color: #4673da; }
.layer:nth-child(3) { border-left-color: var(--blue); }
.layer:nth-child(4) { border-left-color: var(--blue-deep); }
.bracket {
  position: relative; display: flex; align-items: center;
  background: var(--blue-deep); color: #d3def5; border-radius: var(--radius); padding: 1.75rem 1.5rem 1.75rem 2.1rem;
}
.bracket::before { content: ""; position: absolute; left: .9rem; top: 1.25rem; bottom: 1.25rem; width: 3px; border-radius: 2px; background: var(--red); }
.bracket p { margin: 0; font-size: 1.05rem; }
.bracket strong { display: block; font-family: var(--display); font-size: var(--step-2); line-height: 1.15; color: var(--white); margin-bottom: .6rem; }
.bracket a { color: var(--white); }
.bracket a:hover { color: #d3def5; }

/* KI & Automatisierung */
.ki { background: var(--blue); color: #e8eefc; border-top: 6px solid var(--red); }
.ki-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 2.5rem clamp(2rem, 5vw, 4.5rem); align-items: start; }
.ki h2 { color: var(--white); font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.ki .lead { color: var(--white); font-size: 1.15rem; }
.ki a:not(.btn) { color: var(--white); }
.tag { display: inline-block; background: var(--white); color: var(--red-dark); font-family: var(--display); font-weight: 600; padding: .25rem .75rem; border-radius: 999px; margin-bottom: 1.1rem; }
.ki-principles { list-style: none; margin: 1.75rem 0 2.25rem; padding: 0; display: grid; gap: .6rem; }
.ki-principles li { display: flex; gap: .7rem; align-items: baseline; }
.ki-principles li::before { content: ""; flex: none; width: .9rem; height: 2px; background: var(--white); transform: translateY(-.3em); }
.ki-fields { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; max-width: none; }
.ki-fields li { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius); padding: 1.35rem 1.4rem; }
.ki-fields li:first-child { grid-column: 1 / -1; background: var(--white); border-color: var(--white); }
.ki-fields li:first-child h3 { color: var(--blue-deep); }
.ki-fields li:first-child p { color: var(--muted); }
.ki-fields h3 { color: var(--white); font-size: 1.18rem; margin-bottom: .5rem; }
.ki-fields p { margin: 0; font-size: .98rem; }
.ki .draft-note { grid-column: 2; margin: -1.25rem 0 0; font-size: var(--step--1); color: #dbe4fb; }
.ki .todo { background: var(--white); }

/* KI-Seite: Prinzipien als eigene Fläche */
.ki-band { background: var(--blue); color: #e8eefc; border-top: 6px solid var(--red); }
.ki-band h2, .ki-band h3 { color: var(--white); }
.ki-band .section-head p { color: #dbe4fb; }
.ki-band .details > li { border-top-color: rgba(255,255,255,.3); }
.ki-band .details p, .ki-band .details ul { color: #e8eefc; }
.ki-band .details ul li::marker { color: var(--white); }
.ki-band :focus-visible { outline-color: var(--white); }
.ki-band .todo-block { margin: 2rem 0 0; color: var(--text); }
.tag-outline { background: var(--white); border: 1px solid #f0b8bb; }

/* Individuelle Lösungen: auf der Startseite bewusst zurückgenommen */
.special { padding-block: clamp(3rem, 6vw, 4.5rem); }
.special-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 6vw, 5.5rem); align-items: start; }
.special h2 { font-size: var(--step-2); }
.special-grid p { color: var(--muted); }
.special-grid .special-label { font-family: var(--display); font-weight: 600; color: var(--blue-deep); margin-bottom: .5rem; }
.spec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.spec li { position: relative; padding: .8rem 0 .8rem 1.6rem; border-bottom: 1px solid var(--line); color: var(--text); }
.spec li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: .6rem; height: .6rem; border: 2px solid var(--blue); border-radius: 50%; }

/* Ablauf: echte Reihenfolge, daher nummeriert */
.flow-section { background: var(--morning); border-block: 1px solid var(--line); }
.flow { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
.flow.flow-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow li { counter-increment: s; position: relative; padding: 3.25rem 1.5rem 0 0; }
.flow li::before {
  content: counter(s); position: absolute; top: 0; left: 0; z-index: 1;
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--blue); color: var(--white); font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 0 0 6px var(--morning);
}
.flow li::after { content: ""; position: absolute; top: 1.15rem; left: 0; right: 0; height: 2px; background: var(--line); }
.flow li:last-child::after { display: none; }
.flow h3 { margin-bottom: .4rem; }
.flow p { margin: 0; color: var(--muted); font-size: 1rem; }
.section:not(.flow-section):not(.section-tint) .flow li::before { box-shadow: 0 0 0 6px var(--white); }

/* Häufige Fragen: aufklappbar ohne Skript */
.faq { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; display: block; padding: 1.15rem 3rem 1.15rem 0;
  font-family: var(--display); font-size: var(--step-1); font-weight: 600; line-height: 1.25; color: var(--blue-deep);
}
.faq summary:hover { color: var(--blue); }
.faq summary::after {
  content: ""; position: absolute; right: .5rem; top: 1.45rem; width: .6rem; height: .6rem;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(.3rem) rotate(225deg); }
.faq .answer { padding: 0 0 1.25rem; color: var(--muted); }
.faq .answer > :last-child { margin-bottom: 0; }

/* Verwandte Leistungen */
.related { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .75rem; max-width: none; }
.related a {
  display: block; height: 100%; padding: 1.15rem 1.25rem; text-decoration: none;
  background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--blue); border-radius: 4px var(--radius) var(--radius) 4px;
}
.related a:hover { border-color: var(--blue); border-left-color: var(--red); }
.related strong { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--blue-deep); margin-bottom: .25rem; }
.related span { display: block; color: var(--muted); font-size: .97rem; }
.related a.is-ki { border-left-color: var(--blue); }
.related a:hover, .related a:focus-visible { border-left-color: var(--red); }

/* Abschluss-Aufforderung */
.cta-band { background: var(--blue-deep); color: #d3def5; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-band h2 { color: var(--white); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 1.5rem 3rem; align-items: center; }
.cta-inner .actions { margin-top: 0; }
.cta-inner p:last-child { margin-bottom: 0; }
.cta-band :focus-visible { outline-color: var(--white); }

/* Über uns */
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1rem clamp(2rem, 6vw, 5.5rem); align-items: start; }
.placeholder { font-style: italic; color: var(--muted); }

/* Kontakt */
.contact { background: var(--blue-deep); color: #d3def5; }
.contact h2 { color: var(--white); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 6vw, 5.5rem); align-items: start; }
.contact-list { margin: 0; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.contact-list dt { font-family: var(--display); font-weight: 600; color: var(--blue-deep); }
.contact-list dd { margin: 0; }
.contact .contact-list { border-top-color: rgba(255,255,255,.22); }
.contact .contact-list div { border-bottom-color: rgba(255,255,255,.22); }
.contact .contact-list dt { color: var(--white); }
.contact .placeholder { color: #a9bce6; }
.contact a:not(.btn) { color: var(--white); }
.contact :focus-visible, .ki :focus-visible { outline-color: var(--white); }

/* Rechtliche Seiten und längere Texte */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; margin-bottom: .5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--blue); }
.prose dl { margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.prose dl div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: .25rem 1rem; padding-block: .75rem; border-bottom: 1px solid var(--line); }
.prose dt { font-weight: 600; color: var(--blue-deep); }
.prose dd { margin: 0; }
.legal-status { border: 2px solid var(--red); border-radius: var(--radius); background: #fff6f6; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
.legal-status h2 { margin-top: 0; color: var(--red-dark); font-size: var(--step-1); }
.legal-status > :last-child { margin-bottom: 0; }

/* Fußbereich */
.site-footer { padding-block: 3rem 2.5rem; font-size: .95rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; align-items: start; }
.footer-brand img { display: block; width: 180px; height: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); max-width: 34ch; }
.footer-head { font-size: 1.05rem; margin-bottom: .6rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-block; padding-block: .35rem; color: var(--text); text-decoration: none; }
.footer-col a:hover { color: var(--blue); text-decoration: underline; }
.legal-note { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--1); margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line); max-width: none; }

/* Responsiv */
@media (max-width: 1180px) {
  .logo-flag { display: none; }
}
@media (max-width: 1080px) {
  .nav-list > li > a, .sub > summary { padding-inline: .5rem; font-size: .98rem; }
  .sub > summary { padding-right: 1.6rem; }
  .sub > summary::after { right: .6rem; }
  .nav-list > li > a[aria-current="page"]::after { left: .5rem; right: .5rem; }
  .sub.is-active > summary::before { left: .5rem; right: 1.6rem; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* Acht Hauptpunkte: kompaktere Abstände, bevor das Menü einklappt */
@media (max-width: 1360px) {
  .nav-list { gap: 0; }
  .nav-list > li > a { padding-inline: .5rem; font-size: .98rem; }
  .nav-list > li > a[aria-current="page"]::after { left: .5rem; right: .5rem; }
}

/* Mobile Navigation: Logo, Kontakt und Menü-Schalter in einer Zeile */
@media (max-width: 1240px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: .75rem; }
  .nav { display: none; }
  .menu { display: block; }
  .brand img { width: 170px; }
  .logo-flag { display: inline-block; }
}

@media (max-width: 900px) {
  .hero-grid, .page-hero-grid, .support-grid, .ki-grid, .special-grid, .about-grid, .contact-grid, .split, .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 13ch; }
  .office { max-width: 36rem; }
  .office-mini { justify-self: start; max-width: 26rem; }
  .support-intro { position: static; }
  .stack { grid-template-columns: minmax(0, 1fr); }
  .bracket { order: -1; }
  .layer { grid-template-columns: minmax(0, 1fr); }
  .ki .draft-note { grid-column: 1; margin-top: -1rem; }
  .flow, .flow.flow-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.25rem; }
  .flow li::after { display: none; }
  .details { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .logo-flag { display: none; }
  .header-cta { display: none; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose dl div { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { width: min(100% - 2rem, var(--wrap)); }
  .brand img { width: 150px; }
  .actions .btn { flex: 1 1 100%; }
  .hero-points { flex-direction: column; }
  .layer { padding: 1.15rem 1.25rem; }
  .ki-fields { grid-template-columns: minmax(0, 1fr); }
  .flow, .flow.flow-3 { grid-template-columns: minmax(0, 1fr); }
  .contact-list div { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .toc p { flex-basis: 100%; }
}

@media (max-width: 400px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-header { position: static; }
  .menu, .skip, .toc { display: none; }
  .draft-bar, .hero, .page-hero, .ki, .ki-band, .contact, .cta-band, .services, .flow-section, .section-tint { background: none !important; color: #000; }
  .faq details > .answer { display: block; }
}

/* B3: prägnantes zweifarbiges Logo und dezente, plastische Oberflächen */
:root { --header-h: 106px; }
.site-header { box-shadow: 0 6px 22px rgba(16,38,90,.09); }
.header-inner { grid-template-columns: minmax(280px, 335px) minmax(0,1fr) auto; column-gap: 1.1rem; }
.brand img { width: min(100%, 335px); height: auto; filter: drop-shadow(0 2px 2px rgba(16,38,90,.11)); }
.footer-brand img { width: 260px; max-width: 100%; height: auto; }
.layer, .office-area, .office-mini, .info-card, .service-card, .contact-card, .prose blockquote { box-shadow: 0 9px 25px rgba(17,43,92,.095), 0 2px 5px rgba(17,43,92,.035); }
.layer { border-radius: 9px; transition: transform .18s ease, box-shadow .18s ease; }
.layer:hover { transform: translateY(-3px); box-shadow: 0 15px 32px rgba(17,43,92,.15); }
.btn { box-shadow: 0 4px 10px rgba(16,38,90,.14); transition: transform .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 15px rgba(16,38,90,.19); }
@media (max-width: 1180px) { .header-inner { grid-template-columns: minmax(250px,290px) minmax(0,1fr) auto; } .nav-list > li > a { font-size: .91rem; padding-inline: .32rem; } }
@media (max-width: 960px) { :root { --header-h: 94px; } .header-inner { grid-template-columns: minmax(0,1fr) auto auto; } .brand img { width: 275px; max-width: 100%; } }
@media (max-width: 560px) { :root { --header-h: 83px; } .header-inner { grid-template-columns: minmax(0,1fr) auto; } .brand img { width: 220px; max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .layer, .btn { transition: none; } .layer:hover, .btn:hover { transform: none; } }

/* B3 correction: two distinct header rows, logo always centered above navigation */
.site-header .header-brand-row { display: flex; justify-content: center; align-items: center; padding-block: 15px 13px; }
.site-header .header-brand-row .brand { display: inline-flex; justify-content: center; max-width: 100%; }
.site-header .header-brand-row .brand img { width: min(440px, 83vw); max-width: 100%; height: auto; }
.site-header .header-nav-row { border-top: 1px solid var(--line); background: #fff; }
.site-header .header-inner { display: flex; justify-content: center; align-items: center; gap: 22px; min-height: 61px; }
.site-header .nav { min-width: 0; }
.site-header .nav-list { flex-wrap: wrap; justify-content: center; gap: 2px 7px; }
.site-header .nav-list > li > a { font-size: .99rem; padding: .55rem .55rem; }
.site-header .header-cta { flex-shrink: 0; }
@media (max-width: 960px) { .site-header .header-brand-row { padding-block: 11px; } .site-header .header-brand-row .brand img { width: min(345px, 82vw); } .site-header .header-inner { justify-content: space-between; } .site-header .nav { display: none; } .site-header .menu { display: block; } }
@media (max-width: 560px) { .site-header .header-brand-row .brand img { width: min(300px, 85vw); } .site-header .header-inner { min-height: 52px; } }

/* Transparent logo: no image-level box shadow */
.site-header .brand img, .footer-brand img { filter: none !important; box-shadow: none !important; }

/* Typografie-Korrektur: einheitliche Seitentitel, keine Silbentrennung */
.hero h1, .page-hero h1, h1 {
  font-size: clamp(2.15rem, 3.5vw, 3.25rem);
  max-width: none;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}
@media (max-width: 900px) { .hero h1 { max-width: none; } }
@media (max-width: 560px) {
  .hero h1, .page-hero h1, h1 { font-size: clamp(1.85rem, 7.5vw, 2.5rem); }
}

.nowrap-heading { white-space: nowrap; }
/* Compact footer: logo, contact and legal links only. */
.compact-footer { padding: 1.1rem 0 .65rem; }
.footer-compact { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; flex-wrap: wrap; }
.footer-compact .footer-brand img { width: 205px; max-width: 100%; height: auto; margin: 0; filter: none; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .92rem; }
.footer-placeholder { color: var(--muted); font-style: italic; }
.footer-legal { display: flex; gap: 1rem; font-size: .92rem; }
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
.footer-disclaimer { margin-top: .55rem; padding-top: .45rem; border-top: 1px solid var(--line); font-size: .73rem; color: var(--muted); }
@media (max-width: 640px) { .footer-compact { flex-direction: column; align-items: flex-start; gap: .6rem; } }

.postal-address { font-style: normal; line-height: 1.7; }

/* Überschriften ohne Silbentrennung; bei Bedarf Umbruch nur zwischen Wörtern */
h1, h2, h3, .section h2, .split h2 { hyphens: none; overflow-wrap: normal; word-break: normal; }
/* Footer desktop: gleichmäßiger Abstand zwischen Logo und vier Kontakt-/Rechtslinks */
@media (min-width: 900px) {
  .footer-compact { display: grid; grid-template-columns: 205px repeat(4, minmax(0, 1fr)); align-items: center; column-gap: 1.1rem; }
  .footer-contacts, .footer-legal { display: contents; }
  .footer-contacts > span, .footer-legal > a { justify-self: center; white-space: nowrap; }
}
@media (min-width: 641px) and (max-width: 899px) {
  .footer-compact { justify-content: center; gap: .8rem 1.5rem; }
}
