/* drkv-website: gemeinsames Stylesheet nach dem drkv-Design-System (Light- und Dark-Theme, Regel A: Orange als Signal).
   Schriften liegen lokal (kein Abruf bei Dritten). */

@font-face { font-family: "Rapid ST Medium Wide"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/RapidST-MediumWide.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("/assets/fonts/NotoSans-Light.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/NotoSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/NotoSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/NotoSans-SemiBold.woff2") format("woff2"); }

:root {
  /* Palette */
  --anthracite: #212226;
  --white: #FFFFFF;
  --light-grey: #E7E8E9;
  --light-grey-tint-2: #F5F6F6;
  --grey: #C9C9C9;
  --grey-blue: #515254;
  --grey-blue-tint-1: #747576;
  --grey-blue-tint-2: #979798;
  --orange: #E47127;
  /* Semantische Tokens (Light) */
  --surface: var(--white);
  --surface-alt: var(--light-grey);
  --ink: var(--anthracite);
  --ink-muted: var(--grey-blue);
  --hairline: var(--anthracite);
  --hairline-subtle: var(--grey-blue-tint-1);
  --signal: var(--orange);
  --on-signal: var(--anthracite);
  /* Abstände (8er-Raster) */
  --space-4: 4px; --space-8: 8px; --space-16: 16px; --space-24: 24px; --space-32: 32px; --space-48: 48px; --space-64: 64px; --space-96: 96px;
  --display: "Rapid ST Medium Wide", "Noto Sans", system-ui, sans-serif;
  --sans: "Noto Sans", system-ui, sans-serif;
  color-scheme: light;
}

/* Dark-Theme (drkvdark): Grund Anthrazit, Text Weiß, Flächen Graublau */
:root[data-theme="dark"] {
  --surface: var(--anthracite);
  --surface-alt: var(--grey-blue);
  --ink: var(--white);
  --ink-muted: var(--grey);
  --hairline: var(--white);
  --hairline-subtle: var(--grey-blue-tint-2);
  --signal: var(--orange);
  --on-signal: var(--anthracite);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: var(--anthracite);
    --surface-alt: var(--grey-blue);
    --ink: var(--white);
    --ink-muted: var(--grey);
    --hairline: var(--white);
    --hairline-subtle: var(--grey-blue-tint-2);
    --signal: var(--orange);
    --on-signal: var(--anthracite);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--surface); -webkit-hyphens: auto; hyphens: auto; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dark :focus-visible { outline-color: var(--white); }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--space-48); padding-right: var(--space-48); }
.section { padding-top: var(--space-96); padding-bottom: var(--space-96); }
.soft { background: var(--surface-alt); }
.dark { background: var(--anthracite); color: var(--white); --ink: var(--white); --ink-muted: var(--grey); --hairline-subtle: var(--grey-blue-tint-1); }
.dark a { color: var(--white); }

/* Typografie */
.kicker { font-size: 13px; line-height: 1.3; color: var(--ink-muted); }
.kicker::after { content: ""; display: block; width: 32px; height: 2px; background: var(--signal); margin-top: var(--space-8); }
.dark .kicker { color: var(--grey); }
.h1 { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 5.6vw, 60px); line-height: 1.02; max-width: 960px; text-wrap: balance; }
.h2 { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.08; text-wrap: balance; }
.h3 { font-family: var(--sans); font-weight: 500; font-size: 22px; line-height: 1.4; }
.lead { font-weight: 300; font-size: 20px; line-height: 1.5; max-width: 640px; }
.body { font-size: 17px; max-width: 70ch; }
.small { font-size: 14px; line-height: 1.4; color: var(--ink-muted); }
.dark .body { color: var(--white); }
.dark .small { color: var(--grey); }
.stack { display: flex; flex-direction: column; gap: var(--space-24); }
.mb-40 { margin-bottom: var(--space-48); }
.mt-12 { margin-top: var(--space-16); }

/* Kopfzeile */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap { padding-top: var(--space-16); padding-bottom: var(--space-16); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); }
.brand { display: flex; align-items: center; gap: var(--space-16); text-decoration: none; }
.brand img { display: block; height: 24px; width: auto; }
.brand span { font-size: 12px; font-style: italic; color: var(--ink-muted); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-24); font-size: 14px; line-height: 1.4; }
.nav a { text-decoration: none; padding: 12px 0; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .lang { color: var(--ink-muted); }
.nav .lang a { padding: 12px 4px; min-width: 32px; justify-content: center; }
.nav .lang [aria-current] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Schaltflächen (Pille, Orange mit Anthrazit-Schrift) */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; text-align: center; font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.2; padding: 12px 24px; border-radius: 9999px; border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn:hover { background: var(--ink); color: var(--surface); }
.btn.primary, .nav a.btn.primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn.primary:hover { background: var(--anthracite); border-color: var(--anthracite); color: var(--white); }
.dark .btn.primary:hover { background: var(--white); border-color: var(--white); color: var(--anthracite); }
.dark .btn { border-color: var(--white); color: var(--white); }
.dark .btn.primary { color: var(--on-signal); }
.nav a.btn { padding: 12px 24px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-16); align-items: center; }

/* Seitenkopf */
.hero { padding-top: var(--space-96); padding-bottom: var(--space-96); }

/* Raster */
.cols { display: flex; flex-wrap: wrap; gap: var(--space-32); }
.cols > * { flex: 1 1 280px; min-width: 0; }
.cols.wide > * { flex-basis: 360px; }
.card { border: 1px solid var(--hairline-subtle); border-radius: 0; padding: var(--space-32); display: flex; flex-direction: column; gap: var(--space-16); background: var(--surface); }
.card .grow { flex-grow: 1; }

/* Stufenliste */
.rows { display: flex; flex-direction: column; border-bottom: 1px solid var(--hairline-subtle); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-32); padding: var(--space-24) 0; border-top: 1px solid var(--hairline-subtle); }
.row:first-child { border-top-color: var(--hairline); }
.row .no { flex: 0 0 80px; font-size: 13px; color: var(--ink-muted); padding-top: var(--space-4); }
.row h3 { flex: 1 1 280px; min-width: 0; }
.row p { flex: 2 1 420px; min-width: 0; }

/* Arbeitsweise */
.principle { border-top: 2px solid var(--hairline); padding-top: var(--space-24); }

/* Preise */
.price { border-top: 2px solid var(--white); padding-top: var(--space-24); }
.price .amount { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; margin-top: var(--space-8); }

/* Schnell-Einschätzung */
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-16); }
.pick { display: flex; flex-direction: column; justify-content: flex-start; flex: 1 1 200px; min-width: 0; text-align: left; font: inherit; cursor: pointer; padding: var(--space-24); border-radius: 0; border: 2px solid var(--hairline-subtle); background: var(--surface); color: var(--ink); }
.pick b { display: block; font-weight: 600; font-size: 20px; }
.pick span { display: block; font-size: 15px; margin-top: var(--space-4); }
.pick i { display: block; font-style: normal; font-size: 13px; margin-top: var(--space-16); }
.pick[aria-pressed="true"] { background: var(--anthracite); border-color: var(--anthracite); color: var(--white); }
.pick[aria-pressed="true"]:focus-visible { outline-color: var(--ink); }
.result { margin-top: var(--space-24); background: var(--surface); border: 1px solid var(--hairline-subtle); border-radius: 0; padding: var(--space-32); }
.result .label { font-size: 13px; color: var(--ink-muted); margin-bottom: var(--space-16); }
.cause { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-16); justify-content: space-between; padding: var(--space-16) 0; border-top: 1px solid var(--grey); font-size: 16px; }
.cause > span:first-child { flex: 1 1 320px; min-width: 0; }
.cause b { font-weight: 600; }
.cause .stage { font-size: 13px; color: var(--ink-muted); }
.result .sum { margin-top: var(--space-16); font-size: 16px; font-weight: 600; }

/* Anfrage aus der Schnell-Einschätzung */
.request { margin-top: var(--space-24); background: var(--surface); border: 1px solid var(--hairline-subtle); border-radius: 0; padding: var(--space-32); display: flex; flex-direction: column; gap: var(--space-16); }
.request .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-24); }
.request .field { min-width: 0; display: flex; flex-direction: column; gap: var(--space-8); }
.request label { font-size: 14px; font-weight: 600; }
.request label span { font-weight: 400; color: var(--ink-muted); }
.request textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--hairline-subtle); border-radius: 0; padding: 12px; resize: vertical; min-height: 128px; }
.request textarea::placeholder { color: var(--ink-muted); }
.request textarea:focus-visible, .request .check input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.request fieldset.stack { border: 0; margin: 0; padding: 0; min-width: 0; }
.request .stack legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: var(--space-16); }
.request .stack legend span { font-weight: 400; color: var(--ink-muted); }
.request .stack-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-24); }
.request .stack-group { display: flex; flex-direction: column; gap: var(--space-4); }
.request .stack-group .label { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); padding-bottom: var(--space-8); }
.request .stack-group .check { padding: 6px 0; font-size: 15px; }
.request .checks { display: flex; flex-direction: column; gap: var(--space-8); padding-top: var(--space-16); border-top: 1px solid var(--hairline-subtle); }
.request .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.request .check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 2px 0 0; flex: none; border: 1px solid var(--ink); border-radius: 0; background: var(--surface); display: grid; place-content: center; cursor: pointer; }
.request .check input::before { content: ""; width: 10px; height: 10px; background: var(--ink); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); transform: scale(0); }
.request .check input:checked::before { transform: scale(1); }
.request .check input[aria-invalid="true"] { border-color: var(--signal); border-width: 2px; }
.request .check span { color: var(--ink); font-weight: 400; }
.request .check em { font-style: normal; color: var(--ink-muted); }
.request .actions { padding-top: var(--space-8); }
.request button.btn { cursor: pointer; font-family: inherit; }

/* Anfrage-Band */
.cta { display: flex; flex-wrap: wrap; gap: var(--space-24) var(--space-48); align-items: center; justify-content: space-between; }
.cta > div { flex: 1 1 480px; min-width: 0; }

/* Fließtext-Seiten (Impressum, Datenschutz, Definition) */
.prose { max-width: 70ch; }
.prose h1 { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.08; margin-bottom: var(--space-32); }
.prose h2 { font-family: var(--sans); font-weight: 500; font-size: 22px; line-height: 1.4; margin: var(--space-48) 0 var(--space-16); }
.prose p, .prose li { font-size: 17px; }
.prose p { margin: 0 0 var(--space-16); }
.prose ul { margin: 0 0 var(--space-16); padding-left: 22px; }
.prose address { font-style: normal; font-size: 17px; margin-bottom: var(--space-16); }

/* Fußzeile */
.site-footer { border-top: 1px solid var(--hairline); }
.site-footer .wrap { padding-top: var(--space-32); padding-bottom: var(--space-32); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16) var(--space-32); justify-content: space-between; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-24); }
.site-footer a { padding: 14px 0; display: inline-block; }

@media (max-width: 767px) {
  .wrap { padding-left: var(--space-16); padding-right: var(--space-16); }
  .section { padding-top: var(--space-64); padding-bottom: var(--space-64); }
  .hero { padding-top: var(--space-64); padding-bottom: var(--space-64); }
  .lead { font-size: 19px; }
  .card, .result, .request { padding: var(--space-24); }
  .request .fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Dark-Theme: Feinheiten */
.theme-toggle { display: inline-flex; align-items: center; gap: var(--space-8); font: inherit; font-size: 14px; line-height: 1.4; color: var(--ink-muted); background: transparent; border: 0; padding: 12px; min-width: 44px; min-height: 44px; justify-content: center; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img { filter: brightness(0) invert(1); }
  :root:not([data-theme="light"]) .dark { border-top: 1px solid var(--grey-blue-tint-2); }
  :root:not([data-theme="light"]) .btn.primary:hover, :root:not([data-theme="light"]) .dark .btn.primary:hover { background: var(--white); border-color: var(--white); color: var(--anthracite); }
  :root:not([data-theme="light"]) .pick[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--anthracite); }
  :root:not([data-theme="light"]) .cause { border-top-color: var(--grey-blue-tint-2); }
}
:root[data-theme="dark"] .brand img { filter: brightness(0) invert(1); }
:root[data-theme="dark"] .dark { border-top: 1px solid var(--grey-blue-tint-2); }
:root[data-theme="dark"] .btn.primary:hover, :root[data-theme="dark"] .dark .btn.primary:hover { background: var(--white); border-color: var(--white); color: var(--anthracite); }
:root[data-theme="dark"] .pick[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--anthracite); }
:root[data-theme="dark"] .cause { border-top-color: var(--grey-blue-tint-2); }
.theme-toggle svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.b2b-note { margin: 0; padding: var(--space-8) var(--space-24); font-size: 14px; line-height: 1.4; text-align: center; color: var(--white); background: var(--anthracite); }
.b2b-note::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-8); background: var(--orange); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .b2b-note { background: var(--grey-blue); } }
:root[data-theme="dark"] .b2b-note { background: var(--grey-blue); }

.cols.four > * { flex-basis: 240px; }
.plist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-8); font-size: 16px; line-height: 1.5; }
.mt-32 { margin-top: var(--space-32); }

/* Zeilenumbrüche: Überschriften, Buttons und Hinweise nur an Wortgrenzen und weichen Trennstellen umbrechen */
.h1, .h2, .h3, .btn, .kicker, .b2b-note, .plist { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: break-word; }
p, li { text-wrap: pretty; }
.h3, .btn, .kicker, .b2b-note { text-wrap: balance; }
.cols.two > * { flex-basis: 480px; }
@media (max-width: 1100px) { .cols.four > * { flex-basis: calc(50% - var(--space-16)); } }
@media (max-width: 767px) { .nav { gap: 0 var(--space-16); } .cols.four > * { flex-basis: 100%; } }
h1, h2, h3 { text-wrap: balance; }

/* Gründerseite */
.founder { display: flex; flex-wrap: wrap; gap: var(--space-48); align-items: center; }
.founder .founder-text { flex: 1 1 360px; min-width: 0; }
.founder figure { flex: 1 1 360px; max-width: 640px; margin: 0; }
.founder figure img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-8) var(--space-24); margin: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 767px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: var(--space-16); } }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-24); }
.timeline li { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-24); border-top: 1px solid var(--hairline-subtle); padding-top: var(--space-16); }
@media (max-width: 767px) { .timeline li { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Sprachhinweis */
.lang-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-8) var(--space-16); padding: var(--space-8) var(--space-48); background: var(--surface-alt); border-bottom: 1px solid var(--hairline-subtle); font-size: 14px; line-height: 1.4; text-align: center; position: relative; }
.lang-hint a { font-weight: 600; }
.lang-hint-close { position: absolute; right: var(--space-16); top: 50%; transform: translateY(-50%); min-width: 32px; min-height: 32px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
@media (max-width: 767px) { .lang-hint { padding-left: var(--space-16); padding-right: 48px; } }

/* Navigation: Angebote-Menü, Seitenleiste */
.nav .menu { position: relative; }
.nav .menu summary { list-style: none; cursor: pointer; padding: 12px 0; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.nav .menu summary::-webkit-details-marker { display: none; }
.nav .menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav .menu summary:hover, .nav .menu[open] summary { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .menu summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.nav .menu ul { list-style: none; margin: 0; padding: var(--space-8) 0; position: absolute; top: 100%; left: -16px; min-width: 240px; background: var(--surface); border: 1px solid var(--hairline); z-index: 40; }
.nav .menu li a { display: flex; padding: 10px 16px; min-height: 44px; }
.nav [aria-current="page"]:not(.lang a) { font-weight: 600; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.subnav { border-bottom: 1px solid var(--hairline); background: var(--surface); position: sticky; top: 0; z-index: 15; }
.subnav .wrap { display: flex; align-items: center; gap: 0 var(--space-24); overflow-x: auto; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.subnav a { text-decoration: none; padding: 12px 0; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-muted); }
.subnav a:hover, .subnav a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.subnav a.btn { color: var(--on-signal); padding: 8px 20px; min-height: 0; margin-left: auto; }
[id] { scroll-margin-top: 64px; }
@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); }
  .subnav { top: var(--hdr, 77px); }
  [id] { scroll-margin-top: 140px; }
}

/* Nach oben: immer sichtbar */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 44px; height: 44px; padding: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 50%; background: var(--signal); color: var(--on-signal); border: 1px solid var(--signal); font-size: 20px; line-height: 1; text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.to-top:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
