/* Farben, Radien und Layout aus dem App-Theme von Compita (Repo hecate):
   src/Hub.Client/wwwroot/css/design-system.css und app.css. Bei Änderungen am App-Theme hier nachziehen.
   Wie in der App: kleine Radien (4–12 px), keine Pillenformen. */

/* Schriften (alle SIL OFL, Lizenzen in fonts/): Unbounded für Überschriften, Onest für Text, JetBrains Mono für Code.
   Plus Jakarta Sans nur noch für die Wortmarke „ompita“, wie im Logo der App. Nur lateinischer Zeichensatz. */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/unbounded-latin.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/onest-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2"); }

:root {
  --c-bg: #f5f3ec; --c-surface: #ffffff; --c-surface-2: #faf8f2; --c-surface-3: #f1eee3;
  --c-text: #262624; --c-text-2: #45443f; --c-text-3: #64625b; --c-text-4: #7d7b73;
  --c-border: #e4e1d7; --c-border-strong: #cbc8bc; --c-divider: color-mix(in srgb, #2c2c2c 10%, transparent);
  /* Dunkle Flächen wie Sidebar und Login-Panel der App */
  --c-dark: #2c2c2c; --c-dark-text: #cbc8bc; --c-dark-dim: #a3a19a; --c-dark-head: #faf8f2;
  --c-primary: #3d6be0; --c-primary-600: #3159c4; --c-primary-700: #2747a0;
  --c-primary-50: #eef3ff; --c-primary-100: #dce6ff; --c-primary-400: #8aa8f3; --c-focus: #3159c4;
  --c-success: #5a7445; --c-success-50: #eef2e8; --c-success-700: #4d633b;
  --c-warn: #6e5410; --c-warn-50: #fcf1d2;
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 12px;
  --sh-sm: 0 1px 2px rgba(44, 44, 44, .06); --sh-md: 0 4px 14px rgba(44, 44, 44, .08); --sh-lg: 0 16px 40px rgba(44, 44, 44, .14);
  --font-sans: "Onest", system-ui, sans-serif;
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --font-brand: "Plus Jakarta Sans", system-ui, sans-serif;

  --sidebar-w: 276px;
  --sec-gap: 112px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  color: var(--c-text); background: var(--c-bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-underline-offset: 3px; }
/* Unbounded ist breit: lange deutsche Wörter in Überschriften dürfen auf schmalen Handys trennen statt überzustehen. */
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
a:hover { color: var(--c-primary-700); }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wordmark {
  display: inline-flex; align-items: baseline;
  font-family: var(--font-brand); font-weight: 800; letter-spacing: -0.04em; line-height: 1; white-space: nowrap;
  color: var(--c-text); text-decoration: none;
}
.wordmark svg { height: 0.76em; width: calc(0.76em * 56 / 52); margin-right: 0.035em; overflow: visible; flex: none; }
.wordmark:hover { color: inherit; }

.skip { position: absolute; left: 12px; top: 12px; z-index: 50; padding: 10px 14px; border-radius: var(--r-xs); background: var(--c-surface); box-shadow: var(--sh-md); font-weight: 600; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Icons: IBM Carbon (Apache-2.0, siehe icons/LICENSE-carbon.txt), gefüllt auf 32er-Raster. Keine Lucide-Strichicons. */
.ic { width: 18px; height: 18px; flex: none; fill: currentColor; }

/* ---------- Buttons wie in der App: eckig mit 6 px Radius, nie als Pille ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-xs);
  font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 1.2;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn-primary { background: var(--c-primary); border-color: var(--c-primary-600); color: #fff; }
.btn-primary:hover { background: var(--c-primary-600); color: #fff; }
.btn-primary:active { background: var(--c-primary-700); border-color: var(--c-primary-700); }
.btn-secondary { background: var(--c-surface); border-color: var(--c-border); color: var(--c-text); }
.btn-secondary:hover { background: var(--c-surface-2); border-color: var(--c-border-strong); color: var(--c-text); }
.btn-secondary:active { background: var(--c-surface-3); }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 16px; }

/* ---------- App-Shell: Dunkle Sidebar links, Inhalt auf Creme rechts ---------- */

.app {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh; min-height: 100dvh;
}

.sidebar {
  grid-column: 1; align-self: start;
  position: sticky; top: 0; z-index: 10; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 24px; padding: 24px 14px; overflow: auto;
  background: var(--c-dark); color: var(--c-dark-text);
}
.sidebar .wordmark { align-self: flex-start; margin: 4px 12px 8px; font-size: 32px; color: #fff; }
.sidebar :focus-visible { outline-color: var(--c-primary-400); }
.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 40px; padding: 0 12px; border-radius: var(--r-xs);
  color: var(--c-dark-text); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color 100ms, color 100ms;
}
.nav-item:hover { background: color-mix(in srgb, white 8%, transparent); color: #fff; }
.nav-item::before { content: ""; position: absolute; left: -14px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--c-primary); opacity: 0; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 5px; }

/* Aktiver Eintrag wie in der App: blaue Schrift, Balken am linken Rand. Ohne JavaScript.
   Wo der Browser Scroll-Timelines kann (Chrome, Edge, Safari 26), folgt er dem Abschnitt bei 40 % der Fensterhöhe.
   Sonst gilt „Start“ beim Laden und nach einem Klick der Abschnitt aus der Adresse (:target). */
@supports not ((animation-timeline: view()) and (timeline-scope: none)) {
  :root:not(:has(:target)) .nav a[href="#start"],
  :root:has(#start:target) .nav a[href="#start"],
  :root:has(#hintergrund:target) .nav a[href="#hintergrund"],
  :root:has(#programme:target) .nav a[href="#programme"],
  :root:has(#anbindung:target) .nav a[href="#anbindung"],
  :root:has(#datenschutz:target) .nav a[href="#datenschutz"],
  :root:has(#demo:target, #kontakt:target) .nav a[href="#demo"] { color: var(--c-primary-400); font-weight: 600; }
  :root:not(:has(:target)) .nav a[href="#start"]::before,
  :root:has(#start:target) .nav a[href="#start"]::before,
  :root:has(#hintergrund:target) .nav a[href="#hintergrund"]::before,
  :root:has(#programme:target) .nav a[href="#programme"]::before,
  :root:has(#anbindung:target) .nav a[href="#anbindung"]::before,
  :root:has(#datenschutz:target) .nav a[href="#datenschutz"]::before,
  :root:has(#demo:target, #kontakt:target) .nav a[href="#demo"]::before { opacity: 1; }
}
@supports (animation-timeline: view()) and (timeline-scope: none) {
  .app { timeline-scope: --s-start, --s-hintergrund, --s-programme, --s-anbindung, --s-datenschutz, --s-demo; }
  #start { view-timeline-name: --s-start; }
  #hintergrund { view-timeline-name: --s-hintergrund; }
  #programme { view-timeline-name: --s-programme; }
  #anbindung { view-timeline-name: --s-anbindung; }
  #datenschutz { view-timeline-name: --s-datenschutz; }
  #demo { view-timeline-name: --s-demo; }
  .nav-item, .nav-item::before { animation: linear none; animation-range: cover 60vh cover calc(100% - 40vh); }
  .nav-item { animation-name: nav-on; }
  .nav-item::before { animation-name: nav-bar; }
  .nav a[href="#start"], .nav a[href="#start"]::before { animation-timeline: --s-start; animation-range: cover 0% cover calc(100% - 40vh); }
  .nav a[href="#hintergrund"], .nav a[href="#hintergrund"]::before { animation-timeline: --s-hintergrund; }
  .nav a[href="#programme"], .nav a[href="#programme"]::before { animation-timeline: --s-programme; }
  .nav a[href="#anbindung"], .nav a[href="#anbindung"]::before { animation-timeline: --s-anbindung; }
  .nav a[href="#datenschutz"], .nav a[href="#datenschutz"]::before { animation-timeline: --s-datenschutz; }
  .nav a[href="#demo"], .nav a[href="#demo"]::before { animation-timeline: --s-demo; }
}
@keyframes nav-on { from, to { color: var(--c-primary-400); font-weight: 600; } }
@keyframes nav-bar { from, to { opacity: 1; } }

.main { grid-column: 2; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 48px; }

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

.hero { padding: 72px 0 0; scroll-margin-top: 24px; }
.hero h1 {
  margin: 0; max-width: 11em;
  font-family: var(--font-display); font-size: clamp(36px, 5.3vw, 78px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04;
  text-wrap: balance;
}
.hero-lead { margin: 28px 0 0; max-width: 32em; font-size: clamp(18px, 1.8vw, 20px); line-height: 1.6; color: var(--c-text-2); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }

/* ---------- Abschnitte: Kopf, Hintergrund, Programme, Datenschutz ---------- */

.sec { margin-top: var(--sec-gap); scroll-margin-top: 32px; }
.card { background: var(--c-surface); border-radius: var(--r-lg); }

.sec h2 {
  margin: 0; max-width: 18em;
  font-family: var(--font-display); font-size: clamp(27px, 3.3vw, 41px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; text-wrap: balance;
}
.sec-head .lead { margin: 20px 0 0; max-width: 40em; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; color: var(--c-text-2); text-wrap: pretty; }

/* Hintergrund: Überschrift links, Text rechts */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.split h2 { font-size: clamp(25px, 2.8vw, 35px); }
.story p { margin: 0 0 18px; font-size: 18px; line-height: 1.7; color: var(--c-text-2); text-wrap: pretty; }

/* Angebundene Programme: weiße Karten ohne Rahmen wie in der App, keine Logos (nur Produktnamen) */
.apps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app-card { display: flex; flex-direction: column; padding: 22px 22px 20px; box-shadow: var(--sh-sm); }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-head h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.badge {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 4px; white-space: nowrap;
  background: var(--c-primary-50); color: var(--c-primary-700); font-size: 12px; font-weight: 600;
}
.app-alias { margin-top: 2px; font-size: 13px; color: var(--c-text-4); }
.app-card dl { margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.app-card dl div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding-top: 10px; border-top: 1px solid var(--c-divider); }
.app-card dt { font-size: 13px; font-weight: 600; color: var(--c-text-4); line-height: 1.55; }
.app-card dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--c-text-2); }

.apps-foot { margin-top: 24px; padding: 20px 24px; border-radius: var(--r-lg); background: var(--c-surface-3); }
.apps-foot p { margin: 0; max-width: 56em; font-size: 15.5px; line-height: 1.65; color: var(--c-text-2); }
.apps-foot b { color: var(--c-text); }
.apps-foot a, .reqs-foot a { font-weight: 600; color: var(--c-primary-700); }
.apps-foot .fine { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--c-text-3); }

/* Anbindung: Spec-Ausschnitt als Editor-Fenster. Nummern im Code (.mark) gehören zu den Einträgen der Liste daneben.
   Zeilen höchstens 38 Zeichen, damit der Block bei 390 px Breite ohne seitliches Scrollen passt. */
.spec { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.code { margin: 0; overflow: hidden; border-radius: var(--r-lg); background: #242422; box-shadow: var(--sh-lg); }
.code figcaption {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  background: var(--c-dark); border-bottom: 1px solid color-mix(in srgb, white 8%, transparent);
  font-size: 13px; color: var(--c-dark-text);
}
.code-file { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.code-file .ic { width: 15px; height: 15px; color: var(--c-primary-400); }
.code-dir { color: var(--c-dark-dim); }
.code-meta { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--c-dark-dim); white-space: nowrap; }
.code-skip {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  padding: 4px 7px; border: 0; border-radius: 4px; background: var(--c-dark); color: var(--c-dark-head);
  font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.code-lang { padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, white 10%, transparent); color: var(--c-dark-head); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.code pre { margin: 0; overflow-x: auto; }
.code :focus-visible { outline-color: var(--c-primary-400); outline-offset: -2px; }
.code code {
  display: block; width: max-content; min-width: 100%; padding: 14px 0 16px; counter-reset: ln;
  font-family: var(--font-mono);
  font-size: 13px; line-height: 1.75; color: #ecebe5; font-variant-ligatures: none;
}
.ln { display: block; min-height: 1.75em; padding-right: 20px; counter-increment: ln; transition: background-color 120ms, box-shadow 120ms; }
.code { --line-gutter: 4ch; }
.ln::before { content: counter(ln); display: inline-block; width: var(--line-gutter); padding-right: 2ch; text-align: right; color: #77756e; user-select: none; -webkit-user-select: none; }
.code .k { color: var(--c-primary-400); }
.code .p { color: #8f8d86; }
.code .v { color: #ecebe5; }
.code .s { color: #c5d9a6; }
.code .t { padding: 1px 3px; border-radius: 3px; background: color-mix(in srgb, #f2c46d 16%, transparent); color: #f2c46d; }
.code .j { color: #e3a6d6; }
.code .n { color: #f0a875; }
.mark, .spec-list li::before {
  display: inline-grid; place-items: center; border-radius: 4px; background: var(--c-primary); color: #fff;
  font-family: var(--font-sans); font-weight: 700; line-height: 1;
}
.mark { width: 17px; height: 17px; margin-left: 10px; font-size: 10.5px; vertical-align: 1px; }

.spec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.spec-list li {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 14px; row-gap: 2px;
  padding: 14px 10px 14px 0; border-top: 1px solid var(--c-border-strong); transition: background-color 120ms;
}
.spec-list li:first-child { padding-top: 2px; border-top: 0; }
.spec-list li::before { content: attr(data-g); grid-row: 1 / 3; width: 24px; height: 24px; margin-top: 1px; font-size: 12px; }
.spec-list b { font-size: 16px; line-height: 1.5; }
.spec-list span { font-size: 15px; line-height: 1.55; color: var(--c-text-3); }
.spec-side { position: sticky; top: 32px; }
.spec-more { margin: 6px 0 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--c-surface-3); font-size: 14px; line-height: 1.55; color: var(--c-text-3); }
.spec-more b { margin-right: 6px; color: var(--c-text); }

@media screen and (prefers-reduced-motion: no-preference) {
  .spec.is-typing .code-meta { visibility: hidden; }
  .spec.is-typing .ln { animation: yaml-type var(--duration) steps(var(--characters), end) var(--delay) backwards; }
  .spec.is-typing .spec-list li, .spec.is-typing .spec-more {
    animation: yaml-explain 320ms ease-out var(--delay) backwards;
  }
  @keyframes yaml-type {
    from { clip-path: inset(0 calc(100% - var(--line-gutter)) 0 0); }
    to { clip-path: inset(0 calc(100% - var(--line-gutter) - var(--text-width)) 0 0); }
  }
  @keyframes yaml-explain { from { opacity: 0; } to { opacity: 1; } }
}
@media print { .code-skip { display: none; } }

/* Mit Maus: Eintrag und zugehörige Zeilen heben sich gegenseitig hervor (ohne JavaScript, per :has) */
@media (hover: hover) {
  .spec:has(.spec-list li[data-g="1"]:hover) .ln[data-g="1"], .spec:has(.ln[data-g="1"]:hover) .ln[data-g="1"],
  .spec:has(.spec-list li[data-g="2"]:hover) .ln[data-g="2"], .spec:has(.ln[data-g="2"]:hover) .ln[data-g="2"],
  .spec:has(.spec-list li[data-g="3"]:hover) .ln[data-g="3"], .spec:has(.ln[data-g="3"]:hover) .ln[data-g="3"],
  .spec:has(.spec-list li[data-g="4"]:hover) .ln[data-g="4"], .spec:has(.ln[data-g="4"]:hover) .ln[data-g="4"],
  .spec:has(.spec-list li[data-g="5"]:hover) .ln[data-g="5"], .spec:has(.ln[data-g="5"]:hover) .ln[data-g="5"] { background: color-mix(in srgb, var(--c-primary) 20%, transparent); box-shadow: inset 2px 0 0 var(--c-primary-400); }
  .spec:has(.ln[data-g="1"]:hover) .spec-list li[data-g="1"],
  .spec:has(.ln[data-g="2"]:hover) .spec-list li[data-g="2"],
  .spec:has(.ln[data-g="3"]:hover) .spec-list li[data-g="3"],
  .spec:has(.ln[data-g="4"]:hover) .spec-list li[data-g="4"],
  .spec:has(.ln[data-g="5"]:hover) .spec-list li[data-g="5"] { background: var(--c-primary-50); }
}

/* Datenschutz: nur Schlagworte als Kacheln, vier Spalten, auf dem Handy zwei */
.keys { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.keys li { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--r-lg); background: var(--c-surface); box-shadow: var(--sh-sm); }
.key-ic { display: block; margin-bottom: 14px; color: var(--c-text); line-height: 0; }
.key-ic .ic { width: 24px; height: 24px; }
.keys b { font-size: 15.5px; line-height: 1.35; }
.keys li > span:last-child { font-size: 13.5px; line-height: 1.45; color: var(--c-text-3); }

/* Was sich anbinden lässt und was (noch) nicht */
.reqs { margin-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; padding: 24px; border-radius: var(--r-lg); background: var(--c-surface); box-shadow: var(--sh-sm); }
.reqs h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.reqs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reqs li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5; color: var(--c-text-2); }
.reqs li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 14px; border-radius: 4px; }
.reqs div:first-child li::before { background: var(--c-success-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='%234d633b'%3E%3Cpath d='M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z'/%3E%3C/svg%3E") center / 10px no-repeat; }
.reqs div:nth-child(2) li::before { background: var(--c-surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='%2364625b'%3E%3Cpath d='M8 15H24V17H8z'/%3E%3C/svg%3E") center / 10px no-repeat; }
.reqs-foot { grid-column: 1 / -1; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--c-divider); font-size: 15px; color: var(--c-text-2); }

/* ---------- Demo & Gespräch: dunkles Panel wie das Login der App ---------- */

.demo-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start;
  padding: 56px; border-radius: var(--r-lg); background: var(--c-dark); color: var(--c-dark-text);
}
.demo-panel h2 {
  margin: 0; color: var(--c-dark-head);
  font-family: var(--font-display); font-size: clamp(28px, 3.5vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance;
}
.demo-panel .lead { margin: 20px 0 0; max-width: 30em; font-size: 17px; line-height: 1.65; }
.demo-panel :focus-visible { outline-color: var(--c-primary-400); }
.demo-panel .form-card :focus-visible { outline-color: var(--c-focus); }

.options { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.options li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; }
.opt-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; color: #fff; }
.opt-icon .ic { width: 24px; height: 24px; }
.options b { color: var(--c-dark-head); font-size: 17px; line-height: 1.4; margin-top: 6px; }
.options li > span:last-child { font-size: 15px; line-height: 1.55; color: var(--c-dark-dim); }
.demo-open { margin: 36px 0 0; padding-top: 24px; border-top: 1px solid color-mix(in srgb, white 12%, transparent); font-size: 15px; }
.demo-open a { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
.demo-open a:hover { color: var(--c-primary-400); }
.demo-open .ic { width: 16px; height: 16px; }

.form-card { padding: 32px; color: var(--c-text); scroll-margin-top: 32px; }
.form-card h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.form-card h3 + p { margin: 4px 0 24px; font-size: 15px; color: var(--c-text-3); }

.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact .wide { grid-column: 1 / -1; }
.contact label { display: flex; flex-direction: column; gap: 6px; }
.contact > label > input { margin-top: auto; }
.field-label, .contact label > span { font-size: 14px; font-weight: 600; color: var(--c-text-2); }
.contact input:not([type="radio"]), .contact textarea {
  width: 100%; padding: 0 12px; border: 1px solid var(--c-border-strong); border-radius: var(--r-xs);
  background: var(--c-surface); font-family: var(--font-sans); font-size: 16px; color: var(--c-text);
  transition: border-color 120ms, box-shadow 120ms;
}
.contact input:not([type="radio"]) { height: 46px; }
.contact textarea { min-height: 104px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.contact input:not([type="radio"]):hover, .contact textarea:hover { border-color: var(--c-text-4); }
.contact input:not([type="radio"]):focus, .contact textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-100); }
.contact input::placeholder, .contact textarea::placeholder { color: var(--c-text-4); }

/* Anliegen als Segmentschalter wie die Filter „Alle | Kunde | Lieferant“ der App */
.seg { margin: 0; padding: 0; border: 0; min-width: 0; }
.seg legend { margin-bottom: 6px; padding: 0; }
.seg-opts { display: flex; }
.seg-opts label { position: relative; flex: 1 1 0; display: block; }
.seg-opts input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* .contact davor: schlägt .contact label > span */
.contact .seg-opts span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; text-align: center;
  border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-text-2);
  font-size: 14.5px; font-weight: 500; line-height: 1.25;
}
.seg-opts label:first-child span { border-radius: var(--r-xs) 0 0 var(--r-xs); }
.seg-opts label + label span { margin-left: -1px; border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.seg-opts input:hover + span { background: var(--c-surface-2); }
.seg-opts input:checked + span { position: relative; z-index: 1; background: var(--c-primary-50); border-color: var(--c-primary-400); color: var(--c-primary-700); font-weight: 600; }
.seg-opts input:focus-visible + span { position: relative; z-index: 2; outline: 2px solid var(--c-focus); outline-offset: 2px; }

.contact-foot { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.contact-foot .btn { width: 100%; }
/* Beschriftung des Absende-Buttons folgt dem gewählten Anliegen, ohne JavaScript. */
.lbl-call, .contact:has(input[value="gespraech"]:checked) .lbl-demo { display: none; }
.contact:has(input[value="gespraech"]:checked) .lbl-call { display: inline; }
.contact-note { font-size: 13px; line-height: 1.5; color: var(--c-text-3); }
.contact-mail { margin: 0; padding-top: 14px; border-top: 1px solid var(--c-divider); font-size: 14.5px; color: var(--c-text-2); }
.contact-mail a { font-weight: 600; color: var(--c-primary-700); }
/* Honeypot: für Menschen unsichtbar, Bots füllen es aus. Kein display:none – das überspringen manche Bots. */
.contact .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.site-footer { margin-top: auto; padding-top: 96px; }
.site-footer .wrap {
  max-width: 1180px; margin: 0 auto; padding: 24px 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  border-top: 1px solid var(--c-border); font-size: 14px; color: var(--c-text-3);
}
.site-footer ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }

/* ---------- Unterseiten (Impressum, Datenschutz, Danke, Fehler) ---------- */

.wrap { width: 100%; max-width: 760px; margin: 0 auto; }
.site-header { padding: 32px 24px 8px; }
.site-header .wordmark { font-size: 36px; }
.legal { flex: 1; padding: 24px 24px 0; }
.legal h1 { font-family: var(--font-display); font-size: clamp(27px, 3.7vw, 36px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: 24px 0 28px; }
.legal h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 32px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 16px; font-weight: 700; margin: 20px 0 6px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; line-height: 1.75; color: var(--c-text-2); }
.legal li { margin-bottom: 6px; }
.legal p { margin: 0 0 12px; line-height: 1.75; color: var(--c-text-2); }
.legal a { overflow-wrap: anywhere; }
.legal .card { padding: 40px; }
.legal .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Rückmeldung nach dem Absenden (danke.html) bzw. bei Fehlern (contact.php) – wie .notice in der App */
.notice { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; padding: 16px 18px; border-radius: var(--r-md); }
.notice b { display: block; font-size: 17px; }
.notice p { margin: 4px 0 0; }
.notice.success { background: var(--c-success-50); color: var(--c-success-700); }
.notice.warn { background: var(--c-warn-50); color: var(--c-warn); }
.notice .ic { width: 22px; height: 22px; margin-top: 1px; }

/* ---------- Responsive ---------- */

@media (pointer: coarse) {
  .code figcaption, .code-skip { min-height: 44px; }
}

@media (max-width: 1180px) {
  :root { --sidebar-w: 248px; }
  .content, .site-footer .wrap { padding-left: 32px; padding-right: 32px; }
  .demo-panel { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 48px; }
  .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .spec { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .spec-side { position: static; }
  .story { max-width: 40em; }
}

/* Bei bis zu 900 px wird die Sidebar zur Kopfzeile mit Wortmarke.
   Flex statt Grid, damit die Kopfzeile über die ganze Seite sticky bleibt. */
@media (max-width: 900px) {
  :root { --sec-gap: 88px; }
  .app { display: flex; flex-direction: column; }
  .sidebar {
    align-self: stretch; height: auto; flex-direction: row; align-items: center; justify-content: space-between;
    gap: 16px; padding: 12px 20px; overflow: visible;
  }
  .sidebar .wordmark { margin: 0; font-size: 26px; }
  .nav, .sidebar-foot { display: none; }
  .main { flex: 1; }
  .hero, .sec, .form-card { scroll-margin-top: 88px; }
  .hero { padding-top: 48px; }
  .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 640px) {
  .content, .site-footer .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 40px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .demo-panel { padding: 32px 20px 20px; margin-left: -8px; margin-right: -8px; }
  .form-card { padding: 22px 18px; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact .seg-opts span { padding: 0 8px; font-size: 14px; }
  .apps { grid-template-columns: minmax(0, 1fr); }
  .reqs { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px 18px; }
  .reqs-foot { margin-top: 0; }
  .code code { font-size: 12px; }
  .ln { padding-right: 12px; }
  .code { --line-gutter: 3ch; }
  .ln::before { padding-right: 1.5ch; }
  .code figcaption { padding: 9px 12px; }
  .code-dir { display: none; }
  .spec-list li { padding-right: 0; }
  .story p { font-size: 17px; }
  .apps-foot { padding: 18px; }
  .site-footer { padding-top: 64px; }
  .site-header { padding: 24px 16px 4px; }
  .site-header .wordmark { font-size: 32px; }
  .legal { padding: 16px 16px 0; }
  .legal .card { padding: 24px; }
  .sec h2, .split h2 { font-size: 25px; }
  .demo-panel h2 { font-size: 28px; }
  .legal h1 { font-size: min(24px, 6.1vw); }
}
