/* Stiftung Herzenswunsch für Hürther Pänz — design system
   Vanilla CSS, no build step. Self-hosted fonts (see ./fonts.css).
   Noto Sans is the body copy font; Yanone Kaffeesatz is reserved
   for headings, buttons, and nav.

   Accessibility: all font-sizes are in rem, relative to the root
   element's font-size (which we never fix in px) — so a visitor's
   browser text-size setting or zoom level scales everything. Body
   copy defaults to 1.125rem (~18px); only the footer uses a
   smaller, still-readable size. */

@import url("fonts.css");

:root {
  --color-text: #201e1d;
  --color-text-soft: #474238;
  --color-bg: #fff;
  --color-bg-cream: #faf9f5;
  --color-orange: #df8d41;
  --color-orange-button: #c76f22;
  --color-orange-ink: #4f2b0f;
  --color-orange-dark: #a3591f;
  --color-orange-deep: #6b3c17;
  --color-orange-tint: #f9dcb8;
  --color-orange-cream: #f5ead8;
  --color-pink-tint: #f7e0ef;
  --color-pink-dark: #5c2a4c;
  --color-pink-mid: #833c6c;
  --color-tan: #ebddc5;
  --color-footer-bg: #302d2a;
  --color-footer-text: #f5efe4;
  --color-footer-muted: #d9d0c1;
  --color-muted: #675f51;
  --color-gray-light: #e7e3da;

  --font-ui: "Yanone Kaffeesatz", sans-serif;
  --font-body: "Noto Sans", sans-serif;
  --font-display: "Annie Use Your Telescope", cursive;

  --radius-pill: 999px;
  --radius-card: 32px;
  --radius-card-lg: 36px;

  --space-sm: 0.75rem;

  --shadow-photo: 0 20px 40px rgba(32, 30, 29, 0.18);

  /* Every color change (hover, focus, state) fades with this. */
  --transition-colors:
    color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  /* Fills a typical laptop viewport, caps line-length/whitespace on
     large external displays. 1440 / 12 = 120px columns for the
     planned grid. */
  --content-max: 1440px;
}

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

html {
  color-scheme: light;
  font-size: 112.5%;
  /* The decorative hero blobs/photos bleed past the viewport; clip them
     on the root so the page cannot be scrolled sideways. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
  /* Lange Wörter (z. B. „Stellvertretende“) brechen bei großer Schrift um,
     statt Spalten zu sprengen. */
  overflow-wrap: break-word;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  /* Without this, main's automatic flex min-width defaults to its
     content's min-content size. A descendant with a non-wrapping
     intrinsic width (e.g. the testimonial carousel track, which is
     `width: max-content` while cycling) would otherwise force main
     — and with it the whole homepage — to stay pinned at its max
     desktop width, breaking responsiveness on narrow viewports. */
  min-width: 0;
}

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

a {
  color: inherit;
  transition: var(--transition-colors);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-colors: none;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

/* One h2 size everywhere (sections, text pages, cards). The condensed
   display face needs the extra size to stay readable. */
h2 {
  font-size: 1.875rem;
}

/* Page-width cap: main content and footer bars are siblings (not nested
   in one wrapper element), so each is capped and centered individually
   — including its background, i.e. no full-bleed bands. The fixed
   .site-header is the exception: its background must span the full
   viewport (so scrolling hero content never peeks out beside it), while
   .site-header-inner caps the actual nav content to the same width. */
main,
.site-footer-inner,
.footer-bar-inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

/* ── Buttons & pills ─────────────────────────────────────────────── */

.btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  /* Mindesthöhe statt fester Höhe: bei großer Schrift oder schmalem Bildschirm
     darf der Text umbrechen, statt aus dem Button zu laufen. */
  min-height: 44px;
  max-width: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  /* 1px bottom padding: Noto Sans sits ~0.5px low in a centered line box. */
  padding: 0.25em 24px calc(0.25em + 1px);
  border-radius: var(--radius-pill);
  transition: var(--transition-colors);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--color-orange-button);
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: color-mix(in srgb, var(--color-orange-button), black 15%);
}

.btn--secondary {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  /* Same lightness step as the primary hover (dL* 8). */
  background: color-mix(in srgb, var(--color-footer-bg), white 8.4%);
}

.btn-arrow {
  flex-shrink: 0;
  width: 1.55em;
  height: 0.886em;
  /* Handgezeichnet: Strichstärke wächst mit der Schrift, bleibt aber sichtbar dünn. */
  overflow: visible;
}

.btn--ghost {
  background: transparent;
  color: var(--color-footer-bg);
  padding-inline: 20px;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: color-mix(in srgb, var(--color-footer-bg) 10%, transparent);
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

.pill--tan {
  background: var(--color-orange-tint);
  color: var(--color-orange-ink);
}

.pill--pink {
  background: var(--color-pink-tint);
  color: var(--color-pink-dark);
}

.pill--orange {
  background: var(--color-orange-button);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── View transitions (logo/nav morph between home and subpages) ──── */

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

body.has-intro:not(.header-active) .site-intro-logo img {
  view-transition-name: site-logo;
}

body.has-intro:not(.header-active) .site-intro .main-nav {
  view-transition-name: site-nav;
}

body.has-intro.header-active .site-header .site-logo img,
body.has-fixed-header .site-header .site-logo img {
  view-transition-name: site-logo;
}

body.has-intro.header-active .site-header .main-nav,
body.has-fixed-header .site-header .main-nav {
  view-transition-name: site-nav;
}

/* ── Header / nav ────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--color-bg);
  box-shadow: 0 2px 12px rgba(32, 30, 29, 0.08);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  /* Seitenrand wächst stufenlos von 20px (800px Fensterbreite) auf 44px
     (1000px), damit das Logo beim Verkleinern nicht springt. */
  padding: 12px clamp(20px, calc(20px + (100vw - 800px) * 0.12), 44px);
  max-width: var(--content-max);
  margin-inline: auto;
}

.site-header.is-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

body.has-fixed-header .site-header {
  transform: translateY(0);
}

/* Die feste Kopfzeile ist 68-88px hoch (je nach Logo), 88px reichen als Platz. */
body.has-fixed-header main,
.site-header.is-visible ~ main {
  padding-top: 88px;
}

@media (max-width: 50em) {
  .site-header-inner {
    padding: 16px 20px;
    flex-wrap: wrap;
  }

  body.has-fixed-header main,
  .site-header.is-visible ~ main {
    padding-top: 88px;
  }
}

/* ── Homepage intro (big logo + centered nav, scrolls away) ───────── */

.site-intro {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 64px 44px 40px;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  /* Same automatic-min-width guard as main — .site-intro is also a
     direct flex child of body. */
  min-width: 0;
}

.site-intro-logo {
  display: flex;
}

.site-intro-logo img {
  width: 656px;
  max-width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.site-intro .main-nav ul {
  justify-content: center;
  /* Abstand zwischen den Punkten bleibt 28px; umgebrochene Zeilen rücken enger. */
  row-gap: 8px;
}

@media (max-width: 40em) {
  .site-intro {
    padding: 40px 20px 28px;
    gap: 20px;
  }

  .site-intro-logo img {
    width: 412px;
  }
}

.site-logo {
  flex-shrink: 0;
  /* Logo is 1791×382 (ratio ~4.69:1) — floors the shrink at the width
     where the auto-computed height is 44px. Set here (not just on the
     img) so the flex item itself never shrinks past it. */
  min-width: calc(44px * 1791 / 382);
  margin-right: auto;
  display: flex;
  align-items: center;
}

.site-logo img {
  width: min(262px, 40vw);
  max-width: 100%;
  min-width: calc(44px * 1791 / 382);
  height: auto;
  mix-blend-mode: multiply;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-nav .nav-donate,
.mobile-nav-head .nav-donate,
.nav-toggle {
  font-size: 1.125rem;
  line-height: 1.5;
}

.main-nav a.nav-donate {
  color: #fff;
}

.nav-toggle {
  display: none;
}

.main-nav .nav-donate .btn-icon,
.mobile-nav-head .nav-donate .btn-icon,
.nav-toggle .btn-icon {
  display: none;
  /* Icons use a 24x24 viewBox at 24px with stroke-width 2, so the line is
     exactly 2px wide on screen. */
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Feste Kopfzeile (ab 801px, darunter übernimmt das Menü): Die Menüpunkte
   behalten ihren Abstand und stehen immer in einer Zeile. Wird der Platz
   knapp, schrumpft stattdessen das Logo. */
/* Menü-Layout (bis 800px): Logo, Spenden und Menü bleiben in einer Zeile.
   Wird der Platz knapp, schrumpft das Logo, statt dass die Buttons umbrechen. */
@media (max-width: 50em) {
  .site-header-inner {
    flex-wrap: nowrap;
  }

  .site-logo {
    flex-shrink: 1;
    min-width: 140px;
  }

  .site-logo img {
    min-width: 0;
  }
}

@media (min-width: 50.0625em) {
  /* Mindestabstand zwischen Logo und erstem Menüpunkt. */
  .site-header-inner {
    column-gap: 48px;
  }

  .site-header .main-nav {
    flex: none;
  }

  .site-header .main-nav ul {
    flex-wrap: nowrap;
    gap: 22px;
  }

  .site-header .main-nav a {
    white-space: nowrap;
  }

  .site-logo {
    flex: 0 1 262px;
    min-width: 120px;
  }

  .site-logo img {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 50em) {

  .site-header {
    gap: var(--space-sm);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header .main-nav ul > li {
    display: none;
  }

  .site-header .main-nav ul > li.nav-donate-item {
    display: block;
  }
}

@media (max-width: 31.25em) {
  .site-header .nav-donate,
  .site-header .nav-toggle,
  .mobile-nav-head .nav-donate,
  .mobile-nav-close {
    width: 44px;
    padding-inline: 0;
  }

  .site-header .nav-donate .btn-icon,
  .site-header .nav-toggle .btn-icon,
  .mobile-nav-head .nav-donate .btn-icon,
  .mobile-nav-close .btn-icon {
    display: inline-flex;
  }

  .site-header .nav-donate .btn-label,
  .site-header .nav-toggle .btn-label,
  .mobile-nav-head .nav-donate .btn-label,
  .mobile-nav-close .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Icon-Button: quadratisch/rund (44px), Beschriftung nur für Screenreader.
   Die Kopfzeile schaltet unter 500px mit denselben Regeln um (siehe oben). */
.btn--icon {
  width: 44px;
  padding-inline: 0;
}

.btn--icon .btn-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn--icon .btn-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Hamburger -> Kreuz: drei Linien, die oberste und unterste drehen in die
   Mitte, die mittlere blendet aus. Im Menü-Dialog läuft das beim Öffnen von
   selbst (@starting-style), beim Schließen rückwärts (Klasse is-closing, siehe
   header.js). Auf der Design-System-Seite schaltet .is-open den Zustand. */
.icon-morph line {
  transform-box: view-box;
  transform-origin: center;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
}

.mobile-nav[open] .icon-morph .m-top,
.icon-morph.is-open .m-top {
  transform: rotate(45deg) translateY(6px);
}

.mobile-nav[open] .icon-morph .m-bot,
.icon-morph.is-open .m-bot {
  transform: rotate(-45deg) translateY(-6px);
}

.mobile-nav[open] .icon-morph .m-mid,
.icon-morph.is-open .m-mid {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-nav[open].is-closing .icon-morph .m-top,
.mobile-nav[open].is-closing .icon-morph .m-mid,
.mobile-nav[open].is-closing .icon-morph .m-bot {
  transform: none;
  opacity: 1;
}

@starting-style {
  .mobile-nav[open] .icon-morph .m-top,
  .mobile-nav[open] .icon-morph .m-bot {
    transform: none;
  }

  .mobile-nav[open] .icon-morph .m-mid {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .icon-morph line {
    transition: none;
  }
}

/* ── Mobile nav dialog (native <dialog>, full viewport) ───────────── */

.mobile-nav {
  display: none;
  border: none;
  padding: 0;
}

.mobile-nav[open] {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px 20px;
  background: var(--color-bg);
  overflow-y: auto;
}

.mobile-nav::backdrop {
  background: rgba(32, 30, 29, 0.4);
}

.mobile-nav-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
  /* Abstand zur Liste darunter. */
  margin-bottom: 20px;
}

/* Menüpunkte im Overlay: erste Ebene mit großzügigem Abstand, die zweite
   Ebene (Satzung, Jahresberichte) ist auf jeder Breite direkt aufgeklappt
   und eingerückt, kein Dropdown. */
.mobile-nav .main-nav ul {
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.mobile-nav .main-nav .sub-nav {
  position: static;
  display: flex;
  gap: 0;
  min-width: 0;
  margin-top: 6px;
  padding: 0 0 0 16px;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.mobile-nav .main-nav .sub-nav a {
  padding: 10px 12px;
  white-space: normal;
}

.mobile-nav .main-nav .sub-nav li.is-active > a {
  background: var(--color-orange-tint);
  border-radius: 10px;
}

@media (min-width: 50.0625em) {
  .mobile-nav {
    display: none !important;
  }
}

.main-nav a {
  font-family: var(--font-body);
  text-decoration: none;
  font-size: 1.25rem;
  color: var(--color-text);
  transition: var(--transition-colors);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-orange-dark);
}

/* Plain nav links use the body font: the condensed display face is
   harder to read at this size. */
.main-nav a:not(.btn) {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
}

/* Enlarge the tap area of plain nav links to 44px without moving the
   layout: padding adds the height, the negative margin takes it back. */
.main-nav ul:not(.sub-nav) > li > a:not(.btn) {
  display: inline-block;
  padding: 12px 6px;
  margin: -12px -6px;
}

.main-nav a.btn--primary:hover,
.main-nav a.btn--primary:focus-visible {
  color: #fff;
}

.main-nav li.is-active > a,
.main-nav .sub-nav li.is-active > a {
  color: var(--color-orange-deep);
  font-weight: 600;
}

.main-nav a .nav-label {
  position: relative;
  display: inline-block;
}

.main-nav li.is-active > a .nav-label::after,
.main-nav .sub-nav li.is-active > a .nav-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12rem;
  height: 0.18rem;
  background: var(--color-orange);
  border-radius: 999px;
}

/* ── Zweite Navigationsebene (Dropdown) ──────────────────────────── */

.main-nav li.has-subnav {
  position: relative;
}

.main-nav .sub-nav {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  /* Abstand zum Menüpunkt, damit das Dropdown die Unterstreichung des aktiven
     Punkts nicht verdeckt. Die Brücke (::before) hält das Hover dazwischen. */
  margin-top: 16px;
  left: 0;
  min-width: 220px;
  background: var(--color-bg);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(32, 30, 29, 0.16);
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  z-index: 20;
}

.main-nav .sub-nav::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

/* Die Einträge stehen direkt untereinander (der Abstand der Hauptnavigation
   soll hier nicht gelten). */
.site-header .main-nav .sub-nav {
  gap: 0;
}

.main-nav li.has-subnav:hover .sub-nav,
.main-nav li.has-subnav:focus-within .sub-nav {
  display: flex;
}

.main-nav .sub-nav li {
  padding: 0;
}

.main-nav .sub-nav a {
  display: block;
  padding: 8px 20px;
  font-size: 1rem;
  text-align: left;
  white-space: nowrap;
}

.main-nav .sub-nav li.is-active > a {
  display: block;
  color: var(--color-orange-deep);
}

@media (max-width: 40em) {
  .main-nav .sub-nav {
    position: static;
    display: flex;
    box-shadow: none;
    padding: 4px 0 4px 16px;
    min-width: 0;
  }

}

/* ── Page header (interior pages) ───────────────────────────────── */

.page-header {
  padding: 32px 44px 36px;
}

.page-header h1 {
  font-family: var(--font-ui);
  font-size: 3.5rem;
  line-height: 1.05;
  max-width: 720px;
}

/* Nur wenn eine Einleitung unter dem Titel steht. */
.page-header h1 + .page-intro {
  margin-top: 14px;
}

.page-header .page-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-soft);
  max-width: 640px;
}

.page-content > :first-child,
.page-content-intro > :first-child {
  margin-top: 0;
}

.page-content {
  padding: 0 44px 64px;
  max-width: 760px;
  /* Textspalte links, bündig mit dem Seitentitel. */
  margin-inline: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-soft);
}

.page-content h2 {
  margin: 32px 0 12px;
  color: var(--color-text);
}

.page-content p a:not(.btn),
.page-content li a:not(.btn) {
  font-weight: 600;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

.page-content p a:not(.btn):hover,
.page-content li a:not(.btn):hover {
  color: var(--color-orange-dark);
}

.page-content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  margin: 24px 0;
}

.page-content figure {
  margin: 24px 0;
}

.page-content figure img {
  margin: 0;
}

.page-content figcaption {
  font-size: 1rem;
  color: var(--color-muted);
  margin-top: 8px;
}

@media (max-width: 40em) {
  .page-header,
  .page-content {
    padding-inline: 20px;
  }

  .page-header {
    padding-top: 16px;
    padding-bottom: 24px;
  }
}

/* ── Content grid (reusable two-column layout for interior pages) ── */

.page-content:has(.content-grid),
.page-content:has(.jahresberichte-grid) {
  max-width: var(--content-max);
  margin-inline: 0;
}

/* Karten über die volle Breite, der Einleitungstext bleibt lesbar schmal. */
.page-content:has(.jahresberichte-grid) > p {
  max-width: 672px;
}

.page-content-intro {
  max-width: 760px;
  margin-bottom: 40px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.content-grid > * {
  min-width: 0;
}

@media (max-width: 56.25em) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.stiftung-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.stiftung-card a {
  display: inline-block;
  padding-block: 0.6rem;
  margin-block: -0.6rem;
}

.stiftung-card {
  border-radius: var(--radius-card);
  padding: 26px 30px;
}

.stiftung-card h2,
.stiftung-card h4 {
  margin-top: 0;
}

/* h4 appears only in the Design System demo (nested under an h3). */
.stiftung-card h4 {
  font-family: var(--font-ui);
  font-size: 1.875rem;
  margin-bottom: 12px;
}

.stiftung-card--orange {
  background: var(--color-orange-tint);
}

/* Vorstand: Funktion klein über dem Namen, Name als Hauptinformation. */
.stiftung-members {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-wrap: anywhere;
  gap: 16px;
  margin: 16px 0 0;
}

.stiftung-members dt {
  font-size: 1rem;
  line-height: 1.3;
  color: var(--color-orange-ink);
}

.stiftung-card--pink .stiftung-members dt {
  color: var(--color-pink-dark);
}

.stiftung-members dd a {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

.stiftung-members dd a:hover {
  color: var(--color-pink-mid);
}

.stiftung-members dd {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.stiftung-card--orange h2,
.stiftung-card--orange h4 {
  color: var(--color-orange-deep);
}

.stiftung-card--pink {
  background: var(--color-pink-tint);
}

.stiftung-card--pink h2,
.stiftung-card--pink h4 {
  color: var(--color-pink-dark);
}

.page-content .donate-cover {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 0 auto 24px;
  border-radius: 0;
}

.freistellungsbescheid-heading {
  margin-top: 40px;
}

.freistellungsbescheid-link {
  margin: 16px 0 0;
}

/* ── Hero (homepage) ────────────────────────────────────────────── */

.hero-section {
  position: relative;
  isolation: isolate;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-blob--large {
  top: -90px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: var(--color-pink-tint);
  opacity: 0.7;
}

.hero-blob--small {
  top: 200px;
  left: -30px;
  width: 70px;
  height: 70px;
  background: var(--color-orange-tint);
  opacity: 0.8;
}

.hero-blob--extra {
  bottom: -50px;
  left: 12%;
  width: 130px;
  height: 130px;
  background: var(--color-tan);
  opacity: 0.6;
}

.hero-blob--wide {
  top: 45%;
  right: -110px;
  width: 200px;
  height: 200px;
  background: var(--color-orange-tint);
  opacity: 0.5;
}

/* Decorative photo circles, positioned left/right of the centered
   content and free to bleed past the section edges. */
.hero-photos {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-photo {
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-photo);
  pointer-events: auto;
}

.hero-photo--main {
  top: 30px;
  right: -30px;
  /* Ab 1100px Fensterbreite wachsen die Bilder stufenlos mit (bis 380px bzw.
     240px), darunter bleiben sie bei 260px bzw. 150px. */
  width: clamp(260px, calc(260px + (100vw - 1100px) * 0.24), 380px);
  aspect-ratio: 1;
}

.hero-photo--secondary {
  bottom: 50px;
  left: -20px;
  width: clamp(150px, calc(150px + (100vw - 1100px) * 0.15), 240px);
  aspect-ratio: 1;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) contrast(0.85) brightness(1.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin-inline: auto;
  padding: 56px 44px 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 40em) {
  .hero-content {
    padding: 32px 20px 48px;
  }
}

.hero-headline {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 5.5rem;
  line-height: 1;
  margin: 0 auto 20px;
  max-width: 560px;
}

@media (max-width: 40em) {
  .hero-headline {
    font-size: 3.5rem;
  }
}

.hero-text {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-soft);
  max-width: 460px;
  margin: 0 auto 28px;
}

.hero-text p {
  margin: 0;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.hero-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Below ~900px there's no room either side of the centered content
   for the photos to sit at, so they move into normal flow, stacked
   in a row above the headline instead of bleeding off the edges. */
@media (max-width: 56.25em) {
  .hero-photos {
    position: static;
    inset: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    padding-top: 32px;
  }

  .hero-photo {
    /* Relative (not static) so it stays in normal flow but still
       takes part in z-index stacking — otherwise the absolutely
       positioned blobs, which stack above non-positioned content,
       would render in front of it. The desktop top/right/bottom/left
       offsets still apply under position: relative, so they're
       reset here to keep the circles in their normal flex position. */
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 1;
  }

  .hero-photo--main {
    width: 200px;
    height: 200px;
  }

  .hero-photo--secondary {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 40em) {
  .hero-photos {
    padding-top: 20px;
  }

  .hero-photo--main {
    width: 150px;
    height: 150px;
  }

  .hero-photo--secondary {
    width: 110px;
    height: 110px;
  }
}

/* ── Photo placeholder (empty Kirby image field) ────────────────── */

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  background: var(--color-tan);
  color: var(--color-orange-ink);
  font-size: 1rem;
  line-height: 1.4;
}

/* ── Bereiche cards ──────────────────────────────────────────────── */

.bereiche-section {
  padding: 64px 44px 56px;
}

@media (max-width: 40em) {
  .bereiche-section {
    padding: 40px 20px;
  }
}

.bereiche-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.bereiche-heading h2 {
  max-width: 440px;
}

.bereiche-heading .bereiche-sub {
  font-size: 1rem;
  color: var(--color-muted);
}

.bereiche-grid {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

@media (max-width: 56.25em) {
  .bereiche-grid {
    flex-direction: column;
  }
}

.bereiche-card {
  border-radius: var(--radius-card);
  padding: 26px;
  flex: 1;
  min-width: 200px;
}

.bereiche-card:nth-child(odd) {
  background: var(--color-orange-tint);
}

.bereiche-card:nth-child(odd) .bereiche-card-title {
  color: var(--color-orange-deep);
}

.bereiche-card:nth-child(odd) .bereiche-card-text {
  color: var(--color-orange-ink);
}

.bereiche-card:nth-child(even) {
  background: var(--color-pink-tint);
  margin-top: 14px;
}

.bereiche-card:nth-child(even) .bereiche-card-title {
  color: var(--color-pink-dark);
}

.bereiche-card:nth-child(even) .bereiche-card-text {
  color: var(--color-pink-dark);
}

.bereiche-card:nth-child(1) {
  transform: rotate(-1.5deg);
}
.bereiche-card:nth-child(2) {
  transform: rotate(1deg);
}
.bereiche-card:nth-child(3) {
  transform: rotate(-1deg);
}
.bereiche-card:nth-child(4) {
  transform: rotate(1.5deg);
}

@media (max-width: 56.25em) {
  .bereiche-card {
    transform: none !important;
    margin-top: 0 !important;
  }
}

.bereiche-card-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.bereiche-card-text {
  font-size: 1rem;
  line-height: 1.5;
}

/* ── Jahresberichte-Übersicht (schräge Karten wie .bereiche-card) ─── */

.jahresberichte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  margin: 32px auto;
}

.jahresberichte-card {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-card);
  padding: 26px;
  min-height: 100px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition:
    var(--transition-colors),
    scale 0.15s ease;
}

.jahresberichte-card:hover,
.jahresberichte-card:focus-visible {
  scale: 1.04;
}

.jahresberichte-card:nth-child(odd) {
  background: var(--color-orange-tint);
  color: var(--color-orange-deep);
  transform: rotate(-1.5deg);
}

.jahresberichte-card:nth-child(even) {
  background: var(--color-pink-tint);
  color: var(--color-pink-dark);
  transform: rotate(1.5deg);
}

@media (max-width: 40em) {
  .jahresberichte-card {
    transform: none !important;
  }
}

/* Hohe Fenster (Hochformat, Quadrat, hohe Monitore): lieber mehr Höhe nutzen
   als die volle Breite. Statt 6 flacher Karten pro Reihe gibt es 4 bzw. 3
   größere Karten, der Block bleibt schmaler. 12 Berichte teilen sich in 6, 4
   und 3 Spalten glatt auf. Im Querformat (z. B. 1440 x 900) bleibt es bei der
   breiten Anordnung. */
@media (min-width: 56.25em) and (max-aspect-ratio: 4/3) {
  .jahresberichte-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 62rem;
    gap: 28px;
  }

  .jahresberichte-card {
    aspect-ratio: 5 / 4;
    font-size: 2.25rem;
  }
}

@media (min-width: 56.25em) and (max-aspect-ratio: 1/1) {
  .jahresberichte-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 48rem;
  }

  .jahresberichte-card {
    aspect-ratio: 4 / 3;
  }
}

/* ── Testimonials (Karussell) ─────────────────────────────────────── */
/* Bewusst ohne JS-Bibliothek (Vanilla JS, siehe assets/js/testimonials.js),
   passend zum Tech-Stack des Projekts. Ohne aktives JavaScript zeigt
   reines CSS eine statische Reihe der ersten 3/2/1 Testimonials — die Klasse
   .is-carousel wird nur von JS gesetzt und schaltet dann auf das
   gleitende Karussell um. */

.testimonials-section {
  padding: 56px 44px 64px;
  text-align: center;
}

@media (max-width: 40em) {
  .testimonials-section {
    padding: 40px 20px;
  }
}

.testimonials-heading {
  margin-bottom: 34px;
}

.testimonial-carousel {
  overflow: hidden;
}

.testimonial-track {
  display: flex;
}

.testimonial-carousel:not(.is-carousel) .testimonial-track {
  justify-content: center;
}

.testimonial-card {
  flex: 1 0 33.3333%;
  padding: 0 18px;
  box-sizing: border-box;
}

.testimonial-card:nth-child(n + 4) {
  display: none;
}

@media (max-width: 56.25em) {
  .testimonial-card {
    flex-basis: 50%;
  }

  .testimonial-card:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 40em) {
  .testimonial-card {
    flex-basis: 100%;
  }

  .testimonial-card:nth-child(n + 2) {
    display: none;
  }
}

.testimonial-carousel.is-carousel .testimonial-card {
  display: block;
  flex: 0 0 auto;
}

.testimonial-carousel.is-carousel {
  cursor: grab;
  touch-action: pan-y;
  /* Höhe folgt den sichtbaren Stimmen (JS, fitHeight in testimonials.js). */
  transition: height 0.6s ease;
}

.testimonial-carousel.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.testimonial-carousel.is-carousel .testimonial-track {
  width: max-content;
  align-items: flex-start;
  transition: transform 0.6s ease;
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-carousel.is-carousel,
  .testimonial-carousel.is-carousel .testimonial-track {
    transition: none;
  }
}

/* Punkte-Navigation (per JS erzeugt, siehe testimonials.js). Die Buttons
   sind 44px groß (Touch-Ziel), der sichtbare Punkt sitzt als ::before darin. */
.testimonial-dots[hidden] {
  display: none;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.testimonial-dot {
  appearance: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-toggle {
  width: 44px;
  margin-left: 12px;
  padding: 0;
}

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

.testimonial-dot::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-footer-bg);
  border-radius: 50%;
  background: transparent;
  transition: var(--transition-colors);
}

.testimonial-dot[aria-current="true"]::before {
  background: var(--color-footer-bg);
}

.testimonial-dot:hover::before {
  background: color-mix(in srgb, var(--color-footer-bg) 40%, transparent);
}

.testimonial-dot:focus-visible {
  outline: 3px solid var(--color-footer-bg);
  outline-offset: -4px;
  border-radius: 50%;
}

/* Wischhinweis (per JS, siehe testimonials.js): spielt einmal an der Stelle
   der Steuerung, danach blenden Punkte und Pause-Button ein. */
.testimonial-dots.is-hinting > :not(.testimonial-hint) {
  display: none;
}

.testimonial-dots.is-revealed > * {
  animation: testimonial-reveal 0.4s ease both;
}

.testimonial-hint {
  position: relative;
  width: 100%;
  height: 44px;
  overflow: hidden;
}

.testimonial-hand {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 40px;
  margin: -20px 0 0 -18px;
  opacity: 0;
  translate: 80px 0;
}

.testimonial-hand .hand-outline {
  fill: var(--color-footer-bg);
}

.testimonial-hand .hand-fill {
  fill: var(--color-bg);
}

.testimonial-hand .hand-lines {
  fill: var(--color-footer-bg);
  fill-opacity: 0.18;
}

.testimonial-hand .hand-closed {
  opacity: 0;
}

/* Erst offene Hand, zum Wischen greift sie zu (geschlossene Hand) und zieht
   nach links, dort blendet sie aus. Wie der Cursor beim Ziehen am Karussell. */
.testimonial-hint.is-playing .testimonial-hand {
  animation: testimonial-swipe 2.8s ease-in-out 2;
}

.testimonial-hint.is-playing .hand-open {
  animation: testimonial-hand-open 2.8s step-end 2;
}

.testimonial-hint.is-playing .hand-closed {
  animation: testimonial-hand-closed 2.8s step-end 2;
}

@keyframes testimonial-swipe {
  0% {
    opacity: 0;
    translate: 80px 0;
  }
  10% {
    opacity: 1;
    translate: 70px 0;
    scale: 1;
  }
  40% {
    translate: 70px 0;
    scale: 1;
  }
  46% {
    translate: 70px 0;
    scale: 0.92;
  }
  88% {
    opacity: 1;
    translate: -70px 0;
    scale: 0.92;
  }
  100% {
    opacity: 0;
    translate: -80px 0;
    scale: 0.92;
  }
}

@keyframes testimonial-hand-open {
  0% {
    opacity: 1;
  }
  42% {
    opacity: 0;
  }
}

@keyframes testimonial-hand-closed {
  0% {
    opacity: 0;
  }
  42% {
    opacity: 1;
  }
}

@keyframes testimonial-reveal {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-dots.is-revealed > * {
    animation: none;
  }
}

.testimonial-avatar {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-tan);
}

.testimonial-avatar img,
.testimonial-avatar .photo-placeholder {
  width: 100%;
  height: 100%;
}

.testimonial-avatar img {
  object-fit: cover;
}

.testimonial-avatar .photo-placeholder {
  font-weight: 700;
  padding: 0;
}

.testimonial-quote {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-soft);
  max-width: 320px;
  margin: 0 auto 12px;
}

.testimonial-name {
  font-size: 1.125rem;
  font-weight: 700;
}

.testimonial-role {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-muted);
}

/* Link der Organisation: Tap-Fläche mind. 44 px, per negativem Margin
   ohne Layoutverschiebung. */
.testimonial-role a {
  display: inline-block;
  padding-block: 11px;
  margin-block: -11px;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

.testimonial-role a:hover,
.testimonial-role a:focus-visible {
  color: var(--color-orange-dark);
}

/* ── Projekt-Cards (Projekte-Übersicht) ──────────────────────────── */
/* Bewusst anders als die Bereiche-/Hero-Cards: die Projektgrafiken
   haben einen weißen Hintergrund, darum keine Farbfläche und keine
   Schrägstellung, sondern schlicht Grafik → Überschrift → Text
   untereinander. Der Bildcontainer ist unsichtbar (kein Hintergrund)
   und quadratisch, die Grafik sitzt darin per object-fit: contain,
   damit sie nie beschnitten oder verzerrt wird. */

.projekt-grid-section {
  padding: 8px 44px 64px;
}

@media (max-width: 40em) {
  .projekt-grid-section {
    padding: 0 20px 40px;
  }
}

.projekt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
}

.projekt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.projekt-card-image {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.projekt-card-image img,
.projekt-card-image .photo-placeholder {
  width: 100%;
  height: 100%;
}

.projekt-card-image img {
  object-fit: contain;
}

.projekt-card-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

/* ── Spenden ──────────────────────────────────────────────────────── */

.donate-card {
  background: var(--color-tan);
  border-radius: var(--radius-card);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Titel wie bei den Stiftung-Karten: globale h2-Größe, dunkle Orangefarbe. */
.donate-card h2,
.ds-section .donate-card h3 {
  margin: 0;
  font-size: 1.875rem;
  color: var(--color-orange-deep);
}

.donate-iban {
  background: var(--color-orange-cream);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 1rem;
  line-height: 1.7;
  font-family: ui-monospace, monospace;
}

.donate-card .btn {
  align-self: flex-start;
}

/* Button und Rückmeldung in einer Zeile: die Meldung erscheint neben dem
   Button, es wird nichts nach unten geschoben. */
.donate-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  /* Wenn die Meldung nicht neben den Button passt (schmale Karte), rutscht sie
     darunter. Der Platz dafür (zwei Zeilen) ist immer reserviert. */
  min-height: calc(44px + 4px + 2 * 1.2em);
  align-content: flex-start;
}

.donate-copy .btn {
  flex: none;
}

.donate-copy-status {
  flex: 1 1 8em;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.donate-girocode {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.donate-girocode img {
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: 16px;
  padding: 8px;
}

.donate-girocode p {
  color: var(--color-text);
  flex: 1 1 180px;
  font-size: 1rem;
}

/* ── Footer (the one place smaller text is allowed) ─────────────── */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}

.site-footer-inner {
  padding: 44px 44px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

@media (max-width: 45em) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    padding: 32px 20px 20px;
  }
}

.site-footer-inner > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-orange-cream);
  margin-bottom: 10px;
}

.footer-address,
.footer-contact {
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-legal {
  font-size: 0.875rem;
  line-height: 1.2;
  text-align: right;
}

@media (max-width: 45em) {
  .footer-legal {
    text-align: left;
  }
}

.footer-legal a,
.footer-contact a {
  display: inline-block;
  padding-block: 0.75rem;
}

.footer-legal a {
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.footer-bar {
  background: var(--color-footer-bg);
  color: var(--color-footer-muted);
  font-size: 0.8125rem;
  font-family: var(--font-body);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bar-inner {
  padding: 12px 44px;
}

@media (max-width: 45em) {
  .footer-bar-inner {
    padding-inline: 20px;
  }
}

/* ── Article / project lists (interior pages) ───────────────────── */

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-tan);
}

.project-list a {
  display: inline-block;
  padding-block: 10px;
  margin-block: -10px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.article-detail {
  padding: 32px 44px 64px;
  max-width: 760px;
  margin-inline: 0;
}

/* Seiten mit Illustration (Ziele): Text links, Illustration rechts
   daneben, beim Scrollen mitlaufend. */
.page-content:has(.page-split:not(.page-split--text-only)) {
  max-width: var(--content-max);
}

.page-split {
  display: grid;
  grid-template-columns: minmax(0, 672px) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: start;
}

.page-split--text-only {
  grid-template-columns: minmax(0, 1fr);
}

.page-split-main > :first-child {
  margin-top: 0;
}

.page-split-media {
  /* Bleibt beim Scrollen durch die Liste neben dem Text sichtbar. */
  position: sticky;
  top: 112px;
}

.page-split-media img {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 0;
  object-fit: contain;
}

@media (max-width: 56.25em) {
  .page-split {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Mobil: kleines Bild über dem Text. */
  .page-split-media {
    order: -1;
    position: static;
  }

  .page-split-media img {
    max-width: 220px;
    margin-left: 0;
  }
}

/* Projektseiten: Text links, Bild rechts im restlichen Platz. */
.article-detail--split {
  max-width: none;
}

.article-split {
  display: grid;
  grid-template-columns: minmax(0, 672px) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: start;
}

.article-split-media img {
  display: block;
  width: 100%;
  max-width: 520px;
  max-height: 70vh;
  margin-inline: auto;
  object-fit: contain;
}

.article-detail--text-only .article-split {
  grid-template-columns: minmax(0, 672px);
}

@media (max-width: 56.25em) {
  .article-split {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Mobil: kleines Bild über dem Text. */
  .article-split-media {
    order: -1;
  }

  .article-split-media img {
    max-width: 280px;
    max-height: 280px;
  }
}

@media (max-width: 40em) {
  .article-detail {
    padding: 16px 20px 48px;
  }
}

.article-detail-date,
.article-detail-medium {
  font-size: 1rem;
  margin: 0 0 4px;
}

.article-detail-date {
  color: var(--color-muted);
}

.article-detail-medium {
  color: var(--color-text-soft);
  margin-bottom: 18px;
}

.article-detail h1 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

.article-detail-cover {
  margin: 0 0 24px;
}

.article-detail-cover img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  display: block;
}

.article-detail-cover:has(figcaption) img {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.article-detail-cover figcaption {
  padding: 12px 24px;
  background: var(--color-gray-light);
  border-bottom-left-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
  font-size: 1rem;
  color: var(--color-text-soft);
}

.article-detail-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-soft);
}

.article-detail-back {
  display: inline-block;
  padding-block: 10px;
  margin-top: 18px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.article-detail-back:hover,
.article-detail-back:focus-visible,
.jahresbericht-nav-link:hover,
.jahresbericht-nav-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.jahresbericht-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-gray-light);
}

.jahresbericht-nav-link {
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  color: var(--color-text);
}

.jahresbericht-nav-next {
  margin-left: auto;
  text-align: right;
}

/* ── Design-System-Seite (Übersicht aller Elemente) ───────────────── */

.page-content.ds {
  max-width: var(--content-max);
  margin-inline: 0;
}

.ds-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-tan);
}

.ds-toc a {
  font-weight: 600;
  padding-block: 10px;
}

.ds-section {
  padding-top: 24px;
  scroll-margin-top: 100px;
}

.ds-section > h2 {
  margin: 0 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--color-tan);
}

.ds-section h3 {
  font-family: var(--font-ui);
  font-size: 1.5rem;
  margin: 28px 0 12px;
  color: var(--color-text);
}

.ds-section code {
  font-size: 1rem;
  color: var(--color-text-soft);
  overflow-wrap: anywhere;
}

.ds-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.ds-swatch {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ds-swatch-color {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(32, 30, 29, 0.15);
}

.ds-swatch-info {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.ds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: flex-start;
}

.ds-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.ds-specimen-label {
  margin: 28px 0 6px;
  font-size: 1rem;
  color: var(--color-muted);
}

.ds-type-row {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 8px 32px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-tan);
}

@media (max-width: 50em) {
  .ds-type-row {
    grid-template-columns: 1fr;
  }
}

.ds-type-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  color: var(--color-muted);
}

.ds-type-meta strong {
  color: var(--color-text);
}

.ds-type-sample {
  color: var(--color-text);
  overflow-wrap: anywhere;
}

/* Specimens mirror the real styles; sizes are in rem like the site. */
.ds-t-hero,
.ds-t-h1,
.ds-t-h1-article,
.ds-t-h2,
.ds-t-h3,
.ds-t-btn {
  color: var(--color-text);
}

.ds-t-hero {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 5.5rem;
  line-height: 1;
}

.ds-t-h1 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1.05;
}

.ds-t-h1-article {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.1;
}

.ds-t-h2 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.2;
}


.ds-t-h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}

.ds-t-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-soft);
}

.ds-t-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-soft);
  max-width: 70ch;
}

.ds-t-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-soft);
  max-width: 70ch;
}

.ds-t-quote {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-soft);
  max-width: 320px;
}

.ds-t-card-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}


.ds-t-nav {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.5;
}

.ds-t-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}

.ds-t-brand {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.5;
}


.ds-t-tag {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-orange-ink);
}

.ds-t-meta {
  font-size: 1rem;
  color: var(--color-muted);
}

.ds-t-mono {
  font-family: ui-monospace, monospace;
  font-size: 1rem;
  line-height: 1.7;
}

.ds-t-footer {
  font-size: 0.875rem;
  line-height: 1.7;
}

.ds-t-copyright {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.ds-dark {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}

.ds-dark.is-muted {
  color: var(--color-footer-muted);
}

.ds-weights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px 32px;
}

.ds-measure {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ds-measure > div {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-soft);
}

.ds-measure .is-narrow {
  max-width: 30ch;
}

.ds-measure .is-good {
  max-width: 66ch;
}

.ds-measure .is-wide {
  max-width: none;
}

.ds-tight {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.875rem;
  max-width: 14ch;
  color: var(--color-text);
}

.ds-footer-sample {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  font-size: 0.875rem;
}

.ds-section .bereiche-grid {
  margin-bottom: 8px;
}

.ds-section .content-grid,
.ds-section .jahresberichte-grid,
.ds-section .projekt-grid {
  margin-top: 0;
}

.testimonial-row {
  max-width: 360px;
  text-align: center;
}

.testimonial-row .testimonial-card {
  padding: 0;
}

.ds-section .testimonial-dots {
  justify-content: flex-start;
  align-items: center;
  margin-top: 0;
}

.ds-donate {
  max-width: 560px;
}

.ds-box {
  width: 120px;
  height: 80px;
  background: var(--color-orange-tint);
}
