/* Patchwerk — Basis: Tokens aus dem Dambly-IT-Designsystem, Schrift, Grundelemente.
   Raster: 8 px (space-1 8, space-2 16, space-3 24, space-4 32). */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }

:root {
  /* Marke */
  --brand: #1e4d3b;
  --brand-2: #2c6049;
  --brand-deep: #1a4535;
  --accent: #3f8a63;
  --leaf: #9ccfb0;
  --on-brand: #d8e8de;

  /* Fläche und Text */
  --surface: #f3f6f2;
  --card: #ffffff;
  --tile: #dfe9e2;
  --ink: #14281f;
  --muted: #4d5f55;
  --line: #d6dfd8;
  --line-soft: #e6ece7;

  /* Zustände (Text und Grund getrennt, jeweils ≥ 4,5:1) */
  --ok-bg: #e4efe7;   --ok-ink: #1e4d3b;
  --warn-bg: #fdf0e3; --warn-ink: #8a4b12;
  --info-bg: #e6eff8; --info-ink: #1d4f7c;
  --bad-bg: #fbeaea;  --bad-ink: #8a1f1f;
  --off-bg: #eceff0;  --off-ink: #4d5f55;

  /* Abstände */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(56px, 7vw, 96px);

  /* Rundung */
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SF Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/26px var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lange deutsche Komposita: erst trennen, im Notfall umbrechen, nie seitlich überlaufen. */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
h1 { font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; }
code, pre, kbd { font-family: var(--mono); font-size: 0.875em; }
code { overflow-wrap: anywhere; }
pre { margin: 0; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.on-dark :focus-visible, .side :focus-visible { outline-color: var(--leaf); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s2); top: -64px; z-index: 100; padding: 12px 16px; background: var(--card); border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: var(--s2); }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 0 var(--s3);
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--brand-2); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: #b4c8bb; color: var(--brand); }
.btn-ghost:hover { background: var(--tile); color: var(--brand); }
.btn-leaf { background: var(--leaf); color: var(--ink); }
.btn-leaf:hover { background: #b4dcc4; color: var(--ink); }
.btn-line-light { background: transparent; border-color: #5d8f77; color: #fff; }
.btn-line-light:hover { background: var(--brand-2); color: #fff; }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { background: var(--tile); color: var(--brand); }
.btn-sm { min-height: 44px; padding: 0 var(--s2); font-size: 15px; }

/* Kennzeichen */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; line-height: 20px; font-weight: 600; white-space: nowrap;
}
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill-warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill-info { background: var(--info-bg); color: var(--info-ink); }
.pill-bad { background: var(--bad-bg); color: var(--bad-ink); }
.pill-off { background: var(--off-bg); color: var(--off-ink); }

.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.logo svg { flex-shrink: 0; }
.logo .a { color: var(--brand); }
.logo .b { color: var(--accent); }
.on-dark .logo .a, .logo.on-dark .a { color: #fff; }
.on-dark .logo .b, .logo.on-dark .b { color: var(--leaf); }
