/* ---------- Navigation ---------- */
.nav-fade {               /* gestufter Blur am unteren Rand: drei Ebenen, die nach oben weich auslaufen */
  position: fixed; inset: auto 0 0 0; height: 104px; z-index: 20; pointer-events: none;
}
.nav-fade i { position: absolute; inset: 0; display: block; }
.nav-fade i:nth-child(1) { -webkit-backdrop-filter: blur(1.5px) saturate(1.5); backdrop-filter: blur(1.5px) saturate(1.5);
  -webkit-mask-image: linear-gradient(to top, #000 55%, transparent); mask-image: linear-gradient(to top, #000 55%, transparent); }
.nav-fade i:nth-child(2) { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent 75%); mask-image: linear-gradient(to top, #000 35%, transparent 75%); }
.nav-fade i:nth-child(3) { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 50%); mask-image: linear-gradient(to top, #000 15%, transparent 50%); }
.nav-fade::after {        /* Hauch von Aufhellung ganz unten */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(242, 242, 242, 0.35), rgba(242, 242, 242, 0) 60%);
}
.nav {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30;
  display: flex; gap: var(--s-3); align-items: center;
  width: max-content;   /* sonst begrenzt left: 50 % die Breite auf die halbe Bildschirmbreite (Handy: Navi gequetscht, „schließen“ abgeschnitten) */
}
.nav__group {
  display: flex; gap: var(--s-1); align-items: center; padding: var(--s-2);
  border-radius: var(--r-m); border: 1px solid var(--glass-stroke);
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-pill);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav__group { background: rgba(230, 230, 230, 0.97); }
}
.nav__tab {
  display: flex; align-items: center; padding: 6px var(--s-5);
  border-radius: var(--r-s); color: var(--ui-dark);
  font-weight: 700; font-size: var(--fs-s); line-height: var(--lh-s);
  transition: background-color .15s ease, color .15s ease;
}
/* Hover nur bei echter Maus – auf dem Handy bleibt nach dem Antippen sonst ein „klebender“ Hover-Zustand (dunkleres Schwarz) */
@media (hover: hover) {
  .nav__tab:hover { background: rgba(38, 38, 38, 0.06); }
  .nav__tab[aria-current="page"]:hover, .nav__tab--dark:hover, .nav__tab[aria-expanded="true"]:hover { background: #000; }
}
.nav__tab[aria-current="page"], .nav__tab--dark, .nav__tab[aria-expanded="true"] { background: var(--ui-dark); color: #fff; }   /* offener Kontakt gilt als aktiv */
.nav__group--dark { border-color: var(--ui-dark); background: var(--ui-dark); }
/* Weicher Wechsel zur Projektseiten-Navi: „schließen“ fährt aus; auf dem Handy klappen zusätzlich die Beschriftungen ein. */
:root { --nav-dur: .48s; --nav-ease: cubic-bezier(.65, 0, .35, 1); }   /* gleiche Dauer und Kurve wie die gleitende Markierung (JS) */
.nav__tab { transition: background-color .2s ease, color .2s ease, padding var(--nav-dur) var(--nav-ease); }
.nav__label { display: block; overflow: hidden; max-width: 9em; opacity: 1;   /* max-width statt Grid: läuft auch auf dem iPhone (WebKit) weich */
  transition: max-width var(--nav-dur) var(--nav-ease), opacity .3s ease; }
.nav__label > span { display: inline-block; white-space: nowrap; padding-left: var(--s-2); }
/* Desktop: Icon und Text bleiben immer, nur auf dem Handy wird die Projektseiten-Navi zu Icons */
@media (max-width: 640px) { .nav--compact .nav__label:not(.nav__label--fest) { max-width: 0; opacity: 0; } }
.nav--compact .nav__tab:not(.nav__tab--dark) { padding-inline: var(--s-5); }
.nav__close { display: block; overflow: hidden; max-width: 0; margin-left: calc(var(--s-3) * -1); opacity: 0; transform: scale(.9);
  transition: max-width var(--nav-dur) var(--nav-ease), margin var(--nav-dur) var(--nav-ease), opacity .3s ease, transform var(--nav-dur) var(--nav-ease); }
.nav__close > .nav__group { min-width: 0; overflow: hidden; }
.nav--compact .nav__close { max-width: 16em; margin-left: 0; opacity: 1; transform: none; transition-delay: .08s; }

/* ---------- Seiten ---------- */
.page { padding: var(--s-6) var(--s-6) calc(var(--nav-height) + 40px); }

/* ---------- Projektraster ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); list-style: none; margin: 0; padding: 0; align-items: start; }
/* Spalten wie in der Referenz: 1 · ab 640 px 2 · ab 1024 px 3 (maximal 3) */
@media (max-width: 1023px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .grid { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; padding: 6px; text-align: left; width: 100%;
  background: var(--card);   /* Innenabstand rundum 6 px */ border-radius: var(--r-2xl); box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card__media { aspect-ratio: 475 / 300; border-radius: var(--r-xl); overflow: hidden; background: var(--placeholder); }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card__title {
  padding: var(--s-5) var(--s-3) var(--s-5) var(--s-7);
  color: #111; font-weight: 600; font-size: var(--fs-m); line-height: 20.8px;   
}
.card__name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* Titel immer einzeilig, Karten bleiben gleich hoch */

/* ---------- Projektseite als Ebene ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 10; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--s-6) var(--s-6) calc(var(--nav-height) + 40px);
}
.overlay__scrim {          /* abgedunkelter, weichgezeichneter Hintergrund, eigene Ebene neben .overlay (nicht darin: iOS Safari schneidet
                              fixierte Elemente in scrollenden Containern ab) und über den Bildschirmrand hinaus vergrößert */
  position: fixed; top: -160px; right: -40px; bottom: -160px; left: -40px; z-index: 9; pointer-events: none; background: var(--scrim);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
}
.sheet {
  width: min(100%, var(--sheet-width)); margin: 0 auto;
  display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5);
  background: var(--bg); border-radius: var(--r-2xl); box-shadow: var(--shadow-sheet);
  position: relative; z-index: 1; will-change: transform;
}
.sheet:focus { outline: none; }
/* Große Bildschirme: die ganze Projektseite 10 % größer (wie einmal Cmd +), Verhältnisse und Bildformate bleiben gleich */
@media (min-width: 1440px) { .sheet { zoom: 1.1; } }

/* ---------- Bild-Bausteine ---------- */
.media { border-radius: var(--r-l); overflow: hidden; background: var(--placeholder); }
.media :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-full { aspect-ratio: 856 / 360; }
/* Banner oben auf der Detailseite: Desktop 2:1, Handy und iPad (bis 1023 px) 4:3.
   Eine Datei im Format 4:3 mit Sicherheitszone reicht (siehe assets/README.md); object-fit: cover schneidet oben/unten. */
.media--banner { aspect-ratio: 2 / 1; }
@media (max-width: 1023px) { .media--banner { aspect-ratio: 4 / 3; } }
/* Bento: drei Spalten, jede Kachel mit eigenem Format. Schmale Kacheln (1 Spalte) übernehmen die Höhe der Nachbarin.
   Bis 640 px (dort laden die Handy-Fassungen) steht alles untereinander. */
.media-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.media-bento .media { position: relative; aspect-ratio: var(--format); }
.media-bento .media :is(img, video) { position: absolute; inset: 0; width: 100%; height: 100%; }
.media-bento .media--s1 { aspect-ratio: auto; }
.media-bento .media--s2 { grid-column: span 2; }
.media-bento .media--s3 { grid-column: 1 / -1; }
@media (max-width: 640px) { .media-bento .media { grid-column: 1 / -1; aspect-ratio: var(--format-mobil); } }
.media-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.media-split .media { aspect-ratio: 423 / 300; }
@media (max-width: 640px) { .media-split { grid-template-columns: 1fr; } }
.slider {
  display: flex; gap: var(--s-3); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; cursor: grab; user-select: none;
}
.slider::-webkit-scrollbar { display: none; }
.slider.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.slider .media { flex: 0 0 276px; height: 300px; scroll-snap-align: start; }

/* 3er-Reihe auf Projektseiten */
.media-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.media-trio .media { aspect-ratio: 276 / 300; }
@media (max-width: 640px) {
  .media-trio { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -12px; padding-inline: 12px; scroll-padding-inline: 12px; }
  .media-trio::-webkit-scrollbar { display: none; }
  .media-trio .media { flex: 0 0 78%; scroll-snap-align: start; }
}
.slider :is(img, video) { pointer-events: none; }

/* ---------- Section Header ---------- */
.section-header {
  display: flex; gap: var(--s-9); align-items: flex-start;
  padding: var(--s-6) var(--s-9) var(--s-7) var(--s-6);
}
.section-header__meta { flex: 0 0 180px; display: flex; flex-direction: column; gap: var(--s-2); }
.section-header__label { color: #000; font-weight: 600; font-size: var(--fs-s); line-height: var(--lh-s); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0;
  color: var(--text-muted); font-size: var(--fs-xs); line-height: 16px; }
.section-header__body { flex: 1; display: flex; flex-direction: column; gap: var(--s-5); }
.section-header__title { color: var(--text-strong); font-weight: 600; font-size: var(--fs-xl); line-height: var(--lh-xl); }
.lead { color: var(--text); font-weight: 500; font-size: var(--fs-s); line-height: var(--lh-body); }
@media (max-width: 640px) {
  .section-header { flex-direction: column; gap: var(--s-5); padding: var(--s-6) var(--s-3) var(--s-6); }
  .section-header__meta { flex-basis: auto; }
}

/* ---------- Akkordeon ---------- */
.accordion { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-3) 0 var(--s-6); }
.acc { background: var(--bg); padding: 0 var(--s-6); }
.acc__summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  min-height: 45px; border-top: 1px solid var(--line);
  color: var(--text-strong); font-weight: 600; font-size: var(--fs-m); line-height: var(--lh-m);
}
.acc__summary::-webkit-details-marker { display: none; }
.acc__summary .icon--offen, .acc[open] .acc__summary .icon--zu { display: none; }
.acc[open] .acc__summary .icon--offen { display: block; }
.acc__body { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-3) 0 var(--s-6); }

.acc__list { padding-left: var(--s-6); color: var(--text); font-weight: 500; display: flex; flex-direction: column; gap: var(--s-2); line-height: var(--lh-body); font-size: var(--fs-s); }
.acc__body strong { font-weight: 700; color: #222; }
.acc__sub { margin: var(--s-3) 0 calc(var(--s-2) * -1); font-size: var(--fs-s); line-height: var(--lh-body); font-weight: 700; color: #222; }
.acc__key { margin: 0; padding-left: var(--s-5); border-left: 3px solid #222; font-size: var(--fs-m); line-height: 1.5; font-weight: 700; color: #222; }
/* Fakten-Zeile: Fokus und Rolle */
.section-header__body .acc__facts { margin-top: var(--s-2); padding-top: var(--s-5); border-top: 1px solid #DDDDDD; }   /* feine Trennlinie zur Einleitung */
.acc__facts { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; font-size: var(--fs-xs); line-height: 16px; color: var(--text-muted); }
.acc__facts > div:not(:last-child)::after { content: "·"; margin: 0 var(--s-3); color: #b5b5b5; }
.acc__facts dt, .acc__facts dd { display: inline; margin: 0; }
.acc__facts dt { font-weight: 500; }
.acc__facts dt::after { content: ":"; }
.acc__facts dd { margin-left: 4px; font-weight: 600; color: #444; }
/* Flowmap (Baustein „karte“): Überblick im Text, ganzer Ablauf im Vollbild. Optional pro Projekt: ohne Baustein in der JSON erscheint sie nicht. */
.flowmap { margin: 0 0 var(--s-3); display: flex; flex-direction: column; gap: var(--s-3); }
.canvas { position: relative; overflow: hidden; border-radius: var(--r-m); background: #F8F8F8; border: 1px solid #E2E2E2; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.canvas.kann-ziehen { cursor: grab; }
.canvas.is-ziehen { cursor: grabbing; }
/* weicher Rand, wenn seitlich noch mehr kommt */
.canvas::before, .canvas::after { content: ""; position: absolute; top: 0; bottom: 0; width: 18px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.canvas::before { left: 0; background: linear-gradient(to right, rgba(248, 248, 248, .75), rgba(248, 248, 248, 0)); }
.canvas::after { right: 0; background: linear-gradient(to left, rgba(248, 248, 248, .75), rgba(248, 248, 248, 0)); }
.canvas.mehr-links::before, .canvas.mehr-rechts::after { opacity: 1; }
.canvas__world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.canvas__lines { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.kante { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.kante--haupt { stroke: #222; stroke-width: 2; }
.kante--neben { stroke: #A3A3A3; stroke-width: 1.6; stroke-dasharray: 5 5; }
.kante--sync { stroke: #1FA971; stroke-width: 2; }
.kante--rueck { stroke: #7A7A7A; stroke-width: 1.6; }
.pfeil--haupt { fill: #222; } .pfeil--neben { fill: #A3A3A3; } .pfeil--sync { fill: #1FA971; } .pfeil--rueck { fill: #7A7A7A; }
.port { fill: var(--surface); stroke-width: 1.6; }
.port--haupt { stroke: #222; } .port--neben { stroke: #A3A3A3; } .port--sync { stroke: #1FA971; } .port--rueck { stroke: #7A7A7A; }
.cnode { position: absolute; padding: var(--s-5) var(--s-6); background: var(--surface); border: 1px solid #DEDEDE; border-radius: var(--r-m); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.cnode--hervor { border: 1.5px solid #222; box-shadow: 0 0 0 4px rgba(34, 34, 34, .08); }
.cnode--entscheidung { border: 1.5px dashed #8A8A8A; background: #FCFCFC; }
.cnode__tag { position: absolute; left: 10px; top: -10px; padding: 1px 8px; border-radius: 6px; background: #F8F8F8; border: 1px solid #DEDEDE; font-size: 10.5px; line-height: 15px; font-weight: 600; font-style: normal; color: #555; }
.cnode--entscheidung .cnode__tag { border-style: dashed; }
.cnode b { display: block; overflow-wrap: anywhere; font-size: var(--fs-s); line-height: 1.35; font-weight: 700; color: #222; }
.cnode span { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid #ECECEC; font-size: var(--fs-xs); line-height: 1.45; color: #6b6b6b; font-weight: 500; }
.clabel { position: absolute; transform: translate(-50%, -50%); padding: 1px 9px; border-radius: 999px; background: #F2F2F2; border: 1px solid #DEDEDE; font-size: 10.5px; line-height: 16px; font-weight: 600; color: #555; white-space: nowrap; }
.clabel--haupt { background: var(--surface); border-color: #BDBDBD; color: #222; }
.clabel--sync { background: #E5F6EE; border-color: #BFE6D3; color: #14774F; }
.flowmap__fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-6); }
.flowmap__legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-xs); line-height: var(--lh-xs); color: #6b6b6b; }
.flowmap__legende li { display: flex; align-items: center; gap: var(--s-3); }
.leg { display: block; width: 18px; border-top: 2px solid #222; }
.leg--neben { border-top: 1.6px dashed #A3A3A3; }
.leg--sync { border-top-color: #1FA971; }
.leg--rueck { width: 14px; height: 7px; border: 1.6px solid #7A7A7A; border-bottom: 0; border-radius: 6px 6px 0 0; }
.flowmap__voll { position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #D4D4D4; background: var(--surface); color: #222; cursor: pointer; }
.flowmap__voll[hidden] { display: none; }
.canvas__pfeil { position: absolute; top: 50%; z-index: 3; width: 34px; height: 34px; margin-top: -17px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #D4D4D4; background: var(--surface); color: #222; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.canvas__pfeil--l { left: 8px; } .canvas__pfeil--r { right: 8px; }
.canvas.mehr-links .canvas__pfeil--l, .canvas.mehr-rechts .canvas__pfeil--r { opacity: 1; pointer-events: auto; }
.canvas.is-ziehen .canvas__pfeil { opacity: 0; pointer-events: none; }
.flowmap__fuss:not(:has(li)) { display: none; }
/* Vollbild */
.flowmap-voll { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; gap: var(--s-3); padding: calc(var(--s-6) + env(safe-area-inset-top)) var(--s-6) calc(var(--s-6) + env(safe-area-inset-bottom)); background: var(--bg); }
.flowmap-voll__kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.flowmap-voll__kopf b { font-size: var(--fs-m); line-height: var(--lh-m); color: #222; }
.flowmap-voll__ctrl { display: flex; gap: var(--s-2); }
.flowmap-voll__ctrl button { height: 34px; min-width: 34px; padding: 0 var(--s-3); border-radius: 17px; background: var(--surface); border: 1px solid #DCDCDC; font-size: var(--fs-s); font-weight: 700; line-height: 1; }
.canvas--voll { flex: 1; min-height: 0; touch-action: none; cursor: grab; background: var(--surface); }
.flowmap-voll__hint { margin: 0; font-size: var(--fs-xs); color: #8a8a8a; }
.flowmap-voll .nur-handy { display: none; }
@media (max-width: 640px) { .flowmap-voll .nur-desktop { display: none; } .flowmap-voll .nur-handy { display: inline; } .flowmap-voll { padding-inline: var(--s-5); } }

/* ---------- Prototyp-Steuerung (nur lokal) ---------- */
.proto { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: var(--s-3); font-size: 12px; line-height: 16px; }
.proto__toggle {
  padding: 8px 12px; border-radius: var(--r-m); background: var(--ui-dark); color: #fff; font-weight: 700;
  box-shadow: var(--shadow-pill);
}
.proto__panel {
  width: 260px; padding: var(--s-5); border-radius: var(--r-l); border: 1px solid var(--glass-stroke);
  background: rgba(250, 250, 250, 0.9); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; gap: var(--s-5);
}
.proto__panel[hidden] { display: none; }
.proto__group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.proto__group legend { padding: 0 0 6px; font-weight: 700; color: var(--text-strong); }
.proto__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.proto__chip input { position: absolute; opacity: 0; pointer-events: none; }
.proto__chip span { display: block; padding: 4px 8px; border-radius: 8px; background: var(--bg); color: var(--text); cursor: pointer; }
.proto__chip input:checked + span { background: var(--ui-dark); color: #fff; }
.proto__chip input:focus-visible + span { outline: 2px solid var(--ui-dark); outline-offset: 1px; }
@media (max-width: 640px) { .proto { bottom: calc(92px + env(safe-area-inset-bottom)); right: 12px; } .proto__panel { width: min(280px, calc(100vw - 24px)); max-height: 60vh; overflow-y: auto; } }

/* ---------- Hover der Projektkarten: Farbstapel ----------
   --schicht ist der Rand je Streifen. Unter der Karte schieben sich drei
   Streifen in den sattesten Farben des Titelbilds hervor (--c-stark1…3 aus js/app.js), die Nachbarn derselben Spalte
   weichen aus. Die oberste Karte einer Spalte (.ist-oberste) kann nicht hoch: dort wächst der Stapel nach unten. */
:root { --hover-delay: .14s; --fan-ease: cubic-bezier(.22, .61, .36, 1); }
.card { position: relative; isolation: isolate; --schicht: 11px; --stapelhoehe: calc(var(--schicht) * 3); }
.card__media { position: relative; }
.card__media img { position: relative; z-index: 1; }
.card__title { position: relative; overflow: hidden; }
.card__layers, .card__schichten { position: absolute; inset: 0; pointer-events: none; }
.card__layers { z-index: -1; }
.card__schichten { z-index: -2; }
.card:not(.card--pending) { background: transparent; box-shadow: none; }
.card:not(.card--pending) .card__layers { background: var(--card); box-shadow: var(--shadow-card); }
.card:not(.card--pending) :is(.card__layers, .card__media, .card__title) { transition: transform .55s var(--fan-ease); }

/* Streifen: --n 1 liegt ganz außen, --n 3 direkt an der Karte */
.card__schichten i { position: absolute; left: 0; right: 0; bottom: calc((var(--n) - 1) * var(--schicht)); height: calc(var(--schicht) + 28px); z-index: var(--n);
  border-radius: 0 0 var(--r-2xl) var(--r-2xl); opacity: 0; transform: translateY(-6px); filter: saturate(1.5) contrast(1.08);
  transition: transform .45s var(--fan-ease), opacity .3s ease;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, .38) 48%, transparent 70%), radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(90deg, color-mix(in srgb, var(--a) 92%, #000), var(--b) 50%, var(--c));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 -1px 0 rgba(0, 0, 0, .09); }
.card__schichten i:nth-child(1) { --n: 1; --a: color-mix(in srgb, var(--c-stark3, #999) 70%, #000); --b: var(--c-stark3, #aaa); --c: var(--c-stark1, #bbb); }
.card__schichten i:nth-child(2) { --n: 2; --a: var(--c-stark2, #aaa); --b: var(--c-stark1, #bbb); --c: color-mix(in srgb, var(--c-stark2, #999) 70%, #000); }
.card__schichten i:nth-child(3) { --n: 3; --a: var(--c-stark1, #bbb); --b: var(--c-stark2, #ccc); --c: var(--c-stark3, #ddd); }
.card.ist-oberste .card__schichten i { bottom: calc((var(--n) - 4) * var(--schicht)); }

@media (hover: hover) {
  .card:not(.card--pending):is(:hover, :focus-visible) { z-index: 2; }
  .card:not(.card--pending):is(:hover, :focus-visible) .card__schichten i { opacity: 1; transform: none; transition-delay: calc(var(--hover-delay) + (3 - var(--n)) * 55ms); }
  .card:not(.card--pending):is(:hover, :focus-visible) :is(.card__layers, .card__media, .card__title) { transform: translateY(calc(var(--stapelhoehe) * -1)); transition-delay: var(--hover-delay); }
  .card.ist-oberste:not(.card--pending):is(:hover, :focus-visible) :is(.card__layers, .card__media, .card__title) { transform: none; }
}
/* Nachbarkarten rutschen mit (Klasse setzt js/app.js) */
.ist-geschoben { transition: transform .55s var(--fan-ease); }
@media (prefers-reduced-motion: reduce) { .card__schichten i { transition: opacity .2s ease !important; } }

/* ---------- Kontakt: eine Karte über der Navi, keine eigene Seite ---------- */
.kontakt {
  position: fixed; left: 50%; bottom: calc(16px + 46px + 22px); transform: translateX(-50%); z-index: 35;
  width: min(320px, calc(100vw - 32px)); pointer-events: none;
  --kontakt-h: 48px;   /* Höhe jeder Fläche, oben wie unten */
}
.kontakt[data-offen] { pointer-events: auto; }
/* steigt gerade auf und wird dabei scharf */
.kontakt__card {
  display: flex; flex-direction: column; gap: var(--s-2); padding: 6px; border-radius: var(--r-xl);
  background: var(--text-strong); color: #fff; box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(30px) scale(.96); filter: blur(6px);
  transition: transform .65s var(--fan-ease), opacity .35s ease, filter .5s ease;
}
.kontakt[data-offen] .kontakt__card { opacity: 1; transform: none; filter: none; }
.kontakt__kachel { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); width: 100%; height: var(--kontakt-h); padding: 0 var(--s-5); border-radius: 14px; background: var(--ui-dark); font-weight: 600; font-size: var(--fs-s); line-height: var(--lh-s); transition: background-color .2s ease; }
a.kontakt__kachel:hover { background: #333; }
.kontakt__kachel[aria-disabled="true"] { opacity: .55; cursor: default; }
.kontakt__mail { min-width: 0; font-weight: 500; font-size: var(--fs-s); line-height: var(--lh-s); overflow-wrap: anywhere; }
.kontakt__mail:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Kopieren sitzt als eigener Knopf mit Abstand am rechten Rand der Kachel */
.kontakt__kachel:has(.kontakt__knopf) { padding-right: 6px; }
.kontakt__knopf { flex: none; min-width: 84px; min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-s); background: rgba(255, 255, 255, .1); font-weight: 600; font-size: var(--fs-xs); transition: background-color .2s ease; }
.kontakt__knopf:hover { background: rgba(255, 255, 255, .18); }
.kontakt__paar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.pfeil { width: 14px; height: 14px; }
/* Handy: fast volle Breite und alles im selben Verhältnis größer */
@media (max-width: 640px) {
  .kontakt { width: min(420px, calc(100vw - 24px)); --kontakt-h: 60px; }
  .kontakt__kachel { padding: 0 var(--s-6); font-size: var(--fs-m); }
  .kontakt__mail { font-size: var(--fs-m); }
  .kontakt__knopf { min-width: 96px; min-height: 48px; font-size: var(--fs-s); }
  .kontakt .pfeil { width: 16px; height: 16px; }
}
@media (max-width: 374px) {   /* sehr schmal: Adresse bleibt einzeilig */
  .kontakt__kachel { padding: 0 var(--s-5); }
  .kontakt__mail { font-size: var(--fs-s); }
  .kontakt__knopf { min-width: 80px; font-size: var(--fs-xs); }
}

/* Zieh-Hinweis: dunkle Pille begleitet über Bildreihen den Mauszeiger (rechts unten daneben), beim Ziehen wird sie kleiner */
.zieh-pille { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; }
.zieh-pille { display: flex; align-items: center; gap: var(--s-3); margin: 16px 0 0 16px; transform-origin: 0 0; padding: 8px 12px 8px 8px; border-radius: var(--r-m);
  background: var(--ui-dark); color: #fff; font-weight: 700; font-size: var(--fs-s); line-height: var(--lh-s);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); opacity: 0; scale: .6; transition: opacity .2s ease, scale .3s var(--fan-ease); }
.zieh-pille svg { width: 18px; height: 18px; }
.zieh-pille.is-sichtbar { opacity: 1; scale: 1; }
.zieh-pille.is-gedrueckt { scale: .88; }
.slider.has-pille { cursor: grab; } .slider.has-pille.is-dragging { cursor: grabbing; }

/* ---------- Handy: Navi mit ausreichend großen Tippflächen ----------
   Richtwert: mindestens 44 × 44 pt (Apple) bzw. 48 × 48 dp (Material). Hier etwas darüber: Tabs 52 px hoch, mind. 56 px breit.
   Nur der aktive Tab zeigt seinen Text, inaktive nur das Icon – so passt die Navi samt „schließen“ in die Breite. */
@media (max-width: 640px) {
  .nav { bottom: calc(12px + env(safe-area-inset-bottom)); gap: 8px; max-width: calc(100vw - 24px); }
  .nav__group { padding: 4px; border-radius: 16px; }
  .nav__tab { min-height: 52px; min-width: 56px; justify-content: center; padding: 14px 16px; border-radius: 12px; font-size: 15px; }
  .nav__tab .icon { width: 26px; height: 26px; }
  .nav--compact .nav__tab:not(.nav__tab--dark) { padding-inline: 16px; }
  .nav--compact .nav__tab[aria-current] .nav__label { max-width: 0; opacity: 0; }   /* auf der Projektseite hat „schließen“ den Text */
  .nav__close { margin-left: -8px; }
  .nav--compact .nav__close { margin-left: 0; }
  .nav-fade { height: calc(112px + env(safe-area-inset-bottom)); }
  .page, .overlay { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .kontakt { bottom: calc(12px + 62px + 16px + env(safe-area-inset-bottom)); }

}

/* Gleitende Markierung in der Navi: die dunkle Fläche wandert zum aktiven Tab (Desktop und Handy gleich) */
.nav__group--wechsel { position: relative; }
.nav__indicator { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: var(--r-s); background: var(--ui-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18); pointer-events: none; will-change: transform, width; }
.nav__group--wechsel .nav__tab { position: relative; z-index: 1; }
.nav__group--wechsel .nav__tab[aria-current="page"], .nav__group--wechsel .nav__tab[aria-current="page"]:hover { background: transparent; }
.nav__group--wechsel .nav__tab { transition: color var(--nav-dur) var(--nav-ease), background-color .2s ease, padding var(--nav-dur) var(--nav-ease); }   /* Textfarbe wechselt im Takt der Markierung */
@media (max-width: 640px) { .nav__indicator { border-radius: 12px; } }

/* Immer nur ein aktiver Zustand: Ist der Kontakt offen, tritt die Markierung bei Projekte/Über mich zurück */
.nav__indicator { transition: opacity .25s ease; }
.nav--kontakt .nav__indicator { opacity: .16; }   /* vorheriger Tab bleibt verankert, aber zurückgenommen */
.nav--kontakt .nav__group--wechsel .nav__tab[aria-current="page"] { color: var(--ui-dark); }

@media (max-width: 640px) {
  /* Projektseite + offener Kontakt: Kontakt bleibt ein Icon (dunkel), damit „schließen“ ganz sichtbar bleibt */
  .nav--compact .nav__tab[aria-expanded="true"] .nav__label { max-width: 0; opacity: 0; }
}
@media (max-width: 360px) {
  /* sehr schmale Handys: auch „schließen“ nur als Icon (Screenreader lesen die Beschriftung weiter) */
  .nav__label--fest { max-width: 0 !important; opacity: 0; }
  .nav__tab { padding-inline: 14px; min-width: 52px; }
}

/* Platzhaltergrau nur ohne Bild – sonst schimmert es an den (im Export abgerundeten) Bildecken als dunkler Rand durch */
.card__media:has(img), .media:has(img, video) { background: transparent; }

/* Responsive Navi in Stufen (gemessen: alles beschriftet ≈ 395 px, ohne „Kontakt“-Text ≈ 336 px):
   über 420 px  · alles mit Text, wie am Desktop
   bis 420 px   · Projekte und Über mich mit Text, Kontakt nur als Icon (geöffnet: dunkel)
   bis 360 px   · nur der aktive Tab mit Text
   Projektseite · immer kompakt: Icons + „schließen“ (bis 360 px auch das nur als Icon) */
@media (max-width: 420px) {
  .nav__tab[data-kontakt-knopf] .nav__label { max-width: 0; opacity: 0; }
}
@media (max-width: 360px) {
  .nav__group--wechsel .nav__tab:not([aria-current]) .nav__label { max-width: 0; opacity: 0; }
}

/* Handy: Projektseite als Bottom-Sheet – volle Breite, oben bleibt ein Streifen der Seite sichtbar, Griff zum Herunterziehen */
.sheet__griff { display: none; }
@media (max-width: 640px) {
  /* Handy: kein Blick auf die Seite dahinter. Hintergrund = Farbe der Karte, die Seite blendet per JS mit aus und ein (app.js, HANDY), kein Blur (einfacher, robust in iOS Safari,
     auch unter der Statusleiste). Desktop bleibt unverändert (Karte über weichgezeichneter Seite). */
  .overlay__scrim { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.is-locked { background: var(--bg); }
  .overlay { padding: calc(var(--s-6) + env(safe-area-inset-top)) 0 0; }
  .sheet { width: 100%; min-height: calc(100% - 14px - env(safe-area-inset-top)); border-radius: 24px 24px 0 0;
    padding: 24px 12px calc(110px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, .12); }
  .sheet__griff { display: block; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px;
    border-radius: 3px; background: rgba(0, 0, 0, .2); }
}

/* Projektseite: Die Navi fährt weg, nur „schließen“ bleibt; nach dem Schließen kommt sie zurück */
.nav > .nav__group { max-width: 30em; transition: max-width var(--nav-dur) var(--nav-ease), opacity .3s ease, padding var(--nav-dur) var(--nav-ease),
  margin var(--nav-dur) var(--nav-ease), border-width var(--nav-dur) var(--nav-ease), transform var(--nav-dur) var(--nav-ease); }
.nav--compact > .nav__group { max-width: 0; padding-inline: 0; border-width: 0; margin-right: calc(var(--s-3) * -1);
  opacity: 0; transform: scale(.9); overflow: hidden; pointer-events: none; }
@media (max-width: 640px) { .nav--compact > .nav__group { margin-right: -8px; } }

/* Hinter der Kontaktkarte: weicher Blur-Kreis von unten, damit die Karte vor der
   unruhigen Seite gut lesbar sind – wie der Glas-Effekt hinter der Navi. Liegt unter der Navi, die bleibt scharf. */
.kontakt-hintergrund { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; transition: opacity .45s ease;
  --hg-form: ellipse 62% 42% at 50% 100%;   /* Größe des Blur-Kreises: nur um die Karte herum */
  --hg-blur: 6px; --hg-weiss: .3;           /* Stärke */
  background: radial-gradient(var(--hg-form), rgba(242, 242, 242, var(--hg-weiss)), rgba(242, 242, 242, 0) 75%);
  -webkit-backdrop-filter: blur(var(--hg-blur)); backdrop-filter: blur(var(--hg-blur));
  -webkit-mask-image: radial-gradient(var(--hg-form), #000 45%, transparent 100%); mask-image: radial-gradient(var(--hg-form), #000 45%, transparent 100%); }
@media (max-width: 760px) { .kontakt-hintergrund { --hg-form: ellipse 110% 62% at 50% 100%; } }   /* Handy: breiterer Kreis */
body.kontakt-offen .kontakt-hintergrund { opacity: 1; pointer-events: auto; }

/* ---------- Bausteine im Akkordeon: Chips und Zeitband ---------- */
/* Chips */
.chipgruppen { display: flex; flex-direction: column; gap: var(--s-5); }
.chipgruppe__titel { margin: 0 0 var(--s-2); font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: var(--text-muted); }
.chipreihe { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chip { font-size: var(--fs-s); line-height: 18px; font-weight: 500; color: #222; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px 12px; }

/* Kompakte Chips: Mini-Chip im Text ([[…]]) und Chip-Zeilen mit Beschriftung links */
.chip--inline { display: inline-block; font-size: var(--fs-xs); line-height: 16px; padding: 1px 8px; margin: 1px 0; vertical-align: 1px; font-weight: 600; color: #333; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 999px; }
.chipgruppen--kompakt { gap: var(--s-3); }
.chipgruppen--kompakt .chipgruppe { display: grid; grid-template-columns: 172px 1fr; gap: var(--s-3); align-items: center; }
.chipgruppen--kompakt .chipgruppe__titel { margin: 0; }
.chipgruppen--kompakt .chipreihe { gap: var(--s-2); }
.chipgruppen--kompakt .chip { font-size: var(--fs-xs); line-height: 16px; padding: 2px 8px; font-weight: 600; color: #333; }

/* Zeitband */
.zb { margin: var(--s-2) 0; display: flex; flex-direction: column; gap: var(--s-3); }
.zb__bahn { position: relative; height: 12px; background: #E4E4E4; border-radius: 999px; overflow: hidden; }
.zb__feld { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.zb__feld--hell { background: #BDBDBD; } .zb__feld--dunkel { background: var(--ui-dark); }
.zb__achse { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: var(--text-muted); }
.zb__achse span { border-left: 1px solid var(--line); padding-left: 4px; }

.zb__text { margin: 0; font-size: var(--fs-s); line-height: 20px; font-weight: 500; color: var(--text); }

/* Gerahmt, mit Marker und Legende */
.zb--rahmen { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-m); padding: var(--s-5) var(--s-6) var(--s-6); gap: var(--s-3); }
.zb__titel { margin: 0; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: var(--text-muted); }
.zb--rahmen .zb__bahn { height: 10px; background: #EDEDED; overflow: visible; }
.zb--rahmen .zb__feld { border-radius: 999px; }
.zb--rahmen .zb__achse { margin-top: calc(var(--s-2) * -1); }

.zb__text--klein { font-size: var(--fs-xs); line-height: 17px; color: var(--text); }

.zb__marke-wrap { position: relative; padding-top: 24px; }
.zb__marker { position: absolute; top: 0; bottom: -2px; width: 0; border-left: 1px dashed #8A8A8A; }
.zb__flagge { position: absolute; top: -1px; right: 8px; white-space: nowrap; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: #333; }
.zb__legende { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.zb__legende li { display: grid; grid-template-columns: 10px 1fr; gap: var(--s-3); align-items: baseline; }
.zb__legende .zb__punkt { width: 9px; height: 9px; border-radius: 50%; display: block; position: static; }
.zb__legende .zb__text { margin: 0; }
.zb__marke-wrap--ohne { padding-top: 0; }
.zb__marke-wrap--ohne .zb__marker { top: -4px; bottom: -4px; }
/* Beschriftungen in fester Spalte mit Doppelpunkt, Chips daneben */
.chipgruppen--kompakt .chipgruppe__titel::after { content: ":"; }
@media (max-width: 640px) { .chipgruppen--kompakt .chipgruppe { grid-template-columns: 1fr; gap: var(--s-2); } }

/* Impressum und Datenschutz */
.recht { max-width: 720px; margin: 0 auto; padding: var(--s-9) var(--s-6) var(--s-8); color: var(--text); }
.recht__titel { margin: 0 0 var(--s-7); font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 600; color: var(--text-strong); }
.recht section { margin-bottom: var(--s-7); }
.recht__sub { margin: 0 0 var(--s-2); font-size: var(--fs-m); line-height: var(--lh-m); font-weight: 700; color: #222; }
.recht p { margin: 0 0 var(--s-3); font-size: var(--fs-s); line-height: var(--lh-body); font-weight: 500; }
.recht a { color: inherit; text-decoration: underline; }
.recht__offen { background: #FFE9A8; padding: 0 4px; border-radius: 4px; }

/* ---------- Ausgegraute Karten für Projekte „in Arbeit“ (nur im Live-Stand): flache Platzhalter-Blöcke ---------- */
.card--pending { cursor: default; transition: none; box-shadow: none; background: #EFEFEF; }
.card--pending:is(:hover, :focus-visible) { transform: none; box-shadow: none; }
.card--pending:focus-visible { outline: 2px solid #8a8a8a; outline-offset: 2px; }
.card--pending .card__media { position: relative; display: block; background:
  linear-gradient(#D6D6D6, #D6D6D6) 8% 74% / 46% 9% no-repeat,
  linear-gradient(#D6D6D6, #D6D6D6) 8% 88% / 28% 6% no-repeat,
  linear-gradient(#DBDBDB, #DBDBDB) 92% 50% / 34% 62% no-repeat,
  #E2E2E2; }
.card--pending .card__title, .card--pending .card__name { color: var(--text-muted); }
.card__pille { position: absolute; top: var(--s-5); left: var(--s-5); z-index: 2; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; color: #444; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 4px 8px; }
.card__tipp { position: absolute; left: 50%; top: 42%; z-index: 6; width: max-content; max-width: min(260px, 86%); transform: translate(-50%, 6px); opacity: 0; pointer-events: none; background: var(--ui-dark); color: #fff; font-size: var(--fs-xs); line-height: 17px; font-weight: 500; text-align: center; padding: 8px 12px; border-radius: var(--r-s); transition: opacity .18s ease, transform .18s ease; }
.card--pending:is(:hover, :focus-visible, .is-tipp) .card__tipp { opacity: 1; transform: translate(-50%, 0); }

/* Ecken der Hover-Ebenen folgen dem Kartenradius */
.card__layers { border-radius: inherit; }

/* ======================================================================
   Über mich: links die Fotos, rechts Karten in einer breiten und einer schmalen Spalte, 12 px Raster.
   Vorlage: Dans Figma-Entwurf für 1512 px.

   ab 1200 px   Fotospalte 232, Karten 808 : 366
   901–1199     Fotospalte 200, Karten 2 : 1
   700–900      Fotoreihe oben (zum Wischen), Karten 3 : 2
   bis 699      eine Spalte
   ====================================================================== */
.page[data-aktiv="ueber-mich"] { padding: var(--s-5) var(--s-5) 0; }
.ub { --text-muted: #6B6B6B; --link: #1A3FD0; display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s-5); align-items: start; color: var(--text-strong); font-weight: 500; }

/* Linke Spalte */
.ub-links { position: sticky; top: var(--s-5); display: flex; flex-direction: column; min-width: 0; }
.ub-bilder { display: flex; gap: var(--s-5); min-width: 0; scrollbar-width: none; }
.ub-bilder::-webkit-scrollbar { display: none; }
.ub-bilder .media { flex: none; border-radius: var(--r-xl); }
@media (min-width: 901px) {
  .ub-links { height: calc(100vh - var(--s-5)); }
  .ub-links .ub-bilder { flex: 1; min-height: 0; flex-direction: column; overflow-y: auto; border-radius: var(--r-xl); padding-bottom: var(--s-5); }
  .ub-links .ub-bilder .media { width: 100%; aspect-ratio: 276 / 300; }
}
@media (min-width: 901px) and (max-width: 1199px) { .ub { grid-template-columns: 200px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .ub { grid-template-columns: minmax(0, 1fr); }
  .ub-links { position: static; }
  .ub-bilder { overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -12px; padding-inline: 12px; scroll-padding-inline: 12px; cursor: grab; }
  /* zwei Fotos ganz, das dritte angeschnitten */
  .ub-bilder .media { width: clamp(125px, 39vw, 232px); aspect-ratio: 276 / 300; scroll-snap-align: start; }
}

/* Rechte Seite */
.ub-rechts { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; padding-bottom: calc(var(--nav-height) + var(--s-6)); }
.ub .media { background: var(--placeholder); }
.ub .media :is(img, video) { width: 100%; height: 100%; object-fit: cover; }
.rk-raster { display: grid; grid-template-columns: minmax(0, 808fr) minmax(240px, 366fr); gap: var(--s-5); align-items: stretch; }
.rk-spalte { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; container-type: inline-size; }
.rk { background: var(--bg); border-radius: var(--r-2xl); padding: var(--s-7) var(--s-7) var(--s-8); font-size: var(--fs-s); line-height: 20px; min-width: 0; }
.rk__label { align-self: flex-start; width: fit-content; margin: 0 0 var(--s-7); padding: 3px var(--s-3); border-radius: var(--s-2); background: var(--line); font-size: var(--fs-xs); line-height: 18px; font-weight: 600; }

/* Reihen der breiten Spalte. Die unterste Karte reicht bis zum Ende der Spalte */
.rk-reihe { display: grid; gap: var(--s-5); }
.rk-reihe--ki { grid-template-columns: minmax(0, 514fr) minmax(0, 280fr); }
.rk-reihe--design { grid-template-columns: minmax(0, 280fr) minmax(0, 516fr); }
@container (max-width: 600px) { .rk-reihe { grid-template-columns: minmax(0, 1fr); } }
.rk-spalte--haupt > :last-child { flex: 1; }
/* AI-native Work und UX-Brain bleiben lange nebeneinander; die Karte ist nie breiter als 300 px */
.rk-reihe.rk-reihe--ki { grid-template-columns: minmax(0, 1fr) clamp(210px, 35%, 300px); }
/* UX-Brain: feste Fläche, die Karte füllt sie. Beim Hover rutschen nur Titel und Kartengrund hoch und legen den
   Farbstapel darunter frei, alles innerhalb der Fläche. Die bewegte Grafik behält ihre Größe: sie zeichnet sich bei
   jeder Größenänderung neu und würde sonst blitzen */
.rk-ux { display: flex; flex-direction: column; min-width: 0; min-height: 220px; }
.rk-ux .card { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; contain: size; }
.rk-ux .card__media { flex: 1; min-height: 0; aspect-ratio: auto; }
.rk-ux .card__media > img { position: absolute; inset: 0; }
.rk-ux .card:not(.card--pending) .card__title { z-index: 3; border-radius: 0 0 var(--r-xl) var(--r-xl); transition: transform .55s var(--fan-ease), background-color .2s ease; }
.rk-ux .card:not(.card--pending) .card__layers { transition: bottom .55s var(--fan-ease); }
@media (hover: hover) {
  .rk-ux .card:not(.card--pending):is(:hover, :focus-visible) :is(.card__layers, .card__media) { transform: none; }
  .rk-ux .card:not(.card--pending):is(:hover, :focus-visible) .card__layers { bottom: var(--stapelhoehe); transition-delay: var(--hover-delay); }
  .rk-ux .card:not(.card--pending):is(:hover, :focus-visible) .card__title { transform: translateY(calc(var(--stapelhoehe) * -1)); background: var(--card); transition-delay: var(--hover-delay); }
}
@container (max-width: 420px) { .rk-reihe.rk-reihe--ki { grid-template-columns: minmax(0, 1fr); } .rk-ux { min-height: 0; } .rk-ux .card { contain: none; } .rk-ux .card__media { flex: none; aspect-ratio: 475 / 300; } }

/* Intro wie auf den Projektseiten: Headline 24, Fließtext in der Größe aller Karten. Kontakt daneben ist gleich hoch */
.rk__intro { display: flex; flex-direction: column; gap: var(--s-6); max-width: 640px; }
.rk__titel { margin: 0; font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 600; text-wrap: balance; }
@media (min-width: 1200px) { .rk--intro, .rk--kontakt { min-height: 243px; } }

/* Skills und Prozess: Gruppen als Spalten, ein Begriff je Zeile */
.sk { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: var(--s-7) var(--s-6); }
.sk ul { list-style: none; margin: 0; padding: 0; }
.sk__kopf { margin: 0 0 var(--s-5); font: inherit; color: var(--text-muted); }
@container (min-width: 900px) { .sk:not(.pz) { justify-content: start; column-gap: var(--s-8); } }
@container (max-width: 720px) { .sk { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sk.pz { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: var(--s-8) var(--s-6); }
.rk--skills, .rk--prozess, .rk--toolset { display: flex; flex-direction: column; }

/* Toolsets: Icon oben bündig mit dem Namen, darunter wofür. Die Icon-Dateien haben rund 3 px eigenen Rand */
.tl { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: var(--s-8) var(--s-6); align-content: start; margin: 0; padding: 0; list-style: none; }   /* so viele Spalten, wie Platz ist */
.rk--tool-grafik .tl { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); column-gap: var(--s-5); }
.tl__item { display: flex; align-items: flex-start; gap: var(--s-3); min-width: 0; }
.tl__item img { flex: none; width: 40px; height: 40px; margin: -1px -3px; }
.tl__item div { min-width: 0; }
.tl__item strong, .tl__item span { display: block; }
.tl__item span { color: var(--text-muted); }

/* Kontakt */
.rk--kontakt { display: flex; flex-direction: column; align-items: flex-start; }
.ko__titel { color: var(--text-muted); margin: 0 0 var(--s-2); }
.ko__titel--plattform { margin-top: auto; padding-top: var(--s-8); margin-bottom: var(--s-2); }
.ko__mail { overflow-wrap: anywhere; }
.ko__mail:hover { text-decoration: underline; text-underline-offset: 4px; }
.ko__link { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 28px; font-weight: 500; color: var(--link); }
.ko__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.ko__link[aria-disabled="true"] { opacity: .55; }
.ko__extern { width: 15px; height: 15px; }

/* Kleine Kacheln: Überschrift, Wert, beim wechselnden Wert darunter die Punkte; beide Werte auf einer Linie */
.rk-zahlen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.rk--zahl { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); min-height: 102px; padding: var(--s-7) var(--s-2) var(--s-5); text-align: center; }
.rk--zahl .ko__titel { margin: 0; }
.rk--zahl .rk__wert { font-size: 16px; line-height: 21px; font-weight: 700; overflow-wrap: normal; }
@container (max-width: 260px) { .rk-zahlen { grid-template-columns: minmax(0, 1fr); } .rk--zahl { min-height: 0; } }

/* Werdegang: Akkordeon mit Logo, Name und Zeitraum; Rollen mit Jahren daneben */
.wg__bereich { border-top: 1px solid var(--line); }
.wg__bereich:first-child { border-top: 0; }
.wg__kopf { display: flex; align-items: center; gap: var(--s-5); padding: var(--s-5) 0; list-style: none; cursor: pointer; }
.wg__kopf::-webkit-details-marker { display: none; }
/* Beim Schließen zeigt das Symbol schon den Zielzustand (js: weichAufklappen) */
.wg__bereich[data-zu][open] > .wg__kopf .icon--offen { display: none; }
.wg__bereich[data-zu][open] > .wg__kopf .icon--zu { display: block; }
/* Hover: eine Fläche hinter der ganzen Zeile, ragt links und rechts über den Text hinaus */
.wg__kopf { position: relative; isolation: isolate; }
.wg__kopf::before { content: ""; position: absolute; inset: var(--s-2) calc(-1 * var(--s-3)); z-index: -1; border-radius: var(--r-m); background: rgba(0, 0, 0, .05); opacity: 0; transition: opacity .18s ease; }
.wg__bereich:first-child > .wg__kopf::before { top: -6px; }   /* oberste Zeile hat oben keinen Abstand */
@media (hover: hover) { .wg__kopf:hover::before { opacity: 1; } }
.wg__kopf:is(:active, :focus-visible)::before { opacity: 1; }
.wg__bereich:first-child > .wg__kopf { padding-top: 0; }
.wg__logo { flex: none; width: 24px; height: 24px; border-radius: 5px; }
.wg__name { flex: 1; min-width: 0; line-height: 18px; }
.wg__ort, .wg__spanne { display: block; }
.wg__spanne { font-style: italic; font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums; }
.wg__kopf .icon { flex: none; width: 20px; height: 20px; }
.wg__kopf .icon--offen, .wg__bereich[open] > .wg__kopf .icon--zu { display: none; }
.wg__bereich[open] > .wg__kopf .icon--offen { display: block; }
.wg__bereich ul { margin: 0; padding: 0 0 var(--s-5); list-style: none; }
.wg__bereich li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-5); padding: var(--s-2) 0; }
.wg__rolle { min-width: 0; }
.wg__zeit { flex: none; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Datenschutz und Impressum: nur so hoch wie der Inhalt, oben angedockt unter der Karte davor */
.rk.rk--recht { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-3) var(--s-7); padding-block: var(--s-6); color: var(--text-muted); font-size: 10px; line-height: 14px; }
.rk--recht a { display: inline-flex; align-items: center; min-height: 24px; }   /* kleine Schrift, aber noch gut zu treffen */
.rk.rk--recht { padding-block: var(--s-5); }
.rk--recht a:hover { color: var(--text-strong); text-decoration: underline; }

/* Pfeil-Knopf unten in der Fotospalte: zeigt, dass die Fotos weiterscrollen */
.ub-weiter { display: none; }
@media (min-width: 901px) {
  .ub-weiter { display: grid; place-items: center; position: fixed; left: 128px; bottom: 16px; z-index: 30; width: 48px; height: 48px; transform: translateX(-50%); border-radius: var(--r-m); background: var(--ui-dark); color: #fff; box-shadow: var(--shadow-pill); transition: opacity .25s ease, transform .25s ease, background-color .15s ease; }
  .ub-weiter svg { width: 22px; height: 22px; }
  .ub-weiter:hover { background: #000; }
  .ub-weiter[data-ende] { opacity: 0; pointer-events: none; transform: translate(-50%, 6px); }
  body.is-locked .ub-weiter { display: none; }   /* nicht über der geöffneten Projektseite */
}

/* Wechselnde Werte (Kachel „Erfahrung in“, Werkzeuge) */
.wx { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); min-width: 0; }
.wx__werte { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; text-align: center; }
.wx__werte span { grid-area: 1 / 1; min-width: 0; align-self: center; opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.wx__werte span[data-aktiv] { opacity: 1; transform: none; transition: opacity .5s ease .4s, transform .5s ease .4s; }   /* erst raus, dann rein: nie zwei Begriffe übereinander */
.wx__punkte { display: flex; gap: var(--s-2); }
.wx__punkte i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .25; transition: opacity .3s ease; }
.wx__punkte i[data-aktiv] { opacity: 1; }
.rk--klickbar { cursor: pointer; user-select: none; }

@media (max-width: 1199px) { .rk__titel { font-size: 20px; line-height: 26px; } }
@media (min-width: 700px) and (max-width: 900px) { .rk-raster { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
/* Handy: eine Spalte, sinnvolle Reihenfolge über alle Karten */
@media (max-width: 699px) {
  .rk-raster { grid-template-columns: minmax(0, 1fr); }
  .rk-spalte { container-type: normal; }
  .rk-spalte, .rk-reihe { display: contents; }
  .rk-raster .rk--intro { order: 1; } .rk-raster .rk-zahlen { order: 2; } .rk-raster .rk--ki { order: 3; } .rk-raster .rk-ux { order: 4; }
  .rk-raster .rk--tool-design { order: 5; } .rk-raster .rk--prozess { order: 6; } .rk-raster .rk--skills { order: 7; }
  .rk-raster .rk--werd { order: 9; } .rk-raster .rk--tool-grafik { order: 10; } .rk-raster .rk--kontakt { order: 11; } .rk-raster .rk--recht { order: 12; }
  .sk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ko__titel--plattform { padding-top: var(--s-7); }
  .rk.rk--recht { justify-content: center; }
}

/* Dreierkombi in schmalen Desktop-Breiten (Klasse setzt js/app.js: dreierkombi) */
.rk-reihe.rk-reihe--ki.rk-reihe--dreier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rk-reihe--dreier > .rk--ki { grid-column: 1 / -1; }
.rk-reihe--dreier > .rk-zahlen { grid-column: 1; grid-row: 2; grid-template-columns: minmax(0, 1fr); }
.rk-reihe--dreier > .rk-ux { grid-column: 2; grid-row: 2; min-height: 216px; }
.rk-reihe--dreier > .rk-ux .card { contain: size; }
.rk-reihe--dreier > .rk-ux .card__media { flex: 1; aspect-ratio: auto; }

/* Phone: UX-Brain über die volle Breite im Format der Rasterkarten */
@media (max-width: 479px) { .rk-raster .rk-ux { min-height: 0; } .rk-raster .rk-ux .card { contain: none; } .rk-raster .rk-ux .card__media { flex: none; aspect-ratio: 475 / 300; } }
/* Großes Handy und kleines Tablet (480–699): die zwei kleinen Kacheln untereinander, daneben UX-Brain */
@media (min-width: 480px) and (max-width: 699px) {
  .rk-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rk-raster :is(.rk, .rk-zahlen, .rk-ux) { grid-column: 1 / -1; }
  .rk-raster .rk--ki { order: 2; }
  .rk-raster .rk-zahlen { grid-column: 1; grid-template-columns: minmax(0, 1fr); order: 3; }
  .rk-raster .rk-ux { grid-column: 2; order: 4; min-height: 0; }
  .rk-raster .rk-ux .card { contain: size; }
  .rk-raster .rk-ux .card__media { flex: 1; aspect-ratio: auto; }
}

/* Am Seitenende blendet der Weichzeichner unter der Navi aus (Klasse am-ende, js/app.js), damit nichts unscharf stehen bleibt */
.nav-fade { transition: opacity .35s ease; }
body.am-ende .nav-fade { opacity: 0; }

