/* docsniff Landingpage
   Fonts: Geist / Geist Mono (SIL OFL), self-hosted. Icons: Phosphor (MIT). */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0c0d;
  --bg-2: #111315;
  --surface: #15181a;
  --surface-2: #1b1f21;
  --line: #24292b;
  --line-2: #30373a;
  --text: #ecefed;
  --text-2: #a3aba7;
  --text-3: #7c8581;
  --accent: #4ade80;          /* Grün aus dem Logo */
  --accent-ink: #062b15;      /* Text auf Akzent */
  --accent-soft: rgb(74 222 128 / 0.12);
  --accent-2: #60a5fa;        /* Zweitakzent: Blau aus dem Scan-Strahl, für "erkannt" */
  --accent-2-soft: rgb(96 165 250 / 0.14);
  --scan-a: var(--accent-2);
  --paper: #f3f4f2;
  --paper-ink: #1d2321;
  --paper-mute: #69716d;
  --shadow: 0 30px 80px -30px rgb(0 0 0 / 0.7);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --r: 14px;      /* Karten */
  --r-sm: 8px;    /* Inputs, Chips */
  --r-pill: 999px; /* Buttons */

  --wrap: 1240px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f4;
    --bg-2: #eceeec;
    --surface: #ffffff;
    --surface-2: #f6f7f6;
    --line: #dde1de;
    --line-2: #cdd3cf;
    --text: #121614;
    --text-2: #4b5450;
    --text-3: #626b67;
    --accent: #15803d;
    --accent-ink: #ffffff;
    --accent-soft: rgb(21 128 61 / 0.09);
    --accent-2: #2563eb;
    --accent-2-soft: rgb(37 99 235 / 0.1);
    --scan-a: var(--accent-2);
    --paper: #ffffff;
    --shadow: 0 30px 70px -35px rgb(20 40 30 / 0.35);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5f4;
  --bg-2: #eceeec;
  --surface: #ffffff;
  --surface-2: #f6f7f6;
  --line: #dde1de;
  --line-2: #cdd3cf;
  --text: #121614;
  --text-2: #4b5450;
  --text-3: #626b67;
  --accent: #15803d;
  --accent-ink: #ffffff;
  --accent-soft: rgb(21 128 61 / 0.09);
  --accent-2: #2563eb;
  --accent-2-soft: rgb(37 99 235 / 0.1);
  --scan-a: var(--accent-2);
  --paper: #ffffff;
  --shadow: 0 30px 70px -35px rgb(20 40 30 / 0.35);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, pre { font-family: var(--mono); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

.hero .eyebrow { color: var(--accent-2); }
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -0.035em; max-width: 18ch; }
.lead { margin-top: 20px; font-size: clamp(17px, 1.4vw, 19px); color: var(--text-2); max-width: 58ch; }

/* ---------- Buttons ---------- */
.btn {
  --h: 50px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: inherit; font-weight: 600; font-size: 16px; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn .icon { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: color-mix(in oklab, var(--accent) 88%, white); }
  .btn--ghost:hover { border-color: var(--text-3); background: var(--surface); }
  .btn:hover .icon { transform: translateX(3px); }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color 250ms ease, border-color 250ms ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner { height: 68px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.nav__links { display: flex; gap: 28px; margin-left: 12px; }
.nav__links a, .nav__login { color: var(--text-2); text-decoration: none; font-size: 15px; transition: color 150ms ease; }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav__login { display: inline-flex; align-items: center; gap: 7px; }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover, .nav__login:hover { color: var(--text); }
}
/* Aufklappmenüs in der Navigation (Sprache, Bedienhilfen) */
.pop { position: relative; }
.pop summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid transparent;
  color: var(--text-2); font-size: 14px; font-family: var(--mono);
  transition: color 150ms ease, border-color 150ms ease, scale 160ms var(--ease-out);
}
.pop summary:active { scale: 0.95; }
.a11y summary { padding: 0; }
.a11y summary .icon { width: 22px; height: 22px; }
.pop summary::-webkit-details-marker { display: none; }
.pop[open] summary, .pop summary:focus-visible { color: var(--text); border-color: var(--line-2); }
@media (hover: hover) and (pointer: fine) { .pop summary:hover { color: var(--text); } }
.pop__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 190px;
  list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  transform-origin: top right;
}
@media (prefers-reduced-motion: no-preference) {
  .pop[open] .pop__panel { animation: pop 180ms var(--ease-out); }
}
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }

.langsw a { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 6px; text-decoration: none; font-size: 15px; color: var(--text-2); transition: scale 160ms var(--ease-out); }
.langsw a:active { scale: 0.97; }
.langsw a b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--text-3); width: 20px; }
.langsw a[aria-current] { color: var(--text); background: var(--accent-soft); }
.langsw a[aria-current] b { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .langsw a:hover { background: var(--surface-2); color: var(--text); } }

/* Bedienhilfen */
.a11y__panel { width: 300px; padding: 14px; display: grid; gap: 4px; font-family: var(--font); }
.a11y__h { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.a11y__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--text-2); }
.seg { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--bg); }
.seg button {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; min-width: 32px; padding: 0 9px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2);
  font: inherit; font-size: 13px; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--ease-out);
}
.seg button:active { transform: scale(0.95); }
.seg button sup { font-size: 10px; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.seg output { font-family: var(--mono); font-size: 12px; min-width: 44px; text-align: center; color: var(--text); }
@media (hover: hover) and (pointer: fine) { .seg button:not([aria-checked="true"]):hover { color: var(--text); background: var(--surface-2); } }

.a11y__switch { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; color: var(--text); cursor: pointer; }
.a11y__switch > .icon { color: var(--text-3); }
.a11y__switch span { flex: 1; }
.a11y__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a11y__switch i { position: relative; width: 38px; height: 22px; flex: none; border-radius: var(--r-pill); background: var(--line-2); transition: background-color 180ms ease; }
.a11y__switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform 200ms var(--ease-out), background-color 180ms ease; }
.a11y__switch input:checked + i { background: var(--accent); }
.a11y__switch input:checked + i::after { transform: translateX(16px); background: var(--accent-ink); }
.a11y__switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.a11y__reset {
  margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: transparent; color: var(--text-2);
  font: inherit; font-size: 14px; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .a11y__reset:hover { color: var(--text); border-color: var(--text-3); } }

/* Wirkung der Bedienhilfen */
:root[data-size="1"] body { zoom: 1.125; }
:root[data-size="2"] body { zoom: 1.25; }
:root.a11y-contrast {
  --text-2: var(--text);
  --text-3: color-mix(in oklab, var(--text) 82%, transparent);
  --line: color-mix(in oklab, var(--text) 30%, transparent);
  --line-2: color-mix(in oklab, var(--text) 55%, transparent);
}
:root.a11y-contrast .status, :root.a11y-contrast .step { opacity: 1; }
:root.a11y-links main a:not(.btn), :root.a11y-links footer a { text-decoration: underline; text-underline-offset: 3px; }
:root.a11y-calm *, :root.a11y-calm *::before, :root.a11y-calm *::after { animation: none !important; transition: none !important; }
:root.a11y-calm { scroll-behavior: auto; }
:root.a11y-calm.js .reveal { opacity: 1; transform: none; }
.footer__small { font-size: 13px; color: var(--text-3); }

.nav__toggle {
  display: none; width: 42px; height: 42px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-2); border-radius: var(--r-pill); color: var(--text); cursor: pointer;
  transition: scale 160ms var(--ease-out);
}
.nav__toggle:active { scale: 0.95; }
.nav__toggle .icon--close { display: none; }

@media (max-width: 960px) {
  .nav__toggle { display: inline-flex; }
  .nav__login span { display: none; }
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px 24px 24px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    /* Schließen schneller als Öffnen */
    transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
  }
  .nav__links a { padding: 14px 0; font-size: 18px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav.is-open { background: var(--bg); border-bottom-color: var(--line); }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: auto; transition-duration: 200ms; }
  .nav.is-open .icon--open { display: none; }
  .nav.is-open .icon--close { display: block; }
}
@media (max-width: 520px) {
  .nav__actions .btn { display: none; }
}

/* ---------- Hero ---------- */
/* Hero + Laufband passen zusammen in den ersten Bildschirm (Laufband ca. 58px) */
.hero { position: relative; padding: 104px 0 48px; min-height: min(calc(100dvh - 58px), 920px); display: flex; align-items: center; }
.hero__glow {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 30%, var(--accent-soft), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgb(96 165 250 / 0.06), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
/* Titelgröße passt sich der längsten Zeile der jeweiligen Sprache an (--chars kommt aus PHP) */
.hero__copy { container-type: inline-size; }
.hero__title { font-size: clamp(36px, calc(100cqi / (var(--chars, 12) * 0.53)), 88px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 650; }
.hero__title .line > span { white-space: nowrap; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: inline-block; }
.hero__accent { color: var(--accent); }
.hero__sub { margin-top: 26px; font-size: clamp(18px, 1.5vw, 20px); color: var(--text-2); max-width: 40ch; }
.hero__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Ladeanimation: gestaffeltes Einblenden, Titelzeilen gleiten aus ihrer Maske */
@media (prefers-reduced-motion: no-preference) {
  .load { animation: rise 700ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 70ms + 80ms); }
  .hero__title .load { animation-name: rise-mask; animation-duration: 800ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-mask { from { transform: translateY(105%); } }

/* ---------- Demo (Beleg wird gelesen) ---------- */
.demo { margin: 0; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.demo__doc { position: relative; transform: rotate(-1.5deg); }
.doc {
  background: var(--paper); color: var(--paper-ink);
  border-radius: 6px; padding: 22px 20px 26px;
  font-size: 12.5px; line-height: 1.45;
  box-shadow: var(--shadow), 0 0 0 1px rgb(0 0 0 / 0.06);
  /* Zackenkante unten wie am Logo */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  padding-bottom: 34px;
  min-height: 368px;
  /* Blur verbindet alten und neuen Beleg beim Tausch zu einem Übergang */
  transition: opacity 300ms ease, filter 300ms ease;
}
.doc__head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.doc__vendor { display: block; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.doc__addr { display: block; color: var(--paper-mute); font-size: 11.5px; margin-top: 2px; }
.doc__kind { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--paper-mute); white-space: nowrap; }
.doc__meta { display: flex; gap: 16px; margin: 16px 0 12px; color: var(--paper-mute); font-size: 11.5px; }
.doc__meta b { color: var(--paper-ink); font-weight: 600; }
.doc__lines { border-top: 1px solid #e1e4e2; padding-top: 8px; }
.doc__line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.doc__line span:last-child { font-family: var(--mono); font-size: 12px; }
.doc__sum { margin-top: 10px; border-top: 1px solid #e1e4e2; padding-top: 8px; }
.doc__sum > div { display: flex; justify-content: space-between; padding: 2px 0; color: var(--paper-mute); }
.doc__sum > div span:last-child { font-family: var(--mono); font-size: 12px; color: var(--paper-ink); }
.doc__total { font-weight: 650; color: var(--paper-ink) !important; font-size: 13.5px; margin-top: 4px; }

/* Hervorhebung des Feldes, das gerade gelesen wird */
[data-src] { border-radius: 3px; transition: background-color 250ms ease, box-shadow 250ms ease; }
[data-src].is-reading { background: rgb(74 222 128 / 0.28); box-shadow: 0 0 0 3px rgb(74 222 128 / 0.28); }

.beam {
  position: absolute; left: -10px; right: -10px; top: 0; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--scan-a), #4ade80);
  box-shadow: 0 0 22px 4px rgb(74 222 128 / 0.35);
  opacity: 0;
}
.beam::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 70px;
  background: linear-gradient(to top, rgb(74 222 128 / 0.16), transparent);
}
.demo.is-scanning .beam { animation: sweep 1500ms var(--ease-in-out) both; }
@keyframes sweep {
  0% { opacity: 0; transform: translateY(8px); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateY(360px); }
}

.demo__out {
  margin-top: 36px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.demo__file { font-family: var(--mono); font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status {
  font-family: var(--mono); font-size: 11.5px; padding: 3px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.status[data-state="done"] { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); background: var(--accent-soft); }
.status[data-state="review"] { color: var(--text); border-style: dashed; border-color: var(--text-3); }

.fields { margin: 0; padding: 6px 0; }
.field { display: grid; grid-template-columns: minmax(92px, max-content) 1fr; gap: 8px; padding: 7px 14px; font-size: 13px; align-items: baseline; }
.field dt { color: var(--text-3); white-space: nowrap; }
.field dd { margin: 0; display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.field dd span { font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field dd em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--text-3); white-space: nowrap; flex: none; }
.field dd span, .field dd em { opacity: 0; transform: translateX(-6px); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.field.is-set dd span, .field.is-set dd em { opacity: 1; transform: none; }
.field.is-low dd span { text-decoration: underline dashed var(--text-3); text-underline-offset: 4px; }
.field.is-low dd em { color: var(--text); }
/* Platzhalter, solange das Feld leer ist */
.field dd { position: relative; }
.field dd::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 60%; height: 8px; margin-top: -4px; border-radius: 4px;
  background: var(--surface-2); transition: opacity 200ms ease;
}
.field.is-set dd::before { opacity: 0; }

.demo__check {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--accent);
  transition: opacity 250ms ease;
}
.demo__check.is-hidden { opacity: 0; }
.demo__check.is-review { color: var(--text-2); }
.demo__cap { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); text-align: right; margin-top: 6px; }

/* ---------- Ticker ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker__track { display: flex; width: max-content; }
.ticker__list { display: flex; gap: 48px; padding: 0 24px; margin: 0; list-style: none; font-family: var(--mono); font-size: 14px; color: var(--text-2); white-space: nowrap; }
.ticker__list li { display: flex; align-items: center; gap: 48px; }
.ticker__list li::after { content: "/"; color: var(--line-2); }
/* Erkannter Belegtyp aus der Hero-Demo leuchtet im Laufband auf */
.ticker__list span {
  padding: 4px 10px; margin: -4px -10px; border-radius: var(--r-pill); border: 1px solid transparent;
  transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease;
}
.ticker__list li.is-hit span { color: var(--text); background: var(--accent-2-soft); border-color: color-mix(in oklab, var(--accent-2) 55%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .ticker__track { animation: ticker 40s linear infinite; }
}
/* Pause nur bei echtem Hover; auf Touch würde ein Tippen das Band hängen lassen */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .ticker:hover .ticker__track { animation-play-state: paused; }
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Reveal beim Scrollen ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: var(--rd, 0ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Ablauf ---------- */
.flow { padding: 140px 0 120px; }
.flow__grid { margin-top: 72px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 72px; align-items: start; }
.flow__steps { list-style: none; margin: 0; padding: 0; }
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 20px;
  padding: 36px 0; min-height: 34vh;
  opacity: 0.38; transition: opacity 400ms var(--ease-out);
}
.step.is-active, .no-js .step { opacity: 1; }
.step__icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--text-2);
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease;
}
.step.is-active .step__icon { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step h3 { font-size: 24px; margin-top: 6px; }
.step p { margin-top: 10px; color: var(--text-2); max-width: 46ch; }

/* Fortschrittslinie entlang der Schritte */
.flow__steps { position: relative; }
.flow__steps::before, .flow__steps::after {
  content: ""; position: absolute; left: 21px; top: 58px; bottom: 58px; width: 2px; border-radius: 2px;
}
.flow__steps::before, .flow__steps::after { z-index: 0; }
.flow__steps::before { background: var(--line); }
.flow__steps::after {
  background: linear-gradient(var(--scan-a), var(--accent));
  transform-origin: top; transform: scaleY(var(--p, 0));
  transition: transform 700ms var(--ease-out);
}
.step__icon { position: relative; z-index: 1; background: var(--bg); }

/* Bühne: ein Beleg wandert durch alle Schritte */
.flow__panel { position: sticky; top: 104px; }
.stage {
  --doc-w: 190px;
  position: relative; height: 470px; overflow: hidden;
  container-type: inline-size;
  background:
    radial-gradient(70% 60% at 50% 45%, var(--accent-soft), transparent 70%),
    radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.stage__bar {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.stage__file { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }
.stage .status[data-state="done"] { color: var(--accent); }

/* Der Beleg */
.st-doc {
  position: absolute; z-index: 2; left: calc(50% - var(--doc-w) / 2); top: 112px; width: var(--doc-w);
  opacity: 0; transform: translateY(-60px) rotate(-4deg) scale(0.92);
  transition: transform 800ms var(--ease-out), opacity 500ms var(--ease-out), filter 500ms var(--ease-out);
}
.st-paper {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px 14px 22px; border-radius: 5px;
  background: var(--paper); color: var(--paper-ink);
  font-size: 9.5px; line-height: 1.35;
  box-shadow: 0 20px 50px -18px rgb(0 0 0 / 0.55);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 10px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 10px 100%;
}
.w {
  position: relative; padding: 0 3px; margin: 0 -3px; border-radius: 2px; white-space: nowrap;
  transition: background-color 250ms ease, box-shadow 250ms ease, color 250ms ease;
}
.w--b { font-weight: 650; font-size: 10.5px; }
.w--s { color: var(--paper-mute); font-size: 8.5px; }
.w--m { font-family: var(--mono); font-size: 8.5px; color: var(--paper-mute); letter-spacing: 0.06em; margin-top: 6px; }
.w--gap { margin-top: 8px; }
/* OCR-Boxen um jedes Wort */
.w::after {
  content: ""; position: absolute; inset: -2px -1px; border-radius: 3px;
  border: 1px solid var(--scan-a); opacity: 0; transform: scale(1.08);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  transition-delay: 0ms;
}
.stage[data-step="1"] .w::after { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 90ms + 500ms); }
.w.is-reading { background: rgb(74 222 128 / 0.3); box-shadow: 0 0 0 2px rgb(74 222 128 / 0.3); }
.w.is-read { color: color-mix(in oklab, var(--paper-ink) 55%, #16a34a); }

.st-beam {
  position: absolute; left: -14px; right: -14px; top: 0; height: 3px; border-radius: 3px; opacity: 0;
  background: linear-gradient(90deg, var(--scan-a), #4ade80);
  box-shadow: 0 0 20px 4px rgb(74 222 128 / 0.35);
}
.st-beam::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 50px; background: linear-gradient(to top, rgb(74 222 128 / 0.16), transparent); }

/* Zustände je Schritt */
.stage[data-step="0"] .st-doc { opacity: 1; transform: none; }
.stage[data-step="1"] .st-doc { opacity: 1; transform: scale(1.18); }
.stage[data-step="2"] .st-doc,
.stage[data-step="3"] .st-doc,
.stage[data-step="4"] .st-doc { opacity: 1; transform: translateX(calc(-25cqw + 4px)) scale(0.96); }
/* Übergabe: der Beleg geht als Datensatz in die Antwort rechts über */
.stage[data-step="5"] .st-doc { opacity: 0; transform: translateY(40px) scale(0.6); filter: blur(4px); transition-duration: 900ms, 600ms, 600ms; transition-delay: 0ms, 300ms, 300ms; }
.stage .st-panel--5 { left: 16px; width: auto; align-items: center; }
.st-panel--5 .st-json { width: min(100%, 340px); }
.st-panel--5 .st-hook { width: min(100%, 420px); }
.st-soon { margin-top: 10px; }
.st-soon span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px dashed var(--line-2); color: var(--text-3); font-size: 12px; }
.st-soon small { font-family: var(--mono); font-size: 10.5px; }

/* Aufnahme */
.st-inputs {
  position: absolute; top: 62px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px;
  opacity: 0; transform: translateY(-6px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.st-inputs span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--bg); font-size: 12.5px; }
.st-inputs .icon { color: var(--accent); }
.st-inputs .is-soon { border-style: dashed; color: var(--text-3); }
.st-inputs .is-soon .icon { color: var(--text-3); }
.stage[data-step="0"] .st-inputs { opacity: 1; transform: none; }
.st-drop { position: absolute; left: 50%; top: 92px; width: 2px; height: 20px; margin-left: -1px; background: linear-gradient(var(--accent), transparent); opacity: 0; transition: opacity 300ms ease; }
.stage[data-step="0"] .st-drop { opacity: 1; }

.st-hash {
  position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 12.5px; color: var(--text-3);
  opacity: 0; transition: opacity 400ms var(--ease-out);
}
.st-hash span { font-family: var(--mono); color: var(--accent); }
.st-hash code { color: var(--text-2); }
.stage[data-step="0"] .st-hash { opacity: 1; transition-delay: 500ms; }

/* Texterkennung */
.st-ocr {
  position: absolute; left: 16px; right: 16px; bottom: 18px; display: flex; justify-content: space-between; gap: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--text-2);
  opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.st-ocr span { display: inline-flex; align-items: center; gap: 6px; }
.st-ocr b { font-weight: 500; color: var(--scan-a); font-variant-numeric: tabular-nums; }
.stage[data-step="1"] .st-ocr { opacity: 1; transform: none; transition-delay: 300ms; }
@media (prefers-reduced-motion: no-preference) {
  .stage[data-step="1"] .st-beam { animation: st-sweep 1900ms var(--ease-in-out) 250ms infinite; }
}
@keyframes st-sweep {
  0% { opacity: 0; transform: translateY(0); }
  10%, 85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(250px); }
}

/* Rechte Panels (Klassifikation, Extraktion, Prüfung, Übergabe) */
.st-panel {
  position: absolute; z-index: 2; top: 64px; bottom: 16px; right: 16px; width: calc(50cqw - 24px);
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateX(16px); pointer-events: none;
  transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out);
}
.stage[data-step="2"] .st-panel--2,
.stage[data-step="3"] .st-panel--3,
.stage[data-step="4"] .st-panel--4,
.stage[data-step="5"] .st-panel--5 { opacity: 1; transform: none; transition-delay: 250ms; }
.st-h { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--text-3); margin-bottom: 10px; }

.st-types { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.st-types li {
  font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text-3);
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform 200ms var(--ease-out);
}
.st-types li.is-try { color: var(--text); border-color: var(--text-3); }
.st-types li.is-hit { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); transform: scale(1.06); }

.st-fields { margin: 0; display: grid; gap: 6px; }
.st-fields > div {
  display: grid; gap: 1px; padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg);
  transition: border-color 250ms ease;
}
.st-fields dt { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.st-fields dd { margin: 0; font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transform: translateX(-8px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.st-fields > div.is-set { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.st-fields > div.is-set dd { opacity: 1; transform: none; }

.st-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st-checks li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-3); transition: color 250ms ease; }
.st-checks i {
  position: relative; width: 20px; height: 20px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--line-2);
  transition: border-color 200ms ease;
}
.st-checks i .icon { width: 22px; height: 22px; color: var(--accent); opacity: 0; transform: scale(0.6); transition: opacity 250ms var(--ease-out), transform 300ms var(--ease-out); }
.st-checks li.is-run i { border-color: var(--accent); border-right-color: transparent; animation: spin 700ms linear infinite; }
.st-checks li.is-ok { color: var(--text); }
.st-checks li.is-ok i { border-color: transparent; }
.st-checks li.is-ok i .icon { opacity: 1; transform: none; }

.st-json { margin: 0; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); font-size: 12px; line-height: 1.7; overflow: hidden; }
.st-json i { font-style: normal; color: var(--text-2); }
.st-json b { font-weight: 400; color: var(--accent); }
.st-json u { text-decoration: none; color: var(--scan-a); }
.st-hook { display: flex; align-items: center; margin-top: 12px; }
.st-wire { position: relative; flex: 1; height: 2px; background: var(--line-2); overflow: hidden; margin-right: 8px; }
.st-wire i { position: absolute; top: 0; left: 0; width: 30%; height: 100%; background: var(--accent); transform: translateX(-100%); }
@media (prefers-reduced-motion: no-preference) {
  .stage[data-step="5"] .st-wire i { animation: st-packet 1.4s var(--ease-in-out) 600ms infinite; }
}
@keyframes st-packet { to { transform: translateX(340%); } }
.st-target { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--accent); color: var(--accent); font-size: 12.5px; white-space: nowrap; }


/* ---------- Funktionen (Bento) ---------- */
.features { padding: 120px 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.bento {
  margin-top: 56px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, 1fr);
  grid-template-areas:
    "in in in in rv rv"
    "ru ru la la rv rv"
    "ru ru du du du du";
}
.tile {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.tile h3 { font-size: 22px; letter-spacing: -0.025em; }
.tile p { color: var(--text-2); font-size: 16px; max-width: 46ch; }
/* Lichtkante folgt der Maus (nur Feinzeiger) */
/* Eigenes Element, per JS eingefügt und direkt per transform verschoben: keine CSS-Variable am .tile,
   die bei jeder Mausbewegung die Styles aller Kinder neu berechnen ließe */
.tile__glow {
  position: absolute; top: -420px; left: -420px; width: 840px; height: 840px; pointer-events: none;
  background: radial-gradient(circle closest-side, var(--accent-soft), transparent 60%);
  opacity: 0; transition: opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) { .tile:hover .tile__glow { opacity: 1; } }

.tile--inputs { grid-area: in; background: linear-gradient(135deg, color-mix(in oklab, var(--scan-a) 9%, var(--surface)), var(--surface) 55%); }
.tile--review { grid-area: rv; }
.tile--rules { grid-area: ru; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 16px 16px; background-color: var(--surface); }
.tile--lang { grid-area: la; }
.tile--dupe { grid-area: du; background: linear-gradient(90deg, var(--surface) 40%, color-mix(in oklab, var(--accent) 8%, var(--surface))); }

.inputs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; }
.inputs span {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--bg);
  font-size: 15px;
}
.inputs .icon { color: var(--accent); }
.inputs .is-soon { border-style: dashed; background: transparent; color: var(--text-2); }
.inputs .is-soon .icon { color: var(--text-3); }
.inputs small { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }

.mini { margin-top: auto; display: grid; gap: 8px; padding-top: 18px; }
.mini > div {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: baseline;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
  font-size: 14px;
}
.mini span { color: var(--text-3); font-size: 13px; }
.mini b { font-weight: 500; font-family: var(--mono); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.mini--low { border-style: dashed !important; border-color: var(--text-3) !important; }
.mini--low em { color: var(--text); }
.mini--low b { text-decoration: underline dashed var(--text-3); text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .mini--low { animation: nudge 3.2s var(--ease-in-out) 3; }
}
@keyframes nudge { 0%, 70%, 100% { transform: none; } 78% { transform: translateX(3px); } 86% { transform: translateX(-2px); } }

.rates { list-style: none; margin: auto 0 0; padding: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rates li { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); font-family: var(--mono); font-size: 14px; color: var(--text-2); }
.rates b { display: block; font-family: var(--font); font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }

.langs { display: flex; gap: 14px; font-size: clamp(36px, 4vw, 52px); font-weight: 650; letter-spacing: -0.04em; line-height: 1; margin-bottom: 18px; }
.langs span { color: var(--line-2); transition: color 400ms ease; }
.langs span.is-on { color: var(--text); }

.hash { margin-top: auto; padding-top: 18px; font-size: clamp(13px, 1.6vw, 17px); color: var(--text-3); letter-spacing: 0.04em; word-break: break-all; }
.hash .ok { color: var(--accent); }

/* ---------- Datenschutz ---------- */
.privacy { padding: 140px 0 120px; }
.privacy__title { max-width: 16ch; }
.boundary { margin-top: 64px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.boundary__zone { position: relative; border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--line)); border-radius: var(--r); padding: 34px 24px 26px; background: var(--accent-soft); }
.boundary__label {
  position: absolute; top: -12px; left: 20px; display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; background: var(--bg); border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--line)); border-radius: var(--r-pill);
  font-family: var(--mono); font-size: 12px; color: var(--accent);
}
.boundary__row { display: flex; align-items: center; }
.node {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font-size: 15px;
}
.node .icon { color: var(--accent); }
.node--off { color: var(--text-3); border-style: dashed; background: transparent; }
.node--off .icon { color: var(--text-3); }
.wire { flex: 1; min-width: 24px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.wire i { position: absolute; top: -1px; left: 0; width: 26px; height: 3px; border-radius: 3px; background: var(--accent); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .boundary.is-in .wire i { animation: packet 2.4s linear infinite; }
  .boundary.is-in .wire:nth-of-type(4) i { animation-delay: 0.8s; }
  .boundary.is-in .wire:nth-of-type(6) i { animation-delay: 1.6s; }
}
@keyframes packet {
  0% { opacity: 0; transform: translateX(-30px); }
  15% { opacity: 1; }
  45% { opacity: 1; }
  60%, 100% { opacity: 0; transform: translateX(var(--w, 160px)); }
}

.facts { margin-top: 72px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 72px; max-width: 980px; }
.fact > .icon { width: 28px; height: 28px; color: var(--accent); }
.fact h3 { margin-top: 16px; font-size: 21px; }
.fact p { margin-top: 8px; color: var(--text-2); max-width: 44ch; }

/* ---------- On-Premise (geplant) ---------- */
.soon { padding: 0 0 40px; }
.soon__box {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  padding: 28px 32px; border: 1px dashed var(--line-2); border-radius: var(--r);
  background: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in oklab, var(--line) 45%, transparent) 14px 15px);
}
.soon__tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--bg); color: var(--text-2); white-space: nowrap;
}
.soon__title { font-size: 24px; letter-spacing: -0.025em; }
.soon__copy p { margin-top: 6px; color: var(--text-2); max-width: 70ch; }
.soon__icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); color: var(--text-3); }
.soon__icon .icon { width: 26px; height: 26px; }
@media (prefers-reduced-motion: no-preference) {
  .soon__box.is-in .soon__icon { animation: soon-pulse 2.8s var(--ease-in-out) 3; }
}
@keyframes soon-pulse { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
@media (max-width: 767px) {
  .soon__box { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
  .soon__tag { justify-self: start; }
  .soon__icon { display: none; }
}

/* ---------- FAQ ---------- */
.faq { padding: 140px 0; }
.faq__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; }
.faq__grid .h2 { position: sticky; top: 120px; }
.faq__list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font-size: 19px; font-weight: 550; letter-spacing: -0.015em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .icon { color: var(--text-3); transition: transform 250ms var(--ease-out), scale 160ms var(--ease-out), color 200ms ease; }
/* Druck-Feedback am Icon statt an der ganzen Zeile (eine skalierte Vollbreite-Zeile wirkt wie ein Ruckeln) */
.qa summary:active .icon { scale: 0.85; }
.qa[open] summary .icon { transform: rotate(45deg); color: var(--accent); }
.qa__body p { padding: 0 48px 26px 0; color: var(--text-2); max-width: 64ch; }
@media (hover: hover) and (pointer: fine) { .qa summary:hover .icon { color: var(--text); } }
/* Akkordeon: Höhe animieren, wo der Browser es kann */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  @media (prefers-reduced-motion: no-preference) {
    .qa::details-content { height: 0; overflow: clip; transition: height 300ms var(--ease-out), content-visibility 300ms allow-discrete; }
    .qa[open]::details-content { height: auto; }
  }
}

/* ---------- Kontakt ---------- */
.contact { padding: 120px 0 140px; background: var(--bg-2); border-top: 1px solid var(--line); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.direct { margin-top: 40px; display: grid; gap: 14px; }
.direct a { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 550; text-decoration: none; width: fit-content; }
.direct a .icon { color: var(--accent); }
.direct p { color: var(--text-3); font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .direct a:hover { color: var(--accent); } }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 32px; display: grid; gap: 20px; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input { display: grid; gap: 8px; }
.input label { font-size: 14px; font-weight: 550; }
.input label small { font-weight: 400; color: var(--text-3); margin-left: 4px; font-size: 13px; }
.input input, .input select, .input textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 12px 14px; min-height: 48px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input textarea { resize: vertical; min-height: 110px; }
.input select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.input input:focus, .input select:focus, .input textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.has-error input { border-color: #f87171; }
.input__help { font-size: 13px; color: var(--text-3); }
.input__err { font-size: 13.5px; color: #fca5a5; min-height: 0; }
.input__err:empty { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .input__err { color: #b91c1c; }
  :root:not([data-theme="dark"]) .input.has-error input { border-color: #dc2626; }
}
:root[data-theme="light"] .input__err { color: #b91c1c; }
:root[data-theme="light"] .input.has-error input { border-color: #dc2626; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--text-2); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.consent a { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn__busy { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; }
.form.is-busy .btn__busy { display: block; animation: spin 700ms linear infinite; }
.form.is-busy .btn__label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.form__msg:empty { display: none; }
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); font-size: 15px; }
.msg .icon { margin-top: 3px; }
.msg--ok { background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); }
.msg--ok .icon { color: var(--accent); }
.msg--err { background: rgb(248 113 113 / 0.08); border: 1px solid rgb(248 113 113 / 0.35); color: var(--text); }
.msg--err .icon { color: #f87171; }
.msg a { color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .msg { animation: rise 400ms var(--ease-out) both; }
}
.form.is-sent .form__row, .form.is-sent .input, .form.is-sent .consent, .form.is-sent [data-submit] { display: none; }

/* ---------- Footer ---------- */
.footer { padding: 72px 0 36px; font-size: 15px; color: var(--text-2); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr; gap: 40px; }
.footer__brand p { margin-top: 14px; max-width: 32ch; }
.footer .brand { color: var(--text); }
.footer__h { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; letter-spacing: 0; }
.footer p + p { margin-top: 10px; }
.footer a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--text); } }
.footer__base { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-3); }

/* ---------- Rechtsseiten ---------- */
.legal { padding: 140px 0 100px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.04em; }
.legal h2 { font-size: 22px; margin-top: 48px; }
.legal p, .legal li { color: var(--text-2); margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--accent); }
.legal .note { margin-top: 24px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); font-size: 15px; }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero { min-height: auto; }
  .demo { max-width: 720px; }
  .flow__grid { grid-template-columns: 1fr; gap: 24px; }
  .flow__panel { top: 76px; order: -1; z-index: 5; }
  .step { min-height: 46vh; padding: 24px 0; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "in in" "rv ru" "la ru" "du du"; }
  .contact__grid, .faq__grid { grid-template-columns: 1fr; gap: 48px; }
  .faq__grid .h2 { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .hero { padding: 104px 0 56px; }
  .demo { grid-template-columns: 1fr; }
  .demo__doc { transform: none; }
  .demo__out { margin-top: 0; }
  .flow, .privacy, .faq { padding: 96px 0 80px; }
  .features, .contact { padding: 80px 0; }
  .flow__grid, .bento, .facts { margin-top: 40px; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "in" "rv" "ru" "la" "du"; }
  .tile { padding: 22px; }
  .stage { --doc-w: 132px; height: 330px; }
  .st-doc { top: 92px; }
  .st-paper { font-size: 7px; padding: 11px 10px 16px; gap: 2px; }
  .w--b { font-size: 7.5px; }
  .w--s, .w--m { font-size: 6.5px; }
  .stage[data-step="1"] .st-doc { transform: scale(1.1); }
  .st-inputs { top: 56px; }
  .st-inputs span { font-size: 11px; padding: 3px 8px; }
  .st-drop { top: 80px; height: 12px; }
  .st-hash, .st-ocr { font-size: 10.5px; bottom: 12px; }
  .st-panel { top: 52px; bottom: 10px; right: 10px; width: calc(52cqw - 14px); }
  .stage[data-step="2"] .st-doc, .stage[data-step="3"] .st-doc, .stage[data-step="4"] .st-doc { transform: translateX(calc(-25cqw + 6px)) scale(0.92); }
  .st-h { font-size: 10px; margin-bottom: 6px; }
  .st-types li { font-size: 10px; padding: 3px 7px; }
  .st-fields { gap: 4px; }
  .st-fields > div { padding: 4px 7px; }
  .st-fields dt { font-size: 9px; }
  .st-fields dd { font-size: 10.5px; }
  .st-checks { gap: 6px; }
  .st-checks li { font-size: 11px; gap: 7px; }
  .st-checks i { width: 16px; height: 16px; }
  .st-json { font-size: 10px; padding: 8px 10px; }
  .st-target { font-size: 10.5px; padding: 4px 8px; }
  .flow__steps::before, .flow__steps::after { display: none; }
  .boundary { grid-template-columns: 1fr; }
  .boundary__row { flex-direction: column; align-items: stretch; gap: 0; }
  .boundary__row .wire { width: 1px; min-height: 18px; flex: none; margin-left: 24px; }
  .boundary__out { justify-self: start; }
  .facts { grid-template-columns: 1fr; gap: 36px; }
  .form { padding: 22px; }
  .form__row { grid-template-columns: 1fr; }
  .qa__body p { padding-right: 0; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Weniger Bewegung, nicht null: Lage/Größe springt, Ein-/Ausblenden und Farbwechsel bleiben weich */
  *, *::before, *::after { transition-property: opacity, color, background-color, border-color, box-shadow, filter !important; }
}
