/* projekte.html — „Registerzug"
   Baut auf landing/style.css auf (Wrap, Mast, Rule, Punkt, Fuß) und ergänzt
   nur das, was die Projektseite braucht: vier Blätter, die auf großen
   Schirmen seitwärts durchs Bild laufen, darunter/ohne JS schlicht
   untereinander. Farbe strikt nach base.css-Schlüssel. */

/* ---------- Kopfleiste: hier mitlaufend statt über dem Hero ---------- */

.mast {
  position: sticky;
  top: 0;
  background: var(--papier);
  border-bottom: 1px solid var(--haarlinie);
}
.mast__nav a[aria-current="page"] {
  color: var(--tinte);
  font-weight: 600;
  border-bottom-color: var(--f-marke);
}

/* ---------- Seitenkopf ---------- */

.kopf {
  padding-block: clamp(2.75rem, 7vw, 5rem) clamp(2.5rem, 5vw, 4rem);
}
.kopf__h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.045em;
  text-transform: uppercase;
  margin: 0 0 clamp(1.1rem, 2.5vw, 1.6rem);
}
.kopf__lede {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  line-height: 1.34;
  letter-spacing: -.02em;
  max-width: 40ch;
}

/* Marker-Highlight aus v2: ruhige Tönung, Text bleibt AA-kontrastiert */
.hand {
  font-style: normal;
  color: var(--k-marke);
  background: var(--t-marke);
  padding: 0 .14em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hand--fertig { color: var(--k-fertig); background: var(--t-fertig); }

.kopf__rand {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}
.kopf__strich { display: block; width: 3.5rem; height: 1px; background: var(--linie); }
.kopf__wort {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gedaempft);
}

/* ---------- Registerzug ---------- */

.zug-sektion {
  position: relative;
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  overflow-x: clip;
}
.zug { display: flex; flex-direction: column; }

.blatt {
  position: relative;
  width: 100%;
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(2.75rem, 6vw, 3.75rem);
  border-top: 1px solid var(--haarlinie);
}
.zug > .blatt:first-child { border-top: none; }

.blatt[data-ton="ki"]      { --kf: var(--k-ki);      --ff: var(--f-ki);      --tf: var(--t-ki); }
.blatt[data-ton="betrieb"] { --kf: var(--k-betrieb); --ff: var(--f-betrieb); --tf: var(--t-betrieb); }
.blatt[data-ton="netz"]    { --kf: var(--k-netz);    --ff: var(--f-netz);    --tf: var(--t-netz); }
.blatt[data-ton="marke"]   { --kf: var(--k-marke);   --ff: var(--f-marke);   --tf: var(--t-marke); }
.blatt[data-zweitton="betrieb"] { --ff2: var(--f-betrieb); }

.blatt__balken {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: var(--ff);
}
.blatt__balken--zwei {
  background: linear-gradient(var(--ff) 0 50%, var(--ff2, var(--ff)) 50% 100%);
}
.blatt--offen .blatt__balken {
  background: repeating-linear-gradient(var(--ff) 0 9px, transparent 9px 18px);
}

.blatt__in { position: relative; }

.blatt__nr {
  margin: 0 0 clamp(.9rem, 2vw, 1.4rem);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: .78;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--linie);
  max-width: none;
}
.blatt--offen .blatt__nr {
  -webkit-text-stroke-color: var(--kf);
  font-size: clamp(4.5rem, 12vw, 9.5rem);
  font-weight: 300;
}

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem .5rem; margin: 0; padding: 0; }
.chip {
  display: inline-flex;
  align-items: baseline;
  border: 1px solid var(--haarlinie);
  border-radius: var(--pill);
  padding: .22rem .75rem;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gedaempft);
  white-space: nowrap;
}
.chip--still { color: var(--gedaempft); border-style: dashed; }

.skizze { display: none; height: auto; }
.sk-l { stroke: var(--linie); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sk-h { stroke: var(--haarlinie); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sk-kreis { stroke: var(--linie); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sk-neon { fill: var(--ff); }
.sk-neon2 { fill: var(--ff2, var(--ff)); }
.sk-neon-p { fill: var(--ff); }
.sk-flaeche { fill: var(--ff); }
.sk-flaeche2 { fill: var(--ff2, var(--ff)); }
.sk-toenung { fill: var(--tf); stroke: var(--linie); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sk-leer { stroke: var(--ff); stroke-width: 1; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }

.blatt__titel {
  color: var(--kf);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .98;
  margin: 0 0 clamp(1rem, 2.2vw, 1.5rem);
  max-width: 16ch;
}
.blatt__titel--lang { font-size: clamp(1.6rem, 3.4vw, 2.6rem); max-width: 18ch; }

.blatt__lede {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.1vw, 1.55rem);
  line-height: 1.32;
  letter-spacing: -.02em;
  max-width: 40ch;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}

/* Textmarker: mit JS wächst er beim Ins-Bild-Kommen, ohne JS ist er sofort da */
.mk {
  color: var(--tinte);
  background-color: transparent;
  font-weight: 600;
  padding: 0 .1em;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transition: background-size .55s var(--ease);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.mk--ki      { background-image: linear-gradient(var(--f-ki), var(--f-ki)); }
.mk--betrieb { background-image: linear-gradient(var(--f-betrieb), var(--f-betrieb)); }
.mk--netz    { background-image: linear-gradient(var(--f-netz), var(--f-netz)); }
.js .mk { background-size: 0% 100%; }
.js .mk.ist-markiert { background-size: 100% 100%; }

.fakten { list-style: none; margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); padding: 0; }
.fakten li {
  position: relative;
  border-top: 1px solid var(--haarlinie);
  padding: .6rem 0 .6rem 1.5rem;
  max-width: 50ch;
}
.fakten li:last-child { border-bottom: 1px solid var(--haarlinie); }
.fakten li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.3em;
  width: 7px;
  height: 7px;
  background: var(--ff);
}

.blatt__ton {
  display: inline-block;
  margin: 0;
  padding: .6rem .95rem;
  background: var(--tf);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  letter-spacing: -.02em;
  line-height: 1.25;
  max-width: 34ch;
}

.blatt--offen .blatt__titel { color: var(--kf); }
.blatt--offen .blatt__lede { color: var(--gedaempft); max-width: 44ch; }

/* ---------- Seitwärts-Hinweis + Registerleiste (nur im gepinnten Modus) ---------- */

.zug-hinweis, .rail { display: none; }

.zug-sektion--laeuft .zug-hinweis {
  display: flex;
  align-items: center;
  gap: .5rem;
  position: absolute;
  right: clamp(1.25rem, 5vw, 5rem);
  bottom: 4.25rem;
  margin: 0;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gedaempft);
  transition: opacity .4s var(--ease);
}
.zug-hinweis__pfeil { font-size: 1rem; letter-spacing: 0; }

.zug-sektion--laeuft .rail {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--papier);
  border-top: 1px solid var(--linie);
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}
.rail__spur {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: var(--haarlinie);
}
.rail__fuell {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--linie);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.rail__tabs {
  list-style: none;
  display: flex;
  margin: 0 auto;
  padding: 0;
  max-width: var(--spalte);
}
.rail__tab {
  flex: 1 1 0;
  display: flex;
  align-items: baseline;
  gap: .55rem;
  padding: .75rem 1rem .8rem 0;
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--gedaempft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 2px solid transparent;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.rail__nr {
  font-family: var(--display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--gedaempft);
  transition: color .35s var(--ease);
}
.rail__tab.ist-aktiv { color: var(--tinte); border-top-color: var(--tinte); }
.rail__tab.ist-aktiv .rail__nr { color: var(--k-marke); }

/* ---------- Nachwort ---------- */

.nachwort { padding-block: clamp(3.5rem, 7vw, 6rem) clamp(4rem, 8vw, 7rem); }
.nachwort__h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: -.03em;
  max-width: 24ch;
  margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
}
.nachwort__p {
  margin: 0 0 clamp(1.5rem, 3vw, 2rem);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  color: var(--gedaempft);
  max-width: 52ch;
}
.nachwort__link { margin: 0; }
.nachwort__link a {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: -.02em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
  text-decoration-color: var(--f-marke);
  transition: color .3s var(--ease);
}
.nachwort__link a:hover { color: var(--k-marke); }

/* ---------- Ab 900px: zweispaltiges Blatt ---------- */

@media (min-width: 900px) {
  .blatt__in {
    display: grid;
    grid-template-columns: minmax(165px, 17%) minmax(0, 1fr) minmax(0, 21%);
    gap: clamp(1.75rem, 3.5vw, 3.5rem);
    align-items: start;
  }
  .blatt__seite { grid-column: 1; grid-row: 1; }
  .blatt__text  { grid-column: 2; grid-row: 1; }
  .skizze {
    display: block;
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    max-width: 230px;
    margin-left: auto;
    margin-top: .4rem;
  }
  .blatt { padding-block: clamp(3rem, 6vw, 4.5rem); }
  .blatt__lede { max-width: 44ch; }
  .fakten li { max-width: 54ch; }
}

/* ---------- Gepinnter Zustand (setzt JS per Klasse) ---------- */

.zug-sektion--laeuft .blatt {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: none;
  border-left: 1px solid var(--haarlinie);
  padding-block: clamp(6.5rem, 14vh, 9rem) clamp(6rem, 12vh, 8rem);
}
.zug-sektion--laeuft .zug > .blatt:first-child { border-left: none; }
.zug-sektion--laeuft .blatt__balken { width: 12px; }

/* ---------- Motion-Ausgangszustände (nur mit JS) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .p-auf { opacity: 0; transform: translateY(14px); }
}

/* ---------- Schmale Viewports ---------- */

@media (max-width: 620px) {
  .blatt__titel { max-width: none; }
  .kopf__lede { max-width: none; }
  .chip { font-size: .66rem; letter-spacing: .1em; }
}

/* Blinkender Cursor wie in der Kommandozeile */
.cursor {
  display: inline-block;
  width: .09em;
  height: .82em;
  margin-left: .12em;
  background: var(--k-marke);
  vertical-align: baseline;
  animation: cursor-blink 1.06s steps(1, end) infinite;
}
@keyframes cursor-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------- Korrektur: Blätter müssen ins Fenster passen ----------
   Der gepinnte Registerzug kann nicht scrollen, also darf kein Blatt höher
   als der Bildschirm werden. Höhe fest, Innenabstände knapper, Typografie
   im laufenden Zug eine Spur kompakter. */
@media (min-width: 900px) {
  .zug-sektion--laeuft .blatt {
    height: 100svh;
    min-height: 0;
    padding-block: clamp(4.5rem, 9vh, 6rem) clamp(2rem, 5vh, 3.5rem);
    overflow: hidden;
  }
  .zug-sektion--laeuft .blatt__in { max-height: 100%; }
  .zug-sektion--laeuft .blatt__titel { font-size: clamp(1.6rem, 2.8vw, 2.5rem); }
  .zug-sektion--laeuft .blatt__lede { font-size: clamp(1rem, 1.5vw, 1.2rem); margin-bottom: 1rem; }
  .zug-sektion--laeuft .fakten li { padding-block: .45rem; font-size: .96rem; }
  .zug-sektion--laeuft .blatt__ton { margin-top: 1rem; font-size: 1rem; }
  .zug-sektion--laeuft .skizze { max-width: 8.5rem; }

  /* Die Textspalte bekommt im laufenden Zug den Platz, den die beiden
     Randspalten verschenken: die Skizze ist dort nur noch 8.5rem breit,
     ihre Spalte reservierte aber 21 % der Breite. Breitere Zeilen heißt
     weniger Umbrüche heißt niedrigere Blätter — das ist der Hebel, mit dem
     die langen Blätter 03 und 04 ins Fenster passen, ohne die Schrift
     weiter zu verkleinern. */
  .zug-sektion--laeuft .blatt__in {
    grid-template-columns: minmax(145px, 14%) minmax(0, 1fr) 9rem;
    gap: clamp(1.25rem, 2.6vw, 2.75rem);
  }
  .zug-sektion--laeuft .blatt__lede { max-width: 54ch; }
  .zug-sektion--laeuft .fakten li { max-width: none; }
  .zug-sektion--laeuft .blatt__ton { max-width: 62ch; }
}

/* Flache Fenster (Laptops): dort ist die Höhe knapp, nicht die Breite.
   Abstände und Listenpolster schrumpfen zuerst — sie tragen keine
   Information, Text schon. Gemessen an Blatt 04 (das längste). */
@media (min-width: 900px) and (max-height: 850px) {
  .zug-sektion--laeuft .blatt {
    padding-block: clamp(4.5rem, 9vh, 6rem) clamp(1.5rem, 3.5vh, 2.5rem);
  }
  .zug-sektion--laeuft .blatt__titel { margin-bottom: .7rem; }
  .zug-sektion--laeuft .blatt__lede { margin-bottom: .8rem; line-height: 1.26; }
  .zug-sektion--laeuft .fakten { margin-bottom: .9rem; }
  .zug-sektion--laeuft .fakten li { padding-block: .34rem; line-height: 1.38; }
  .zug-sektion--laeuft .fakten li::before { top: 1.05em; }
  .zug-sektion--laeuft .blatt__ton { margin-top: .7rem; padding: .45rem .8rem; }
  .zug-sektion--laeuft .blatt__nr { margin-bottom: .6rem; font-size: clamp(2.6rem, 5.5vh, 4.5rem); }
}

/* Sehr flache Fenster: noch eine Stufe enger. */
@media (min-width: 900px) and (max-height: 700px) {
  .zug-sektion--laeuft .blatt__titel { font-size: clamp(1.5rem, 2.4vw, 2rem); }
  .zug-sektion--laeuft .blatt__lede { font-size: 1.02rem; margin-bottom: .6rem; }
  .zug-sektion--laeuft .fakten { margin-bottom: .7rem; }
  .zug-sektion--laeuft .fakten li { padding-block: .28rem; font-size: .92rem; }
  .zug-sektion--laeuft .blatt__ton { font-size: .95rem; margin-top: .55rem; }
  .zug-sektion--laeuft .skizze { max-width: 6.5rem; }
}

/* ---------- TopCharge: bewusst gesetzter Markenblock ----------
   Der einzige farbige Block der Seite. Damit er wie ein Highlight wirkt und
   nicht wie ein Fremdkörper, behält er die Gesetze der Seite bei: dieselbe
   Typografie, dieselbe Rasterbreite, dieselbe Linienlogik. Nur invertiert,
   in den Farben der Marke. */
.tc {
  --tc-grund: oklch(0.235 0.055 262);
  --tc-tief: oklch(0.295 0.05 262);
  --tc-gruen: oklch(0.805 0.185 150);
  --tc-hell: oklch(0.932 0.012 236);
  --tc-still: oklch(0.775 0.021 238);
  background: var(--tc-grund);
  color: var(--tc-hell);
  border-block: 1px solid var(--linie);
  padding-block: clamp(3rem, 8vh, 5rem);
  position: relative;
  overflow: hidden;
}
/* schmaler Neonstreifen oben: das Markensignal, nicht als Rahmen */
.tc::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--tc-gruen);
}
.tc__in { position: relative; }
.tc__tag {
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tc-gruen);
}
.tc__kopf { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.25rem; }
.tc__mark { width: clamp(34px, 4vw, 44px); height: auto; }
.tc__titel {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 0;
  color: var(--tc-hell);
}
.tc__lede {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  line-height: 1.24;
  letter-spacing: -.02em;
  max-width: 34ch;
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  color: var(--tc-hell);
}
.tc__hi { color: var(--tc-gruen); }
.tc__fakten { list-style: none; margin: 0 0 clamp(1.75rem, 4vw, 2.25rem); padding: 0; }
.tc__fakten li {
  position: relative;
  border-top: 1px solid oklch(0.295 0.05 262);
  padding: .7rem 0 .7rem 1.5rem;
  max-width: 62ch;
  color: var(--tc-still);
  font-size: clamp(.98rem, 1.5vw, 1.08rem);
}
.tc__fakten li:last-child { border-bottom: 1px solid oklch(0.295 0.05 262); }
.tc__fakten li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.35em;
  width: 7px; height: 7px;
  background: var(--tc-gruen);
}
.tc__link { margin: 0; }
.tc__link a {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--tc-hell);
  text-decoration: none;
  background-image: linear-gradient(var(--tc-gruen), var(--tc-gruen));
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 100%;
  padding-bottom: .15em;
  transition: background-size .3s var(--ease);
}
.tc__link a:hover, .tc__link a:focus-visible { background-size: 100% 6px; }
.tc :focus-visible { outline-color: var(--tc-gruen); }

/* Ab Tablet zweispaltig: Aussage links, Belege rechts. Sonst steht der
   dunkle Block rechts halb leer und wirkt unfertig. */
@media (min-width: 900px) {
  .tc__in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }
  .tc__tag { grid-column: 1 / -1; grid-row: 1; }
  .tc__kopf { grid-column: 1; grid-row: 2; }
  .tc__lede { grid-column: 1; grid-row: 3; margin-bottom: 0; }
  .tc__fakten { grid-column: 2; grid-row: 2 / span 2; margin-bottom: 1.75rem; }
  .tc__link { grid-column: 2; grid-row: 4; }
  .tc__fakten li { max-width: none; }
}
