/* ==========================================================================
   primmoplus.de – Stylesheet
   Quelle der Werte: docs/design-system.md

   Abschnitte (neue Styles immer in den passenden Abschnitt):
   1. Tokens
   2. Schriften
   3. Basis
   4. Layout
   5. Komponenten
   6. Seiten-Sektionen (werden von PROJ-2 ff. ergänzt)
   7. Hilfsklassen
   ========================================================================== */


/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  /* Farben */
  --color-primary: #F7A823;        /* Orange – CTAs, Akzente */
  --color-primary-text: #9A5B00;   /* Bernstein – Eyebrows, Links (5.1:1 auf Off-White, WCAG AA; Styleguide-Wert #E8930C war 2.3:1) */
  --color-primary-soft: #FDF0DA;   /* Icon-Hintergründe */
  --color-green: #1F9D55;
  --color-blue: #2F7FD1;
  --color-ink: #1A1A1A;            /* Headlines, dunkle Buttons, Footer */
  --color-text: #6B6660;           /* Fließtext */
  --color-bg: #FAF8F5;             /* Seitenhintergrund */
  --color-surface: #FFFFFF;        /* Karten */
  --color-line: #EEEAE4;           /* Rahmen, Trenner, Weltkarte */
  --color-line-soft: #F1EDE7;
  --color-on-dark: #FFFFFF;
  --color-on-dark-muted: #B9B2A8;  /* Fließtext auf --color-ink (Kontrast ≈ 8.6:1) */
  --color-on-dark-line: #34312D;
  --color-control: #8A837A;        /* Bedienelemente auf hellem Grund (Slider-Punkte) – ≥ 3:1 auch auf der Weltkarte */
  --color-green-text: #177A42;     /* Grün für Text (Erfolgsmeldungen), ≥ 4,5:1 auf Weiß */
  --color-sand: #EBD3B0;           /* warme Fläche in Afrika-Form, solange das Hero-Foto lädt/fehlt */

  /* Schriften */
  --font-serif: 'Libre Baskerville', 'Libre Baskerville Fallback', Georgia, serif;
  --font-sans: 'Jost', 'Jost Fallback', Arial, sans-serif;

  /* Typo-Skala (rem, damit Browser-Zoom und Schriftgröße greifen) */
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);       /* 40 → 64px */
  --fs-h2: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);   /* 30 → 40px */
  --fs-h3: 1.375rem;                                  /* 22px */
  --fs-lead: 1.125rem;                                /* 18px */
  --fs-body: 0.9375rem;                               /* 15px */
  --fs-small: 0.875rem;                               /* 14px */
  --fs-eyebrow: 0.75rem;                              /* 12px */
  --fs-button: 0.8125rem;                             /* 13px */
  --fs-stat: 2.5rem;                                  /* 40px */
  --lh-h1: 1.08;
  --lh-h2: 1.15;
  --lh-h3: 1.3;
  --lh-lead: 1.6;
  --lh-body: 1.65;
  --ls-eyebrow: 0.14em;
  --ls-button: 0.06em;

  /* Abstände */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5rem;
  --section-space: clamp(3.5rem, 2rem + 6vw, 6rem);

  /* Layout */
  --container-max: 1120px;
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2rem);
  --header-h: 88px;
  --header-h-compact: 68px;

  /* Formen & Tiefe */
  --radius-card: 20px;
  --radius-box: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 10px 30px rgba(60, 40, 10, 0.06);
  --shadow-header: 0 6px 24px rgba(60, 40, 10, 0.08);
  --focus-ring: 0 0 0 3px var(--color-bg), 0 0 0 5px var(--color-ink);

  /* Bewegung */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.25s;
  --duration-reveal: 0.8s;

  /* Breakpoint (nur zur Doku – Media Queries können keine Variablen lesen): 900px */
}


/* ==========================================================================
   2. Schriften (selbst gehostet, keine externen Anfragen)
   ========================================================================== */

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/jost-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Libre Baskerville: nur Regular vorhanden – Bold wird synthetisiert (wie im Styleguide) */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/libre-baskerville-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/libre-baskerville-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Größenangeglichene Ersatzschriften – verhindern Layout-Sprünge beim Schriftwechsel.
   Werte aus den Font-Metriken berechnet (Durchschnittsbreite + Ascent/Descent). */
@font-face {
  font-family: 'Jost Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 92.2%;
  ascent-override: 116%;
  descent-override: 40.7%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Libre Baskerville Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 117.1%;
  ascent-override: 82.8%;
  descent-override: 23.1%;
  line-gap-override: 0%;
}


/* ==========================================================================
   3. Basis
   ========================================================================== */

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

html {
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Bei offenem mobilen Menü scrollt die Seite dahinter nicht */
html.is-menu-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* kein Hintergrund: die Weltkarten-Ebene liegt zwischen html und Inhalt */
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--color-ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }

p {
  margin: 0;
  text-wrap: pretty;
}

ul, ol {
  margin: 0;
  padding: 0;
}

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

img {
  height: auto;
}

a {
  color: var(--color-primary-text);
  text-underline-offset: 0.2em;
  transition: color var(--duration);
}

a:hover {
  color: var(--color-ink);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* Programmatisch fokussierte Ziele (z. B. <main> nach Skip-Link) ohne Rahmen */
[tabindex="-1"]:focus {
  box-shadow: none;
}

/* Anker-Ziele nicht unter dem Sticky-Header verstecken.
   Volle Header-Höhe: Beim Sprung von ganz oben schrumpft der Header danach (88 → 68 px)
   und der Inhalt rutscht 20 px nach oben – sonst landet die Überschrift unter dem Header. */
[id] {
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

::selection {
  background: var(--color-primary);
  color: var(--color-ink);
}


/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-space);
}

.container--narrow {
  max-width: calc(48rem + 2 * var(--gutter));
}

.section--tight {
  padding-block: calc(var(--section-space) / 2);
}


/* Kopfbereich einer Sektion: Eyebrow, Überschrift, Einleitung */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 40rem;
  margin-bottom: var(--space-7);
}

.section-head--center {
  margin-inline: auto;
  align-items: center;
  text-align: center;
}

/* Karten-Raster */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--space-4);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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


/* ==========================================================================
   5. Komponenten
   ========================================================================== */

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

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--color-ink);
  max-width: 52ch;
}

.text-muted {
  color: var(--color-text);
}

/* --- Buttons ------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 14px 26px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-button);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--duration), color var(--duration), transform var(--duration);
}

.button:active {
  transform: translateY(1px);
}

.button--dark {
  background: var(--color-ink);
  color: var(--color-on-dark);
}

.button--dark:hover {
  background: var(--color-primary);
  color: var(--color-ink);   /* 8.8:1 – weiß auf Orange wäre nur 2.4:1 */
}

.button--primary {
  background: var(--color-primary);
  color: var(--color-ink);
}

.button--primary:hover {
  background: var(--color-ink);
  color: var(--color-on-dark);
}

/* Play-Link: grüner Kreis + Beschriftung */
.play-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink);
}

.play-link__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-green);
  transition: transform var(--duration);
}

.play-link__icon::after {
  content: '';
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 11px solid var(--color-on-dark);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.play-link:hover {
  color: var(--color-ink);
}

.play-link:hover .play-link__icon {
  transform: scale(1.08);
}

/* --- Karten -------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 28px;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: var(--lh-h3);
  color: var(--color-ink);
}

.card__text {
  font-size: var(--fs-small);
  line-height: 1.6;
}

/* Feature-Karte: zentriert mit Icon-Kreis */
.card--feature {
  align-items: center;
  text-align: center;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.card__icon > svg {
  width: 26px;
  height: 26px;
}

/* Kennzahl-Karte: Eyebrow + große Zahl + Fortschrittsbalken */
.card--stat {
  gap: var(--space-2);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: var(--fs-stat);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-ink);
}

/* Fortschrittsbalken: natives <progress value max> (ohne Inline-Styles, ohne JS) */
.progress {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: var(--space-2);
  border: 0;
  border-radius: 3px;
  background: var(--color-line-soft);
  color: var(--color-primary);
  overflow: hidden;
  appearance: none;
}

.progress::-webkit-progress-bar {
  border-radius: 3px;
  background: var(--color-line-soft);
}

.progress::-webkit-progress-value {
  border-radius: 3px;
  background: var(--color-primary);
}

.progress::-moz-progress-bar {
  border-radius: 3px;
  background: var(--color-primary);
}

/* Info-Box mit Rahmen statt Schatten */
.box {
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-box);
}

/* --- Bild weich einblenden (<picture class="img-fade">) ------------------- */

/* Bild blendet ein, sobald es geladen ist (main.js setzt .is-loaded); bis dahin bleibt
   die Hintergrundfläche des Rahmens sichtbar. Lädt es nicht: kein „kaputtes Bild“.
   Ohne JS sofort sichtbar. */
.js .img-fade img {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.js .img-fade.is-loaded img {
  opacity: 1;
}

/* --- Fakten-Chips --------------------------------------------------------- */

/* Kleine Info-Pillen (nicht klickbar). Dunkle Schrift auf hellem Orange: Kontrast ≥ 12:1 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-ink);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.4;
}

/* --- Projektkarte (PROJ-5) ------------------------------------------------- */

/* Ganze Karte klickbar: Link im Titel, Klickbereich per ::after über die Karte gestreckt.
   Screenreader lesen einen Link mit dem Projektnamen; der Pfeil ist Deko. */
.project-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration) var(--ease-out), box-shadow var(--duration);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(60, 40, 10, 0.1);
}

.project-card:focus-within {
  box-shadow: var(--shadow-card), var(--focus-ring);
}

.project-card__media {
  position: relative;
  /* ausdrückliche Breite statt seitlicher margin: Safari berechnet aspect-ratio in einer
     Flex-Spalte sonst aus der Breite inkl. Rand (PROJ-5 BUG-1) */
  align-self: center;
  width: calc(100% - 24px);
  margin-top: 12px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-box);
  overflow: hidden;
  background: var(--color-sand);   /* sichtbar, solange das Bild lädt oder fehlt */
}

/* Bild absolut im Rahmen: Die Höhe bestimmt allein aspect-ratio des Rahmens */
.project-card__photo {
  position: absolute;
  inset: 0;
}

.project-card__photo,
.project-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.project-card__photo img {
  max-width: none;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

.project-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.project-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-5);
}

.project-card__title {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

.project-card__link {
  color: var(--color-ink);
  text-decoration: none;
}

.project-card__link:hover {
  color: var(--color-ink);
}

.project-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-card);
}

/* Fokusrahmen sitzt an der ganzen Karte (focus-within), nicht am Titel */
.project-card__link:focus-visible {
  box-shadow: none;
}

.project-card__text {
  font-size: var(--fs-small);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__arrow {
  display: grid;
  place-items: center;
  align-self: flex-end;
  width: 44px;
  height: 44px;
  margin-top: auto;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-ink);
  transition: background-color var(--duration), color var(--duration), transform var(--duration);
}

.project-card__arrow svg {
  width: 20px;
  height: 20px;
}

.project-card:hover .project-card__arrow,
.project-card:focus-within .project-card__arrow {
  background: var(--color-ink);
  color: var(--color-on-dark);
  transform: translateX(2px);
}

/* --- Slider (PROJ-5) ------------------------------------------------------- */

/* Natives horizontales Scrollen mit Einrasten – funktioniert auch ohne JS.
   main.js blendet Pfeile/Punkte nur ein, wenn die Karten überlaufen. */
.slider {
  --slider-gap: var(--space-5);
  --slides-visible: 3;
}

.slider__track {
  display: flex;
  gap: var(--slider-gap);
  margin: 0 -8px;
  padding: 8px 8px 24px;          /* Platz für Schatten und Hover-Anhebung */
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .slider__track {
    scroll-behavior: smooth;
  }
}

/* Mit JS: Scrollleiste ausblenden (Pfeile/Punkte übernehmen); ohne JS bleibt sie sichtbar */
.js .slider__track {
  scrollbar-width: none;
}

.js .slider__track::-webkit-scrollbar {
  display: none;
}

.slider__slide {
  display: flex;
  flex: 0 0 calc((100% - (var(--slides-visible) - 1) * var(--slider-gap)) / var(--slides-visible));
  scroll-snap-align: start;
}

@media (max-width: 1099.98px) {
  .slider { --slides-visible: 2; }
}

/* Mobil: eine Karte + angeschnittene nächste */
@media (max-width: 699.98px) {
  .slider { --slider-gap: var(--space-4); }

  .slider__slide {
    flex-basis: 85%;
  }
}

.slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.slider__controls[hidden] {
  display: none;
}

.slider__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: pointer;
  transition: background-color var(--duration), color var(--duration), opacity var(--duration);
}

.slider__arrow svg {
  width: 20px;
  height: 20px;
}

.slider__arrow:hover:not([aria-disabled="true"]) {
  background: var(--color-ink);
  color: var(--color-on-dark);
}

.slider__arrow[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.slider__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Punkt 10 px, Klickfläche 24 px */
.slider__dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Inaktiv: Grau ≥ 3:1 auf Off-White und Weltkarte; aktiv: längliche Pille in Bernstein (Form + Farbe) */
.slider__dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--color-control);
  transition: background-color var(--duration), width var(--duration) var(--ease-out);
}

.slider__dot[aria-current="true"] {
  width: 36px;
}

.slider__dot[aria-current="true"]::before {
  width: 24px;
  background: var(--color-primary-text);
}

.slider__dot:hover::before {
  background: var(--color-ink);
}

/* --- Zitat (PROJ-6) ------------------------------------------------------ */

/* Weiße Karte mit Serif-Zitat, Quelle und großem Anführungszeichen (Deko) */
.quote {
  position: relative;
  margin: 0;
  padding: var(--space-6) var(--space-6) var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-header);
}

.quote::before {
  content: '“';
  position: absolute;
  top: -0.35em;
  left: var(--space-5);
  font-family: var(--font-serif);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--color-primary);
}

.quote__text {
  margin: 0;
}

.quote__text p {
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
  color: var(--color-ink);
}

.quote__source {
  margin-top: var(--space-3);
  font-size: var(--fs-small);
  color: var(--color-text);
}

.quote__source::before {
  content: '— ';
}

/* --- Schritte (PROJ-7) ---------------------------------------------------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-5);
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-4);
}

.step__number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-text);
  font-family: var(--font-serif);
  font-size: 1.125rem;
}

.step__title {
  margin-bottom: var(--space-1);
  font-size: 1.125rem;
  line-height: 1.3;
}

/* --- Bank-Karte (PROJ-7) ---------------------------------------------------- */

/* Wiederverwendbar (Startseite, Projekt-Detailseiten). Werte stehen im HTML (data-bank). */
.bank-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: clamp(1.25rem, 0.75rem + 2vw, 2rem);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.bank-card__label {
  margin-bottom: var(--space-3);
  padding: 0;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.bank-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.bank-card__status {
  min-height: 1.4em;
  margin-top: calc(-1 * var(--space-3));
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-green-text);
}

/* Projekt-Auswahl: native Auswahlfelder, als Pillen gestaltet */
.pills {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.pills__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pill {
  position: relative;
  cursor: pointer;
}

.pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.pill span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--color-control);
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-ink);
  transition: background-color var(--duration), border-color var(--duration), color var(--duration);
}

.pill:hover span {
  border-color: var(--color-ink);
}

.pill input:checked + span {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-on-dark);
}

.pill input:focus-visible + span {
  box-shadow: var(--focus-ring);
}

/* Bezeichnung/Wert-Paare */
.bank-data {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.bank-data__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-line-soft);
}

.bank-data__row:last-child {
  border-bottom: 0;
}

.bank-data dt {
  font-size: var(--fs-small);
  color: var(--color-text);
}

.bank-data dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0;
  min-width: 0;
}

.bank-data__value {
  color: var(--color-ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;   /* nur umbrechen, wenn ein Wort sonst nicht passt */
}

.bank-data__value--strong {
  font-weight: 600;
}

/* IBAN: Vierergruppen brechen nie in sich um, nur dazwischen */
.iban > span {
  white-space: nowrap;
}

/* Ohne JS: Liste aller Verwendungszwecke statt Auswahl; mit JS umgekehrt */
.bank-data__row--purpose,
.bank-card .pills {
  display: none;
}

.js .bank-data__row--purpose { display: grid; border-bottom: 0; }   /* letzte sichtbare Zeile – Linie kommt vom GiroCode */
.js .bank-card .pills { display: block; }
.js .bank-data__row--nojs { display: none; }

.bank-data__row--nojs dd {
  display: block;
}

.bank-data__hint {
  display: block;
  font-size: var(--fs-small);
}

.bank-data__purposes {
  margin-top: var(--space-1);
  padding-left: 1.2em;
  color: var(--color-ink);
  font-weight: 500;
}

/* Kopier-Schaltfläche: kleines Symbol, Klickfläche 44 × 44 px */
.copy-btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-block: -6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-control);
  cursor: pointer;
  transition: background-color var(--duration), color var(--duration);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

.copy-btn:hover {
  background: var(--color-primary-soft);
  color: var(--color-ink);
}

/* GiroCode: unter den Bankdaten, Bild + Hinweis nebeneinander */
.girocode {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line-soft);
}

.girocode img {
  flex: 0 0 auto;
  width: 148px;
  height: 148px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-surface);
}

.girocode figcaption {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--color-text);
}

@media (max-width: 599.98px) {
  .bank-data__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* Mobil nachrangig: Scannen mit demselben Gerät ist unpraktisch */
  .girocode {
    gap: var(--space-4);
  }

  .girocode img {
    width: 96px;
    height: 96px;
  }
}

/* --- Breadcrumb (PROJ-8) -------------------------------------------------- */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  list-style: none;
  font-size: var(--fs-small);
}

.breadcrumb li + li::before {
  content: '›';
  margin-right: var(--space-2);
  color: var(--color-control);
}

.breadcrumb a {
  color: var(--color-text);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-ink);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--color-ink);
  font-weight: 500;
}

/* --- Externer Link (PROJ-8) ------------------------------------------------ */

.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ext-link__icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

/* --- Steckbrief (PROJ-8) --------------------------------------------------- */

.facts {
  padding: clamp(1.25rem, 0.75rem + 2vw, 2rem);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.facts__title {
  margin-bottom: var(--space-4);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

.facts__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-4) var(--space-6);
  margin: 0;
}

.facts__row dt {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.facts__row dd {
  margin: var(--space-1) 0 0;
  color: var(--color-ink);
  font-weight: 500;
  overflow-wrap: break-word;
}

/* --- Fließtext (PROJ-8) ---------------------------------------------------- */

.prose {
  max-width: 68ch;
}

.prose > * + * {
  margin-top: var(--space-4);
}

/* --- Wirkungs-Karten (PROJ-8) ---------------------------------------------- */

/* 2, 3 oder 4 Karten füllen die Breite harmonisch */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-4);
  list-style: none;
}

.impact-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 28px;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--color-primary);
}

.impact-card__amount {
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-ink);
  /* Stichworte statt Beträgen (PROJ-9), z. B. „Tierpatenschaften“: lange Wörter trennen statt überlaufen */
  hyphens: auto;
  hyphenate-limit-chars: 8 4 4;   /* keine Mini-Silben wie „Quarantä-ne“ */
  overflow-wrap: break-word;
}

/* --- Galerie + Vollbild-Ansicht (PROJ-8) ----------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 45%), 1fr));
  gap: var(--space-3);
  list-style: none;
}

.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-box);
  overflow: hidden;
  background: var(--color-sand);
}

.gallery__item picture,
.gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery__item img {
  max-width: none;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #141414;   /* deckend: die Seite dahinter lenkt nicht ab */
  color: var(--color-on-dark);
}

.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox:focus {
  outline: none;
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] {
    animation: intro-fade 0.25s ease;
  }
}

html.is-lightbox-open {
  overflow: hidden;
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--gutter);
  font-size: var(--fs-small);
  color: var(--color-on-dark-muted);
}

.lightbox__stage {
  touch-action: pan-y pinch-zoom;   /* waagerechtes Wischen gehört dem Skript (Blättern) */
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 0;
  padding-inline: var(--space-3);
}

.lightbox__figure {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 0;
  margin: 0;
}

.lightbox__img {
  user-select: none;
  -webkit-user-drag: none;
  max-width: 100%;
  /* Platz für Leiste oben und Bildunterschrift unten – Foto passt immer ganz in den Bildschirm */
  max-height: calc(100dvh - 10rem);
  object-fit: contain;
  border-radius: 8px;
  background: var(--color-sand);
}

.lightbox__caption {
  padding: var(--space-3) var(--gutter) var(--space-5);
  text-align: center;
  font-size: var(--fs-body);
  color: var(--color-on-dark);
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--color-on-dark-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-on-dark);
  cursor: pointer;
  transition: background-color var(--duration);
}

/* hidden-Attribut muss gegen display: grid gewinnen (z. B. nur 1 Foto → keine Pfeile, PROJ-8 BUG-2) */
.lightbox__btn[hidden] {
  display: none;
}

.lightbox__btn svg {
  width: 22px;
  height: 22px;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__btn:focus-visible {
  box-shadow: 0 0 0 3px var(--color-primary);
}

@media (max-width: 599.98px) {
  /* Mobil: Pfeile unten über dem Foto, Wischen ist der Hauptweg */
  .lightbox__stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .lightbox__stage .lightbox__btn {
    position: absolute;
    bottom: var(--space-3);
    z-index: 1;
  }

  .lightbox__stage .lightbox__btn--prev { left: var(--space-4); }
  .lightbox__stage .lightbox__btn--next { right: var(--space-4); }
}

/* --- Häufige Fragen (PROJ-8) ----------------------------------------------- */

.faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq__item {
  background: var(--color-surface);
  border-radius: var(--radius-box);
  box-shadow: var(--shadow-card);
}

.faq__item summary {
  position: relative;
  display: block;
  padding: var(--space-5) calc(var(--space-5) + 32px) var(--space-5) var(--space-5);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--color-ink);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-box);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

/* Plus/Minus-Symbol */
.faq__item summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: var(--space-5);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    linear-gradient(var(--color-ink), var(--color-ink)) center / 10px 2px no-repeat,
    linear-gradient(var(--color-ink), var(--color-ink)) center / 2px 10px no-repeat,
    var(--color-primary-soft);
  transform: translateY(-50%);
  transition: transform var(--duration);
}

.faq__item[open] summary::after {
  background:
    linear-gradient(var(--color-ink), var(--color-ink)) center / 10px 2px no-repeat,
    var(--color-primary);
}

.faq__answer {
  padding: 0 var(--space-5) var(--space-5);
}

.faq__answer > * + * {
  margin-top: var(--space-3);
}

/* --- Zitat zentriert (Variante) -------------------------------------------- */

.quote--center {
  max-width: 46rem;
  margin-inline: auto;
}

/* --- Bank-Karte mit festem Verwendungszweck (Projektseiten) ---------------- */

/* Kein Auswahlfeld → Verwendungszweck immer sichtbar, auch ohne JS */
.bank-data__row--fixed,
.js .bank-data__row--fixed {
  display: grid;
  border-bottom: 0;
}

@media (max-width: 599.98px) {
  .bank-data__row--fixed,
  .js .bank-data__row--fixed {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Skip-Link ----------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  color: var(--color-on-dark);
}

/* --- Logo (Bildmarke, transparentes PNG aus npm run bilder) -------------- */

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.logo__img {
  display: block;
  width: auto;
  height: 44px;
  transition: height var(--duration) var(--ease-out);
}

.site-header.is-scrolled .logo__img {
  height: 38px;
}

/* Footer (dunkler Grund): Logo auf heller Fläche, damit „PLUS“ lesbar bleibt */
.logo--light {
  align-self: flex-start;
  width: fit-content;
  padding: 10px 14px;
  background: var(--color-bg);
  border-radius: 12px;
}

.logo--light .logo__img {
  height: 40px;
}

/* --- Header -------------------------------------------------------------- */

/* Unsichtbare Messpunkte für den Scroll-Zustand (siehe main.js) */
.scroll-sentinel {
  position: absolute;
  left: 0;
  width: 1px;
  pointer-events: none;
  visibility: hidden;
}

.scroll-sentinel--header { top: 0; height: 50px; }
.scroll-sentinel--top { top: 100vh; height: 1px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background-color var(--duration), box-shadow var(--duration);
}

.site-header.is-scrolled {
  background: var(--color-surface);
  box-shadow: var(--shadow-header);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
  transition: min-height var(--duration) var(--ease-out);
}

.site-header.is-scrolled .site-header__inner {
  min-height: var(--header-h-compact);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding-block: var(--space-2);
  font-size: var(--fs-body);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-ink);
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease-out);
}

.site-nav__link:hover {
  color: var(--color-ink);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current]::after {
  transform: scaleX(1);
}

/* Hamburger-Button: erst sichtbar, wenn das Skript läuft (sonst greift die Linkzeile) */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-on-dark);
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 899.98px) {
  /* Ohne JS: Navigation bleibt als umbrechende Linkzeile sichtbar */
  .site-header__inner {
    flex-wrap: wrap;
    padding-block: var(--space-3);
  }

  .site-nav,
  .site-nav__list {
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
  }

  .site-nav .button {
    padding: 10px 18px;
  }

  /* Mit JS: Hamburger statt Linkzeile */
  .js .site-header__inner {
    flex-wrap: nowrap;
    padding-block: 0;
  }

  .js .site-nav {
    display: none;
  }

  .js .menu-toggle {
    display: inline-flex;
  }
}

/* --- Mobiles Menü (natives <dialog>) ------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-menu:focus {
  outline: none;
  box-shadow: none;
}

.mobile-menu::backdrop {
  background: transparent;
}

.mobile-menu[open] {
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
  .mobile-menu[open] {
    animation: menu-in 0.3s var(--ease-out);
  }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h-compact);
}

.mobile-menu__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-7);
  padding-block: var(--space-6) var(--space-7);
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
}

.mobile-menu__link {
  display: block;
  padding-block: var(--space-2);
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.2;
  text-decoration: none;
  color: var(--color-ink);
}

.mobile-menu__link:hover {
  color: var(--color-primary-text);
}

.mobile-menu__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
  font-size: var(--fs-body);
}

.mobile-menu__contact a {
  color: var(--color-ink);
  text-decoration: none;
}

.mobile-menu__contact a:hover {
  color: var(--color-primary-text);
}

/* --- Weltkarte (Hintergrund-Ebene) --------------------------------------- */

.world-map {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.world-map__img {
  position: absolute;
  top: 0;
  left: 50%;
  /* Mindestens 160 % der Fensterhöhe hoch, damit die Karte auch mobil wandern kann.
     Seitenverhältnis der Grafik: 1000 × 1170 */
  width: max(100%, 160vh * 1000 / 1170);
  max-width: none;
  height: auto;
  transform: translate3d(-50%, 0, 0);
  will-change: transform;
}

/* --- Schwebende Farbpunkte ----------------------------------------------- */

/* Container liegt über der ganzen Sektion; Position/Größe der Punkte setzt main.js aus data-Attributen */
.dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.dot {
  position: absolute;
  display: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  will-change: transform;
}

.js .dot.is-placed {
  display: block;
}

/* Option: Punkt nur ab 900px zeigen – für Punkte, die mobil auf Text fallen würden */
@media (max-width: 899.98px) {
  .dot--desktop-only { display: none !important; }
}

.dot--orange { background: var(--color-primary); }
.dot--green { background: var(--color-green); }
.dot--blue { background: var(--color-blue); }

/* Inhalte liegen über den Punkten */
.section > .container {
  position: relative;
  z-index: 1;
}

/* --- Einblenden beim Scrollen -------------------------------------------- */

/* Versteckt wird nur, wenn das Skript läuft und Bewegung erlaubt ist */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Option: gestaffelt nacheinander einblenden (Stufen à 0,12 s) */
  .js .reveal--d1 { transition-delay: 0.12s; }
  .js .reveal--d2 { transition-delay: 0.24s; }
  .js .reveal--d3 { transition-delay: 0.36s; }
}

/* --- Nach-oben-Button ---------------------------------------------------- */

.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-ink);
  box-shadow: var(--shadow-header);
  /* Ohne JS unsichtbar – das Skript blendet ihn nach einer Bildschirmhöhe ein */
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--duration), transform var(--duration), visibility var(--duration), background-color var(--duration);
}

.to-top svg {
  width: 20px;
  height: 20px;
}

.to-top:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  padding-block: var(--space-9) var(--space-6);
  background: var(--color-ink);
  color: var(--color-on-dark-muted);
  font-size: var(--fs-small);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}

@media (min-width: 600px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  }
}

.site-footer__about {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 22rem;
}

.site-footer__title {
  margin-bottom: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
}

.site-footer a:not(.logo) {
  display: inline-block;
  padding-block: var(--space-1);
  color: var(--color-on-dark);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-primary);
}

.site-footer address {
  font-style: normal;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-on-dark-line);
}


/* ==========================================================================
   6. Seiten-Sektionen
   (PROJ-2 ff. ergänzen hier ihre Sektionen, jeweils mit eigener Überschrift)
   ========================================================================== */

/* --- Hero (PROJ-2) -------------------------------------------------------- */

:root {
  /* Bildausschnitt des Hero-Fotos im Afrika-Fenster (horizontal vertikal).
     Bei neuem Foto anpassen, z. B. „60% 25%“ = Gesicht etwas rechts oben. */
  --hero-focus: 58% 28%;
  /* Seitenverhältnis der Afrika-Kontur (assets/img/afrika.svg, viewBox 1012 × 1106) */
  --africa-ratio: 1012 / 1106;
  --hero-height: max(560px, calc(88svh - var(--header-h)));
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--hero-height);
  padding-block: var(--space-5) var(--space-7);
  overflow: clip;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-7);
}

.hero__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.hero__title {
  font-size: clamp(2.5rem, 1.2rem + 4vw, 4.5rem);   /* 40 → 72px (Styleguide-Hero) */
  line-height: var(--lh-h1);
  max-width: 14ch;
  text-wrap: pretty;
}

.hero__figure {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Afrika-Fenster: Maske schneidet alles auf die Kontur zu */
.hero__window {
  position: relative;
  width: min(100%, 560px, calc((var(--hero-height) - 4rem) * var(--africa-ratio)));
  aspect-ratio: var(--africa-ratio);
  background: var(--color-sand);
  -webkit-mask: url('/assets/img/afrika.svg') center / contain no-repeat;
  mask: url('/assets/img/afrika.svg') center / contain no-repeat;
  will-change: transform;
}

.hero__photo {
  position: absolute;
  inset: 0;
  display: block;
  will-change: transform;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--hero-focus);
  /* 10 % größer als das Fenster: Spielraum für die gegenläufige Bewegung, ohne Innenränder */
  scale: 1.1;
}


/* Mobil & Tablet: Afrika-Bild als blasser Hintergrund hinter dem Text */
@media (max-width: 899.98px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__figure {
    position: absolute;
    z-index: 0;
    top: 50%;
    right: -28vw;
    width: 112vw;
    max-width: 760px;
    opacity: 0.25;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .hero__window {
    width: 100%;
  }

  /* Alle Hero-Texte dunkel → AA-Kontrast bei jedem Foto garantiert (siehe PROJ-2 Tech Design F) */
  .hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-ink);
  }

  .hero__eyebrow::before {
    content: '';
    width: 24px;
    height: 2px;
    border-radius: 1px;
    background: var(--color-primary);
  }
}

/* Auftritt beim Laden – nur mit JS und erlaubter Bewegung.
   Keyframes nur mit „from“: Endwert ist der normale Zustand (z. B. Deckkraft 25 % mobil).
   translate/scale statt transform, damit Bewegungs-Motor und Layout-Transforms unberührt bleiben. */
@media (prefers-reduced-motion: no-preference) {
  .js .intro {
    animation: intro-up 0.7s var(--ease-out) both;
  }

  .js .intro--1 { animation-delay: 0.05s; }
  .js .intro--2 { animation-delay: 0.15s; }
  .js .intro--3 { animation-delay: 0.28s; }
  .js .intro--4 { animation-delay: 0.4s; }

  .js .intro--grow {
    animation: intro-grow 0.9s var(--ease-out) 0.1s both;
  }

  .js .hero .dot.is-placed {
    animation: intro-fade 0.5s ease 0.55s both;
  }
}

@keyframes intro-up {
  from { opacity: 0; translate: 0 24px; }
}

@keyframes intro-grow {
  from { opacity: 0; scale: 0.92; }
}

@keyframes intro-fade {
  from { opacity: 0; }
}

/* --- Statistik (PROJ-3) --------------------------------------------------- */

/* Verringerter oberer Abstand: unter dem Hero sind nur ~108 px sichtbar (1440 × 900),
   Eyebrow und Anfang der H2 sollen dort hervorlugen */
.section--stats {
  padding-top: var(--space-6);
}

.section--stats .section-head {
  margin-bottom: var(--space-6);
}

/* 4 Spalten ab 900 px · 2 × 2 darunter · 1 Spalte unter 360 px */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 359.98px) {
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Kennzahl-Karte mit Icon: zentriert wie die Feature-Karte, große Serif-Zahl, kein Balken.
   Die Karte ist Container → die Zahl skaliert mit der Kartenbreite, nicht mit dem Bildschirm. */
.card--kpi {
  align-items: center;
  gap: var(--space-4);
  padding: clamp(1.25rem, 0.75rem + 2vw, 1.75rem);
  text-align: center;
  container-type: inline-size;
}

.kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.kpi__value {
  display: inline-block;
  /* ~21 % der Kartenbreite: „51.170 €“ ≈ 3,95 em, „105.000 €“ ≈ 4,45 em → passt beides; max. 40 px (Styleguide) */
  font-size: clamp(1.375rem, 21cqi, var(--fs-stat));
  line-height: 1.1;
  white-space: nowrap;
}

.kpi__label {
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--color-text);
}

.stats-note {
  margin-top: var(--space-5);
  font-size: var(--fs-small);
  color: var(--color-text);
  text-align: center;
}

/* --- Hauptprojekt (PROJ-4) ------------------------------------------------- */

:root {
  /* Bildausschnitte der Kreisbilder (horizontal vertikal) – bei neuen Fotos anpassen */
  --focus-hauptprojekt-gross: 50% 40%;
  --focus-hauptprojekt-klein-1: 50% 45%;
  --focus-hauptprojekt-klein-2: 50% 40%;
}

.feature-split__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-8);
}

.feature-split__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.feature-split__text .chips {
  margin-block: var(--space-2);
}

/* Runde Bildkomposition: quadratische Bühne, Teile in Prozent positioniert */
.circle-stage {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1;
  justify-self: center;
}

.circle-stage__pos {
  position: absolute;
}

.circle-stage__pos--big     { left: 6%;  top: 6%;  width: 78%; }
.circle-stage__pos--small-1 { left: 66%; top: 2%;  width: 31%; }
.circle-stage__pos--small-2 { left: 0;   top: 68%; width: 25%; }

/* Dünner orangefarbener Ring um den großen Kreis (gleiches Zentrum, etwas größer) */
.circle-stage__ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 90%;
  aspect-ratio: 1;
  /* Transparenz in der Farbe statt per opacity – sonst überschreibt der Einblend-Effekt sie */
  border: 2px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
  border-radius: 50%;
}

.circle {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-sand);   /* sichtbar, solange das Bild lädt oder fehlt */
  will-change: transform;
}

.circle--big {
  box-shadow: var(--shadow-card);
}

.circle--small {
  border: 6px solid var(--color-surface);
  box-shadow: var(--shadow-header);
}

.circle__photo,
.circle__photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.circle__photo img {
  max-width: none;
  object-fit: cover;
}

.circle--big .circle__photo img     { object-position: var(--focus-hauptprojekt-gross); }
.circle--small-1 .circle__photo img { object-position: var(--focus-hauptprojekt-klein-1); }
.circle--small-2 .circle__photo img { object-position: var(--focus-hauptprojekt-klein-2); }

/* Mobil & Tablet: Bild oben, Text darunter */
@media (max-width: 899.98px) {
  .feature-split__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }

  .circle-stage {
    width: 78%;
    max-width: 420px;
  }
}

/* --- Unsere Haltung (PROJ-6) ----------------------------------------------- */

:root {
  --focus-haltung: 50% 50%;   /* Bildausschnitt des Fotos – bei neuem Foto anpassen */
}

/* Unsichtbare Sprungmarke #mission am Sektionsanfang (alte Links) */
.values__anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.values__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-8);
}

.values__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.principles {
  margin-top: var(--space-4);
  list-style: none;
}

.principle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-5);
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-line);
}

.principle:last-child {
  border-bottom: 1px solid var(--color-line);
}

.principle__number {
  min-width: 2.2ch;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--color-primary-text);
}

.principle__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.principle__title {
  font-size: 1.25rem;
  line-height: 1.3;
}

.values__media {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 520px;
}

.values__photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-sand);
  box-shadow: var(--shadow-card);
}

.values__photo picture,
.values__photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.values__photo img {
  max-width: none;
  object-fit: cover;
  object-position: var(--focus-haltung);
}

/* Zitatkarte im Fluss unter dem Foto, feste Überlappung von 56 px nach oben –
   verdeckt so unabhängig von der Kartenhöhe nur den unteren Fotorand */
.values__quote {
  position: relative;
  z-index: 1;
  margin: -56px var(--space-7) 0 calc(-1 * var(--space-6));
  will-change: transform;
}

@media (max-width: 899.98px) {
  .values__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }

  .values__quote {
    margin: -32px var(--space-4) 0;   /* kleineres Foto → geringere Überlappung */
  }
}

/* --- Jetzt unterstützen (PROJ-7) ------------------------------------------- */

.donate__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: var(--space-8);
}

.donate__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (max-width: 899.98px) {
  .donate__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }
}

/* --- Projekt-Detailseiten (PROJ-8) ----------------------------------------- */

:root {
  --focus-kopf: 50% 35%;   /* Bildausschnitt des Kopf-Fotos (Vorlage) */
}

.page-hero {
  position: relative;
  padding-block: var(--space-7) var(--space-6);
}

.page-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--space-8);
}

.page-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.page-hero__title {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem);
  line-height: var(--lh-h1);
  text-wrap: pretty;
  overflow-wrap: break-word;
  hyphens: auto;
}

.page-hero__media {
  justify-self: end;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-sand);
  box-shadow: var(--shadow-card);
}

.page-hero__media picture,
.page-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
}

.page-hero__media img {
  max-width: none;
  object-fit: cover;
  object-position: var(--focus-kopf);
}

/* Text + optionales Bild (z. B. „Warum wir helfen“) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: var(--space-8);
}

/* ohne Bild: Text allein, volle Lesebreite */
.split:not(:has(.split__media)) {
  grid-template-columns: minmax(0, 1fr);
}

.split__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.split__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-sand);
  box-shadow: var(--shadow-card);
}

.split__media picture,
.split__media img {
  display: block;
  width: 100%;
  height: 100%;
}

.split__media img {
  max-width: none;
  object-fit: cover;
}

@media (max-width: 899.98px) {
  .page-hero__inner,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .page-hero__media {
    justify-self: stretch;
    max-width: 520px;
  }
}

/* --- Platzhalter-Sektionen (PROJ-1) */

.placeholder-intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 40rem;
  padding-block: var(--space-8) var(--section-space);
}

/* --- Einfache Textseite (Impressum, Datenschutz, Barrierefreiheit) -------- */

.page-text {
  max-width: 46rem;
  padding-block: var(--space-8) var(--section-space);
}

.page-text > * + * {
  margin-top: var(--space-4);
}

.page-text h1 {
  margin-bottom: var(--space-6);
}

.page-text h2 {
  margin-top: var(--space-7);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

/* Rechtstexte (PROJ-10): lange Rechtsbegriffe und Adressen dürfen umbrechen */
.page-text {
  hyphens: auto;
  overflow-wrap: break-word;
}

.page-text ul {
  padding-left: 1.25em;
}

.page-text li + li {
  margin-top: var(--space-2);
}

.page-text address {
  font-style: normal;
}

.page-text__stand {
  color: var(--color-text);
  font-size: var(--fs-small);
}

/* Übersicht mit Sprunglinks (Datenschutz) */
.toc {
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.page-text .toc__title {
  margin-top: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ol {
  margin-top: var(--space-3);
  padding-left: 1.4em;
}

.toc li + li {
  margin-top: var(--space-1);
}

/* Fehlende Pflichtangabe – wird von „npm run check:rechtliches“ gefunden (Deploy-Sperre) */
.legal-todo {
  padding: 0.05em 0.4em;
  font-weight: 600;
  color: var(--color-ink);
  background: var(--color-primary-soft);
  border: 1px dashed var(--color-primary-text);
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* --- 404 ----------------------------------------------------------------- */

.error-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 40rem;
  padding-block: var(--space-9) var(--section-space);
}


/* ==========================================================================
   7. Hilfsklassen
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
