/* ==========================================================================
   1-class.com · Stylesheet
   Tokens nach 1class-design (framework.md, ci_branding_erweiterung.md).
   Kein Hexwert außerhalb dieses Token-Blocks. Kein Inline-CSS im HTML (CSP).
   ========================================================================== */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Flächen */
  --surface: #E4E6EE;
  --surface-raised: #EDEEF4;
  --surface-sunken: #DADDE7;
  --surface-weiss: #FFFFFF;

  /* Schrift auf hellen Flächen */
  --ink-strong: #16184E;
  --ink-head: #1E2A78;
  --ink: #474B6D;
  --ink-muted: #706C61;
  --ink-faint: #B19F95; /* nie Text */

  /* Invertierte Schrift, fest, für jede Fläche dunkler als #7A7A7A */
  --inv-strong: #FFFFFF;
  --inv: #C6C9E0;
  --inv-label: #8E92B8; /* erst ab 12 px */

  /* Dunkle Flächen, fest */
  --navy: #16184E;
  --navy-raised: #1B1D5A;
  --navy-sunken: #111340;

  /* Akzent: genau ein Element je Bildschirmansicht */
  --accent: #C9DD03;
  --accent-ink: #16184E;

  /* Marker für offene Texte */
  --warn: #F2D1C9;
  --warn-ink: #C00000;

  /* Feste helle Werte für Diagrammboxen (bleiben auch im Dunkelmodus weiß) */
  --d-box: #FFFFFF;
  --d-tile: #E4E6EE;
  --d-strong: #16184E;
  --d-head: #1E2A78;
  --d-ink: #474B6D;
  --d-faint: #B19F95;

  /* Elevation */
  --sh: 71, 75, 109;
  --light: 255, 255, 255;
  --edge: inset 1px 1px 0 rgba(var(--light), .95), inset -1px -1px 0 rgba(var(--sh), .15);
  --elev-1: -3px -3px 5px rgba(var(--light), 1), 3px 3px 5px rgba(var(--sh), .26);
  --elev-2: -7px -7px 11px rgba(var(--light), 1), 7px 7px 11px rgba(var(--sh), .28);
  --elev-3: -12px -12px 18px rgba(var(--light), 1), 12px 12px 18px rgba(var(--sh), .30);
  --emboss: inset 0 0 0 1px rgba(71, 75, 109, .16), inset 2px 2px 0 rgba(71, 75, 109, .14);

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --font-display: "Jost", "Century Gothic", Futura, system-ui, sans-serif;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: 24px;
  --focus: #1E2A78;
  --cta-sh: 7px 7px 11px rgba(6, 7, 28, .55);
  --cta-sh-hover: 12px 12px 18px rgba(6, 7, 28, .6);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #16184E;
    --surface-raised: #1B1D5A;
    --surface-sunken: #111340;
    --ink-strong: #FFFFFF;
    --ink-head: #FFFFFF;
    --ink: #C6C9E0;
    --ink-muted: #C6C9E0;
    --navy: #111340;
    --navy-raised: #1B1D5A;
    --sh: 6, 7, 28;
    --light: 46, 50, 120;
    --edge: inset 1px 1px 0 rgba(90, 96, 175, .45), inset -1px -1px 0 rgba(var(--sh), .9);
    --elev-1: -3px -3px 5px rgba(var(--light), .7), 3px 3px 5px rgba(var(--sh), .85);
    --elev-2: -7px -7px 11px rgba(var(--light), .7), 7px 7px 11px rgba(var(--sh), .85);
    --elev-3: -12px -12px 18px rgba(var(--light), .7), 12px 12px 18px rgba(var(--sh), .85);
    --focus: #FFFFFF;
  }
}

/* --------------------------------------------------------------------------
   Grundlagen
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; height: auto; }

p { margin: 0 0 16px; max-width: 68ch; }

a { color: var(--ink-head); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: calc(1160px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 10;
  background: var(--surface-weiss); color: var(--d-strong);
  padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600;
}
.skip:focus { top: 16px; }

/* Typografie: Jost nie unter 32 px, darunter Inter */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 7.2vw, 60px); line-height: 1.04; letter-spacing: -.015em; color: var(--ink-strong); }
h2 { font-size: clamp(32px, 3.6vw, 36px); line-height: 1.12; letter-spacing: -.01em; color: var(--ink-head); max-width: 32ch; }
h3 { font-family: var(--font); font-size: 19px; line-height: 1.3; font-weight: 600; color: var(--ink-strong); margin: 0 0 8px; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 12px;
}
.lede { font-size: 18px; line-height: 1.5; margin: 16px 0 0; max-width: 60ch; }
.small { font-size: 14px; }

/* Marker für offene Texte: sichtbar, bis der Text geliefert ist */
.todo {
  background: var(--warn); color: var(--warn-ink);
  padding: 1px 6px; border-radius: 4px; font-weight: 600;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.blind { color: var(--ink); }

/* --------------------------------------------------------------------------
   Kopf
   -------------------------------------------------------------------------- */
.top { background: var(--navy); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand {
  color: var(--inv-strong); text-decoration: none;
  font-weight: 600; font-size: 16px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  padding: 8px 0;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.nav a { color: var(--inv); text-decoration: none; font-size: 15px; font-weight: 500; padding: 12px 4px; display: block; }
.nav a:hover { color: var(--inv-strong); text-decoration: underline; }
.top :focus-visible, .hero :focus-visible, .foot :focus-visible, .panel-dark :focus-visible { outline-color: var(--inv-strong); }
@media (max-width: 860px) { .nav .nav__opt { display: none; } }

/* --------------------------------------------------------------------------
   Hero (dunkle Fläche: nur invertierte Textfarben)
   -------------------------------------------------------------------------- */
.hero { position: relative; background: var(--navy); overflow: hidden; }
.hero__tex { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hero__in { position: relative; padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(56px, 9vw, 112px); }
.hero .eyebrow { color: var(--inv); }
.hero h1 { color: var(--inv-strong); max-width: 14ch; }
.hero .lede { color: var(--inv); font-size: clamp(17px, 2vw, 20px); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.hero__note { color: var(--inv); font-size: 15px; margin: 0; }

/* --------------------------------------------------------------------------
   Schaltflächen
   -------------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-block;
  font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none;
  padding: 16px 28px; border-radius: var(--r-md);
  background: var(--surface-raised); color: var(--ink-head);
  box-shadow: var(--elev-2);
  transition: box-shadow .16s ease-out, transform .16s ease-out;
}
.btn:hover { box-shadow: var(--elev-3); }
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--accent); color: var(--accent-ink); }
.hero .btn--cta, .panel-dark .btn--cta { box-shadow: var(--cta-sh); }
.hero .btn--cta:hover, .panel-dark .btn--cta:hover { box-shadow: var(--cta-sh-hover); }

/* --------------------------------------------------------------------------
   Abschnitte, Raster, Karten
   -------------------------------------------------------------------------- */
.sec { padding: clamp(56px, 8vw, 96px) 0; }
.sec__head { margin-bottom: 32px; }
.sec__head p { margin-top: 16px; }

.grid { display: grid; gap: 24px; }
@media (min-width: 760px) {
  .g2 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(3, 1fr); }
  .g-person { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; gap: 48px; }
}
@media (min-width: 760px) and (max-width: 1040px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1041px) { .g4 { grid-template-columns: repeat(4, 1fr); } }

/* Gerichtete Haarlinie als Overlay */
.card, .btn, .diag, .portrait { position: relative; }
.card::after, .btn::after, .portrait::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: var(--edge); pointer-events: none;
}

.card {
  background: var(--surface-raised); border-radius: var(--r-lg);
  box-shadow: var(--elev-2); padding: 32px;
}
.card > :last-child { margin-bottom: 0; }
.card .beleg { font-size: 15px; color: var(--ink); margin-top: 16px; }
.card .beleg strong { color: var(--ink-strong); font-weight: 600; }
@media (max-width: 480px) { .card { padding: 24px; } }

.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 12px 0 12px 20px; position: relative; max-width: 62ch; }
.list li::before {
  content: ""; position: absolute; left: 0; top: 22px; width: 8px; height: 2px; background: var(--ink-faint);
}
.list strong { color: var(--ink-strong); font-weight: 600; }

/* --------------------------------------------------------------------------
   Grafiken (Inline-SVG)
   Diagrammbox: rein weiß, negativ geprägt. Zahlenpanel: dunkel, erhaben.
   Je Grafik zwei Fassungen: --wide ab 960 px, --narrow darunter.
   -------------------------------------------------------------------------- */
.fig { margin: 0; }
.fig figcaption { font-size: 15px; margin-top: 16px; max-width: 68ch; }
.diag {
  background: var(--d-box); border-radius: var(--r-lg);
  box-shadow: var(--emboss); padding: clamp(16px, 3vw, 40px);
}
.panel-dark {
  background: var(--navy); border-radius: var(--r-xl);
  box-shadow: var(--elev-3); padding: clamp(8px, 2vw, 24px);
}
.svg--narrow { width: 100%; max-width: 600px; margin: 0 auto; }
.svg--wide { display: none; width: 100%; }
@media (min-width: 960px) {
  .svg--narrow { display: none; }
  .svg--wide { display: block; }
}

/* SVG-Füllungen ausschließlich über Klassen, nie zusätzlich als Attribut */
svg text { font-family: var(--font); font-feature-settings: "tnum"; }
.svg-t-inv { fill: var(--inv-strong); }
.svg-s-inv { fill: var(--inv); }
.svg-l-inv { fill: var(--inv-label); }
.svg-t { fill: var(--d-strong); }
.svg-h { fill: var(--d-head); }
.svg-s { fill: var(--d-ink); }
.svg-todo { fill: var(--warn-ink); font-weight: 600; }
.f-cell { fill: var(--navy-raised); }
.f-navy { fill: var(--d-strong); }
.f-cobalt { fill: var(--d-head); }
.f-tile { fill: var(--d-tile); }
.f-faint { fill: var(--d-faint); }
.f-box { fill: var(--d-box); }
.st-faint { fill: none; stroke: var(--d-faint); stroke-width: 2; }
.w5 { font-weight: 500; }
.w6 { font-weight: 600; }
.mid { text-anchor: middle; }
.end { text-anchor: end; }
.caps { letter-spacing: .08em; }
.fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; } .fs-22 { font-size: 22px; } .fs-24 { font-size: 24px; }
.fs-26 { font-size: 26px; } .fs-28 { font-size: 28px; } .fs-32 { font-size: 32px; }
.fs-56 { font-size: 56px; letter-spacing: -.02em; } .fs-60 { font-size: 60px; letter-spacing: -.02em; }

/* --------------------------------------------------------------------------
   Person
   -------------------------------------------------------------------------- */
.portrait { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--elev-2); background: var(--surface-sunken); max-width: 320px; }
.portrait img { width: 100%; }

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */
.kontakt { display: grid; gap: 24px; }
@media (min-width: 760px) { .kontakt { grid-template-columns: repeat(2, 1fr); } }
.kontakt dl { margin: 0; }
.kontakt dt { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-top: 20px; }
.kontakt dt:first-child { margin-top: 0; }
.kontakt dd { margin: 4px 0 0; font-size: 18px; color: var(--ink-strong); }
.kontakt dd a { color: inherit; }
.kontakt__cta { margin-top: 28px; }
address { font-style: normal; }

/* --------------------------------------------------------------------------
   Mandatsseite
   -------------------------------------------------------------------------- */
.mandat__logo { background: var(--surface-weiss); border-radius: var(--r-md); padding: 16px; margin-bottom: 20px; box-shadow: var(--emboss); }
.mandat__logo img { width: 100%; max-width: 240px; margin: 0 auto; }
.mandat dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.mandat dt { color: var(--ink); font-weight: 600; }
.mandat dd { margin: 0; color: var(--ink-strong); }
.group { margin-top: 56px; }
.group > h2 { margin-bottom: 24px; }

/* --------------------------------------------------------------------------
   Rechtsseiten
   -------------------------------------------------------------------------- */
.legal h1 { font-size: clamp(36px, 5vw, 48px); margin-bottom: 32px; }
.legal h2 { margin: 48px 0 16px; max-width: none; }
.legal h3 { margin-top: 28px; }
.legal p, .legal li { max-width: 72ch; }
.legal ul { padding-left: 20px; }
.notice { background: var(--warn); color: var(--warn-ink); border-radius: var(--r-md); padding: 16px 20px; font-weight: 600; max-width: 72ch; margin-bottom: 32px; }

/* --------------------------------------------------------------------------
   Fuß (dunkle Fläche)
   -------------------------------------------------------------------------- */
.foot { background: var(--navy); color: var(--inv); padding: 40px 0; font-size: 15px; }
.foot__in { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot p { margin: 0; max-width: none; }
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.foot a { color: var(--inv-strong); padding: 10px 0; display: inline-block; }

/* --------------------------------------------------------------------------
   Schmale Bildschirme, Bewegung, Druck
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .brand { font-size: 14px; letter-spacing: .1em; }
  .btn { width: 100%; text-align: center; }
  .diag { padding: 12px; }
  .panel-dark { padding: 4px; border-radius: var(--r-lg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .top, .hero__tex, .skip { display: none; }
  .hero, .foot { background: none; }
  .hero h1, .hero .lede, .hero .eyebrow, .hero__note, .foot, .foot a { color: var(--d-strong); }
  .card, .btn, .panel-dark, .portrait { box-shadow: none; }
}

/* --------------------------------------------------------------------------
   Logokacheln der Mandatsseite: weiß, negativ geprägt, auch im Dunkelmodus
   -------------------------------------------------------------------------- */
.legal .logos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px;
  margin: 24px 0 16px; padding: 0; list-style: none;
}
.legal .logos li {
  background: var(--d-box); border-radius: var(--r-md); box-shadow: var(--emboss);
  padding: 16px 12px 12px; min-height: 128px; max-width: none;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px;
}
.logos img { max-height: 56px; width: auto; max-width: 100%; object-fit: contain; margin: auto 0; }
.logos span { font-size: 13px; line-height: 1.3; color: var(--d-ink); text-align: center; }
.logos .logos__text { font-size: 17px; font-weight: 600; color: var(--d-strong); margin: auto 0; text-align: center; }
.logos .todo { color: var(--warn-ink); }
.mandat > h3:first-child { margin-top: 0; }
