/* ==========================================================
   Tokens
   ========================================================== */
:root {
  --font: "Manrope", system-ui, sans-serif;   /* vorher Inter (Backup in _to_delete/backup-vor-manrope). Manrope ist variabel: Stärken 350 (Text) / 450 (Labels) */

  --bg: #FFFFFF;
  --text: #141414;                    /* Headlines, Labels, erste Sätze */
  --text-muted: rgba(20,20,20,0.55);  /* Fließtext, Jahreszahlen, Meta-Infos */
  --flash-1: #FF4D1F;   /* Hero-Aufbau: Farbblöcke hinter den Wörtern (leuchtendes Orange) */
  --flash-2: #FF8AD8;   /* Pink */
  --flash-3: #141414;   /* Schwarz */
  --line: #EDEDED;                    /* feine Trennlinien, Button-Rahmen */
  --surface: #F6F5F3;                 /* warmgraue Fläche hinter Bildern/Karten, Platzhalter */

  --text-width: 480px;    /* schmale Lesespalte, wie bei der Referenz */
  --gutter: 24px;
  --content-inset: 9vw;   /* Seitenabstand für Inhalte (Hero, Grid, Footer, alle Seiten). Die Navigation bleibt am Rand (--gutter) */
  --section-gap: 200px;   /* sehr viel Luft zwischen Abschnitten, Desktop */
  --nav-height: 84px;           /* Höhe der Navigation (Padding 2 × 24px + Button) */
  --project-top-gap: 20px;      /* Abstand Navigation → Key Visual */
  --project-kv-gap: 40px;       /* Abstand Key Visual → Header */
  --project-head-height: 195px; /* Header: Projektname + Untertitel und Kernsatz bis 3 Zeilen, plus etwas Luft */
  --kv-width: min(var(--media-wide), max(320px, calc((100svh - var(--nav-height) - var(--project-top-gap) - var(--project-kv-gap) - var(--project-head-height)) * 2)));
                                /* Breite von Key Visual, Header und Intro + Facts. Nur direkt im Inhaltsbereich verwenden (Prozentwerte) */
  --carousel-reserve: 260px;    /* IDA-Galerie: Platz für Titel, Text und Abstände unter der Reihe. Reihenhöhe = max(280px, min(Breite der aktiven Slide × 9/16, 100svh - --nav-height - --carousel-reserve)) */

  --grid-gap: calc(var(--gutter) * 2);   /* Abstand zwischen Spalten: Projekt-Grid, Bildpaare, Feature-Text/Bild */

  /* Bildbreiten richten sich nach dem Inhaltsbereich (Fensterbreite minus --content-inset links und rechts).
     Prozentwerte beziehen sich auf die Breite des umgebenden Containers, also genau diesen Bereich. */
  --media-wide: 100%;                                  /* Key Visual, große Einzelbilder: wie das Projekt-Grid */
  --media-pair: calc((100% - var(--grid-gap)) / 2);    /* zwei Bilder füllen zusammen die Inhaltsbreite */
  --media-half: calc((100% - var(--grid-gap)) * 0.6);  /* Feature-Bild: ca. 60 %, der Text bekommt den Rest */

  --radius: 16px;         /* Bilder und Karten */
  --radius-pill: 999px;   /* Buttons, Hover-Markierung */

  /* Typo-Skala (Desktop) */
  --fs-hero: clamp(36px, 5.2vw, 64px);
  --fs-headline: clamp(28px, 4vw, 36px);  /* Kernsatz im Header */
  --fs-section: var(--fs-headline);       /* Abschnittsüberschriften: gleiche Größe wie der Kernsatz */
  --fs-step: clamp(22px, 2.2vw, 28px);    /* Überschriften der Prozessschritte und Features */
  --fs-body: 20px;
  --fs-body-s: 17px;   /* kleinerer Fließtext für längere Texte (About-Seite) */
  --fs-label: 16px;
  --fs-nav: 14px;
  --fs-small: 13px;
  --lh-body: 1.4;
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --content-inset: 16px;
    --nav-height: 68px;           /* Padding 2 × 16px + Button */
    --project-head-height: 130px;
    --media-half: 100%;   /* Mobile: Bilder volle Inhaltsbreite */
    --media-pair: 100%;
    --section-gap: 120px;
    --fs-headline: 28px;
    --fs-body: 18px;
    --fs-body-s: 16px;
    --fs-label: 15px;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 350;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

main { flex: 1; }

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

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

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Inhalte (Hero, Grid, Footer, Projektseiten) teilen sich eine linke Kante: --content-inset.
   Schmalere Spalten (Lesespalte, Bildbreiten) begrenzen sich selbst. */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--content-inset);
}

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

/* ==========================================================
   Navigation
   ========================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  font-size: var(--fs-nav);
  transition: transform 300ms ease;
}

.site-nav.is-hidden { transform: translateY(-100%); }

.site-nav .container {
  padding-left: var(--gutter);   /* Navigation bleibt am Rand */
  padding-right: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}

.nav-logo { font-weight: 450; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a { transition: color 200ms ease; }
.nav-links a:not(.nav-button):hover { color: var(--text-muted); }

.nav-button {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: border-color 200ms ease;
}
.nav-button:hover { border-color: var(--text); }

@media (max-width: 720px) {
  .site-nav .container { padding-top: 16px; padding-bottom: 16px; }
  .nav-links { gap: 18px; }
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  margin-top: var(--section-gap);
  padding: 32px 0 40px;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

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

/* ==========================================================
   Rechtliche Seiten (impressum.html, datenschutz.html)
   ========================================================== */
.legal { max-width: 760px; margin-left: 0; padding-top: 48px; font-size: var(--fs-body-s); line-height: 1.55; }
.legal h1 { font-size: var(--fs-headline); font-weight: 350; line-height: 1.2; margin: 0 0 32px; }
.legal h2 { font-size: var(--fs-body-s); font-weight: 450; margin: 40px 0 8px; }
.legal p, .legal ul { margin: 0 0 12px; color: var(--text-muted); }
.legal ul { padding-left: 1.2em; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--text); }
.legal-meta { font-size: var(--fs-small); }

/* ==========================================================
   Startseite: Hero
   ========================================================== */
.hero {
  min-height: calc(100vh - 80px);   /* abzüglich Navigation */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 16vh;
  padding-bottom: 56px;
}

.hero-text {
  margin: 0;
  max-width: 20em;
  font-size: var(--fs-hero);
  font-weight: 350;
  line-height: 1.1;
  letter-spacing: -0.02em;
}


/* Hero-Satz: jedes Wort ein span (.word), Aufbau und Wechselwort werden in interactions.js gesteuert */
.hero-lead { color: var(--text); }
.hero-rest { color: var(--text-muted); }

.hero-text .word {
  display: inline-block;
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* Aufbau: Wörter blenden ruhig und leicht von unten ein (keine Farbblöcke) */
.hero-text .word.is-hidden { opacity: 0; transform: translateY(0.3em); }
.hero-text .word.swap { max-width: 100%; }

/* Wechselwort: schwarz (hebt sich vom grauen Satz ab), wechselt mit sanftem Aus- und Einblenden */
.hero-text .swap-live {
  display: inline-block;
  color: var(--text);
  transition: opacity 350ms ease, transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-text .swap-live.is-out { opacity: 0; transform: translateY(-0.2em); }
.hero-text .swap-live.is-in { opacity: 0; transform: translateY(0.2em); transition: none; }

/* Ein durchlaufender Satz: lead, Teil vor dem Wort mit Wechselwort und Rest sind inline, kein erzwungener Umbruch.
   text-wrap: pretty verhindert ein einzelnes Wort in der letzten Zeile */
.hero-text { text-wrap: pretty; }

/* Wechselwort: nimmt genau die Breite des aktuellen Wortes ein. Beim Wechsel animiert JS die Breite.
   Höchstens so breit wie die Zeile; passt ein langes Wort nicht (Mobile), bricht es zwischen den Teilwörtern um */
.hero-text .swap-clip {
  display: inline-block;
  position: relative;
  vertical-align: top;
  max-width: 100%;
  transition: width 450ms ease;
}
.hero-text .swap-measure {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  visibility: hidden;
}


.hero-scroll {
  align-self: flex-start;
  font-size: var(--fs-nav);
  color: var(--text-muted);
  transition: color 200ms ease;
}
.hero-scroll:hover { color: var(--text); }

/* ==========================================================
   Startseite: Projekt-Grid
   ========================================================== */
.work {
  padding-top: calc(var(--section-gap) / 2);
  scroll-margin-top: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--grid-gap);
  row-gap: calc(var(--section-gap) / 2);
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
}

.tile { display: block; }

.tile-image {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.tile-image img,
.tile-image .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.tile:hover .tile-image img,
.tile:hover .tile-image .placeholder,
.tile:focus-visible .tile-image img,
.tile:focus-visible .tile-image .placeholder { transform: scale(1.02); }

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.tile-title {
  display: inline-block;
  margin: 20px 0 4px;
  padding: 2px 10px 2px 0;
  font-size: var(--fs-label);
  font-weight: 450;
  border-radius: var(--radius-pill);
  transition: background 200ms ease, padding 200ms ease, margin 200ms ease;
}

.tile-arrow {
  display: inline-block;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.tile:hover .tile-arrow,
.tile:focus-visible .tile-arrow {
  opacity: 1;
  transform: none;
}

.tile:hover .tile-title,
.tile:focus-visible .tile-title {
  background: var(--tile-accent, var(--surface));
  padding-left: 10px;
  margin-left: -10px;
}

.tile-tagline {
  margin: 0;
  max-width: var(--text-width);
  color: var(--text-muted);
}

/* ==========================================================
   Projektseite
   ========================================================== */
.text-link {
  font-size: var(--fs-label);
  transition: color 200ms ease;
}
.text-link:hover { color: var(--text-muted); }

/* Header, Intro, Prozesstexte: volle Inhaltsbreite, also dieselbe linke Kante wie das Key Visual.
   Fließtext begrenzt sich selbst über --text-width. */
.col { width: 100%; }

.media {
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.media img,
.media .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder { padding: 16px; text-align: center; word-break: break-all; }

/* Key Visual, Header und Intro + Facts teilen sich die Breite --kv-width.
   Key Visual + Header sind eine Einheit. Das Key Visual ist immer 2:1. Die Breite ist die volle Inhaltsbreite,
   bei niedrigem Fenster schmaler (zentriert), damit Key Visual, Name + Jahr und Kernsatz auf den ersten Bildschirm passen.
   Header und Intro sitzen innerhalb und damit an denselben Kanten wie das Key Visual. */
.project-top {
  width: var(--kv-width);
  margin: var(--project-top-gap) auto 0;
}

.key-visual {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius);
  overflow: hidden;
}
.key-visual .media { height: 100%; border-radius: 0; }

.project-head { margin-top: var(--project-kv-gap); }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  margin: 0 0 16px;
  font-size: var(--fs-body);
}

.project-title {
  margin: 0;
  max-width: 24em;
  font-size: var(--fs-headline);
  font-weight: 350;
  line-height: 1.2;
}

.block-label {
  margin: 0 0 8px;
  font-size: var(--fs-label);
  font-weight: 450;
  color: var(--text);
}
/* Überschrift eines Features oder Prozessschritts. Bei Schritten steht die Nummer grau vor dem Namen. */
.block-title {
  margin: 0 0 16px;
  font-size: var(--fs-step);
  font-weight: 350;
  line-height: 1.2;
  color: var(--text);
}
.block-title .step-number { margin-right: 0.15em; color: var(--text-muted); }
.text-block p { margin: 0; color: var(--text-muted); }

/* Intro + Facts: ca. 60/40 */
.intro {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--grid-gap);
  margin-top: 96px;
}
.intro-text { display: flex; flex-direction: column; gap: var(--gutter); }
.intro-text p { margin: 0; color: var(--text-muted); }
.intro-text .intro-lead { color: var(--text); }

.facts { margin: 0; display: flex; flex-direction: column; gap: 20px; }
.facts dt { font-size: var(--fs-small); color: var(--text-muted); }
.facts dd { margin: 2px 0 0; font-size: var(--fs-label); color: var(--text); }
.facts dd .fact-line + .fact-line { margin-top: calc(var(--gutter) / 6); }

.section { margin-top: var(--section-gap); }

/* Abschnittsüberschrift: viel Abstand nach oben (.section), weniger nach unten, damit klar ist, dass ein neuer Teil beginnt */
.section-label {
  margin-bottom: calc(var(--section-gap) * 0.4);
  font-size: var(--fs-section);
  font-weight: 350;
  line-height: 1.2;
  color: var(--text);
}

/* Features: Wechsel-Layout */
.feature-list { display: flex; flex-direction: column; gap: calc(var(--section-gap) * 0.6); }

.feature {
  display: grid;
  align-items: center;
  column-gap: var(--grid-gap);
  row-gap: 32px;
  width: 100%;
}
.feature .text-block { max-width: var(--text-width); }

.feature.is-text-left { grid-template-columns: minmax(0, 1fr) var(--media-half); }
.feature.is-text-right { grid-template-columns: var(--media-half) minmax(0, 1fr); }
.feature.is-text-right .text-block { order: 2; }

/* stacked: Text oben in der Lesespalte, Bild darunter in --media-wide */
.feature.is-stacked { grid-template-columns: minmax(0, var(--media-wide)); }

/* pair: Text linksbündig oben in der Lesespalte (wie stacked), zwei Karten darunter. Nie zentriert */
.feature.is-pair {
  grid-template-columns: 1fr;
  justify-items: start;
}
.feature.is-pair .text-block { text-align: left; }

.pair-row {
  display: grid;
  grid-template-columns: repeat(2, var(--media-pair));
  gap: var(--grid-gap);
  width: 100%;
}
/* Bildpaar neben dem Text (layout text-left/text-right): beide Bilder teilen sich die Bildspalte, enger Abstand */
/* Bildpaar mit Bildunterschrift (captions) und optional auf grauer Kachel (framed) */
.pair-item { margin: 0; min-width: 0; }
.pair-caption { margin: 12px 0 0; font-size: var(--fs-small); line-height: 1.5; color: var(--text-muted); }
.pair-row.is-framed .media { background: var(--surface); padding: var(--gutter); }
.pair-row.is-framed .media img { object-fit: contain; border-radius: calc(var(--radius) / 2); }
.feature.is-text-left .pair-row,
.feature.is-text-right .pair-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }

/* Accordion-Galerie: aktive Slide groß, die anderen als schmale Streifen mit Overlay.
   Die Reihe nutzt die volle Inhaltsbreite (--media-wide). Die aktive Slide ist immer Gesamtbreite - (n - 1) × (Streifen + Abstand) breit.
   Höhe der Reihe: max(280px, min(Breite der aktiven Slide × 9/16, 100svh - --nav-height - --carousel-reserve)), sie ändert sich beim Wechsel nie.
   100cqw = Breite von .carousel (Container), weil --media-wide Prozentwerte enthält und für height nicht taugt. */
.carousel {
  --strip: 72px;       /* Breite eines Streifens */
  --strip-gap: 8px;    /* Abstand zwischen den Slides */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --active-width: calc(100cqw - (var(--n) - 1) * (var(--strip) + var(--strip-gap)));
  --arrow-size: calc(var(--nav-height) / 2);
  width: var(--media-wide);
  container-type: inline-size;
}

.carousel-frame { position: relative; }

.accordion-row {
  position: relative;
  display: flex;
  gap: var(--strip-gap);
  height: max(280px, min(calc(var(--active-width) * 9 / 16), calc(100svh - var(--nav-height) - var(--carousel-reserve))));
  overscroll-behavior-x: contain;
  touch-action: pan-y;
}

.accordion-slide {
  position: relative;
  flex: 0 0 auto;
  width: var(--strip);
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
}
/* Breite und Deckkraft beim Umsortieren animiert js/project.js (Förderband). Geister sind Kopien verschwindender Slides */
.accordion-slide.is-ghost { pointer-events: none; }
.accordion-slide.is-active { width: var(--active-width); cursor: default; }

/* Bildfläche in der Größe der aktiven Slide, mittig (object-fit: cover, object-position: center):
   Streifen zeigen den mittigen Ausschnitt, das Bild ändert beim Aufklappen seine Größe nicht */
.slide-media {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--active-width);
  height: 100%;
  transform: translateX(-50%);
}
.slide-media .media { width: 100%; height: 100%; border-radius: 0; }
.slide-media .media img { object-fit: cover; object-position: center; }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.55;
  transition: opacity 500ms var(--ease);
}
.accordion-slide.is-active .slide-overlay { opacity: 0; }
.accordion-slide:not(.is-active):hover .slide-overlay { opacity: 0.35; }

/* Pfeile: im Seitenrand (--content-inset) außerhalb der Reihe, vertikal mittig, mit --gutter Abstand */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--arrow-size);
  height: var(--arrow-size);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font: inherit;
  font-size: var(--fs-label);
  color: var(--text);
  cursor: pointer;
  transition: border-color 200ms ease;
}
.carousel-arrow.is-prev { right: 100%; margin-right: var(--gutter); }
.carousel-arrow.is-next { left: 100%; margin-left: var(--gutter); }
.carousel-arrow:hover { border-color: var(--text); }

/* Titel und Text: linksbündig an der linken Kante der Reihe.
   Textbereich hat die Höhe der längsten Slide: alle Texte liegen übereinander, nur einer ist sichtbar */
.carousel-text {
  display: grid;
  margin-top: var(--gutter);
  max-width: var(--text-width);
}
.carousel-text > * { grid-area: 1 / 1; }
.carousel-ghost { visibility: hidden; }
.carousel-live { transition: opacity 250ms var(--ease); }
.carousel-live.is-swapping { opacity: 0; }

/* Schmale Fenster (unter 900px): zu wenig Seitenrand, die Pfeile liegen über dem äußersten Streifen */
@media (max-width: 899px) {
  .carousel-arrow.is-prev { right: auto; left: calc((var(--strip) - var(--arrow-size)) / 2); margin: 0; }
  .carousel-arrow.is-next { left: auto; right: calc((var(--strip) - var(--arrow-size)) / 2); margin: 0; }
}

/* Unter 768px: keine Streifen, sondern ein Wisch-Karussell mit Scroll-Snap.
   Die aktive Slide ist fast voll breit, die nächste schaut rechts ca. 12 % herein (mit Overlay). Keine Pfeile. */
@media (max-width: 767px) {
  .carousel-arrow { display: none; }

  .accordion-row {
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: auto;
  }
  .accordion-row::-webkit-scrollbar { display: none; }

  .accordion-slide,
  .accordion-slide.is-active {
    flex: 0 0 calc(88% - var(--strip-gap));
    width: auto;
    aspect-ratio: 16 / 9;
    scroll-snap-align: start;
  }
  /* Platz hinter der letzten Slide, damit jede Slide am Anfang einrasten kann (Schleife) */
  .accordion-row::after { content: ""; flex: 0 0 12%; }

  .slide-media {
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    transform: none;
  }
}

/* Komponenten (Image-Accordion): hohe Bildstreifen nebeneinander über die volle Inhaltsbreite (--media-wide), 4px Abstand.
   Jede Spalte (.component) enthält Streifen, Titel und Satz und ist immer so breit wie ihr Streifen. Die Breite steuert flex-grow:
   project.js setzt --grow (offener Streifen ca. doppelt so breit, Nachbarn geben weniger nach als entfernte Streifen).
   Genau ein Streifen ist offen. Der Titel ist einzeilig (Ellipse), der Satz erscheint nur unter dem offenen Streifen,
   in fester Breite --open-w (gesetzt von project.js), damit er beim Aufklappen nicht neu umbricht.
   Mobile (unter 720px): Raster mit 2 Spalten, Bild quadratisch, Titel und Satz immer sichtbar, keine Animation. */
.components {
  display: flex;
  gap: 4px;
  width: var(--media-wide);
}
.component {
  flex: var(--grow, 1) 1 0;
  min-width: 0;
  transition: flex-grow 500ms cubic-bezier(0.34, 1.3, 0.64, 1);
}
.component-strip {
  height: 480px;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.component-strip .media { width: 100%; height: 100%; border-radius: 0; }
.component-strip .media img { object-fit: cover; object-position: center; }
/* Schleier über nicht offenen Streifen: Fläche in Seitenfarbe, halbtransparent, blendet beim Öffnen weich aus */
.component-strip { position: relative; }
.component-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.component.is-active .component-strip::after { opacity: 0; }
.component-title {
  margin: var(--gutter) 0 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: var(--lh-body);
  color: var(--text);
  opacity: 0.5;                       /* nicht offene Streifen: Titel leicht gedimmt */
  transition: opacity 300ms ease;
}
.component.is-active .component-title { opacity: 1; }

/* Satz: füllt die Höhe auch unsichtbar (nichts springt), wird von der Spalte beschnitten, solange sie noch schmaler ist.
   Blendet beim Öffnen erst ein, wenn die Breitenanimation fast fertig ist (Fade 200ms, Verzögerung 250ms), beim Wechsel sofort aus. */
.component-text-clip { overflow: hidden; }
.component-text {
  width: var(--open-w, 100%);
  margin: 0;
  font-size: var(--fs-label);
  line-height: var(--lh-body);
  color: var(--text-muted);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s, visibility 0s;
}
.component.is-active .component-text {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease 250ms, visibility 0s 250ms;
}

@media (max-width: 720px) {
  .components { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
  .component { transition: none; }
  .component-strip { height: auto; aspect-ratio: 1 / 1; }
  .component-strip::after { display: none; }   /* Mobile: alle gleichzeitig sichtbar, kein Schleier */
  .component-title { white-space: normal; opacity: 1; }
  .component-text,
  .component.is-active .component-text { width: auto; opacity: 1; visibility: visible; transition: none; }
}

/* Vorher/Nachher-Slider: zwei Bilder übereinander, Breite --media-wide (Feature mit layout "stacked").
   Das Nachher-Bild liegt oben und wird per clip-path von links beschnitten, Vorher links, Nachher rechts. */
.compare {
  --compare-handle: 44px;   /* Durchmesser des Griffs */
  --compare-line: 2px;      /* Breite der Trennlinie */
  width: var(--media-wide);
}

.compare-stage {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.compare-layer { position: absolute; inset: 0; pointer-events: none; }
.compare-layer .media { width: 100%; height: 100%; border-radius: 0; }
.compare-layer .media img { -webkit-user-drag: none; }

.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--compare-line);
  background: var(--bg);
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-handle {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--gutter) / 4);
  width: var(--compare-handle);
  height: var(--compare-handle);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: var(--fs-label);
  line-height: 1;
  color: var(--text);
  transform: translate(-50%, -50%);
}

.compare-label {
  position: absolute;
  top: var(--gutter);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  font-size: var(--fs-small);
  color: var(--text);
  pointer-events: none;
}
.compare-label.is-left { left: var(--gutter); }
.compare-label.is-right { right: var(--gutter); }
.compare-label.is-hidden { opacity: 0; }

/* Galerie: zusammenhängende Bildgruppe (Zeilen mit 1 oder 2 Bildern), Seitenverhältnis aus dem Bild.
   Abstand horizontal und vertikal --gutter (bewusst kleiner als --grid-gap), damit die Gruppe als Einheit wirkt. */
.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
  width: var(--media-wide);
}
.gallery-row { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
.gallery-row.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

.gallery-item {
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.gallery-item img { display: block; width: 100%; height: auto; }
.gallery-item .placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; }
.gallery-row.is-pair .placeholder { aspect-ratio: 4 / 3; }

@media (max-width: 720px) {
  .gallery-row.is-pair { grid-template-columns: 1fr; }
}

/* Scroll-Fade-in: Opacity 0→1, 16px nach oben, 400ms, einmal pro Element (siehe interactions.js) */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-visible { opacity: 1; transform: none; transition: opacity 400ms ease, transform 400ms ease; }

/* Process */
.step { margin-top: calc(var(--section-gap) * 0.6); }
.step:first-of-type { margin-top: 0; }

.step-text { max-width: var(--text-width); margin: 0 auto 40px 0; }

/* wide und pair: Textbereich über den Bildern in zwei Spalten (volle Inhaltsbreite).
   Links ca. 1/3: Überschrift. Rechts ab 1/3, max. 720px: Text. Mobile: Überschrift über dem Text (Standard oben). */
@media (min-width: 721px) {
  .step.is-wide .step-text,
  .step.is-pair .step-text,
  .step.is-grid .step-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); /* Text startet bei 1/3 der Inhaltsbreite */
    align-items: start;
    max-width: none;
  }
  .step.is-wide .step-text .block-title,
  .step.is-pair .step-text .block-title,
  .step.is-grid .step-text .block-title { margin: 0; padding-right: var(--gutter); }
  .step.is-wide .step-text p,
  .step.is-pair .step-text p,
  .step.is-grid .step-text p { max-width: 720px; }
}

.step.is-wide .step-media,
.step.is-pair .step-media,
.step.is-stacked .step-media { display: flex; flex-direction: column; gap: var(--gutter); align-items: center; }
.step.is-wide .media,
.step.is-stacked .media { width: var(--media-wide); }

/* grid: alle Bilder zusammen auf EINER grauen Fläche (--surface, Innenabstand --gutter, Ecken --radius),
   in 2 Spalten mit Abstand --gutter, wie die Ideation-Frames bei hochschulstart. Mobile: eine Spalte */
.step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
  width: var(--media-wide);
  padding: var(--gutter);
  background: var(--surface);
  border-radius: var(--radius);
}
.step-grid .media { width: 100%; border-radius: calc(var(--radius) / 2); background: transparent; }
.step-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* plain: Fotos einzeln im Raster, ohne graue Kachel drumherum, jedes Bild mit vollem Radius */
.step-grid.is-plain { padding: 0; background: transparent; border-radius: 0; }
.step-grid.is-plain .media { border-radius: var(--radius); overflow: hidden; }
/* Rasterzelle mit Bildunterschrift (images: [{ src, alt, caption }]) */
.step-grid-item { margin: 0; min-width: 0; }
.step-grid-caption { margin: 12px 0 0; font-size: var(--fs-small); line-height: 1.5; color: var(--text-muted); }

/* Anforderungs-Grafik (Process-Feld requirements): drei Spalten mit Symbol, Titel, kurzem Text auf grauer Kachel, linksbündig */
.requirements {
  width: var(--media-wide);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
  padding: 48px var(--gutter);
  background: var(--surface);
  border-radius: var(--radius);
}
.requirement { display: flex; flex-direction: column; align-items: flex-start; padding: 0 12px; }
.requirement-icon { height: 56px; margin-bottom: 20px; color: var(--accent, var(--text)); }
.requirement-icon svg { height: 100%; width: auto; display: block; }
.requirement-title { margin: 0 0 6px; font-size: var(--fs-label); font-weight: 450; color: var(--accent, var(--text)); }
.requirement-text { margin: 0; max-width: 240px; font-size: var(--fs-small); line-height: 1.5; color: var(--text-muted); }

/* Process mit text-left / text-right: Text neben den Bildern wie bei Features */
.step.is-text-left,
.step.is-text-right {
  display: grid;
  align-items: center;
  column-gap: var(--grid-gap);
  width: 100%;
}
.step.is-text-left { grid-template-columns: minmax(0, 1fr) var(--media-half); }
.step.is-text-right { grid-template-columns: var(--media-half) minmax(0, 1fr); }
.step.is-text-right .step-text { order: 2; }
.step.is-text-left .step-text,
.step.is-text-right .step-text { margin-bottom: 0; }
.step.is-text-left .step-media,
.step.is-text-right .step-media { display: flex; flex-direction: column; gap: var(--gutter); }

/* Takeaway */
.takeaway p {
  margin: 0;
  max-width: 20em;
  font-size: var(--fs-headline);
  font-weight: 350;
  line-height: 1.25;
}

/* Projekt-Navigation */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  margin-top: var(--section-gap);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.project-nav-link { display: flex; flex-direction: column; gap: 6px; }
.project-nav-link.is-next { text-align: right; }
.project-nav-label { font-size: var(--fs-small); color: var(--text-muted); }
.project-nav-title { font-size: var(--fs-headline); font-weight: 350; line-height: 1.2; transition: color 200ms ease; }
.project-nav-link:hover .project-nav-title { color: var(--accent, var(--text-muted)); }

/* Mobile: einspaltig, Text oben, Bild unten */
@media (max-width: 720px) {
  .intro { grid-template-columns: 1fr; gap: 56px; margin-top: 64px; }
  .section-label { margin-bottom: calc(var(--section-gap) * 0.4); }
  .feature,
  .feature.is-text-left,
  .feature.is-text-right,
  .feature.is-stacked { grid-template-columns: 1fr; }
  .feature.is-text-right .text-block,
  .step.is-text-right .step-text { order: 0; }
  .step.is-text-left,
  .step.is-text-right { grid-template-columns: 1fr; row-gap: 32px; }
  .pair-row { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .step-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .requirements { grid-template-columns: 1fr; row-gap: 36px; padding: 36px var(--gutter); }
  .project-nav-title { font-size: var(--fs-body); }
}

/* ==========================================================
   About
   ========================================================== */
.about { padding-top: 40px; }
.about > section { margin-top: calc(var(--section-gap) * 0.6); }
.about > section:first-child { margin-top: 0; }

/* Intro: Porträt 4:5 (ca. 40 %), Text in der Lesespalte, oben bündig */
.about-intro {
  display: grid;
  grid-template-columns: 28% minmax(0, 1fr);   /* Porträt bewusst klein (ca. 28 % der Inhaltsbreite) */
  column-gap: var(--grid-gap);
  align-items: start;
}
.about-portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.about-portrait img,
.about-portrait .placeholder { width: 100%; height: 100%; object-fit: cover; }
/* Text über die ganze rechte Spalte bis zur rechten Inhaltskante, wie bei den Projektseiten */
.about-intro-text { max-width: none; display: flex; flex-direction: column; gap: var(--gutter); }
/* About: Fließtext eine Stufe kleiner (--fs-body-s), etwas mehr Zeilenabstand, damit der lange Text ruhiger wirkt */
.about-intro-text p,
.about-work p { font-size: var(--fs-body-s); line-height: 1.5; }
/* Begrüßung über dem Intro: groß wie der Kernsatz der Projektseiten, leicht, schwarz */
/* Winkendes Emoji nach der Begrüßung: winkt beim Laden zweimal, danach beim Darüberfahren erneut.
   Drehpunkt unten am Handgelenk. Bei prefers-reduced-motion keine Bewegung */
.about-wave { display: inline-block; margin-left: 0.15em; transform-origin: 70% 75%; cursor: default; }
/* Grafik statt Emoji: Microsoft Fluent Emoji (MIT), assets/about/wave.png (3D) */
.about-wave img { display: block; width: 1.15em; height: 1.15em; }
.about-wave { vertical-align: -0.2em; }
.about-wave.is-waving { animation: wave 1.6s ease-in-out 1; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(16deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(16deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) { .about-wave.is-waving { animation: none; } }
.about-greeting { margin: 0 0 8px; font-size: var(--fs-headline); font-weight: 350; line-height: 1.15; color: var(--text); }
.about-intro-text p { margin: 0; color: var(--text); }   /* ganzer Intro-Text schwarz (vorher nur der erste Absatz) */
.about-intro-text .intro-lead { color: var(--text); }

/* Kontakt: gleiches Raster wie die Prozessschritte (Label 1/3, Inhalt ab 1/3, max. 720px) */
.about-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
}
.about-row .block-title { margin: 0; padding-right: var(--gutter); }
.about-row-body { max-width: 720px; }
.about-row-body > p { margin: 0; color: var(--text-muted); }

/* Lebenslauf: kompakt und zurückhaltend unter den Intro-Absätzen (gleiche Lesespalte).
   Eine Zeile pro Eintrag, Label-Größe, keine Trennlinien. Gibt zeitlichen Kontext, ohne vom Text abzulenken */
/* Working experience + Lebenslauf unter Foto und Intro, volle Inhaltsbreite, gleiches Raster wie das Intro */
/* gleiches Raster wie das Intro (Spaltenbreite setzt about.js mit), Listen in der rechten Spalte */
.about > section.about-cv {
  margin-top: calc(var(--section-gap) * 0.4);
  display: grid;
  grid-template-columns: 28% minmax(0, 1fr);
  column-gap: var(--grid-gap);
  align-items: start;
}
.about > section.about-cv { row-gap: calc(var(--section-gap) * 0.3); }
.about-cv-right { display: flex; flex-direction: column; gap: calc(var(--gutter) * 1.5); }
/* Experience / Education: Überschrift wie "Contact" (--fs-step) in der linken Spalte */
.cv-title-big { margin: 0; }
.about-work p { margin: 0; color: var(--text-muted); }
.cv-label { margin: 0 0 8px; font-size: var(--fs-small); font-weight: 450; color: var(--text-muted); }
.cv-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cv-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--gutter);
  align-items: baseline;
  font-size: var(--fs-label);
  line-height: 1.4;
}
.cv-title { color: var(--text); }
.cv-place { display: block; color: var(--text-muted); }   /* eigene Zeile, sonst bricht der Ort mitten im Namen um */
.cv-time { color: var(--text-muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

.contact-links { margin-top: var(--gutter); display: flex; flex-direction: column; gap: 8px; }
.contact-email { font-size: var(--fs-step); line-height: 1.2; color: var(--text); }
a.contact-email { transition: color 200ms ease; }
a.contact-email:hover { color: var(--text-muted); }
.contact-linkedin { font-size: var(--fs-label); color: var(--text-muted); }
a.contact-linkedin:hover { color: var(--text); }

@media (max-width: 720px) {
  .about-intro { grid-template-columns: 1fr; row-gap: 32px; }
  .about > section.about-cv { grid-template-columns: 1fr; row-gap: 16px; }
  .cv-title-big { margin-top: 32px; }
  .about-row { grid-template-columns: 1fr; row-gap: 16px; }
  .about-row .block-title { padding-right: 0; }
}

/* Fehlende Inhalte (Phase 3+) */
.todo {
  background: #FFF3A3;
  color: var(--text);
}

/* ==========================================================
   Reduced Motion
   ========================================================== */

/* Storyboard Rettungsablauf (media type "storyboard") */
.story { width: var(--media-wide); }
.story-phases {
  display: grid;
  grid-template-columns: repeat(var(--story-n, 4), minmax(0, 1fr));
  gap: var(--gutter);
}
.story-phase { min-width: 0; }
.story-frame {
  border-radius: calc(var(--radius) * 0.75);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 16 / 9;
}
.story-frame .media { width: 100%; height: 100%; border-radius: 0; }
.story-frame .media img { width: 100%; height: 100%; object-fit: cover; }
.story-sub { display: flex; gap: 8px; margin-top: 8px; }
.story-sub .story-frame { flex: 1 1 0; min-width: 0; aspect-ratio: auto; height: auto; }
.story-sub { aspect-ratio: 16 / 9; }
.story-title {
  margin: var(--gutter) 0 4px;
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: var(--lh-body);
  color: var(--text);
}
.story-text {
  margin: 0;
  font-size: var(--fs-label);
  line-height: var(--lh-body);
  color: var(--text-muted);
}
/* Matrix: dieselben Spalten wie die Phasen, damit jeder Balken unter seiner Phase steht */
.story-matrix { margin-top: calc(var(--gutter) * 2); border-top: 1px solid var(--line); padding-top: var(--gutter); }
.story-mrow { position: relative; padding: 6px 0; }
.story-mlabel {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.story-mcells {
  display: grid;
  grid-template-columns: repeat(var(--story-n, 4), minmax(0, 1fr));
  gap: var(--gutter);
}
.story-mcell { height: 4px; border-radius: 2px; background: var(--line); }
.story-mcell.is-on { background: var(--text); }
.story-mcell.join-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: calc(var(--gutter) * -1); }
.story-mcell.join-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
/* Variante mit Bildunterschriften pro Bild */
.story-phase.has-caps { display: flex; flex-direction: column; gap: var(--gutter); }
.story-phase.has-caps .story-title { margin: 0; }
.story-item { margin: 0; }
.story-item .story-frame { aspect-ratio: 16 / 9; }
.story-cap { margin: 10px 0 0; font-size: var(--fs-label); line-height: var(--lh-body); color: var(--text-muted); }
.story-note { margin: var(--gutter) 0 0; font-size: var(--fs-small); color: var(--text-muted); }

@media (max-width: 720px) {
  .story-phases {
    grid-template-columns: repeat(var(--story-n, 4), 78%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .story-phase { scroll-snap-align: start; }
  .story-matrix { overflow-x: auto; }
  .story-mcells { grid-template-columns: repeat(var(--story-n, 4), minmax(56px, 1fr)); gap: 8px; }
  .story-mcell.join-r { margin-right: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Hotspots: Produktbild mit Markern, Breite --media-wide (Feature mit layout "stacked").
   Marker 32px mit 44px Klickfläche. Desktop: Karte neben dem Marker. Mobile: Textfeld unter dem Bild. */
.hotspots {
  --hotspot-size: 32px;   /* sichtbarer Marker */
  --hotspot-hit: 44px;    /* Klickfläche */
  --hotspot-fade: 150ms;
  --hotspot-card: 280px;  /* maximale Breite der Karte */
  width: var(--media-wide);
}

.hotspots-stage {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
}
.hotspots-image { position: absolute; inset: 0; }
.hotspots-image .media { width: 100%; height: 100%; }

.hotspot {
  position: absolute;
  width: var(--hotspot-hit);
  height: var(--hotspot-hit);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.hotspot-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hotspot-size);
  height: var(--hotspot-size);
  margin: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--accent, var(--text));
  font-size: var(--fs-body);
  line-height: 1;
  transition: transform var(--hotspot-fade) ease, background-color var(--hotspot-fade) ease, color var(--hotspot-fade) ease;
}
.hotspot.is-active .hotspot-dot {
  border-color: var(--accent, var(--text));
  background: var(--accent, var(--text));
  color: var(--bg);
  transform: rotate(45deg);
}
.hotspot:focus-visible { outline-offset: 0; border-radius: var(--radius-pill); }

.hotspot-card {
  position: absolute;
  z-index: 1;
  width: max-content;
  max-width: min(var(--hotspot-card), 100%);
  padding: var(--gutter);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--hotspot-fade) ease, visibility 0s linear var(--hotspot-fade);
}
.hotspot-card.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--hotspot-fade) ease;
}

.hotspot-title,
.hotspot-text { margin: 0; font-size: var(--fs-label); line-height: 1.4; }
.hotspot-title { color: var(--text); }
.hotspot-text { color: var(--text-muted); }
.hotspot-title + .hotspot-text { margin-top: 4px; }

/* Infotext steht auf allen Breiten unter dem Bild, keine Karte auf dem Bild */
.hotspot-card { display: none; }
.hotspots-note {
  display: grid;
  margin-top: var(--gutter);
  max-width: var(--text-width);
}
/* Alle Texte liegen übereinander: die längste gibt die feste Mindesthöhe vor */
.hotspots-note-item { grid-area: 1 / 1; }
.hotspots-note-ghost { visibility: hidden; }
.hotspots-note-live { transition: opacity var(--hotspot-fade) ease; }
.hotspots-note-live.is-empty { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .hotspot-dot,
  .hotspot-card,
  .hotspot-card.is-open,
  .hotspots-note-live { transition: none; }
}

/* Video-Loop: Seitenverhältnis aus dem Video, kein Beschneiden. Breite richtet sich nach dem Layout des Features.
   Pause/Play-Button unten rechts: 32px sichtbar, 44px Klickfläche. */
.video-loop {
  --video-toggle-size: 32px;
  --video-toggle-hit: 44px;
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.video-loop video,
.video-loop > .media { display: block; width: 100%; height: 100%; }
.video-loop > .media { border-radius: 0; }
/* Video füllt den Container (Key Visual 2:1): kein eigenes Seitenverhältnis, Bild beschnitten */
.video-loop.is-fill { height: 100%; border-radius: 0; }
.video-loop.is-fill video { object-fit: cover; }

/* Film (Feld film): ganzes Projektvideo mit Ton, native Bedienelemente, volle Inhaltsbreite, 16:9 */
.film-box { width: var(--media-wide); aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.film-box video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }

.video-toggle {
  position: absolute;
  right: calc(var(--gutter) / 2);
  bottom: calc(var(--gutter) / 2);
  width: var(--video-toggle-hit);
  height: var(--video-toggle-hit);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--text);
  cursor: pointer;
}
.video-toggle-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--video-toggle-size);
  height: var(--video-toggle-size);
  margin: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.video-toggle .icon-play { display: none; }
.video-loop.is-paused .icon-pause { display: none; }
.video-loop.is-paused .icon-play { display: block; }
.video-toggle:focus-visible { outline-offset: 0; border-radius: var(--radius-pill); }

/* Feature-Link: Button unter dem Visual, wie der Contact-Button der Navigation. note nur auf Mobile. */
.feature-visual { min-width: 0; }
.feature-link { margin-top: var(--gutter); }
.feature-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--fs-label);
  color: var(--text);
  transition: border-color 200ms ease;
}
.feature-link-button:hover { border-color: var(--accent, var(--text)); }
.feature-link-note { display: none; margin: 8px 0 0; font-size: var(--fs-small); color: var(--text-muted); }
@media (max-width: 767px) {
  .feature-link-note { display: block; }
}

/* Komponenten-Accordion bei reduzierter Bewegung: kein Federeffekt, nur ein kurzer linearer Übergang, kein Verzögern */
@media (prefers-reduced-motion: reduce) {
  .component { transition: flex-grow 150ms linear !important; }
  .component-title { transition: opacity 150ms linear !important; }
  .component.is-active .component-text { transition: opacity 150ms linear, visibility 0s !important; }
}

/* Einbettung (media type "embed"): Vorschaubild + "Click to explore", dann iframe 16:9 */
.embed { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.embed-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 720px; }
.embed-stage > .media { position: absolute; inset: 0; border-radius: 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.embed.is-mobile .embed-stage { aspect-ratio: auto; min-height: 0; }
.embed-note { margin: 12px 0 0; font-size: var(--fs-small); color: var(--text-muted); }
.embed-start,
.embed-fullscreen {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.embed-start {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 20px;
  font-size: var(--fs-label);
}
.embed-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 12px;
  font-size: var(--fs-small);
}
.embed-start:hover,
.embed-fullscreen:hover { border-color: var(--accent, var(--text)); }
.embed-start:focus-visible,
.embed-fullscreen:focus-visible { outline-offset: 3px; }
.embed:fullscreen { border-radius: 0; background: #000; }
.embed:fullscreen .embed-stage { aspect-ratio: auto; min-height: 0; width: 100%; height: 100%; }
.feature-link.is-mobile-only { display: none; }
@media (max-width: 767px) {
  .feature-link.is-mobile-only { display: block; }
}

/* hochschulstart und IDA: Screens kommen schon mit Hintergrund, Schatten und Kontur, nur die Ecken fehlen */
[data-project="hochschulstart"] .media,
[data-project="hochschulstart"] .gallery-item,
[data-project="hochschulstart"] .compare-stage,
[data-project="ida"] .media,
[data-project="ida"] .gallery-item {
  border-radius: 20px;
  overflow: hidden;
  background: #FAFAF8;
}

/* Animierte Seiten (media type "loop"): Hintergrund, Ecken und Schatten bringen die Seiten selbst mit */
.loop { width: var(--media-wide); }
.loop iframe { display: block; width: 100%; height: auto; border: 0; background: none; }


/* Prozessschritt mit framed: true: jedes Bild liegt auf einer grauen, abgerundeten Kachel mit Innenabstand,
   wie die Ideation-Frames. Für Grafiken und Screens mit weißem Hintergrund, die sonst ohne Rahmen auf der Seite stehen */
.step.is-framed .media { background: var(--surface); border-radius: var(--radius); padding: var(--gutter); }
.step.is-framed .media img { object-fit: contain; border-radius: calc(var(--radius) / 2); }
/* framed: "square": Kachel bleibt rund, die Bilder darauf eckig (z.B. Iterations-Frames bei Migration) */
.step.is-framed.is-square .media img { border-radius: 0; }

/* Frame-Karussell im Prozess (Feld "slides"): ein Bild pro Slide, darunter Satz zur Slide und zwei Pfeile */
.frames { width: var(--media-wide); outline: none; }
.frames:focus-visible { outline: 2px solid var(--text); outline-offset: 6px; border-radius: var(--radius); }
.frames-stage { position: relative; display: grid; background: var(--surface); border-radius: var(--radius); padding: var(--gutter); touch-action: pan-y; }
.frames-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity 300ms ease, visibility 0s linear 300ms; }
.frames-slide.is-active { opacity: 1; visibility: visible; transition: opacity 300ms ease; }
.frames-slide .media { width: 100%; border-radius: calc(var(--radius) / 2); overflow: hidden; background: transparent; }
.frames-slide .media { aspect-ratio: 16 / 9; }
.frames-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.frames-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gutter); margin-top: var(--gutter); }
.frames-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.frames-tab { font: inherit; font-size: 16px; font-weight: 350; color: var(--text-muted); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 8px 16px; cursor: pointer; transition: color 150ms, border-color 150ms, background 150ms; }
.frames-tab:hover { color: var(--text); border-color: var(--text-muted); }
.frames-tab.is-active { color: var(--bg); background: var(--text); border-color: var(--text); }
.frames-nav { display: flex; align-items: center; gap: 8px; }
.frames-count { font-size: 13px; color: var(--text-muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.frames-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font: inherit; font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: border-color 150ms; }
.frames-arrow:hover { border-color: var(--text); }
/* Pfeile mittig links und rechts neben dem Bild, im Seitenrand (--content-inset). Unter 900px liegen sie über dem Bildrand. */
.frames-arrow.is-prev, .frames-arrow.is-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.frames-arrow.is-prev { left: calc((var(--content-inset) + 44px) / -2); }
.frames-arrow.is-next { right: calc((var(--content-inset) + 44px) / -2); }
@media (max-width: 900px) {
  .frames-arrow.is-prev { left: 8px; }
  .frames-arrow.is-next { right: 8px; }
}
.frames-tab:focus-visible, .frames-arrow:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.frames-caption { margin: var(--gutter) 0 0; font-size: 16px; color: var(--text-muted); max-width: 720px; min-height: 2.8em; }
@media (max-width: 720px) {
  .frames-stage { padding: 8px; }
  .frames-tab { font-size: 15px; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) { .frames-slide, .frames-slide.is-active { transition: none; } }


/* Ablauf in Schritten (media type "steps") */
.steps { width: var(--media-wide); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(var(--gutter) * 1.6) var(--gutter); }
.steps-item { margin: 0; min-width: 0; }
.steps-title { margin: 0 0 10px; font-size: var(--fs-label); font-weight: 450; color: var(--text); }
.steps-title span { color: var(--text-muted); margin-right: 4px; }
.steps-item .media { width: 100%; border-radius: calc(var(--radius) * 0.75); overflow: hidden; background: var(--surface); }
.steps-item .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.steps-text { margin: 10px 0 0; font-size: var(--fs-label); line-height: var(--lh-body); color: var(--text-muted); }
.steps-note { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Quellenlinks unter einem Prozesstext (Feld sources) */
/* Links im Fließtext ([Text](url) in content.js): gleiche Farbe wie der Text, feine Unterstreichung */
.inline-link { color: inherit; text-decoration: underline; text-decoration-color: var(--text-muted); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 200ms ease, text-decoration-color 200ms ease; }
.inline-link:hover { color: var(--text); text-decoration-color: currentColor; }
.inline-link:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 2px; }
.step-sources { margin: 12px 0 0; font-size: var(--fs-label); color: var(--text-muted); }
.step-source { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.step-source:hover { color: var(--text); text-decoration-color: currentColor; }

/* embed mit designWidth: keine Mindesthöhe, die Höhe ergibt sich aus Breite und ratio */
.embed-stage.is-scaled { min-height: 0; overflow: hidden; }
.embed:fullscreen .embed-stage.is-scaled { display: flex; align-items: center; justify-content: center; }

/* Bewertungsmatrix im Prozess (images-Eintrag type "ratings"), z.B. IDA 01 Research */
.media.ratings { display: flex; align-items: center; justify-content: center; }
.rt-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; container-type: inline-size; padding-right: 3.2em; box-sizing: border-box; }
.rt { width: 100%; border-collapse: collapse; font-size: clamp(10px, 2.2cqw, 13px); line-height: 1.2; color: var(--text); }
.rt th, .rt td { padding: 0; font-weight: 350; }
.rt thead th.rt-crit { height: 7.2em; vertical-align: bottom; position: relative; width: 7%; }
.rt thead th.rt-crit span { position: absolute; left: 50%; bottom: 0.4em; transform-origin: 0 100%; transform: rotate(-50deg); white-space: nowrap; color: var(--text-muted); }
.rt tbody th.rt-name { text-align: left; white-space: nowrap; padding-right: 0.8em; }
.rt tbody tr + tr th, .rt tbody tr + tr td { border-top: 1px solid rgba(20,20,20,0.06); }
.rt td { text-align: center; height: 1.75em; }
.rt-dot { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; vertical-align: middle; }
.rt-dot.is-plus { background: #3FA55B; }
.rt-dot.is-minus { background: #E5484D; }
.rt-dot.is-none { background: rgba(20,20,20,0.07); }
.rt-legend { margin: 0.9em 0 0; display: flex; gap: 1.4em; font-size: clamp(10px, 2cqw, 12px); color: var(--text-muted); }
.rt-legend span { display: inline-flex; align-items: center; gap: 0.45em; }

/* Feature-Überschriften auf dem Desktop immer einzeilig (kein Umbruch wie "comes / in"); sie dürfen breiter als die Textspalte werden */
@media (min-width: 721px) {
  .feature .text-block .block-title { white-space: nowrap; width: max-content; max-width: none; }
}
