/* ==========================================================================
   die-pro — Basis: Schriften, Reset, Typografie, Grundlayout
   Keine Farbliterale. Keine px außer Hairlines, die aus Tokens kommen.
   ========================================================================== */

/* Figtree statt Avenir Next LT Pro: gleiche geometrisch-humanistische Anmutung,
   aber unter SIL Open Font License — selbst hostbar ohne Lizenzfrage.
   Variabler Schnitt, 300–900, deshalb nur zwei Dateien fuer alle Gewichte. */
@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree-Variable-latin.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree-Italic-latin.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

/* --- Reset ---------------------------------------------------------------- */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sprungziele nicht unter den fixierten Header schieben */
  scroll-padding-top: calc(var(--header-height) + var(--space-md));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, picture, svg, canvas {
  display: block;
  max-width: 100%;
}

img, video { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

/* --- Fokus: sichtbar, aber nur bei Tastaturbedienung ---------------------- */

:focus-visible {
  outline: var(--border-thick) solid var(--color-focus);
  outline-offset: var(--space-3xs);
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: calc(var(--space-sm) * -6);
  z-index: var(--z-modal);
  padding: var(--space-2xs) var(--space-sm);
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-sm); }

/* --- Typografie ----------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--text-4xl); letter-spacing: var(--tracking-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); line-height: var(--leading-snug); }
h5 { font-size: var(--text-lg); line-height: var(--leading-snug); }
h6 {
  font-size: var(--text-sm);
  font-weight: var(--weight-demi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: var(--leading-snug);
}

p { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: var(--border-hairline);
  transition: color var(--duration-fast) var(--ease-out),
              text-decoration-color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }

strong, b { font-weight: var(--weight-demi); }

code, pre { font-family: var(--font-mono); font-size: 0.9em; }

hr {
  border: 0;
  border-top: var(--border-hairline) solid var(--color-border);
  margin-block: var(--space-lg);
}

/* --- Typo-Hilfsklassen ---------------------------------------------------- */

.t-hero    { font-size: var(--text-hero); line-height: var(--leading-tight);
             letter-spacing: var(--tracking-hero); font-weight: var(--weight-bold); }
.t-display { font-size: var(--text-4xl); line-height: var(--leading-tight);
             letter-spacing: var(--tracking-hero); font-weight: var(--weight-bold); }
.t-lead    { font-size: var(--text-xl); line-height: var(--leading-snug);
             color: var(--color-text-muted); max-width: var(--measure); }
.t-body    { font-size: var(--text-base); line-height: var(--leading-normal); }
.t-small   { font-size: var(--text-sm); }
.t-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-demi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
}
.t-muted { color: var(--color-text-muted); }
.t-measure { max-width: var(--measure); }

/* --- Layout --------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--width-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: var(--width-wide); }
.wrap--text { max-width: var(--width-text); }
.wrap--full { max-width: var(--width-full); padding-inline: 0; }

.section {
  padding-block: var(--section-y);
  background-color: var(--color-bg);
  color: var(--color-text);
}
.section--tight { padding-block: var(--space-lg); }
.section--flush { padding-block: 0; }

.stack > * + * { margin-top: var(--flow, var(--space-sm)); }
.stack--lg { --flow: var(--space-lg); }
.stack--xl { --flow: var(--space-xl); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.visually-hidden {
  position: absolute;
  width: 0.0625rem; height: 0.0625rem;
  padding: 0; margin: -0.0625rem;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* --- Fließtext aus dem CMS (Rich Text) ------------------------------------ */

.rte { max-width: var(--measure); }
.rte > * + * { margin-top: var(--space-sm); }
.rte h2 { margin-top: var(--space-xl); font-size: var(--text-2xl); }
.rte h3 { margin-top: var(--space-lg); font-size: var(--text-xl); }
.rte ul, .rte ol { padding-left: var(--space-md); }
.rte li + li { margin-top: var(--space-3xs); }
.rte a { color: var(--color-accent); text-decoration-color: var(--color-accent); }
.rte img { border-radius: var(--radius-md); margin-block: var(--space-md); }
.rte blockquote {
  border-left: var(--border-thick) solid var(--color-accent);
  padding-left: var(--space-md);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}
