@font-face { font-family: "Geist"; src: url("/fonts/Geist-Latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: only light;
  --papier: #F2EFE9; --passepartout: #E6E1D7; --tinte: #1A1714; --grau: #5E574F; --linie: #1A171426; --roetel: #C8452C;
  --radius: 6px;
  --text: "Geist", system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* kein Nachfedern und kein Ziehen-zum-Aktualisieren: der Weg soll nicht wackeln */
html, body { overscroll-behavior: none; }
html { background: var(--papier); color: var(--tinte); font: 400 16px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
body { min-height: 100svh; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--roetel); outline-offset: 3px; border-radius: 2px; }

.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 32px; padding: 24px clamp(20px, 3.4vw, 48px) 16px; background: var(--papier); pointer-events: none; }
.bar > * { pointer-events: auto; }
/* Kopf: Name und Satz stehen fest oben (kein grid 0fr/1fr, damit iOS Safari beim Backscroll nicht aufbläht) */
.bar .kopf { display: block; }
.bar .kopf h1 { font-size: 0; line-height: 0; }
.bar .kopf img { display: block; width: clamp(176px, 15.5vw, 230px); height: auto; }
.bar .kopf p { max-height: 120px; overflow: hidden; padding-top: 12px; transition: max-height .32s ease, padding-top .32s ease, opacity .25s ease; max-width: 60ch; color: #4A443E; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.45; text-wrap: balance; }
.bar nav { display: flex; padding-top: max(0px, calc(clamp(176px, 15.5vw, 230px) * .1093 - 17px)); gap: clamp(20px, 2.4vw, 32px); font: 400 14px/1 var(--mono); color: var(--grau); }
.bar nav a { padding: 8px 0; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color .2s, box-shadow .2s; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--tinte); }
.bar nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--roetel); }
/* beim Lesen klappt der Satz unter dem Namen ein */
body.lesen .bar .kopf p { max-height: 0; padding-top: 0; opacity: 0; }

/* der Weg: die Landschaft steht fest, solange die Figur läuft; an Stationen rückt sie ruhig ins obere Fenster */
#weg { position: relative; }
.lauf { min-height: 100svh; }
.stage { position: fixed; inset: 0 0 auto; height: 100svh; overflow: hidden; overflow-x: hidden; overscroll-behavior-x: none; will-change: transform; transition: opacity .32s ease; }
html.js:not(.bereit) .stage { opacity: 0; }
html.js:not(.bereit) .kapitel, html.js:not(.bereit) .tipp { opacity: 0; visibility: hidden; }
.strip { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
.land, .weg-spur, .figur, .vorne, .sitz, .welt-fx { position: absolute; left: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
.weg-spur { z-index: 1; pointer-events: none; }
.figur { z-index: 2; top: 0; }
.vorne, .welt-fx { z-index: 3; pointer-events: none; }
.sitz { position: fixed; top: 0; z-index: 5; pointer-events: none; visibility: hidden; will-change: transform; }

.tipp { position: absolute; left: 50%; translate: -50% 0; font: 400 18px/1 var(--mono); color: var(--grau); white-space: nowrap; transition: opacity .4s ease; }
.tipp i { display: inline-block; font-style: normal; margin-left: 4px; animation: tipp 1.6s ease-in-out infinite; }
@keyframes tipp { 50% { transform: translateY(4px); } }
body.los .tipp { opacity: 0; }

/* Kapitel: ruhiges Papierblatt mit weichem Papiernebel-Übergang statt harter horizontaler Schnittlinie */
.kapitel { position: relative; z-index: 1; margin-top: calc(-1 * var(--hoch, 0px)); padding: 24px max(20px, calc((100% - 620px) / 2)) clamp(48px, 8vh, 80px); background: var(--papier); }
.kapitel::before, .kapitel::after, .bar::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
.kapitel::before { bottom: 100%; height: 148px; background: linear-gradient(to bottom, rgba(242, 239, 233, 0) 0%, rgba(242, 239, 233, .22) 28%, rgba(242, 239, 233, .72) 64%, var(--papier) 100%); }
.kapitel::after { top: 100%; height: 128px; background: linear-gradient(to top, rgba(242, 239, 233, 0) 0%, rgba(242, 239, 233, .22) 28%, rgba(242, 239, 233, .72) 64%, var(--papier) 100%); }
#kontakt::before { height: 48px; }
#kontakt::after { display: none; }
/* weicher Papier-Auslauf unter der Kopfleiste */
.bar::after { top: 100%; height: 28px; background: linear-gradient(to bottom, var(--papier) 0%, rgba(242, 239, 233, 0) 100%); }
.kapitel h2 { font: 600 clamp(24px, 2.4vw, 32px)/1.12 var(--text); letter-spacing: -.03em; }
.unter { margin-top: 8px; color: var(--grau); font-size: 15px; text-wrap: balance; }
.kapitel .liste { margin-top: clamp(24px, 3.5vh, 32px); }
.liste { list-style: none; border-top: 1px solid var(--linie); }
.liste li { border-bottom: 1px solid var(--linie); }
.liste li > b, .liste li > a { display: block; }
/* Leistungen klappen auf: Zeile wie gehabt, rechts ein Plus, darunter ein Absatz und ein Beispiel */
.liste details > summary { display: block; list-style: none; cursor: pointer; position: relative; }
.liste details > summary::-webkit-details-marker { display: none; }
.liste details > summary b::after { content: "+"; display: inline-block; margin-left: .45em; font: 400 18px/1 var(--mono); color: var(--grau); transition: rotate .25s ease, color .2s; }
.liste details[open] > summary b::after { rotate: 45deg; color: var(--roetel); }
@media (hover: hover) and (pointer: fine) { .liste details > summary:hover b { color: var(--roetel); } }
.mehr { padding-top: 12px; max-width: 52ch; }
.mehr p { color: var(--tinte); text-wrap: pretty; }
.mehr a, .gross a { text-decoration: underline 1.5px var(--roetel); text-underline-offset: 3px; transition: color .2s; }
.mehr a:hover, .gross a:hover { color: var(--roetel); }
details[open] .mehr { animation: auf .3s ease; }
@keyframes auf { from { opacity: 0; translate: 0 -4px; } }
.liste li { padding: 20px 64px 20px 0; }
.liste li:has(> a) { padding: 0; }
.liste li > a { padding: 20px 64px 20px 0; }
@media (hover: hover) { .liste li > a { transition: translate .25s; } .liste li > a:hover { translate: 6px 0; } }
.liste b { display: block; font-weight: 500; font-size: 19px; letter-spacing: -.015em; }
/* Projekte sind Links: der Titel trägt eine leise Unterstreichung, auch ohne Hover am Handy erkennbar */
.liste a b { display: inline; text-decoration: underline 1.5px var(--linie); text-underline-offset: 5px; transition: text-decoration-color .2s; }
.liste a:hover b { text-decoration-color: var(--roetel); }
.liste span { display: block; color: var(--grau); margin-top: 4px; text-wrap: pretty; }

/* Notizen: die zweite, leisere Liste unter den Projekten */
.kapitel h3 { margin-top: clamp(40px, 6vh, 56px); font: 600 18px/1.2 var(--text); letter-spacing: -.015em; }
.kapitel .liste.notizen { margin-top: 16px; }
.liste.notizen li > a { display: grid; grid-template-columns: 11ch minmax(0, 1fr); align-items: baseline; column-gap: 16px; padding-block: 14px; }
.liste.notizen time { font: 400 13px/1.4 var(--mono); color: var(--grau); font-variant-numeric: tabular-nums; }
.liste.notizen b { justify-self: start; font-weight: 400; font-size: 16px; line-height: 1.4; letter-spacing: -.005em; text-decoration-color: transparent; }
.alle-notizen { display: none; }

.wer { margin-top: 16px; display: flex; align-items: flex-start; gap: 20px; }
.portrait { flex: 0 0 auto; width: 104px; height: 104px; object-fit: cover; object-position: center 18%; border-radius: var(--radius); background: var(--passepartout); }
.gross { font-size: clamp(15.5px, 1.3vw, 17px); line-height: 1.52; letter-spacing: -.008em; color: var(--tinte); max-width: 50ch; text-wrap: pretty; }
.kontakt { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(26, 23, 20, .20);
  background: transparent;
  color: var(--tinte);
  font: 500 14px/1 var(--text);
  letter-spacing: -.005em;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
@media (hover: hover) and (pointer: fine) { .btn:hover { border-color: var(--tinte); background: rgba(26, 23, 20, .05); } }
.btn:active { transform: scale(.98); }
.btn-prim {
  background: var(--tinte);
  border-color: var(--tinte);
  color: var(--papier);
}
@media (hover: hover) and (pointer: fine) { .btn-prim:hover { background: var(--roetel); border-color: var(--roetel); color: #fff; } }
.weg-weiter { margin-top: 24px; }

/* Ruhige Fußzeile am Ende der 620px-Lesespalte */
.kontakt-fuss { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.kanaele { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; list-style: none; margin-left: -8px; }
.kanaele a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: var(--grau);
  border: 1px solid transparent;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.kanaele a svg { width: 17px; height: 17px; display: block; }
.kanaele a:hover { color: var(--tinte); background: rgba(26, 23, 20, .05); border-color: rgba(26, 23, 20, .12); transform: translateY(-1px); }

.recht { display: flex; gap: 20px; font: 400 13px/1 var(--mono); }
.recht a { color: var(--grau); }
.recht a:hover { color: var(--tinte); }
/* Nav-Sprung: Blätter kurz weg, die Figur läuft durch die Landschaft */
.kapitel { transition: opacity .35s ease; }
body.fahrt .kapitel { opacity: 0; transition-duration: .18s; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .bar .kopf, .bar .kopf p, .tipp, .stage, .kapitel, .liste li > a, .liste details > summary b::after, .btn, .kanaele a { transition: none; }
  .tipp i, details[open] .mehr { animation: none; }
}

@media (min-width: 721px) {
  #kontakt {
    padding: 20px max(24px, calc((100% - 620px) / 2)) 26px;
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .bar { padding: 20px 24px 12px; gap: 16px 20px; }
  .bar .kopf p { max-width: min(52ch, calc(100vw - 400px)); font-size: 14.5px; }
  .bar nav { gap: 16px; font-size: 13px; }
}

@media (max-width: 720px) {
  /* Kopf oben auf Papier, Landschaft läuft weich dahinter aus */
  .bar { padding: 20px 20px 12px; background: var(--papier); }
  .bar .kopf img { width: 164px; }
  .bar .kopf p { padding-top: 10px; font-size: 15px; line-height: 1.42; max-width: 46ch; }
  /* Handy: vier neueste Notizen, alle stehen unter /notizen/ */
  .liste.notizen li:nth-child(n+5) { display: none; }
  .liste.notizen li > a { grid-template-columns: minmax(0, 1fr); row-gap: 4px; padding-block: 12px; }
  .alle-notizen { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font: 400 14px/1.4 var(--mono); text-decoration: underline 1.5px var(--roetel); text-underline-offset: 4px; }
  /* der Text läuft um das Porträt, damit Mail und WhatsApp an der Station über der Leiste stehen */
  .wer { display: flow-root; margin-top: 12px; }
  .portrait { float: right; width: 72px; height: 72px; margin: 4px 0 8px 16px; }
  #kontakt { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .kapitel h2 { font-size: 23px; }
  .unter { font-size: 14.5px; line-height: 1.42; }
  .liste li, .liste li > a { padding: 16px 56px 16px 0; }
  .liste li:has(> a) { padding: 0; }
  .kanaele { margin-top: 24px; gap: 8px; }
  /* Stationen als Leiste unten, die aktuelle in Rötel markiert */
  .bar nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; background: var(--papier); border-top: 1px solid var(--linie); font-size: 13px; }
  .bar nav a { text-align: center; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); box-shadow: inset 0 2px 0 transparent; transition: color .2s, box-shadow .2s; }
  .bar nav a[aria-current] { color: var(--tinte); box-shadow: inset 0 2px 0 var(--roetel); }
}
