/* Agentwerkstatt · Verfahrensfließbild
   Farben, Schriften und verschiebbare Maße stehen als Variablen auf :root.
   Werte für das Regler-Panel (Phase 6) sind mit "Regler" markiert. */

@font-face {
  font-family: "Bricolage Grotesque Variable";
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk Variable";
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono Variable";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Papier und Tusche */
  --paper: #f4f3ee;
  --paper-2: #ebe9e1;
  --sheet: #f4f3ee;
  --grid: #e7e5dc;
  --rule: #dedcd3;
  --ink: #141413;
  --ink-2: #5f5d56;
  --pipe: #141413;

  /* Medium und Aktion */
  --blue: #2200ff;
  --blue-press: #1a00c4;
  --blue-wash: rgba(34, 0, 255, 0.08);

  /* Leitwarte (dunkle Abschnitte) */
  --night: #131312;
  --night-2: #1c1c1a;
  --night-rule: #383732;
  --night-ink: #ecebe2;
  --night-ink-2: #aeaca1;
  --blue-night: #8c82ff;
  --error-night: #ffb2a6;
  --error: #b3261e;

  /* Schriften */
  --f-display: "Bricolage Grotesque Variable", "Hanken Grotesk Variable", system-ui, sans-serif;
  --f-text: "Hanken Grotesk Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono Variable", ui-monospace, "SF Mono", Menlo, monospace;

  /* Maße (Regler) */
  --h1-size: clamp(2.5rem, 1.35rem + 4.475vw, 5.6rem); /* Regler 2026-10-11: 86px bei 1440 */
  --h2-size: clamp(2rem, 1.35rem + 2.5vw, 3.5rem);
  --h3-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.6rem);
  --body-size: 1.125rem;
  --section-pad: clamp(4.5rem, 3rem + 6vw, 9rem);
  --hero-pad-top: clamp(2.5rem, 1.5rem + 4.1vw, 5.5rem); /* Regler: 83px bei 1440 */
  --hero-photo-w: clamp(240px, 22.5vw, 340px); /* Regler: 324px bei 1440 */
  --hero-gap: clamp(2rem, 1rem + 4vw, 5rem);
  --wrap: 1240px;
  --gutter: 16px;
  --grid-step: 24px;
  --pipe-w: 2px;
  --radius: 2px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }

/* ---------- Grundlagen ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; scrollbar-color: #b9b6ab var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--body-size);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--blue); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; margin: 0; text-wrap: balance; font-optical-sizing: auto; }
h1 { font-size: var(--h1-size); line-height: 0.98; letter-spacing: -0.03em; }
h2 { font-size: var(--h2-size); line-height: 1.04; letter-spacing: -0.025em; }
h3 { font-size: var(--h3-size); line-height: 1.15; letter-spacing: -0.01em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--blue); color: #fff; }
input, textarea, select { caret-color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.night :focus-visible { outline-color: var(--blue-night); }

.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;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Rasterpapier */
.sheet-grid {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--grid-step) var(--grid-step);
  background-position: -1px -1px;
}
.sheet-grid + .sheet-grid { border-top: 1px solid var(--ink); }
.night {
  background: var(--night);
  color: var(--night-ink);
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: var(--grid-step) var(--grid-step);
}
.night ::selection { background: var(--blue-night); color: var(--night); }

.section { padding-block: var(--section-pad); position: relative; }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head p { margin-top: 1.25rem; color: var(--ink-2); max-width: 60ch; }
.night .section-head p { color: var(--night-ink-2); }
.lead { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); line-height: 1.5; max-width: 58ch; }
.mono { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--blue);
  display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 52px; padding: 0.85rem 1.4rem;
  background: var(--btn-bg); color: #fff;
  font: 600 1rem/1.2 var(--f-text); letter-spacing: 0.005em;
  text-decoration: none; border: 0; border-radius: var(--radius); cursor: pointer;
  transition: background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  box-shadow: 0 1px 0 rgba(20,20,19,0.18), 0 6px 14px -8px rgba(20,20,19,0.35);
}
.btn:hover { --btn-bg: var(--blue-press); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(20,20,19,0.18), 0 10px 20px -10px rgba(20,20,19,0.4); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.25s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease-out); }
.link-arrow:hover { color: var(--blue); }
.night .link-arrow:hover { color: var(--blue-night); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Kopf ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.brand { display: block; margin-right: auto; text-decoration: none; }
.brand img { width: clamp(178px, 14vw + 60px, 236px); height: auto; }
.nav-list { display: none; gap: clamp(1rem, 2vw, 2rem); font-size: 0.98rem; }
.nav-list a { text-decoration: none; padding: 0.4rem 0; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.nav-list a:hover, .nav-list a[aria-current="page"] { border-bottom-color: var(--ink); }
.site-header .btn { display: none; min-height: 44px; padding: 0.65rem 1.1rem; font-size: 0.95rem; box-shadow: none; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.9rem;
  background: transparent; border: 1px solid var(--ink); border-radius: var(--radius);
  font: 500 0.95rem var(--f-text); color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }
.mobile-nav { border-top: 1px solid var(--rule); background: var(--paper); }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { padding: 0.75rem var(--gutter) 1.5rem; }
.mobile-nav li a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 1.1rem; }
.mobile-nav .btn { margin-top: 1.25rem; width: 100%; justify-content: center; }
@media (min-width: 1024px) {
  .nav-list { display: flex; }
  .site-header .btn { display: inline-flex; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Leitungsplan am Rand (Navigation) ----------
   Unter 1280px: nur die Leitung mit Stationsmarken. Ab 1280px: Messstellen als Links. */

.rail {
  position: fixed; z-index: 40; left: 1px; top: 84px; bottom: 16px; width: 8px; pointer-events: none;
}
.rail::before, .rail-fill {
  content: ""; position: absolute; left: 3px; top: 0; width: var(--pipe-w);
}
.rail::before { bottom: 0; background: #8b897f; }
.rail-fill { height: calc(var(--progress, 0) * 100%); width: 4px; left: 2px; background: var(--blue); transition: height 0.15s linear; }
.rail ol { display: none; }
.rail-ticks { position: absolute; inset: 0; }
.rail-ticks span { position: absolute; left: 0; top: calc(var(--at, 0) * 100%); width: 8px; height: var(--pipe-w); background: #8b897f; transform: translateY(-50%); }
.rail-ticks span.is-passed { background: var(--blue); }
@media (min-width: 1280px) {
  .rail { left: 22px; top: 104px; bottom: 32px; width: 24px; pointer-events: auto; }
  .rail::before { left: 11px; }
  .rail-fill { left: 10px; }
  .rail-ticks { display: none; }
  .rail ol { display: block; position: absolute; inset: 0; }
  .rail li { position: absolute; left: 0; top: calc(var(--at, 0) * 100%); transform: translateY(-50%); }
  .rail a { position: relative; display: block; width: 24px; height: 24px; text-decoration: none; }
  .rail a svg { width: 24px; height: 24px; color: #8b897f; --sym-fill: var(--paper); transition: color 0.3s var(--ease-out); }
  .rail li.is-passed a svg, .rail li.is-current a svg { color: var(--blue); --sym-fill: #e2deff; }
  .rail li.is-next a svg { color: var(--blue); }
  .rail .rail-label {
    position: absolute; left: 32px; top: 50%; transform: translate(-4px, -50%); white-space: nowrap;
    background: var(--paper); color: var(--ink); border: 1px solid var(--ink); padding: 3px 7px;
    font: 500 0.7rem/1.2 var(--f-mono); letter-spacing: 0.05em; text-transform: uppercase;
    opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--ease-out);
  }
  .rail a:hover .rail-label, .rail a:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
}
@media (min-width: 1600px) {
  .rail li.is-current .rail-label { opacity: 1; transform: translate(0, -50%); }
}

/* ---------- Fließbild-Bausteine ---------- */

.sym { flex: none; color: var(--ink); }
.sym path, .sym circle, .sym rect, .sym line, .sym polygon { vector-effect: non-scaling-stroke; }
.night .sym { color: var(--night-ink); }

/* Rohrleitung mit fließendem Medium */
.pipe {
  position: relative; flex: 1 1 auto; min-width: 28px; height: var(--pipe-w);
  background: var(--pipe); align-self: center;
}
.pipe::after {
  content: ""; position: absolute; inset: -1px 0;
  background: repeating-linear-gradient(90deg, var(--blue) 0 14px, transparent 14px 34px);
  background-size: 34px 100%;
  animation: flow-x 1.6s linear infinite;
}
@keyframes flow-x { to { background-position: 34px 0; } }
@keyframes flow-y { to { background-position: 0 34px; } }
.svgflow { animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }

/* ---------- Einstieg ---------- */

.hero { padding-top: var(--hero-pad-top); padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; gap: 2.5rem; align-items: start; }
.hero-copy h1 { max-width: var(--h1-measure, 13.5ch); }
.hero-copy .lead { margin-top: clamp(1.25rem, 1rem + 1vw, 2rem); font-size: var(--hero-lead-size, clamp(1.15rem, 1.05rem + 0.36vw, 1.375rem)); } /* Regler: 22px bei 1440 */
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; margin-top: 1.75rem; }
.hero-cta .note { color: var(--ink-2); font-size: 0.95rem; }
@media (min-width: 1024px) { .hero-cta { display: none; } }
@media (max-width: 1023px) { .hero-line .flow-inlet { display: none; } .hero-line .flow > .pipe:first-of-type { margin-left: 27px; height: 44px; } .hero-line .line-no { margin-bottom: 0.5rem; } .hero-line { margin-top: 2.5rem; } }
.hero-photo { position: relative; justify-self: start; width: min(100%, var(--hero-photo-w)); }
.hero-photo .frame { position: relative; border: 1.5px solid var(--ink); background: var(--paper-2); padding: 8px; }
.hero-photo img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; object-position: 50% 16%; filter: grayscale(1) contrast(1.04); }
.hero-photo .tag {
  position: absolute; right: -22px; top: -22px; width: 64px; height: 64px;
}
.hero-photo figcaption { margin-top: 0.75rem; color: var(--ink-2); }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) var(--hero-photo-w); gap: var(--hero-gap); }
  .hero-photo { justify-self: end; }
}

/* Hauptleitung im Einstieg */
.hero-line { margin-top: var(--hero-line-gap, clamp(3rem, 2rem + 4vw, 5.5rem)); }
.hero-line .line-no { display: block; color: var(--ink-2); margin-bottom: 1rem; }
.flow { display: flex; flex-direction: column; align-items: stretch; }
.flow-inlet { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.flow-inlet .btn { min-height: 64px; padding-inline: 1.5rem; font-size: 1.05rem; }
.flow-inlet .note { color: var(--ink-2); font-size: 0.95rem; }
.flow-station {
  display: flex; align-items: center; gap: 1rem; position: relative;
}
.flow-station .sym { width: 56px; height: 56px; background: var(--paper); }
.flow-station .label { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.3; }
.flow-station .label small { display: block; font: 500 0.72rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
.flow-outlet { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.flow-outlet .box {
  border: 2px solid var(--ink); background: var(--sheet); padding: 0.9rem 1.1rem;
  font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.3;
}
.flow-outlet .box small { display: block; font: 500 0.72rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }

/* senkrecht (Handy) */
.flow > .pipe { width: var(--pipe-w); min-width: 0; height: 36px; flex: none; margin-left: 27px; align-self: flex-start; }
.flow > .pipe::after { inset: 0 -1px; background: repeating-linear-gradient(180deg, var(--blue) 0 14px, transparent 14px 34px); background-size: 100% 34px; animation-name: flow-y; }
.flow > .pipe:first-of-type { margin-left: 32px; }

@media (min-width: 1024px) {
  .flow { flex-direction: row; align-items: center; }
  .flow > .pipe, .flow > .pipe:first-of-type { flex: 1 1 auto; width: auto; min-width: 40px; height: var(--pipe-w); margin: 0; align-self: center; }
  .flow > .pipe::after { inset: -1px 0; background: repeating-linear-gradient(90deg, var(--blue) 0 14px, transparent 14px 34px); background-size: 34px 100%; animation-name: flow-x; }
  .flow-station { flex-direction: column; gap: 0.75rem; text-align: center; }
  .flow-station .label { max-width: 11ch; }
  .flow-inlet .note { position: absolute; margin-top: 76px; }
  .flow-inlet { position: relative; }
  .flow-station .label { position: absolute; top: calc(100% + 0.75rem); left: 50%; transform: translateX(-50%); width: max-content; }
  .flow { padding-bottom: 4.5rem; }
}

/* ---------- Alltag: Verluststellen ---------- */

.leaks-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .leaks-grid { grid-template-columns: 5fr 7fr; gap: 5rem; } .leaks-grid .section-head { position: sticky; top: 120px; align-self: start; margin-bottom: 0; } }
.leaks { position: relative; padding-left: 64px; }
.leaks::before {
  content: ""; position: absolute; left: 23px; top: 8px; bottom: 8px; width: var(--pipe-w); background: var(--night-ink-2);
}
.leaks::after {
  content: ""; position: absolute; left: 22px; top: 8px; bottom: 8px; width: 4px;
  background: repeating-linear-gradient(180deg, var(--blue-night) 0 10px, transparent 10px 40px);
  background-size: 100% 40px; animation: flow-y 3.2s linear infinite; opacity: 0.85;
}
.leaks li { position: relative; padding: 1.25rem 0 1.25rem; border-bottom: 1px solid var(--night-rule); font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem); line-height: 1.45; }
.leaks li:first-child { padding-top: 0; }
.leaks li .drip { position: absolute; left: -58px; top: 1.25rem; width: 36px; height: 40px; background: var(--night); }
.leaks li:first-child .drip { top: 0; }
.leaks-close {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem); padding-top: 2rem; border-top: 1px solid var(--night-rule);
  font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.2; letter-spacing: -0.015em;
  max-width: 30ch;
}
.leaks-close em { font-style: normal; }

/* ---------- Vorgehen: Dreiwegeventil ---------- */

.approach-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .approach-grid { grid-template-columns: 6fr 6fr; gap: 5rem; align-items: end; } }
.approach-grid h2 { font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4.75rem); line-height: 0.98; }
.approach-text p { max-width: 58ch; }

.branch {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  display: grid; gap: 0; position: relative;
}
.branch-in, .branch-out li {
  border: 2px solid var(--ink); background: var(--sheet); padding: 1rem 1.2rem;
  font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.3;
}
.branch-in small, .branch-out li small { display: block; font: 500 0.72rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.branch-valve { display: flex; align-items: center; justify-content: flex-start; padding-left: 26px; position: relative; height: 128px; }
.branch-valve::before { content: ""; position: absolute; left: 33px; top: 0; bottom: 0; width: var(--pipe-w); background: var(--ink); }
.branch-valve .sym { width: 68px; height: 68px; position: relative; background: var(--paper); margin-left: -1px; }
.branch-out { display: grid; gap: 1rem; position: relative; }
.branch-out li { position: relative; }

@media (min-width: 960px) {
  .branch { grid-template-columns: 3fr 2fr 4fr; align-items: center; }
  .branch-valve { height: auto; min-height: 260px; padding-left: 0; justify-content: center; }
  .branch-valve::before { left: 0; right: 50%; top: 50%; bottom: auto; width: auto; height: var(--pipe-w); }
  .branch-out { gap: 1.25rem; }
  .branch-out::before { content: ""; position: absolute; left: -2rem; top: 2.15rem; bottom: 2.15rem; width: var(--pipe-w); background: var(--ink); }
  .branch-out li::before { content: ""; position: absolute; left: calc(-2rem - 2px); top: 50%; width: 2rem; height: var(--pipe-w); background: var(--ink); }
  .branch-valve::after { content: ""; position: absolute; left: 50%; right: -2rem; top: 50%; height: var(--pipe-w); background: var(--ink); }
}

.statement {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  display: flex; gap: 1.25rem; align-items: flex-start;
  font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em;
  max-width: 28ch;
}
.statement .sym { width: 44px; height: 44px; margin-top: 0.1em; color: var(--ink); }

/* ---------- Leistungen: Baugruppen an einer Sammelleitung ---------- */

.groups { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-left: 40px; align-items: start; }
.groups::before { content: ""; position: absolute; left: 15px; top: 0; bottom: 3rem; width: var(--pipe-w); background: var(--ink); }
.group {
  position: relative; background: var(--sheet); border: 1.5px dashed var(--ink);
  padding: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
}
.group::before { content: ""; position: absolute; left: -26px; top: 2.6rem; width: 25px; height: var(--pipe-w); background: var(--ink); }
.group .sym { width: 52px; height: 52px; margin-bottom: 1.1rem; }
.group h3 { margin-bottom: 0.85rem; }
.group p { color: var(--ink-2); max-width: 52ch; }
.group .link-arrow { margin-top: 1.5rem; }
.group--build { background: var(--night); color: var(--night-ink); border-color: var(--night-ink-2); }
.group--build p { color: var(--night-ink-2); }
.group--build .sym { color: var(--night-ink); --sym-fill: var(--night); }
.group-flow { margin-top: 1.75rem; display: flex; flex-wrap: wrap; row-gap: 10px; align-items: center; gap: 0; }
.group-flow .node {
  flex: none; font: 500 0.62rem/1.3 var(--f-mono); letter-spacing: 0.02em; text-transform: uppercase;
  border: 1.5px solid var(--night-ink-2); padding: 0.5rem 0.4rem; color: var(--night-ink);
}
.group-flow .node.is-out { border-color: var(--blue-night); color: var(--blue-night); }
.group-flow .pipe { background: var(--night-ink-2); min-width: 8px; }
.group-flow .pipe::after { background-image: repeating-linear-gradient(90deg, var(--blue-night) 0 10px, transparent 10px 26px); background-size: 26px 100%; animation-duration: 1.2s; }
@media (min-width: 960px) {
  .groups { grid-template-columns: 4fr 5fr 4fr; gap: 2rem; padding-left: 0; padding-top: 88px; }
  .groups::before { left: 0; right: calc((100% - 4rem) * 2 / 13); top: 0; bottom: auto; width: auto; height: var(--pipe-w); }
  .group::before { left: 50%; top: -88px; width: var(--pipe-w); height: 88px; }
  .group .sym { position: absolute; left: 50%; top: -66px; transform: translateX(-50%); width: 44px; height: 44px; margin: 0; --sym-fill: var(--paper); color: var(--ink); }
  .group--build .sym { color: var(--ink); --sym-fill: var(--paper); }
  .group-flow { flex-wrap: nowrap; }
  .group-flow .node { font-size: 0.66rem; letter-spacing: 0.03em; padding: 0.6rem 0.5rem; }
  .group-flow .pipe { min-width: 10px; }
}
.groups-arrow { display: none; }
@media (min-width: 960px) { .groups-arrow { display: block; position: absolute; left: -2px; top: -7px; width: 16px; height: 16px; color: var(--ink); } }

/* ---------- Gerade in der Werkstatt ---------- */

.now-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .now-grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.now-text .lead { margin-top: 1.5rem; }
.now-text p.small { color: var(--night-ink-2); margin-top: 1.25rem; max-width: 52ch; }
.sorter {
  position: relative; border: 1px solid var(--night-rule); background: var(--night-2); padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
}
.sorter-head { display: flex; justify-content: space-between; gap: 1rem; color: var(--night-ink-2); padding-bottom: 1rem; border-bottom: 1px solid var(--night-rule); margin-bottom: 1.5rem; }
.sorter-head .live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--blue-night); }
.sorter-head .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-night); }
.sorter svg { width: 100%; height: auto; }
.sorter .sorter-v { display: none; max-width: 300px; margin-inline: auto; }
@media (max-width: 639px) { .sorter .sorter-h { display: none; } .sorter .sorter-v { display: block; } }
.sorter .cap { margin-top: 1rem; color: var(--night-ink-2); }

/* ---------- Ablauf: Hauptleitung mit Stationen ---------- */

.steps { position: relative; }
.steps-list { display: grid; gap: 0; }
.step { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 1.25rem; padding-bottom: 2.5rem; align-content: start; }
.step:last-child { padding-bottom: 0; }
.station { position: relative; z-index: 1; width: 72px; height: 72px; display: grid; place-items: center; background: var(--paper); }
.station .sym { width: 64px; height: 64px; color: var(--ink); --sym-fill: var(--paper); transition: color 0.5s var(--ease-out); }
.station .tagnum { position: absolute; right: -6px; top: -6px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; background: var(--paper); border: 1.5px solid var(--ink); font-size: 0.72rem; transition: border-color 0.5s var(--ease-out), color 0.5s var(--ease-out); }
.step.is-filled .station .sym { color: var(--blue); --sym-fill: #e2deff; }
.step.is-filled .station .tagnum { border-color: var(--blue); color: var(--blue); }
.step.is-next .station .sym { color: var(--blue); }
.step h3 { margin-top: 0.9rem; }
.step p { color: var(--ink-2); margin-top: 0.6rem; max-width: 34ch; }
.steps-pipe { position: absolute; left: 35px; top: 36px; bottom: 36px; width: var(--pipe-w); background: var(--ink); }
.steps-pipe i { position: absolute; left: -1px; top: 0; width: 4px; height: calc(var(--fill, 0) * 100%); background: var(--blue); transition: height 0.9s var(--ease-out); }
.steps-cta { margin-top: clamp(3rem, 2rem + 2vw, 4rem); display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
@media (min-width: 960px) {
  .steps-list { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .step { grid-template-columns: 1fr; gap: 0; padding-bottom: 0; }
  .station { width: 96px; height: 96px; }
  .station .sym { width: 88px; height: 88px; }
  .steps-pipe { left: 48px; right: calc(25% - 48px - 1.5rem); top: 47px; bottom: auto; height: var(--pipe-w); width: auto; }
  .steps-pipe i { left: 0; top: -1px; height: 4px; width: calc(var(--fill, 0) * 100%); transition: width 0.9s var(--ease-out); }
  .step h3 { margin-top: 1.5rem; }
}

/* ---------- Über mich (Leitwarte) ---------- */

.about-grid { display: grid; gap: 3rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; } }
.about-photo { position: relative; border: 1.5px solid var(--night-ink-2); background: var(--night-2); padding: 10px; max-width: 460px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; }
.about-photo .titleblock { display: grid; grid-template-columns: 1fr auto; border-top: 1.5px solid var(--night-ink-2); margin: 10px -10px -10px; color: var(--night-ink); }
.about-photo .titleblock span { padding: 0.6rem 0.8rem; }
.about-photo .titleblock span + span { border-left: 1.5px solid var(--night-ink-2); color: var(--night-ink-2); }
.about-text h2 { margin-bottom: 2rem; }
.about-text p { max-width: 60ch; color: var(--night-ink-2); }
.about-text p.first { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); line-height: 1.5; color: var(--night-ink); }
.about-text .btn { margin-top: 2rem; }

/* ---------- Fragen als Legende: Ventil zu, Ventil auf ---------- */

.faq-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: 4fr 8fr; gap: 5rem; } .faq-grid .section-head { position: sticky; top: 120px; align-self: start; } }
.faq { border: 1.5px solid var(--ink); background: var(--sheet); }
.faq details { border-bottom: 1px solid var(--ink); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: start;
  padding: 1.3rem clamp(1rem, 0.8rem + 1vw, 1.6rem);
  font-family: var(--f-display); font-weight: 600; font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem); line-height: 1.3;
  transition: background-color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: rgba(20, 20, 19, 0.035); }
.faq summary .tog { width: 40px; height: 30px; margin-top: -2px; }
.faq summary .tog path { fill: var(--ink); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; transition: fill 0.3s var(--ease-out), stroke 0.3s var(--ease-out); }
.faq summary:hover .tog path { fill: #4a4943; }
.faq details[open] summary .tog path { fill: transparent; stroke: var(--blue); }
.faq .answer { padding: 0 clamp(1rem, 0.8rem + 1vw, 1.6rem) 1.5rem calc(clamp(1rem, 0.8rem + 1vw, 1.6rem) + 40px + 1rem); color: var(--ink-2); max-width: 72ch; }

/* ---------- Anfrage (Einlass) ---------- */

.inquiry-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .inquiry-grid { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; } }
.inquiry-text .lead { margin-top: 1.5rem; color: var(--night-ink); }
.inquiry-text .mail { margin-top: 2rem; color: var(--night-ink-2); }
.inquiry-text .mail a { color: var(--night-ink); }
.inlet-pipe { display: none; }
@media (min-width: 960px) {
  .inlet-pipe { display: block; margin-top: 3rem; width: 100%; max-width: 360px; color: var(--night-ink-2); }
}

.form-panel { position: relative; background: var(--night-2); border: 1px solid var(--night-rule); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); }
.fields { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: 0.98rem; margin-bottom: 0.45rem; }
.field label .opt { font-weight: 400; color: var(--night-ink-2); }
.field .hint { font-size: 0.88rem; color: var(--night-ink-2); margin: -0.15rem 0 0.5rem; }
.field .hint-spacer { display: none; }
@media (min-width: 640px) { .field .hint-spacer { display: block; } }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.8rem 0.95rem;
  font: 400 1rem/1.4 var(--f-text); color: var(--night-ink);
  background: var(--night); border: 1.5px solid #4a4943; border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8f8d84; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ecebe2' stroke-width='1.6'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 16px;
}
.field select option { background: var(--night); color: var(--night-ink); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #6b6960; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-night); box-shadow: 0 0 0 3px rgba(140, 130, 255, 0.25); }
.field-error { display: none; margin-top: 0.45rem; font-size: 0.9rem; color: var(--error-night); }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error-night); }
.form-note { grid-column: 1 / -1; font-size: 0.9rem; color: var(--night-ink-2); }
.form-note a { color: var(--night-ink); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { grid-column: 1 / -1; margin: 0; font-size: 0.95rem; }
.form-status.is-error { color: var(--error-night); }
.form-status a { color: var(--night-ink); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

#form-wrap.is-sent form { display: none; }
.form-success { outline: none; }
.form-success[hidden] { display: none; }
.form-success .arrived { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; color: var(--blue-night); }
.form-success .arrived svg { width: 100%; max-width: 420px; height: auto; }
.form-success h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.form-success p { margin-top: 0.75rem; color: var(--night-ink-2); }
.arrive-fill { stroke-dasharray: 400; stroke-dashoffset: 400; animation: arrive 1.4s var(--ease-out) 0.2s forwards; }
@keyframes arrive { to { stroke-dashoffset: 0; } }

/* ---------- Fußzeile: Schriftfeld ---------- */

.site-footer { padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
.titleblock-foot {
  display: grid; border: 1.5px solid var(--ink); background: var(--sheet);
  grid-template-columns: 1fr;
}
.titleblock-foot > div { padding: 1rem 1.15rem; border-bottom: 1px solid var(--ink); }
.titleblock-foot > div:last-child { border-bottom: 0; }
.titleblock-foot .k { display: block; color: var(--ink-2); margin-bottom: 0.35rem; }
.titleblock-foot .brandcell img { width: 210px; }
.titleblock-foot .row2 { display: flex; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; }
.titleblock-foot .brandcell p { margin-top: 0.75rem; color: var(--ink-2); font-size: 0.98rem; max-width: 34ch; }
.titleblock-foot ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.titleblock-foot a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.titleblock-foot a:hover { border-bottom-color: var(--blue); color: var(--blue); }
@media (min-width: 900px) {
  .titleblock-foot { grid-template-columns: 2.2fr 1fr 1.4fr 1.4fr; }
  .titleblock-foot > div { border-bottom: 0; border-right: 1px solid var(--ink); }
  .titleblock-foot > div:last-child { border-right: 0; }
  .titleblock-foot .brandcell { grid-row: span 2; border-right: 1px solid var(--ink); }
  .titleblock-foot .row2 { grid-column: 2 / -1; border-top: 1px solid var(--ink); border-right: 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
}

/* ---------- Unterseite KI-Schulung ---------- */

.crumbs { padding-top: 1.5rem; color: var(--ink-2); font-size: 0.92rem; }
.crumbs ol { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.crumbs li + li::before { content: "›"; margin-right: 0.5rem; color: var(--ink-2); }
.crumbs a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumbs [aria-current] { color: var(--ink); }

.hero--sub { padding-top: clamp(2rem, 1.5rem + 3vw, 4rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; margin-top: 2rem; }

.law-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .law-grid { grid-template-columns: 7fr 5fr; gap: 5rem; align-items: start; } }
.law-text p { max-width: 62ch; }
.law-text p + p { margin-top: 1.25rem; }
.law-text .fineprint { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--night-rule); color: var(--night-ink-2); font-size: 0.95rem; }
.law-text .fineprint a { color: var(--night-ink); }
.timeline { position: relative; padding-left: 1.75rem; display: grid; gap: 2.25rem; }
.timeline::before { content: ""; position: absolute; left: 0; top: 0.35rem; bottom: 0; width: var(--pipe-w); background: var(--night-ink-2); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.75rem - 6px); top: 0.35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--night); border: 2px solid var(--night-ink-2); }
.timeline li.is-now::before { background: var(--blue-night); border-color: var(--blue-night); }
.timeline .date { display: block; color: var(--night-ink-2); margin-bottom: 0.35rem; }
.timeline strong { font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; line-height: 1.3; display: block; }

.learn { display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.learn li { display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; align-items: center; padding: 1.35rem 0; border-bottom: 1px solid var(--rule); font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem); line-height: 1.4; }
.learn li .sym { width: 52px; height: 52px; }
.learn-note { margin-top: 1.5rem; color: var(--ink-2); }
@media (min-width: 960px) { .learn-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 5rem; } .learn-grid .section-head { margin-bottom: 0; } }

.spec { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1.5px solid var(--ink); font-size: 1.05rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--ink); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { width: 34%; font: 500 0.78rem/1.4 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border-right: 1px solid var(--ink); padding-top: 1.3rem; }
.spec td { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem); line-height: 1.35; }
.spec-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .spec-grid { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; } }
.audience { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.audience h3, .audience h2 { margin-bottom: 0.85rem; }
.audience p { color: var(--ink-2); max-width: 52ch; }

/* ---------- Rechtliches ---------- */

.legal { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.legal h1 { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.5rem); }
.legal .pending { margin-top: 2rem; padding: 1.25rem 1.5rem; border: 1.5px dashed var(--ink-2); background: var(--sheet); max-width: 60ch; color: var(--ink-2); }

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .pipe::after, .flow > .pipe::after, .leaks::after, .group-flow .pipe::after, .svgflow { animation: none !important; }
  .arrive-fill { stroke-dashoffset: 0; }
}

.nowrap { white-space: nowrap; }
.h3-like { font-size: var(--h3-size); line-height: 1.15; letter-spacing: -0.01em; }

.night .spec { background: var(--night-2); border-color: var(--night-ink-2); }
.night .spec th, .night .spec td { border-color: var(--night-rule); }
.night .spec th { color: var(--night-ink-2); border-right-color: var(--night-ink-2); }
.night .audience { border-top-color: var(--night-rule); }
.night .audience p { color: var(--night-ink-2); }

/* Kleine Leitung in der Automatisierungs-Karte: auf dem Handy senkrecht */
@media (max-width: 639px) {
  .group-flow { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; }
  .group-flow .node { font-size: 0.7rem; letter-spacing: 0.04em; padding: 0.55rem 0.7rem; }
  .group-flow .pipe { flex: none; width: var(--pipe-w); min-width: 0; height: 20px; margin-left: 22px; align-self: flex-start; }
  .group-flow .pipe::after { inset: 0 -1px; background-image: repeating-linear-gradient(180deg, var(--blue-night) 0 14px, transparent 14px 34px); background-size: 100% 34px; animation-name: flow-y; }
}

/* ---------- Rechtstexte ---------- */

.legal-text { max-width: 68ch; margin-top: 2rem; }
.legal-text h2 { font-size: var(--h3-size); margin: 2.25rem 0 0.6rem; }
.legal-text p { margin: 0 0 1rem; }
.legal-text a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.legal-text .legal-date { margin-top: 2.5rem; color: var(--ink-2); }
