/* =========================================================================
   base.css — slide layout + accessibility system.

   Look: full-screen "slides" with photo backgrounds that stack like cards while
   scrolling (after the original Slides-framework site), right-hand dot
   navigation, slow Ken Burns zoom. Mechanics: native scrolling only. Slides
   become position:sticky once slides.js has measured them (class .stack on
   <html>); without JS they are ordinary full-height sections.

   Colour: every colour is a token. Light/dark via light-dark() and
   color-scheme, so "auto" follows the OS and data-theme="light|dark" forces a
   scheme. data-theme="contrast" (or prefers-contrast: more) switches to a
   black/white/yellow high-contrast theme without photos. Per-site accents come
   from theme-*.css.

   Text on photos: each text block sits on a local scrim (solid core, soft edge)
   whose alpha alone guarantees >= 4.5:1 against the worst-case photo pixel:
   dark .60 black under white text (5.7:1), light .72 white under #141414 (9.3:1).
   Sizing is rem-based (WCAG 1.4.4 / 1.4.10); slides grow with their content.
   ========================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }   /* focus and anchors clear the fixed header (WCAG 2.4.11) */
img, picture, svg { max-width: 100%; height: auto; display: block; }
ul[class], #primary-nav ul, .slide-dots ul, .footer-nav ul { list-style: none; padding: 0; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --font-body: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-ui:   'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: 0.889rem;
  --step-0:  1rem;
  --step-1:  1.25rem;
  --step-2:  1.563rem;
  --step-3:  1.953rem;
  --step-4:  2.441rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --gutter: clamp(1rem, 4vw, 4.25rem);
  --header-h: 5.5rem;
  --radius: 0.375rem;

  /* Surfaces and text (plain slides, paper sections) */
  --bg:         light-dark(#ffffff, #16181d);
  --surface:    light-dark(#f6f6f4, #1d2026);   /* link blue #1d74b8 stays above 4.5:1 */
  --text:       light-dark(#1b1b1b, #f2f2f2);   /* 16.9:1 / 15.9:1 */
  --text-muted: light-dark(#4d4d4d, #c4c4c4);   /*  8.5:1 / 10.2:1 */
  --border:     light-dark(#dcdcd8, #343842);

  /* Photo slides */
  --on-photo:   light-dark(#141414, #ffffff);
  --photo-base: light-dark(#e8e6e1, #111111);   /* shown while the photo loads */
  --veil:       light-dark(#ffffff, #000000);   /* full-photo veil, opacity = --fade */
  --scrim:      light-dark(rgb(255 255 255 / 0.72), rgb(0 0 0 / 0.6));
  --halo:       light-dark(rgb(255 255 255 / 0.85), rgb(0 0 0 / 0.55));

  /* Header pill ("Spenden") inverts the photo ink */
  --pill-bg:    light-dark(#141414, #ffffff);
  --pill-ink:   light-dark(#ffffff, #141414);

  /* Focus: two-tone ring, one of the tones always reaches 3:1 (WCAG 1.4.11 / 2.4.13) */
  --focus:      light-dark(#0b3d91, #ffd34d);
  --focus-halo: light-dark(#ffffff, #000000);

  /* Logo files are white. Light schemes tint them the e.V. page blue (#1d74b8), never black. */
  --logo-blue: brightness(0) saturate(100%) invert(63%) sepia(65%) saturate(7982%) hue-rotate(188deg) brightness(83%) contrast(77%);
  --logo-filter: none;
  --mark-opacity: 0.12;   /* watermark; fainter on light schemes so blue links on it keep 4.5:1 */

  --footer-bg:   #0e0f12;
  --footer-text: #ffffff;   /* 19:1 */
  --footer-link: #ffffff;
  --footer-muted: #b8b8b8;  /* 9.7:1, the credit line steps back */

  /* News tiles: white pictogram on warm colour */
  --tile-green: #4a7c2f;    /* white 5.0:1 */
  --tile-blue:  #3b62a3;    /* white 6.1:1 */
  --tile-ink:   #ffffff;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* High contrast: explicit choice, or the OS asks for more contrast and the
   visitor has not picked a theme. Photos, scrims and motion are switched off. */
:root[data-theme="contrast"] {
  color-scheme: dark;
  --bg: #000000; --surface: #000000; --text: #ffffff; --text-muted: #ffffff; --border: #ffffff;
  --on-photo: #ffffff; --photo-base: #000000; --veil: #000000; --scrim: transparent; --halo: #000000;
  --pill-bg: #ffff00; --pill-ink: #000000;
  --link: #ffff00; --link-hover: #ffffff;
  --focus: #ffff00; --focus-halo: #000000;
  --footer-bg: #000000; --footer-text: #ffffff; --footer-link: #ffff00; --footer-muted: #ffffff;
  --tile-green: #000000; --tile-blue: #000000; --tile-ink: #ffff00;
}
@media (prefers-contrast: more) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #000000; --surface: #000000; --text: #ffffff; --text-muted: #ffffff; --border: #ffffff;
    --on-photo: #ffffff; --photo-base: #000000; --veil: #000000; --scrim: transparent; --halo: #000000;
    --pill-bg: #ffff00; --pill-ink: #000000;
    --link: #ffff00; --link-hover: #ffffff;
    --focus: #ffff00; --focus-halo: #000000;
    --footer-bg: #000000; --footer-text: #ffffff; --footer-link: #ffff00; --footer-muted: #ffffff;
    --tile-green: #000000; --tile-blue: #000000; --tile-ink: #ffff00;
  }
}

/* ---------- Base elements ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
h1, h2 { font-family: var(--font-head); font-weight: 400; letter-spacing: -0.01em; }
h3, h4 { font-family: var(--font-ui); font-weight: 800; }
p { max-width: 65ch; }
p + p { margin-top: var(--space-2); }        /* paragraph spacing >= 2x font (WCAG 1.4.12) */
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
strong { font-weight: 700; }

/* Small uppercase label with wide tracking (original "Raleway caps") */
.label {
  font: 800 0.9rem/1.4 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: var(--radius);
  font: 700 var(--step-0)/1.2 var(--font-ui);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-2); }

/* ---------- Focus (WCAG 2.4.7 / 2.4.11 / 1.4.11) ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-halo);
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }
main:focus, .slide:focus { outline: none; box-shadow: none; }
.paper:focus { outline: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--on-photo);
  /* 14px at the hamburger breakpoint, 16.2px from about 1400px */
  --header-font: clamp(0.778rem, 0.642rem + 0.331vw, 0.9rem);
  --header-track: clamp(0.04em, calc((100vw - 46rem) * 0.004), 0.16em);
}
/* Shade keeps header ink readable over any photo: solid scrim while the items
   sit on it (top 4.75rem), then a long soft fade */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 10.5rem;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--scrim) 0 5.5rem, transparent);
}
:root[data-theme="contrast"] .site-header { background: #000; border-bottom: 2px solid #fff; }
:root[data-theme="contrast"] .site-header::before { display: none; }
@media (prefers-contrast: more) {
  :root:not([data-theme]) .site-header { background: #000; border-bottom: 2px solid #fff; }
  :root:not([data-theme]) .site-header::before { display: none; }
}
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  min-height: var(--header-h);
  padding: var(--space-1) var(--gutter);
}
/* Logo left, navigation centred on the page, tools stacked at the far right */
@media (min-width: 46.01rem) {
  .site-header .container { display: grid; grid-template-columns: 1fr auto 1fr; }
  .brand { justify-self: start; }
  .header-tools { justify-self: end; }
}
.header-tools { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; white-space: nowrap; }
.site-header a { color: inherit; }
.brand { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; }
.brand img { height: 2.25rem; width: auto; }
.brand-chip { background: #fff; padding: 0.2rem 0.4rem; border-radius: var(--radius); }

.header-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0 0.4rem;
  font: 800 var(--header-font)/1.2 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: var(--header-track);
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.header-tool svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-ls { text-decoration: underline; text-underline-offset: 0.3em; }
/* Without JS: a plain light/dark switch instead of the prefs panel (lasts for this page view) */
.js .theme-nojs { display: none; }
.theme-nojs:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-halo); border-radius: 2px; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]):has(#theme-nojs:checked) { color-scheme: dark; --logo-filter: none; --mark-opacity: 0.12; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):has(#theme-nojs:checked) { color-scheme: light; --logo-filter: var(--logo-blue); --mark-opacity: 0.06; }
}

.nav-toggle {
  display: none;            /* revealed on small screens when JS is available */
  place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 0;
  color: var(--pill-ink);
  background: var(--pill-bg);
  cursor: pointer;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

#primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) clamp(0.7rem, 2.2vw, 2rem);
  margin: 0; padding: 0;
  font: 800 var(--header-font)/1.2 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: var(--header-track);
}
#primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}
#primary-nav a:hover { text-decoration: underline; text-underline-offset: 0.4em; }
.nav-cta {
  padding: 0 clamp(0.8rem, 1.8vw, 1.5rem);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink) !important;
}
.nav-cta:hover { text-decoration: none !important; filter: brightness(0.92); }

@media (max-width: 46rem) {
  .header-tool { letter-spacing: 0.08em; }
  .header-tool:not(.theme-nojs) .tool-text { display: none; }      /* icon-only, name via aria-label */
}
@media (max-width: 46rem) {
  .js .site-header .container { flex-wrap: nowrap; }
  .brand, .header-tools { flex: none; }
  #primary-nav { order: 3; flex-basis: 100%; }    /* without JS: full row below */
  #primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  #primary-nav a { min-height: 3.25rem; font-size: 1.1rem; }
  .nav-cta { justify-content: center; margin-top: var(--space-2); }

  /* Collapse behind the round menu button only when JS is present */
  .js .nav-toggle { display: inline-grid; }
  .js #primary-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    padding: var(--space-2) var(--gutter) var(--space-4);
    background: var(--bg);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1.5rem 2rem rgb(0 0 0 / 0.25);
  }
  .js #primary-nav.is-open { display: block; }
  .js #primary-nav .nav-cta { background: var(--text); color: var(--bg) !important; }
}
@media (max-width: 22rem) {
  .header-ls { font-size: 0.8rem; letter-spacing: 0.02em; padding: 0; }
  .site-header .container { gap: var(--space-1); }
}

/* ---------- Display preferences panel (prefs.js) ---------- */
.prefs-toggle { display: none; }
.js .prefs-toggle { display: inline-flex; }
.prefs {
  position: absolute;
  right: var(--gutter);
  top: calc(100% - var(--space-2));
  z-index: 60;
  width: min(20rem, calc(100vw - 2 * var(--gutter)));
  padding: var(--space-3);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.3);
}
.prefs fieldset { border: 0; padding: 0; margin: 0; }
.prefs fieldset + fieldset { margin-top: var(--space-3); }
.prefs legend { margin-bottom: var(--space-1); }
.prefs label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-size: var(--step-0);
  cursor: pointer;
}
.prefs input { width: 1.25rem; height: 1.25rem; accent-color: var(--focus); margin: 0; }

/* ---------- Dot navigation (right edge) ---------- */
.slide-dots {
  position: fixed;
  right: calc(var(--gutter) - 0.75rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  color: var(--on-photo);
}
.slide-dots ul { display: flex; flex-direction: column; gap: 0.5rem; }
.slide-dots a {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.5rem; height: 1.5rem;    /* 24px target (WCAG 2.5.8) */
  color: inherit;
}
.slide-dots a::before {
  content: '';
  width: 0.75rem; height: 0.75rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow: 0 0 0 2px var(--halo);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.slide-dots a[aria-current="true"]::before { background: currentColor; transform: scale(1.15); }
.slide-dots a:hover::before { transform: scale(1.3); }
.slide-dots .dot-label {
  position: absolute;
  right: calc(100% + 0.5rem);
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font: 800 0.85rem/1.4 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  /* hidden visually until hover/focus; always in the accessible name. It is part
     of the link, so the pointer can move onto it without it vanishing (WCAG 1.4.13) */
  clip-path: inset(50%);
}
.slide-dots a:hover .dot-label,
.slide-dots a:focus-visible .dot-label { clip-path: none; }
.slide-dots.labels-off .dot-label { clip-path: inset(50%) !important; }   /* Esc dismisses (WCAG 1.4.13) */
/* Past the last slide: fade out for the pointer, come back when keyboard focus arrives */
.slide-dots { transition: opacity 0.2s ease; }
.slide-dots.is-past:not(:focus-within) { opacity: 0; pointer-events: none; }
@media (max-width: 30rem) { .slide-dots { display: none; } }

/* "Next slide" button (created by slides.js) */
.next-slide {
  position: fixed;
  right: var(--gutter);
  bottom: var(--space-3);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  border: 0;
  border-radius: 50%;
  color: var(--pill-ink);
  background: var(--pill-bg);
  cursor: pointer;
  box-shadow: 0 0.25rem 1rem rgb(0 0 0 / 0.25);
}
.next-slide svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.next-slide[hidden] { display: none; }

/* ---------- Slides ---------- */
.slide {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + var(--space-4)) var(--gutter) var(--space-6);
  background: var(--bg);
  color: var(--text);
  contain: paint;             /* clips the Ken Burns zoom and scrim edge; content never: slides grow */
  text-align: center;
}
/* Card stack: each slide sticks, the next one slides over it. --stick is set by
   slides.js: 0 for slides that fit the viewport, negative for taller ones so they
   stick only once their bottom edge is reached and nothing gets covered unread. */
.stack .slide {
  position: sticky;
  top: var(--stick, 0px);
}
.stack .slide, .stack .slide:focus { box-shadow: 0 -1rem 2.5rem rgb(0 0 0 / 0.28); }
.slide-anchor { height: 0; }

.slide-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
}
.slide-inner > * + * { margin-top: var(--space-3); }
.slide-inner > p, .slide-inner > ul:not([class]) { margin-inline: auto; }
.slide h1, .slide h2 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 4rem); line-height: 1.08; }
.slide .lead { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.7rem); line-height: 1.55; font-weight: 400; }
.slide :is(p, li) { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem); line-height: 1.6; }
.slide-logo { margin-inline: auto; width: min(100%, var(--logo-w, 14rem)); }
.slide-logo--hero { --logo-w: 34rem; }

/* Photo background, veil and Ken Burns */
.slide--photo { background: var(--photo-base); color: var(--on-photo); }
.slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}
.slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--veil);
  opacity: var(--fade, 0.2);
}
@keyframes ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.12) translate(-1%, -1%); }
}
@media (prefers-reduced-motion: no-preference) {
  /* Only with JS: then the "Bewegung" switch exists to stop it (WCAG 2.2.2) */
  :root.js:not([data-motion="off"]) .slide-bg { animation: ken-burns 40s ease-in-out infinite alternate; }
}

/* Local scrim behind text on photos: solid core (guaranteed contrast), soft edge */
.slide--photo .slide-inner { padding: var(--space-3) var(--space-4); }
.slide--photo .slide-inner::before {
  --feather: 7rem;
  content: '';
  position: absolute;
  inset: calc(-1 * var(--feather));
  z-index: -1;
  background: var(--scrim);
  /* Solid over the text box itself, feathered only outside it */
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--feather), #000 calc(100% - var(--feather)), transparent);
  mask-composite: intersect;
}
.slide--photo .slide-inner.is-bare::before { display: none; }   /* logo-only slide */
.slide--photo :is(h1, h2, h3, h4, p, li, a:not(.nav-cta)) { color: var(--on-photo); }
.slide--photo a { text-decoration: underline; }   /* links on photos keep the ink colour, identified by underline (WCAG 1.4.1) */

/* Plain slides (no photo) with an optional decorative logo watermark */
.slide-mark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(80%, 56rem);
  opacity: var(--mark-opacity);
  pointer-events: none;
}

/* Brand slides: solid site colour (IFD green, e.V. blue) with white ink */
.slide--brand { background: var(--brand); color: #fff; }
.slide--brand :is(h1, h2, h3, h4, p, li, a) { color: #fff; }
.slide--brand a { text-decoration: underline; }
.slide--brand { --logo-filter: none; }
.slide--brand { --halo: rgb(0 0 0 / 0.35); }
/* Header and dots over a brand slide: the solid brand colour already carries white ink */
.site-header.on-brand { color: #fff; background: var(--brand); }
/* White ring on the brand colour; the prefs panel keeps its own surface and accent */
.site-header.on-brand :is(.brand, .nav-toggle, .header-tools > a, .header-tools > button):focus-visible,
.site-header.on-brand #primary-nav a:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px #000; }
.site-header.on-brand::before { display: none; }
.site-header.on-brand { --logo-filter: none; }
.slide-dots.on-brand { color: #fff; --halo: rgb(0 0 0 / 0.35); }

/* Logo lockup: display serif name over a caps place line (IFD) */
.lockup span {
  display: block;
  margin-top: 0.3em;
  font: 800 clamp(1rem, 0.8rem + 0.8vw, 1.5rem)/1.2 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.24em;
}
.strong-link { font: 700 var(--step-1)/1.3 var(--font-body); }

/* White logos turn blue on light schemes; hero logos carry no .logo-white and stay white */
.logo-white { filter: var(--logo-filter); }
:root[data-theme="light"] { --logo-filter: var(--logo-blue); --mark-opacity: 0.06; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --logo-filter: var(--logo-blue); --mark-opacity: 0.06; } }
@media (prefers-color-scheme: light) and (prefers-contrast: more) { :root:not([data-theme]) { --logo-filter: none; } }
/* The white hero logo is a design element: a soft shadow keeps it visible on bright photos */
.slide--photo .slide-logo--hero { filter: drop-shadow(0 0.1rem 0.6rem rgb(0 0 0 / 0.65)); }
:root[data-theme="contrast"] .slide--photo .slide-logo--hero { filter: none; }
@media (prefers-contrast: more) { :root:not([data-theme]) .slide--photo .slide-logo--hero { filter: none; } }

/* High contrast: no photos, no watermarks, everything underlined */
:root[data-theme="contrast"] :is(.slide-bg, .slide-mark) { display: none; }
:root[data-theme="contrast"] .slide--brand { background: #000; }
:root[data-theme="contrast"] .slide { box-shadow: none; border-top: 2px solid #fff; }
:root[data-theme="contrast"] a { text-decoration: underline; }
@media (prefers-contrast: more) {
  :root:not([data-theme]) :is(.slide-bg, .slide-mark) { display: none; }
  :root:not([data-theme]) .slide--brand { background: #000; }
  :root:not([data-theme]) .slide { box-shadow: none; border-top: 2px solid #fff; }
  :root:not([data-theme]) a { text-decoration: underline; }
}
@media (forced-colors: active) {
  .slide-bg, .slide-mark { display: none; }
  .slide-dots a::before { forced-color-adjust: none; border-color: CanvasText; }
  .slide-dots a[aria-current="true"]::before { background: Highlight; }
}

/* ---------- Slide content blocks ---------- */
/* Third-level headings in slides are the original's small caps labels */
.slide h3 {
  font: 800 0.9rem/1.4 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.slide-logo.logo-chip { background: #fff; padding: 0.75rem 1rem; border-radius: 0.75rem; }
/* Organisation overview: logo + caps label + short text, no box (original layout) */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5) !important;
}
.org-grid li { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.org-grid .card-link { align-items: center; }
.org-grid img { height: 5rem; width: auto; }
.org-grid h3 { font-size: 1.05rem; }
.org-grid p { font-size: var(--step-1); }

/* Contact / bank details: caps labels, values in the display serif */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5) !important;
}
.info-grid h3 { margin-bottom: 0.4rem; }
.info-grid p { margin-inline: auto; font-family: var(--font-head); font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.7rem); line-height: 1.45; }
.info-grid p + h3 { margin-top: var(--space-3); }
.slide .note { font-size: 1.1rem; }

/* Framed box with cards (news, press): rounded, bordered, solid backdrop */
.card-box {
  margin-top: var(--space-5) !important;
  padding: var(--space-4);
  border: 3px solid var(--on-photo);
  border-radius: 1.25rem;
  background: light-dark(rgb(255 255 255 / 0.9), rgb(30 30 30 / 0.9));
  text-align: left;
}
:root[data-theme="contrast"] .card-box { background: #000; }
@media (max-width: 30rem) {
  .card-box { padding: var(--space-3) var(--space-2); }
  .slide--photo .slide-inner { padding-inline: 0; }
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-4);
}
.card { display: flex; flex-direction: column; gap: var(--space-1); }
.card img { width: 100%; max-width: 20.625rem; aspect-ratio: 330 / 242; object-fit: cover; object-position: top; }
.card h3 { margin-top: var(--space-1); }
.card p { font-size: 1.35rem; line-height: 1.45; }
.card-link { display: flex; flex-direction: column; gap: var(--space-1); text-decoration: none !important; color: inherit; }
.card-link:focus-visible { outline-offset: 4px; }
.card-link:hover .card-title { text-decoration: underline; text-underline-offset: 0.3em; }

/* Coloured tile with a decorative pictogram (aria-hidden); the heading carries the meaning */
.card-tile {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 20.625rem;
  aspect-ratio: 330 / 242;
  background: var(--tile-bg);
  color: var(--tile-ink);
}
:root[data-theme="contrast"] .card-tile { border: 2px solid #fff; }
.card-tile svg {
  width: 45%; height: auto;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.card-tile--foerder { --tile-bg: var(--tile-green); }
.card-tile--zeiten  { --tile-bg: var(--tile-blue); }

/* Plain bulleted lists inside slides stay left aligned for reading */
ul.slide-list { display: inline-block; list-style: disc; text-align: left; padding-left: 1.5rem !important; font-size: var(--step-1); }
.slide-list li + li { margin-top: 0.4rem; }

/* ---------- Paper sections (Leichte Sprache, legal): normal flow, left aligned ---------- */
.paper {
  position: relative;
  z-index: 1;               /* slides over the last stacked slide */
  padding: var(--space-6) var(--gutter);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 -1rem 2.5rem rgb(0 0 0 / 0.2);
}
.paper:nth-of-type(even) { background: var(--surface); }
.paper > .container { max-width: 48rem; margin-inline: auto; }
.paper > .container > * + * { margin-top: var(--space-2); }
.paper h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.paper h3 { font-size: var(--step-0); text-transform: uppercase; letter-spacing: 0.12em; margin-top: var(--space-4); }
.paper h4 { font-size: var(--step-0); margin-top: var(--space-3); }
.paper ul { max-width: 65ch; padding-left: 1.25rem; }
.paper li { margin-bottom: 0.4rem; }

/* Leichte Sprache: larger type, generous spacing, no caps, one sentence per line */
.easy-read { font-size: 1.4rem; line-height: 1.7; }
.easy-read h3 { font-size: 1.5rem; text-transform: none; letter-spacing: 0; margin-top: var(--space-5); }
.easy-read ul { padding-left: 1.5rem; }
.easy-read li + li { margin-top: var(--space-1); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--space-5) var(--gutter);
  font: 400 var(--step--1)/1.6 var(--font-ui);
}
.site-footer a { color: var(--footer-link); }
.site-footer :focus-visible { outline-color: var(--footer-link); box-shadow: 0 0 0 6px var(--footer-bg); }
.site-footer .container { display: grid; grid-template-columns: auto auto auto; justify-content: space-between; gap: var(--space-3) var(--space-4); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.footer-nav a { min-height: 2rem; display: inline-flex; align-items: center; }
.footer-nav a[aria-current="page"] { font-weight: 800; text-decoration: none; }
.footer-contact p, .footer-meta p { margin: 0.25rem 0; }
.footer-meta .footer-nav { margin-top: 0.25rem; }
.footer-credit { grid-column: 1 / -1; max-width: none; margin: 0; color: var(--footer-muted); }
/* Stand-alone credit line, not part of the offer: no underline except on hover, focus and in high contrast */
.site-footer .footer-credit a { color: var(--footer-muted); text-decoration: none; }
.site-footer .footer-credit a:is(:hover, :focus-visible) { text-decoration: underline; }
:root[data-theme="contrast"] .site-footer .footer-credit a { text-decoration: underline; }
@media (prefers-contrast: more) { :root:not([data-theme]) .site-footer .footer-credit a { text-decoration: underline; } }
/* Link groups stack in place first; the columns only give way when three no longer fit */
@media (max-width: 79rem) {
  .site-footer .container { column-gap: var(--space-3); }
  .footer-nav ul { flex-direction: column; gap: 0; }
}
@media (max-width: 50rem) {
  .site-footer .container { grid-template-columns: 1fr; }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ---------- Reduced motion (WCAG 2.3.3) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}

/* ---------- Print: plain flow, no fixed chrome ---------- */
@media print {
  .stack .slide { position: static; box-shadow: none; }
  .site-header, .slide-dots, .next-slide, .prefs { display: none !important; }
  .slide-logo--hero { filter: var(--logo-blue) !important; }    /* white on paper would vanish */
  .slide { min-height: 0; padding-top: var(--space-4); }
}
