/* Kumpari – Stylesheet der statischen Seiten (Landingpage, Rechtstexte).
   Farben ausschließlich aus docs/DESIGN-SYSTEM.md §1.1/§1.2, hell und dunkel
   über prefers-color-scheme. Keine externen Ressourcen, keine Web-Fonts:
   Systemschrift (Inter, falls installiert), damit die Seite selbst nichts
   nachlädt. Eingebunden von app/web/<sprache>.html und
   app/web/<sprache>/*.html – ARCHITECTURE §8.3. */

:root {
  color-scheme: light dark;
  --surface: #FBFAF7;
  --on-surface: #1C1B19;
  --on-surface-variant: #4D4A45;
  --surface-low: #F5F3EF;
  --surface-container: #EFEDE8;
  --primary: #0F766E;
  --on-primary: #FFFFFF;
  --primary-container: #BFEFE6;
  --on-primary-container: #00403A;
  --secondary: #C9481A;
  --on-secondary: #FFFFFF;
  --outline: #7B776F;
  --outline-variant: #D3CFC8;
  --notice: #FFE7B3;
  --on-notice: #4A3400;
  --shadow: 0 1px 2px rgba(28, 27, 25, .08), 0 1px 3px rgba(28, 27, 25, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #131514;
    --on-surface: #E5E3DF;
    --on-surface-variant: #C3C0BA;
    --surface-low: #1B1D1C;
    --surface-container: #1F2221;
    --primary: #6FD9C8;
    --on-primary: #003731;
    --primary-container: #005A52;
    --on-primary-container: #A8F0E4;
    --secondary: #FF9B6E;
    --on-secondary: #4A1B05;
    --outline: #8D8A84;
    --outline-variant: #45484A;
    --notice: #4A3400;
    --on-notice: #FFE7B3;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--surface);
  color: var(--on-surface);
  font: 400 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: .15em; }
a:hover, a:focus-visible { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--primary); color: var(--on-primary);
  padding: 8px 16px; border-radius: 999px; z-index: 10;
}
.skip:focus { left: 16px; }

/* Kopf ------------------------------------------------------------------ */
.top {
  border-bottom: 1px solid var(--outline-variant);
  background: var(--surface);
}
.top .row {
  max-width: 760px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 16px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 20px; letter-spacing: .2px;
  color: var(--on-surface); text-decoration: none; min-height: 48px;
}
.brand svg { width: 32px; height: 32px; flex: none; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; }
.top nav a {
  display: inline-flex; align-items: center; min-height: 48px;
  padding: 0 12px; border-radius: 999px; text-decoration: none;
  color: var(--on-surface-variant); font-weight: 500;
}
.top nav a:hover, .top nav a[aria-current="page"] {
  background: var(--surface-container); color: var(--on-surface);
}
.top nav a.app { color: var(--primary); font-weight: 600; }
/* Sprachwechsler (de <-> en): als Pille mit Rand abgesetzt, damit er sich von
   den Seitenlinks unterscheidet und auf jeder Seite auffindbar bleibt. */
.top nav a.lang, footer nav a.lang { border: 1px solid var(--outline-variant); }
.top nav a.lang { margin-left: 4px; }
footer nav a.lang { border-radius: 999px; padding: 0 12px; margin-left: 8px; }

/* Inhalt ---------------------------------------------------------------- */
main {
  flex: 1;
  width: 100%; max-width: 760px; margin: 0 auto;
  padding: 24px 16px 48px;
}
h1, h2, h3 { font-weight: 600; color: var(--on-surface); }
main > h1 { font-size: 28px; line-height: 1.25; margin: 8px 0 16px; letter-spacing: -.25px; }
h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 12px; }
h3 { font-size: 17px; line-height: 1.4; margin: 24px 0 8px; }
p, ul, ol, dl { margin: 0 0 14px; }
li { margin: 4px 0; }
.muted, small { color: var(--on-surface-variant); }
small { font-size: 14px; }
.lead { font-size: 18px; color: var(--on-surface-variant); margin-bottom: 24px; }
.updated { color: var(--on-surface-variant); font-size: 14px; margin: -8px 0 24px; }
hr { border: 0; border-top: 1px solid var(--outline-variant); margin: 32px 0; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95em; background: var(--surface-container);
  padding: 1px 5px; border-radius: 6px;
}
address { font-style: normal; }
dl div { margin: 0 0 10px; }
dt { font-weight: 600; }
dd { margin: 0; }

/* Platzhalter, die der Betreiber ausfüllen muss (§5 ECG) --------------- */
.ph {
  background: var(--notice); color: var(--on-notice);
  padding: 0 4px; border-radius: 4px; font-weight: 600;
}

/* Hinweis „Deutsche Fassung maßgeblich“ auf jeder englischen Seite ------- */
.binding {
  background: var(--primary-container); color: var(--on-primary-container);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 16px;
  font-size: 15px;
}
.binding > strong { display: block; margin-bottom: 4px; }
.binding a { color: inherit; }
.binding :last-child { margin-bottom: 0; }

/* Hinweis „Entwurf“ ------------------------------------------------------ */
.draft {
  background: var(--notice); color: var(--on-notice);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 24px;
  font-size: 15px;
}
/* Nur die Überschrift der Box (direktes Kind) ist ein Block; ein <strong>
   im Fließtext der Box bleibt inline (Widerrufsbelehrung, beide Sprachen). */
.draft > strong { display: block; margin-bottom: 4px; }
.draft a { color: inherit; }
.draft :last-child { margin-bottom: 0; }

/* Boxen ------------------------------------------------------------------ */
.box {
  background: var(--surface-low); border-radius: 16px;
  padding: 16px 20px; margin: 0 0 16px; box-shadow: var(--shadow);
}
.box.accent { background: var(--primary-container); color: var(--on-primary-container); }
.box.accent a, .box.accent h2, .box.accent h3 { color: inherit; }
.box h2, .box h3 { margin-top: 0; }
.box :last-child { margin-bottom: 0; }

/* Tabellen -------------------------------------------------------------- */
.scroll { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0; }
th, td {
  text-align: left; vertical-align: top; padding: 8px 10px;
  border-bottom: 1px solid var(--outline-variant);
}
th { font-weight: 600; color: var(--on-surface); background: var(--surface-low); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent;
}
.btn.primary { background: var(--secondary); color: var(--on-secondary); }
.btn.tonal { background: var(--primary-container); color: var(--on-primary-container); }
.btn.outline { border-color: var(--outline); color: var(--primary); }
.btn:hover { filter: brightness(.96); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 8px; }

/* Landingpage ------------------------------------------------------------ */
.hero { padding: 16px 0 8px; }
.hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.5px; }
.hero .lead { font-size: 19px; max-width: 34em; }
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 16px 0 24px; padding: 0; list-style: none;
}
.features li {
  background: var(--surface-low); border-radius: 16px; padding: 16px;
  box-shadow: var(--shadow); margin: 0;
}
.features li strong { display: block; margin-bottom: 4px; }
.price { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.price .box { margin: 0; }
.tag {
  font-size: 13px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--primary);
}
.box.accent .tag { color: inherit; }
.price .amount { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.price ul { padding-left: 20px; }

/* Fuß ------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--outline-variant);
  background: var(--surface-low);
  color: var(--on-surface-variant); font-size: 14px;
}
footer .row { max-width: 760px; margin: 0 auto; padding: 12px 16px 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin-bottom: 4px; }
footer nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 8px; margin-left: -8px; color: var(--on-surface-variant);
}
footer nav a + a { margin-left: 4px; }
footer p { margin: 0; }

@media print {
  .top, footer, .skip, .actions { display: none; }
  .draft, .binding { border: 2px solid #000; }
  a { color: inherit; }
}
