/* Januam design system — single entry point.
 *
 * The build inlines every local @import below into one fingerprinted file, so
 * the browser makes exactly one CSS request while the source stays split by
 * concern. Order matters: tokens first, utilities last.
 */

/* --- css/parts/_tokens.css --- */
/* Design tokens.
 *
 * This is the file to replace when a new visual identity arrives: every colour,
 * space, radius and type step in the site resolves through these variables, so
 * re-theming never means touching a component.
 *
 * Palette: a deep teal that reads institutional and trustworthy, warmed by an
 * ember accent — Januam means "doorway", and the accent is the light through it.
 */

:root {
  color-scheme: light dark;

  /* ---------------------------------------------------------- brand scale */
  --brand-50:  #eaf6f8;
  --brand-100: #cde9ee;
  --brand-200: #9dd3dd;
  --brand-300: #66b6c6;
  --brand-400: #3a96aa;
  --brand-500: #1e7a8e;
  --brand-600: #146175;
  --brand-700: #114f5f;
  --brand-800: #0f3f4c;
  --brand-900: #0c2f39;

  --accent-50:  #fef4ec;
  --accent-100: #fce3ce;
  --accent-200: #f8c69c;
  --accent-300: #f2a366;
  --accent-400: #ea8740;
  --accent-500: #d96f25;
  --accent-600: #b7571b;
  --accent-700: #914418;
  --accent-800: #6e3416;
  --accent-900: #4a2311;

  /* Warm neutrals — a pure grey next to teal reads cold and clinical. */
  --neutral-0:   #ffffff;
  --neutral-25:  #fbfaf8;
  --neutral-50:  #f6f4f1;
  --neutral-100: #edeae5;
  --neutral-200: #ddd8d1;
  --neutral-300: #c3bcb2;
  --neutral-400: #9c948a;
  --neutral-500: #78716a;
  --neutral-600: #5c5650;
  --neutral-700: #453f3b;
  --neutral-800: #2d2926;
  --neutral-900: #1b1917;
  --neutral-950: #100f0e;

  --success-500: #2f855a;
  --success-50:  #eaf6ef;
  --warning-500: #b7791f;
  --warning-50:  #fdf6e7;
  --danger-500:  #c53030;
  --danger-50:   #fdeeee;

  /* ------------------------------------------------- semantic assignments */
  --surface:          var(--neutral-0);
  --surface-sunken:   var(--neutral-50);
  --surface-raised:   var(--neutral-0);
  --surface-inverse:  var(--brand-900);
  --surface-brand:    var(--brand-700);
  --surface-accent:   var(--accent-50);

  --text:             var(--neutral-900);
  --text-muted:       var(--neutral-600);
  --text-subtle:      var(--neutral-500);
  --text-inverse:     var(--neutral-0);
  --text-on-brand:    var(--neutral-0);
  --text-link:        var(--brand-600);
  --text-link-hover:  var(--brand-800);

  --border:           var(--neutral-200);
  --border-strong:    var(--neutral-300);
  --border-subtle:    var(--neutral-100);
  --border-inverse:   color-mix(in oklab, var(--neutral-0) 22%, transparent);

  --focus-ring:       var(--accent-500);

  /* ------------------------------------------------------------ typography */
  /* System stacks keep first paint instant and avoid shipping a third-party
   * font request, which German data-protection guidance advises against.
   * To adopt a self-hosted face, set --font-sans / --font-display in
   * _fonts.css — nothing else needs to change. */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  /* Arabic needs a face with proper shaping; these ship with the OS. */
  --font-arabic: "Noto Naskh Arabic", "Segoe UI", "Geeza Pro", "Times New Roman", serif;

  /* A fluid type scale: each step interpolates between 360px and 1280px
   * viewports, so headings stay proportional without breakpoint juggling. */
  --step--1: clamp(0.833rem, 0.80rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.38vw, 1.4rem);
  --step-2:  clamp(1.44rem, 1.30rem + 0.68vw, 1.8rem);
  --step-3:  clamp(1.728rem, 1.50rem + 1.10vw, 2.35rem);
  --step-4:  clamp(2.074rem, 1.72rem + 1.70vw, 3rem);
  --step-5:  clamp(2.488rem, 1.96rem + 2.55vw, 3.9rem);
  --step-6:  clamp(2.986rem, 2.20rem + 3.75vw, 5rem);

  --leading-tight: 1.12;
  --leading-snug: 1.28;
  --leading-normal: 1.6;
  --leading-relaxed: 1.72;

  --tracking-tight: -0.022em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-caps: 0.08em;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ---------------------------------------------------------------- space */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2rem;
  --space-xl:  3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Vertical rhythm between page sections, tighter on phones. */
  --section-gap: clamp(3rem, 2rem + 5vw, 6.5rem);
  --section-gap-tight: clamp(2rem, 1.5rem + 3vw, 4rem);

  /* --------------------------------------------------------------- layout */
  --width-full: 100%;
  --width-wide: 82rem;    /* hero imagery, wide galleries */
  --width-page: 72rem;    /* default content container */
  --width-text: 44rem;    /* long-form prose — ~70 characters */
  --width-narrow: 34rem;  /* forms, single-column cards */
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 2.5rem);

  /* --------------------------------------------------------------- shape */
  --radius-xs: 3px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --border-width: 1px;

  --shadow-xs: 0 1px 2px rgb(16 15 14 / 0.05);
  --shadow-s:  0 1px 3px rgb(16 15 14 / 0.07), 0 1px 2px rgb(16 15 14 / 0.04);
  --shadow-m:  0 4px 12px rgb(16 15 14 / 0.07), 0 2px 4px rgb(16 15 14 / 0.04);
  --shadow-l:  0 12px 28px rgb(16 15 14 / 0.10), 0 4px 8px rgb(16 15 14 / 0.05);
  --shadow-xl: 0 24px 56px rgb(16 15 14 / 0.14), 0 8px 16px rgb(16 15 14 / 0.06);

  /* -------------------------------------------------------------- motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration-base: 220ms;
  --duration-slow: 420ms;

  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 100;
  --z-header: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* Dark theme. Guarded so an explicit data-theme="light" always wins, which the
 * theme toggle relies on. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface:         var(--neutral-950);
    --surface-sunken:  #171614;
    --surface-raised:  var(--neutral-900);
    --surface-inverse: var(--neutral-0);
    --surface-brand:   var(--brand-800);
    --surface-accent:  color-mix(in oklab, var(--accent-500) 14%, var(--neutral-950));

    --text:            var(--neutral-50);
    --text-muted:      var(--neutral-300);
    --text-subtle:     var(--neutral-400);
    --text-inverse:    var(--neutral-950);
    --text-on-brand:   var(--neutral-0);
    --text-link:       var(--brand-200);
    --text-link-hover: var(--brand-100);

    --border:          color-mix(in oklab, var(--neutral-0) 14%, transparent);
    --border-strong:   color-mix(in oklab, var(--neutral-0) 24%, transparent);
    --border-subtle:   color-mix(in oklab, var(--neutral-0) 8%, transparent);
    --border-inverse:  color-mix(in oklab, var(--neutral-950) 20%, transparent);

    --focus-ring:      var(--accent-300);

    --success-50: color-mix(in oklab, var(--success-500) 18%, var(--neutral-950));
    --warning-50: color-mix(in oklab, var(--warning-500) 18%, var(--neutral-950));
    --danger-50:  color-mix(in oklab, var(--danger-500) 18%, var(--neutral-950));

    /* Shadows read as noise on dark surfaces; borders carry elevation instead. */
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-s:  0 1px 3px rgb(0 0 0 / 0.5);
    --shadow-m:  0 4px 12px rgb(0 0 0 / 0.5);
    --shadow-l:  0 12px 28px rgb(0 0 0 / 0.55);
    --shadow-xl: 0 24px 56px rgb(0 0 0 / 0.6);
  }
}

:root[data-theme="dark"] {
  --surface:         var(--neutral-950);
  --surface-sunken:  #171614;
  --surface-raised:  var(--neutral-900);
  --surface-inverse: var(--neutral-0);
  --surface-brand:   var(--brand-800);
  --surface-accent:  color-mix(in oklab, var(--accent-500) 14%, var(--neutral-950));

  --text:            var(--neutral-50);
  --text-muted:      var(--neutral-300);
  --text-subtle:     var(--neutral-400);
  --text-inverse:    var(--neutral-950);
  --text-on-brand:   var(--neutral-0);
  --text-link:       var(--brand-200);
  --text-link-hover: var(--brand-100);

  --border:          color-mix(in oklab, var(--neutral-0) 14%, transparent);
  --border-strong:   color-mix(in oklab, var(--neutral-0) 24%, transparent);
  --border-subtle:   color-mix(in oklab, var(--neutral-0) 8%, transparent);
  --border-inverse:  color-mix(in oklab, var(--neutral-950) 20%, transparent);

  --focus-ring:      var(--accent-300);

  --success-50: color-mix(in oklab, var(--success-500) 18%, var(--neutral-950));
  --warning-50: color-mix(in oklab, var(--warning-500) 18%, var(--neutral-950));
  --danger-50:  color-mix(in oklab, var(--danger-500) 18%, var(--neutral-950));

  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-s:  0 1px 3px rgb(0 0 0 / 0.5);
  --shadow-m:  0 4px 12px rgb(0 0 0 / 0.5);
  --shadow-l:  0 12px 28px rgb(0 0 0 / 0.55);
  --shadow-xl: 0 24px 56px rgb(0 0 0 / 0.6);
}

/* --- css/parts/_fonts.css --- */
/* Self-hosted webfonts.
 *
 * Nothing is loaded by default: the site ships with the system font stack, which
 * paints instantly and — unlike a Google Fonts request — sends no visitor IP to a
 * third party, which German data-protection rulings (LG München I, 3 O 17493/20)
 * have found to require consent.
 *
 * To adopt a brand typeface:
 *   1. drop the .woff2 files into static/fonts/
 *   2. uncomment and adjust the @font-face rules below
 *   3. point --font-sans / --font-display at the family
 *
 * Keep `font-display: swap` so text is readable while the font downloads, and
 * prefer a variable font — one file covers every weight.
 */

/*
@font-face {
  font-family: "Januam Sans";
  src: url("../fonts/januam-sans-variable.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F, U+2000-206F, U+20A0-20BF;
}

@font-face {
  font-family: "Januam Display";
  src: url("../fonts/januam-display-variable.woff2") format("woff2-variations");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Januam Sans", system-ui, sans-serif;
  --font-display: "Januam Display", var(--font-sans);
}
*/

/* --- css/parts/_base.css --- */
/* Reset and element defaults.
 *
 * Everything here uses logical properties (inline/block, start/end) rather than
 * left/right, so enabling Arabic is a `dir="rtl"` change and nothing more.
 */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky header height, so in-page anchors do not land under it. */
  scroll-padding-block-start: 6rem;
  hanging-punctuation: first last;
}

body {
  margin: 0;
  min-block-size: 100svh;
  background-color: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading-normal);
  font-weight: var(--weight-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
  /* Long German compounds ("Sprachförderprogramm") overflow narrow columns
   * without this; the browser hyphenates using the lang attribute's dictionary. */
  overflow-wrap: break-word;
}

:lang(ar) body,
[dir="rtl"] body {
  font-family: var(--font-arabic);
}

/* ------------------------------------------------------------- typography */

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

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }
h5 { font-size: var(--step-1); }
h6 {
  font-size: var(--step-0);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--text-link);
  text-decoration-thickness: max(1px, 0.06em);
  text-underline-offset: 0.18em;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--text-link-hover);
}

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

small { font-size: var(--step--1); }

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

code {
  padding: 0.15em 0.4em;
  border-radius: var(--radius-xs);
  background-color: var(--surface-sunken);
}

pre {
  overflow-x: auto;
  padding: var(--space-s);
  border-radius: var(--radius-m);
  background-color: var(--surface-sunken);
  border: var(--border-width) solid var(--border-subtle);
}

pre code {
  padding: 0;
  background: none;
}

blockquote {
  margin: 0;
}

hr {
  border: 0;
  block-size: var(--border-width);
  background-color: var(--border);
}

/* ----------------------------------------------------------------- media */

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

img {
  /* Prevents layout shift while a photo loads, when width/height are absent. */
  background-color: var(--surface-sunken);
}

svg {
  fill: currentColor;
}

figure { margin: 0; }

/* ----------------------------------------------------------------- lists */

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

/* ----------------------------------------------------------------- forms */

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

textarea {
  resize: vertical;
  min-block-size: 8rem;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

::placeholder {
  color: var(--text-subtle);
  opacity: 1;
}

/* ----------------------------------------------------------------- tables */

table {
  inline-size: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th {
  text-align: start;
  font-weight: var(--weight-semibold);
}

/* ------------------------------------------------------------- selection */

::selection {
  background-color: var(--accent-200);
  color: var(--neutral-900);
}

/* --------------------------------------------------------------- focus */

/* A single, high-contrast focus treatment everywhere. Keyboard users get it;
 * pointer users do not, which keeps the visual noise down. */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------- motion */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------- skip navigation */

.skip-link {
  position: absolute;
  inset-block-start: var(--space-2xs);
  inset-inline-start: var(--space-2xs);
  z-index: var(--z-toast);
  padding: var(--space-2xs) var(--space-s);
  border-radius: var(--radius-s);
  background-color: var(--surface-brand);
  color: var(--text-on-brand);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--space-s)));
  transition: transform var(--duration-base) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--text-on-brand);
}

/* ------------------------------------------------- screen-reader helpers */

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- css/parts/_layout.css --- */
/* Layout primitives.
 *
 * Six composable pieces do almost all the structural work: a container, a
 * vertical stack, a cluster, a responsive grid, a split, and a section band.
 * Blocks arrange these rather than inventing their own geometry.
 */

/* ------------------------------------------------------------- container */

.container {
  inline-size: min(var(--width-page), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.container--wide   { inline-size: min(var(--width-wide), 100% - var(--gutter) * 2); }
.container--text   { inline-size: min(var(--width-text), 100% - var(--gutter) * 2); }
.container--narrow { inline-size: min(var(--width-narrow), 100% - var(--gutter) * 2); }
.container--full   { inline-size: 100%; }

/* ------------------------------------------------------------------ stack */

/* Vertical rhythm via the owl selector: margin only appears *between*
 * children, so a stack never adds stray space at its own edges. */
.stack > * + * {
  margin-block-start: var(--stack-gap, var(--space-s));
}

.stack--2xs { --stack-gap: var(--space-3xs); }
.stack--xs  { --stack-gap: var(--space-2xs); }
.stack--s   { --stack-gap: var(--space-xs); }
.stack--m   { --stack-gap: var(--space-m); }
.stack--l   { --stack-gap: var(--space-l); }
.stack--xl  { --stack-gap: var(--space-xl); }
.stack--2xl { --stack-gap: var(--space-2xl); }

/* ---------------------------------------------------------------- cluster */

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

.cluster--s  { --cluster-gap: var(--space-2xs); }
.cluster--m  { --cluster-gap: var(--space-s); }
.cluster--l  { --cluster-gap: var(--space-m); }
.cluster--between { justify-content: space-between; }
.cluster--center  { justify-content: center; }
.cluster--end     { justify-content: flex-end; }
.cluster--baseline { --cluster-align: baseline; }

/* ------------------------------------------------------------------- grid */

/* Auto-fitting grid: items claim at least --grid-min and share the row.
 * min() guards the single-column case on very narrow phones. */
.grid {
  display: grid;
  gap: var(--grid-gap, var(--space-m));
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(var(--grid-min, 18rem), 100%), 1fr)
  );
}

.grid--2 { --grid-min: 22rem; }
.grid--3 { --grid-min: 17rem; }
.grid--4 { --grid-min: 13rem; }
.grid--5 { --grid-min: 10rem; }
.grid--gap-s { --grid-gap: var(--space-s); }
.grid--gap-l { --grid-gap: var(--space-l); }

/* Fixed column counts once there is room for them. */
.grid--fixed-2,
.grid--fixed-3,
.grid--fixed-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .grid--fixed-2 { grid-template-columns: repeat(2, 1fr); }
  .grid--fixed-3 { grid-template-columns: repeat(2, 1fr); }
  .grid--fixed-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .grid--fixed-3 { grid-template-columns: repeat(3, 1fr); }
  .grid--fixed-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------------ split */

/* Two columns that stack on small screens. --split-ratio sets the balance. */
.split {
  display: grid;
  gap: var(--split-gap, var(--space-xl));
  align-items: var(--split-align, start);
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: var(--split-ratio, 1fr 1fr);
  }

  .split--sidebar    { --split-ratio: minmax(0, 2fr) minmax(16rem, 1fr); }
  .split--sidebar-start { --split-ratio: minmax(16rem, 1fr) minmax(0, 2fr); }
  .split--wide-start { --split-ratio: minmax(0, 3fr) minmax(0, 2fr); }
  .split--wide-end   { --split-ratio: minmax(0, 2fr) minmax(0, 3fr); }
  .split--center     { --split-align: center; }
}

/* Reverses visual order without touching the DOM, so screen readers and
 * keyboard order keep following the source. */
@media (min-width: 52rem) {
  .split--reverse > :first-child { order: 2; }
  .split--reverse > :last-child  { order: 1; }
}

/* ---------------------------------------------------------------- section */

.section {
  padding-block: var(--section-padding, var(--section-gap));
}

.section--tight { --section-padding: var(--section-gap-tight); }
.section--flush-start { padding-block-start: 0; }
.section--flush-end   { padding-block-end: 0; }

/* Tonal bands give a long page rhythm without extra graphics. */
.section--sunken  { background-color: var(--surface-sunken); }
.section--accent  { background-color: var(--surface-accent); }

.section--brand {
  background-color: var(--surface-brand);
  color: var(--text-on-brand);
}

.section--inverse {
  background-color: var(--surface-inverse);
  color: var(--text-inverse);
}

/* Inside a dark band, headings, borders and links must follow the band. */
.section--brand :is(h1, h2, h3, h4, h5, h6),
.section--inverse :is(h1, h2, h3, h4, h5, h6) {
  color: inherit;
}

.section--brand a:not(.button),
.section--inverse a:not(.button) {
  color: inherit;
  text-decoration-color: color-mix(in oklab, currentColor 45%, transparent);
}

.section--brand a:not(.button):hover,
.section--inverse a:not(.button):hover {
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------- page */

.page-body {
  display: flex;
  flex-direction: column;
  min-block-size: 100svh;
}

.page-main {
  flex: 1;
}

/* ------------------------------------------------------------ full bleed */

/* Lets a child of a container escape it and span the viewport — used by
 * full-width imagery inside prose. */
.full-bleed {
  inline-size: 100vw;
  margin-inline-start: 50%;
  transform: translateX(-50%);
  max-inline-size: none;
}

[dir="rtl"] .full-bleed {
  transform: translateX(50%);
}

/* --- css/parts/_components.css --- */
/* Reusable components: buttons, cards, badges, prose, forms, media. */

/* --------------------------------------------------------------- eyebrow */

/* The small caps label above a heading — it orients the reader before the
 * headline does, and carries the accent colour through the page. */
.eyebrow {
  display: block;
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--accent-600);
}

.section--brand .eyebrow,
.section--inverse .eyebrow {
  color: var(--accent-300);
}

.lead {
  font-size: var(--step-1);
  line-height: var(--leading-snug);
  color: var(--text-muted);
  text-wrap: pretty;
}

.section--brand .lead,
.section--inverse .lead {
  color: color-mix(in oklab, currentColor 82%, transparent);
}

/* --------------------------------------------------------------- buttons */

.button {
  --button-bg: var(--brand-700);
  --button-fg: var(--neutral-0);
  --button-border: var(--brand-700);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding-block: 0.7em;
  padding-inline: 1.4em;
  border: var(--border-width) solid var(--button-border);
  border-radius: var(--radius-pill);
  background-color: var(--button-bg);
  color: var(--button-fg);
  font-size: var(--step-0);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  /* Below the 44px WCAG target only when the label is tiny; this guarantees it. */
  min-block-size: 2.75rem;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.button:hover {
  --button-bg: var(--brand-800);
  --button-border: var(--brand-800);
  color: var(--button-fg);
}

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

.button[aria-disabled="true"],
.button:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.button--accent {
  --button-bg: var(--accent-500);
  --button-fg: var(--neutral-0);
  --button-border: var(--accent-500);
}

.button--accent:hover {
  --button-bg: var(--accent-600);
  --button-border: var(--accent-600);
}

.button--secondary {
  --button-bg: transparent;
  --button-fg: var(--text-link);
  --button-border: var(--border-strong);
}

.button--secondary:hover {
  --button-bg: var(--surface-sunken);
  --button-fg: var(--text-link-hover);
  --button-border: var(--brand-600);
}

.button--ghost {
  --button-bg: transparent;
  --button-fg: var(--text);
  --button-border: transparent;
}

.button--ghost:hover {
  --button-bg: var(--surface-sunken);
  --button-fg: var(--text);
}

/* On a dark band the default fill disappears, so invert it. */
.section--brand .button--secondary,
.section--inverse .button--secondary {
  --button-fg: var(--neutral-0);
  --button-border: var(--border-inverse);
}

.section--brand .button--secondary:hover,
.section--inverse .button--secondary:hover {
  --button-bg: color-mix(in oklab, var(--neutral-0) 12%, transparent);
  --button-fg: var(--neutral-0);
  --button-border: var(--neutral-0);
}

.button--large {
  font-size: var(--step-1);
  padding-block: 0.75em;
  padding-inline: 1.6em;
}

.button--small {
  font-size: var(--step--1);
  padding-block: 0.5em;
  padding-inline: 1em;
  min-block-size: 2.25rem;
}

.button--full { inline-size: 100%; }

.button .icon {
  inline-size: 1.1em;
  block-size: 1.1em;
  flex: none;
}

/* Arrow nudge on hover — a small signal that the link goes somewhere. */
.button--arrow .icon {
  transition: transform var(--duration-base) var(--ease-out);
}

.button--arrow:hover .icon {
  transform: translateX(0.2em);
}

[dir="rtl"] .button--arrow .icon {
  transform: scaleX(-1);
}

[dir="rtl"] .button--arrow:hover .icon {
  transform: scaleX(-1) translateX(0.2em);
}

/* ------------------------------------------------------------- text link */

/* A standalone link that reads as an action without being a button. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform var(--duration-base) var(--ease-out);
}

[dir="rtl"] .link-arrow::after {
  content: "←";
}

.link-arrow:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.link-arrow:hover::after {
  transform: translateX(0.25em);
}

[dir="rtl"] .link-arrow:hover::after {
  transform: translateX(-0.25em);
}

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25em 0.75em;
  border-radius: var(--radius-pill);
  background-color: var(--surface-sunken);
  border: var(--border-width) solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

a.badge:hover {
  background-color: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
}

.badge--accent {
  background-color: var(--accent-50);
  border-color: var(--accent-200);
  color: var(--accent-700);
}

.badge--active {
  background-color: var(--success-50);
  border-color: color-mix(in oklab, var(--success-500) 30%, transparent);
  color: var(--success-500);
}

.badge--completed {
  background-color: var(--surface-sunken);
  color: var(--text-subtle);
}

.badge--dot::before {
  content: "";
  inline-size: 0.5em;
  block-size: 0.5em;
  border-radius: 50%;
  background-color: currentColor;
  flex: none;
}

/* ----------------------------------------------------------------- cards */

.card {
  display: flex;
  flex-direction: column;
  block-size: 100%;
  overflow: hidden;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-l);
  background-color: var(--surface-raised);
  transition:
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

/* Only cards that are entirely clickable lift. */
.card--link:hover,
.card--link:focus-within {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-m);
  transform: translateY(-2px);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--surface-sunken);
}

.card__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card--link:hover .card__media img {
  transform: scale(1.03);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-m);
  flex: 1;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  align-items: center;
  font-size: var(--step--1);
  color: var(--text-subtle);
}

.card__title {
  font-size: var(--step-2);
  line-height: var(--leading-snug);
  /* German compounds ("Computergrundkenntnisse") are longer than a card is
   * wide. Without this the global break-word splits them at an arbitrary
   * letter; hyphens: auto breaks at a syllable and shows the hyphen, using the
   * dictionary for the lang on <html>. */
  hyphens: auto;
  overflow-wrap: normal;
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

/* Stretched link: the whole card is the hit target, but only the title is in
 * the accessibility tree as the link. */
.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card--link { position: relative; }

.card__text {
  color: var(--text-muted);
  font-size: var(--step-0);
}

.card__footer {
  margin-block-start: auto;
  padding-block-start: var(--space-xs);
}

/* Anything interactive inside a stretched-link card needs to sit above it. */
.card__footer a,
.card__meta a,
.card .badge {
  position: relative;
  z-index: 1;
}

/* ----------------------------------------------------------------- prose */

/* Long-form content rendered from Markdown. Scoped tightly so it never leaks
 * into component markup. */
.prose {
  max-inline-size: var(--width-text);
  font-size: var(--step-0);
  line-height: var(--leading-relaxed);
  color: var(--text);
  hyphens: auto;
}

.prose > * + * {
  margin-block-start: var(--space-s);
}

.prose > :is(h2, h3, h4) {
  margin-block-start: var(--space-xl);
  margin-block-end: var(--space-xs);
}

.prose > :is(h2, h3, h4) + * {
  margin-block-start: 0;
}

.prose h2 { font-size: var(--step-3); }
.prose h3 { font-size: var(--step-2); }
.prose h4 { font-size: var(--step-1); }

.prose :is(ul, ol) {
  padding-inline-start: 1.4em;
}

.prose li + li {
  margin-block-start: var(--space-3xs);
}

.prose li::marker {
  color: var(--accent-500);
}

.prose blockquote {
  padding-inline-start: var(--space-m);
  border-inline-start: 3px solid var(--accent-400);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
  color: var(--text-muted);
}

.prose img {
  border-radius: var(--radius-m);
}

.prose figure figcaption {
  margin-block-start: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--text-subtle);
}

.prose table {
  display: block;
  overflow-x: auto;
  font-size: var(--step--1);
}

.prose :is(th, td) {
  padding: var(--space-2xs) var(--space-xs);
  border-block-end: var(--border-width) solid var(--border);
}

.prose thead th {
  border-block-end-width: 2px;
  border-block-end-color: var(--border-strong);
}

.prose hr {
  margin-block: var(--space-xl);
}

.prose--wide { max-inline-size: none; }

/* Footnotes from markdown-it. */
.prose .footnotes {
  margin-block-start: var(--space-xl);
  padding-block-start: var(--space-m);
  border-block-start: var(--border-width) solid var(--border);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ----------------------------------------------------------------- forms */

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

.field__label {
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.field__hint {
  font-size: var(--step--1);
  color: var(--text-subtle);
}

.field__required {
  color: var(--danger-500);
}

.input,
.textarea,
.select {
  inline-size: 100%;
  padding: 0.65em 0.9em;
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius-s);
  background-color: var(--surface);
  color: var(--text);
  font-size: var(--step-0);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--brand-400);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-500) 25%, transparent);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--danger-500);
}

.field__error {
  font-size: var(--step--1);
  color: var(--danger-500);
}

.checkbox {
  display: flex;
  align-items: start;
  gap: var(--space-2xs);
  font-size: var(--step--1);
  line-height: var(--leading-normal);
  cursor: pointer;
}

.checkbox input {
  inline-size: 1.15rem;
  block-size: 1.15rem;
  margin-block-start: 0.15rem;
  flex: none;
  accent-color: var(--brand-600);
}

/* A hidden field real users never see and bots reliably fill in. */
.honeypot {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* ----------------------------------------------------------------- notes */

.note {
  padding: var(--space-s) var(--space-m);
  border-inline-start: 3px solid var(--brand-500);
  border-radius: var(--radius-s);
  background-color: var(--surface-sunken);
  font-size: var(--step--1);
}

.note--success { border-inline-start-color: var(--success-500); background-color: var(--success-50); }
.note--warning { border-inline-start-color: var(--warning-500); background-color: var(--warning-50); }
.note--danger  { border-inline-start-color: var(--danger-500);  background-color: var(--danger-50); }

/* --------------------------------------------------------------- figures */

.figure img {
  inline-size: 100%;
  border-radius: var(--radius-l);
}

.figure figcaption {
  margin-block-start: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--text-subtle);
  text-wrap: pretty;
}

/* --------------------------------------------------------- section header */

.section-header {
  max-inline-size: var(--width-text);
  margin-block-end: var(--space-xl);
}

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

.section-header > * + * {
  margin-block-start: var(--space-xs);
}

/* ---------------------------------------------------------------- divider */

.divider {
  block-size: var(--border-width);
  background-color: var(--border);
  border: 0;
}

/* ------------------------------------------------------------- pagination */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  align-items: center;
  justify-content: center;
  margin-block-start: var(--space-xl);
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.5rem;
  min-block-size: 2.5rem;
  padding-inline: 0.5em;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-s);
  text-decoration: none;
  color: var(--text-muted);
}

.pagination__item[aria-current="page"] {
  background-color: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--neutral-0);
  font-weight: var(--weight-semibold);
}

/* ---------------------------------------------------------- placeholder */

/* Stands in for a photograph that has not been supplied yet, so a layout can
 * be reviewed before the photo shoot rather than collapsing. */
.image-placeholder {
  display: grid;
  place-items: center;
  inline-size: 100%;
  overflow: hidden;
  border-radius: var(--radius-l);
  background-color: var(--surface-sunken);
  color: var(--brand-700);
}

.image-placeholder svg {
  inline-size: 100%;
  block-size: 100%;
}

/* A card with no photograph gets a thin accent rule instead of an empty frame,
 * so a listing without imagery still has a top edge to scan against. */
.card:not(:has(.card__media)) {
  border-block-start: 3px solid var(--brand-600);
}

.card:not(:has(.card__media)):hover {
  border-block-start-color: var(--accent-500);
}

/* --- css/parts/_header.css --- */
/* Site header: brand, primary navigation, language switcher, search, donate CTA. */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  background-color: color-mix(in oklab, var(--surface) 88%, transparent);
  border-block-end: var(--border-width) solid var(--border-subtle);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background-color: var(--surface); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  min-block-size: 4.5rem;
}

/* ------------------------------------------------------------------ brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  flex: none;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}

.brand:hover { color: var(--brand-700); }

.brand__mark {
  inline-size: 2.25rem;
  block-size: 2.25rem;
  flex: none;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.05; }

.brand__tagline {
  font-size: 0.6rem;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
}

@media (max-width: 26rem) {
  .brand__tagline { display: none; }
}

/* ------------------------------------------------------------ desktop nav */

.site-nav { display: none; }

@media (min-width: 64rem) {
  .site-nav {
    display: block;
    margin-inline-start: auto;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-3xs);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .site-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-s);
    color: var(--text);
    font-size: var(--step-0);
    font-weight: var(--weight-medium);
    text-decoration: none;
    white-space: nowrap;
  }

  .site-nav__link:hover {
    background-color: var(--surface-sunken);
    color: var(--brand-700);
  }

  .site-nav__link[aria-current="page"],
  .site-nav__item--active > .site-nav__link {
    color: var(--brand-700);
  }

  /* Underline marks the active branch without shifting layout. */
  .site-nav__item--active > .site-nav__link::after {
    content: "";
    position: absolute;
    inset-block-end: -1px;
    inset-inline: 0.7rem;
    block-size: 2px;
    border-radius: 2px;
    background-color: var(--accent-500);
  }

  .site-nav__item { position: relative; }

  /* -------------------------------------------------------- dropdown menu */

  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
  }

  .site-nav__chevron {
    inline-size: 0.7em;
    block-size: 0.7em;
    transition: transform var(--duration-fast) var(--ease-out);
  }

  .site-nav__item[data-open="true"] .site-nav__chevron {
    transform: rotate(180deg);
  }

  .site-nav__submenu {
    position: absolute;
    inset-block-start: calc(100% + 0.35rem);
    inset-inline-start: 0;
    z-index: var(--z-overlay);
    min-inline-size: 16rem;
    padding: var(--space-2xs);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-m);
    background-color: var(--surface-raised);
    box-shadow: var(--shadow-l);
    list-style: none;
    margin: 0;
  }

  .site-nav__submenu[hidden] { display: none; }

  .site-nav__sublink {
    display: block;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-s);
    color: var(--text);
    text-decoration: none;
    font-size: var(--step-0);
  }

  .site-nav__sublink:hover {
    background-color: var(--surface-sunken);
    color: var(--brand-700);
  }

  .site-nav__subdesc {
    display: block;
    font-size: var(--step--1);
    color: var(--text-subtle);
  }
}

/* -------------------------------------------------------------- utilities */

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-inline-start: auto;
}

@media (min-width: 64rem) {
  .header-actions { margin-inline-start: var(--space-s); }
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: var(--radius-s);
  color: var(--text);
  background: none;
  border: none;
}

.icon-button:hover {
  background-color: var(--surface-sunken);
  color: var(--brand-700);
}

.icon-button .icon {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}

/* Below the desktop breakpoint the bar keeps only the language switcher and
 * the donate button: a phone has room for two controls beside the logo and the
 * menu trigger, and for a non-profit those are the two that matter. Search and
 * the theme toggle are duplicated inside the menu — see .mobile-menu__tools. */
@media (max-width: 63.99rem) {
  .header-actions > [data-search-open],
  .header-actions > [data-theme-toggle] {
    display: none;
  }
}

.header-actions .button--donate {
  padding-inline: 1.1em;
  font-size: var(--step--1);
}

@media (min-width: 48rem) {
  .header-actions .button--donate {
    padding-inline: 1.4em;
    font-size: var(--step-0);
  }
}

/* The tools row inside the mobile menu. */
.mobile-menu__tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.mobile-menu__tool {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.6rem 1rem;
  min-block-size: 2.75rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.mobile-menu__tool:hover {
  background-color: var(--surface-sunken);
  color: var(--brand-700);
}

.mobile-menu__tool .icon {
  inline-size: 1.1rem;
  block-size: 1.1rem;
}

.mobile-menu__tool[aria-current="true"] {
  border-color: var(--brand-500);
  color: var(--brand-700);
  font-weight: var(--weight-semibold);
}

/* ------------------------------------------------------- language switcher */

.lang-switcher { position: relative; }

.lang-switcher__button {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.5rem 0.7rem;
  min-block-size: 2.75rem;
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.lang-switcher__button:hover {
  background-color: var(--surface-sunken);
}

.lang-switcher__menu {
  position: absolute;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-end: 0;
  z-index: var(--z-overlay);
  min-inline-size: 11rem;
  padding: var(--space-3xs);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-m);
  background-color: var(--surface-raised);
  box-shadow: var(--shadow-l);
  list-style: none;
  margin: 0;
}

.lang-switcher__menu[hidden] { display: none; }

.lang-switcher__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-s);
  color: var(--text);
  text-decoration: none;
  font-size: var(--step-0);
}

.lang-switcher__link:hover { background-color: var(--surface-sunken); }

.lang-switcher__link[aria-current="true"] {
  font-weight: var(--weight-semibold);
  color: var(--brand-700);
}

.lang-switcher__code {
  font-size: var(--step--1);
  text-transform: uppercase;
  color: var(--text-subtle);
  letter-spacing: var(--tracking-wide);
}

/* An untranslated target falls back to that language's home page — say so. */
.lang-switcher__link[data-fallback="true"] .lang-switcher__code::after {
  content: " ·";
  color: var(--accent-500);
}

/* ------------------------------------------------------------ mobile menu */

.menu-button { display: inline-flex; }

@media (min-width: 64rem) {
  .menu-button { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-menu[hidden] { display: none; }

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-block-size: 4.5rem;
  border-block-end: var(--border-width) solid var(--border-subtle);
}

.mobile-menu__body {
  padding-block: var(--space-l) var(--space-2xl);
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu__link {
  display: block;
  padding-block: var(--space-xs);
  border-block-end: var(--border-width) solid var(--border-subtle);
  color: var(--text);
  font-size: var(--step-2);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.mobile-menu__link:hover { color: var(--brand-700); }

.mobile-menu__sublist {
  list-style: none;
  margin: 0;
  padding-block: var(--space-2xs);
  padding-inline-start: var(--space-s);
}

.mobile-menu__sublink {
  display: block;
  padding-block: var(--space-3xs);
  color: var(--text-muted);
  text-decoration: none;
}

.mobile-menu__sublink:hover { color: var(--brand-700); }

.mobile-menu__footer {
  margin-block-start: var(--space-l);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

/* Without JS the menu cannot open, so show navigation inline instead. */
.no-js .menu-button { display: none; }
.no-js .site-nav { display: block; margin-inline-start: auto; }

@media (max-width: 63.99rem) {
  .no-js .site-header__inner { flex-wrap: wrap; }
  .no-js .site-nav__list { flex-wrap: wrap; }
  .no-js .site-nav__submenu { position: static; box-shadow: none; border: 0; padding: 0; }
  .no-js .site-nav__submenu[hidden] { display: block; }
}

/* ---------------------------------------------------------------- search */

.search-dialog {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  align-content: start;
  justify-items: center;
  padding-block-start: clamp(3rem, 10vh, 8rem);
  background-color: color-mix(in oklab, var(--neutral-950) 55%, transparent);
  backdrop-filter: blur(4px);
}

.search-dialog[hidden] { display: none; }

.search-dialog__panel {
  inline-size: min(40rem, 100% - var(--gutter) * 2);
  padding: var(--space-m);
  border-radius: var(--radius-l);
  background-color: var(--surface-raised);
  box-shadow: var(--shadow-xl);
}

.search-dialog__results {
  margin-block-start: var(--space-s);
  max-block-size: min(24rem, 50vh);
  overflow-y: auto;
  list-style: none;
  padding: 0;
}

.search-result {
  display: block;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-s);
  color: var(--text);
  text-decoration: none;
}

.search-result:hover,
.search-result:focus-visible {
  background-color: var(--surface-sunken);
}

/* Both are spans, so they need to be told to occupy their own line — without
 * this the summary runs straight on from the title. */
.search-result__title {
  display: block;
  font-weight: var(--weight-semibold);
}

.search-result__meta {
  display: block;
  font-size: var(--step--1);
  line-height: var(--leading-snug);
  color: var(--text-subtle);
  /* Keep a long summary to two lines so the result list stays scannable. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result mark {
  background-color: var(--accent-100);
  color: inherit;
  border-radius: 2px;
}

/* Locks background scroll while a full-screen overlay is open. */
body.is-locked { overflow: hidden; }

/* --- css/parts/_footer.css --- */
/* Site footer: organisation summary, link columns, newsletter, legal strip. */

.site-footer {
  margin-block-start: auto;
  background-color: var(--brand-900);
  color: color-mix(in oklab, var(--neutral-0) 82%, transparent);
  font-size: var(--step-0);
}

.site-footer a {
  color: inherit;
  text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
}

.site-footer a:hover {
  color: var(--neutral-0);
  text-decoration-color: currentColor;
}

.site-footer :is(h2, h3) {
  color: var(--neutral-0);
}

.site-footer__main {
  display: grid;
  gap: var(--space-xl);
  padding-block: var(--space-2xl) var(--space-xl);
}

@media (min-width: 52rem) {
  .site-footer__main {
    grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(10rem, 1fr));
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  max-inline-size: 26rem;
}

.site-footer__brand .brand,
.site-footer__brand .brand:hover {
  color: var(--neutral-0);
}

.site-footer__blurb {
  color: color-mix(in oklab, var(--neutral-0) 72%, transparent);
  text-wrap: pretty;
}

.footer-column__title {
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: color-mix(in oklab, var(--neutral-0) 62%, transparent);
  margin-block-end: var(--space-xs);
}

.footer-column__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

/* ------------------------------------------------------------- contact */

.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  font-style: normal;
}

.footer-contact li {
  display: flex;
  align-items: start;
  gap: var(--space-2xs);
}

.footer-contact .icon {
  inline-size: 1.1em;
  block-size: 1.1em;
  margin-block-start: 0.35em;
  flex: none;
  opacity: 0.7;
}

/* ------------------------------------------------------------- social */

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border: var(--border-width) solid color-mix(in oklab, var(--neutral-0) 22%, transparent);
  border-radius: var(--radius-pill);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.social-links a:hover {
  background-color: color-mix(in oklab, var(--neutral-0) 12%, transparent);
  border-color: color-mix(in oklab, var(--neutral-0) 45%, transparent);
}

.social-links .icon {
  inline-size: 1.15rem;
  block-size: 1.15rem;
}

/* -------------------------------------------------------- accreditations */

.accreditations {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
}

.accreditations li {
  padding: 0.3em 0.8em;
  border: var(--border-width) solid color-mix(in oklab, var(--neutral-0) 20%, transparent);
  border-radius: var(--radius-pill);
  color: color-mix(in oklab, var(--neutral-0) 74%, transparent);
}

/* ----------------------------------------------------------- newsletter */

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.newsletter-form .input {
  flex: 1 1 12rem;
  background-color: color-mix(in oklab, var(--neutral-0) 8%, transparent);
  border-color: color-mix(in oklab, var(--neutral-0) 24%, transparent);
  color: var(--neutral-0);
}

.newsletter-form .input::placeholder {
  color: color-mix(in oklab, var(--neutral-0) 52%, transparent);
}

.newsletter-form .input:focus-visible {
  border-color: var(--accent-300);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-400) 30%, transparent);
}

.newsletter-hint {
  font-size: var(--step--1);
  color: color-mix(in oklab, var(--neutral-0) 58%, transparent);
}

/* ---------------------------------------------------------- legal strip */

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-m);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-m);
  border-block-start: var(--border-width) solid
    color-mix(in oklab, var(--neutral-0) 14%, transparent);
  font-size: var(--step--1);
  color: color-mix(in oklab, var(--neutral-0) 62%, transparent);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-m);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- css/parts/_blocks.css --- */
/* Page-section blocks.
 *
 * Each block here maps 1:1 to a template in templates/blocks/ and to a `type:`
 * an editor can write in a page's YAML. Adding a visual pattern means adding
 * one template and one section in this file — nothing else changes.
 */

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  padding-block: clamp(3rem, 2rem + 6vw, 7rem);
  overflow: hidden;
}

/* Default hero: text beside an image. */
.hero__inner {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 58rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-2xl);
  }
}

.hero__content > * + * { margin-block-start: var(--space-s); }

.hero__title {
  font-size: var(--step-6);
  letter-spacing: var(--tracking-tight);
}

.hero__lead {
  font-size: var(--step-2);
  line-height: var(--leading-snug);
  color: var(--text-muted);
  max-inline-size: 36rem;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-block-start: var(--space-m);
}

.hero__media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--surface-sunken);
  box-shadow: var(--shadow-l);
}

.hero__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* A soft brand wash behind the hero, so the fold has depth without an image. */
.hero--washed {
  background:
    radial-gradient(
      70rem 40rem at 88% -10%,
      color-mix(in oklab, var(--brand-200) 50%, transparent),
      transparent 60%
    ),
    radial-gradient(
      50rem 34rem at -10% 110%,
      color-mix(in oklab, var(--accent-100) 65%, transparent),
      transparent 62%
    ),
    var(--surface);
}

/* The light wash is far too bright on a dark surface; dim both stops. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero--washed {
    background:
      radial-gradient(
        70rem 40rem at 88% -10%,
        color-mix(in oklab, var(--brand-500) 22%, transparent),
        transparent 60%
      ),
      radial-gradient(
        50rem 34rem at -10% 110%,
        color-mix(in oklab, var(--accent-500) 16%, transparent),
        transparent 62%
      ),
      var(--surface);
  }
}

:root[data-theme="dark"] .hero--washed {
  background:
    radial-gradient(
      70rem 40rem at 88% -10%,
      color-mix(in oklab, var(--brand-500) 22%, transparent),
      transparent 60%
    ),
    radial-gradient(
      50rem 34rem at -10% 110%,
      color-mix(in oklab, var(--accent-500) 16%, transparent),
      transparent 62%
    ),
    var(--surface);
}

/* Full-bleed photographic hero with an overlay. */
.hero--image {
  min-block-size: clamp(24rem, 62vh, 40rem);
  color: var(--neutral-0);
  align-content: end;
}

.hero--image .hero__title,
.hero--image .hero__lead,
.hero--image .eyebrow {
  color: inherit;
}

.hero--image .hero__lead {
  color: color-mix(in oklab, var(--neutral-0) 88%, transparent);
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__backdrop img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* The scrim keeps text at AA contrast over any photograph. */
.hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in oklab, var(--neutral-950) 82%, transparent) 0%,
    color-mix(in oklab, var(--neutral-950) 52%, transparent) 45%,
    color-mix(in oklab, var(--neutral-950) 22%, transparent) 100%
  );
}

.hero--centered .hero__inner {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.hero--centered .hero__content {
  max-inline-size: var(--width-text);
}

.hero--centered .hero__actions { justify-content: center; }

/* ------------------------------------------------------------------ stats */

.stats {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  padding: var(--space-m);
  border-radius: var(--radius-l);
  background-color: var(--surface-raised);
  border: var(--border-width) solid var(--border);
}

.section--brand .stat,
.section--inverse .stat {
  background-color: color-mix(in oklab, var(--neutral-0) 8%, transparent);
  border-color: var(--border-inverse);
}

.stat__value {
  font-family: var(--font-display);
  /* One step below the display size: "10.000+" is seven glyphs and wrapped
   * onto a second line at --step-5 in a four-column row. */
  font-size: var(--step-4);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
  /* A figure split across two lines stops being a figure. */
  white-space: nowrap;
}

.section--brand .stat__value,
.section--inverse .stat__value {
  color: var(--accent-300);
}

.stat__label {
  font-weight: var(--weight-semibold);
}

.stat__note {
  font-size: var(--step--1);
  color: var(--text-muted);
}

.section--brand .stat__note,
.section--inverse .stat__note {
  color: color-mix(in oklab, currentColor 72%, transparent);
}

/* ------------------------------------------------------------ feature card */

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-m);
  border-radius: var(--radius-l);
  background-color: var(--surface-raised);
  border: var(--border-width) solid var(--border);
  block-size: 100%;
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 3rem;
  block-size: 3rem;
  margin-block-end: var(--space-2xs);
  border-radius: var(--radius-m);
  background-color: var(--brand-50);
  color: var(--brand-700);
}

.feature__icon .icon {
  inline-size: 1.5rem;
  block-size: 1.5rem;
}

.feature__title { font-size: var(--step-1); }

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

.feature--plain {
  background: none;
  border: 0;
  padding: 0;
}

/* ------------------------------------------------------------------ steps */

/* A numbered process. The connecting rule is drawn with a pseudo-element so
 * it survives reflow at any column count. */
.steps {
  display: grid;
  gap: var(--space-l);
  counter-reset: step;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.step {
  position: relative;
  counter-increment: step;
  padding-block-start: var(--space-m);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  color: var(--accent-500);
  font-variant-numeric: tabular-nums;
}

.step::after {
  content: "";
  position: absolute;
  inset-block-start: 0.75em;
  inset-inline-start: 2.5rem;
  inline-size: calc(100% - 3rem);
  block-size: var(--border-width);
  background-color: var(--border);
}

.step:last-child::after { display: none; }

@media (max-width: 47.99rem) {
  .step::after { display: none; }
}

.step__title {
  font-size: var(--step-1);
  margin-block-start: var(--space-s);
}

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

/* --------------------------------------------------------------- timeline */

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  padding-inline-start: var(--space-l);
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0.6rem;
  inset-inline-start: 0.3rem;
  inline-size: 2px;
  background: linear-gradient(
    to bottom,
    var(--brand-300),
    color-mix(in oklab, var(--brand-300) 20%, transparent)
  );
}

.timeline__item {
  position: relative;
  padding-block-end: var(--space-l);
}

.timeline__item:last-child { padding-block-end: 0; }

.timeline__item::before {
  content: "";
  position: absolute;
  inset-block-start: 0.45rem;
  inset-inline-start: calc(-1 * var(--space-l) + 0.3rem);
  inline-size: 0.75rem;
  block-size: 0.75rem;
  margin-inline-start: -0.25rem;
  border-radius: 50%;
  background-color: var(--surface);
  border: 2px solid var(--brand-500);
}

.timeline__date {
  display: block;
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--accent-600);
}

.timeline__title {
  font-size: var(--step-1);
  margin-block-start: var(--space-3xs);
}

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

/* ----------------------------------------------------------------- quote */

.quote {
  display: grid;
  gap: var(--space-m);
  max-inline-size: var(--width-text);
}

.quote__text {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: pretty;
}

.quote__text::before { content: "“"; }
.quote__text::after  { content: "”"; }

.quote__attribution {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-style: normal;
}

.quote__avatar {
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.quote__name { font-weight: var(--weight-semibold); }

.quote__role {
  font-size: var(--step--1);
  color: var(--text-muted);
}

.section--brand .quote__role,
.section--inverse .quote__role {
  color: color-mix(in oklab, currentColor 74%, transparent);
}

/* ----------------------------------------------------------------- logos */

.logo-wall {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-l) var(--space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

.logo-wall img {
  block-size: clamp(2rem, 4vw, 3rem);
  inline-size: auto;
  max-inline-size: 11rem;
  object-fit: contain;
  /* Partner marks come in every colour; neutralising them keeps the wall calm
   * and restores full colour on hover for recognition. */
  filter: grayscale(1);
  opacity: 0.65;
  background: none;
  transition: filter var(--duration-base) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
}

.logo-wall a:hover img,
.logo-wall a:focus-visible img {
  filter: grayscale(0);
  opacity: 1;
}

/* -------------------------------------------------------------- accordion */

.accordion {
  border-block-start: var(--border-width) solid var(--border);
  max-inline-size: var(--width-text);
}

.accordion__item {
  border-block-end: var(--border-width) solid var(--border);
}

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding-block: var(--space-s);
  font-size: var(--step-1);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  list-style: none;
}

.accordion__summary::-webkit-details-marker { display: none; }

.accordion__summary::after {
  content: "";
  inline-size: 0.75rem;
  block-size: 0.75rem;
  flex: none;
  border-inline-end: 2px solid var(--accent-500);
  border-block-end: 2px solid var(--accent-500);
  transform: rotate(45deg);
  transition: transform var(--duration-base) var(--ease-out);
}

.accordion__item[open] > .accordion__summary::after {
  transform: rotate(-135deg);
}

.accordion__panel {
  padding-block-end: var(--space-m);
  color: var(--text-muted);
}

/* --------------------------------------------------------------- media+text */

.media-text__media img {
  inline-size: 100%;
  border-radius: var(--radius-l);
  aspect-ratio: var(--media-ratio, 4 / 3);
  object-fit: cover;
}

.media-text__content > * + * { margin-block-start: var(--space-s); }

/* ------------------------------------------------------------------- SDG */

.sdg-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.sdg-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border-radius: var(--radius-pill);
  background-color: color-mix(in oklab, var(--sdg-color) 12%, var(--surface));
  border: var(--border-width) solid color-mix(in oklab, var(--sdg-color) 35%, transparent);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  color: var(--text);
  text-decoration: none;
}

[dir="rtl"] .sdg-badge {
  padding-inline: 0.4rem 0.85rem;
}

.sdg-badge__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.65rem;
  block-size: 1.65rem;
  flex: none;
  border-radius: 50%;
  background-color: var(--sdg-color);
  color: #fff;
  font-weight: var(--weight-bold);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

/* Large SDG tiles for the dedicated section. */
.sdg-grid {
  display: grid;
  gap: var(--space-s);
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.sdg-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-m);
  border-radius: var(--radius-m);
  background-color: var(--sdg-color);
  color: #fff;
  block-size: 100%;
}

.sdg-tile__number {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: var(--weight-bold);
  line-height: 1;
}

.sdg-tile__title {
  font-size: var(--step-0);
  font-weight: var(--weight-semibold);
  color: inherit;
}

.sdg-tile__text {
  font-size: var(--step--1);
  color: color-mix(in oklab, #fff 84%, transparent);
}

/* ------------------------------------------------------------------ team */

.team-grid {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-member__photo {
  inline-size: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-l);
  margin-block-end: var(--space-xs);
}

.team-member__name { font-size: var(--step-1); }

.team-member__role {
  font-size: var(--step--1);
  color: var(--accent-600);
  font-weight: var(--weight-semibold);
}

.team-member__bio {
  margin-block-start: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* -------------------------------------------------------------------- CTA */

.cta-band {
  display: grid;
  gap: var(--space-m);
  align-items: center;
}

@media (min-width: 52rem) {
  .cta-band {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-xl);
  }
}

.cta-band__title { font-size: var(--step-3); }

.cta-band__text {
  color: color-mix(in oklab, currentColor 80%, transparent);
  max-inline-size: 42rem;
  text-wrap: pretty;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* --------------------------------------------------------------- gallery */

.gallery {
  display: grid;
  gap: var(--space-s);
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery img {
  inline-size: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-m);
}

/* ----------------------------------------------------------------- embed */

.embed {
  position: relative;
  aspect-ratio: var(--embed-ratio, 16 / 9);
  border-radius: var(--radius-l);
  overflow: hidden;
  background-color: var(--surface-sunken);
}

.embed iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

/* A click-to-load placeholder keeps third-party cookies off the page until the
 * visitor asks for the video — the position German data protection expects. */
.embed__consent {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: var(--space-xs);
  padding: var(--space-m);
  text-align: center;
  background-color: var(--surface-sunken);
}

/* --------------------------------------------------------------- key facts */

.fact-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.fact-list > div {
  display: grid;
  gap: var(--space-3xs) var(--space-s);
  padding-block: var(--space-xs);
  border-block-end: var(--border-width) solid var(--border-subtle);
}

@media (min-width: 34rem) {
  .fact-list > div {
    grid-template-columns: minmax(8rem, 12rem) 1fr;
    align-items: baseline;
  }
}

.fact-list dt {
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--text-subtle);
  text-transform: uppercase;
}

.fact-list dd {
  margin: 0;
}

/* --- css/parts/_utilities.css --- */
/* Utilities. Deliberately few — the layout primitives should do the work.
 * Anything added here must be genuinely single-purpose and reused. */

/* ------------------------------------------------------------------ text */

.text-center { text-align: center; }
.text-start  { text-align: start; }
.text-end    { text-align: end; }
.text-balance { text-wrap: balance; }

.text-muted  { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-accent { color: var(--accent-600); }
.text-brand  { color: var(--brand-700); }

.text-xs { font-size: var(--step--1); }
.text-lg { font-size: var(--step-1); }
.text-xl { font-size: var(--step-2); }

.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

.measure { max-inline-size: var(--width-text); }
.measure-narrow { max-inline-size: var(--width-narrow); }

/* --------------------------------------------------------------- spacing */

.mt-0  { margin-block-start: 0; }
.mt-s  { margin-block-start: var(--space-s); }
.mt-m  { margin-block-start: var(--space-m); }
.mt-l  { margin-block-start: var(--space-l); }
.mt-xl { margin-block-start: var(--space-xl); }
.mb-0  { margin-block-end: 0; }
.mb-m  { margin-block-end: var(--space-m); }
.mb-l  { margin-block-end: var(--space-l); }
.mx-auto { margin-inline: auto; }

/* --------------------------------------------------------------- display */

.hidden { display: none !important; }
.block  { display: block; }
.inline-flex { display: inline-flex; }

@media (max-width: 47.99rem) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 48rem) {
  .hide-desktop { display: none !important; }
}

/* ----------------------------------------------------------------- icons */

.icon {
  inline-size: 1em;
  block-size: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--filled {
  fill: currentColor;
  stroke: none;
}

/* Mirror directional glyphs in right-to-left layouts. */
[dir="rtl"] .icon--directional { transform: scaleX(-1); }

/* ---------------------------------------------------------------- aspect */

.aspect-square { aspect-ratio: 1; }
.aspect-video  { aspect-ratio: 16 / 9; }
.aspect-photo  { aspect-ratio: 4 / 3; }

.object-cover { object-fit: cover; inline-size: 100%; block-size: 100%; }

/* ---------------------------------------------------------------- scroll */

/* Horizontal scroller for card rows on narrow screens. */
.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(16rem, 1fr);
  gap: var(--space-m);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block-end: var(--space-2xs);
  scrollbar-width: thin;
}

.scroller > * { scroll-snap-align: start; }

@media (min-width: 64rem) {
  .scroller {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
    overflow: visible;
  }
}

/* --------------------------------------------------------------- reveal */

/* Opt-in entrance animation, driven by an IntersectionObserver in main.js.
 * Content is visible from the start if JS never runs. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity var(--duration-slow) var(--ease-out),
      transform var(--duration-slow) var(--ease-out);
  }

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

/* --- css/parts/_print.css --- */
/* Print styles. Course schedules and project pages do get printed and handed
 * out at the Beratungsstelle, so this is not a throwaway. */

@media print {
  :root {
    --surface: #fff;
    --surface-sunken: #fff;
    --surface-raised: #fff;
    --text: #000;
    --text-muted: #333;
    --border: #bbb;
  }

  .site-header,
  .site-footer__main,
  .mobile-menu,
  .search-dialog,
  .skip-link,
  .button,
  .newsletter-form,
  .social-links,
  .pagination {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.45;
  }

  .section { padding-block: 0.6cm; }

  :is(h1, h2, h3) {
    break-after: avoid;
    page-break-after: avoid;
  }

  :is(p, li, blockquote, figure, .card) {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Print the destination of links the reader cannot click. */
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }

  .card { border: 1px solid #ccc; box-shadow: none; }

  img { max-inline-size: 12cm; }
}

