/* sven-nieder.de – Seitenstil auf Basis des Designsystems »Sven Nieder«.
   Farben, Abstände, Radien und Schriftfamilien kommen ausschließlich aus tokens.css.
   Leitidee: Understatement. Eine Textspalte, viel Papier, Karmin nur in den Links. */

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 28px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; hyphens: manual; }
p { hyphens: auto; hyphenate-limit-chars: 7 3 3; text-wrap: pretty; }

.in { max-width: var(--layout-max); margin: 0 auto; padding: 0 var(--space-4); }
@media (min-width: 600px) { .in { padding: 0 var(--space-6); } }
.spalte { max-width: var(--measure); }

.skip {
  position: absolute; left: var(--space-4); top: -60px; z-index: 20;
  background: var(--surface); color: var(--ink); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md); font-weight: 600;
}
.skip:focus { top: var(--space-2); }

/* ---------- Links und Fokus ---------- */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--karmin);
  text-decoration-thickness: max(1.5px, 0.055em);
  text-underline-offset: 0.18em;
  text-decoration-skip-ink: auto;
}
a:hover { color: var(--karmin-deep); }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

/* Externe Links: ohne Unterstreichung, dafür nur ein feiner Karmin-Pfeil (↗) als Hintergrundbild.
   Bewusst kein CSS-Mask: Safari verwirft sonst die Regel und zeigt einen roten Block.
   Die geschützten Leerzeichen halten Abstand und kleben den Pfeil ans letzte Wort. */
a[target="_blank"] { text-decoration: none; }
a[target="_blank"]::after {
  content: "\00a0\00a0";
  padding-right: 0.26em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bf1b2c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 18 6M9 6h9v9'/%3E%3C/svg%3E") no-repeat right top 0.22em;
  background-size: 0.26em 0.26em;
}
a[target="_blank"]:hover { color: var(--karmin-deep); text-decoration: underline; text-decoration-color: var(--karmin); }
a[target="_blank"]:hover::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a1523' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 18 6M9 6h9v9'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  a[target="_blank"]::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0606a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 18 6M9 6h9v9'/%3E%3C/svg%3E"); }
  a[target="_blank"]:hover::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f58a91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 18 6M9 6h9v9'/%3E%3C/svg%3E"); }
}
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.kopf .in { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: var(--space-4); }

/* Lockup: Wortmarke = halbe Bildmarkenhöhe, Abstand = ein Zehntel */
.lockup {
  --h: 28px;
  display: inline-flex; align-items: flex-start; gap: calc(var(--h) / 10);
  text-decoration: none; color: var(--mark);
}
.lockup:hover { color: var(--mark); }
.lockup img { height: var(--h); width: auto; }
.lockup .wm {
  font-weight: 600; letter-spacing: -0.02em; font-size: calc(var(--h) / 2);
  line-height: 1; padding-top: calc(var(--h) * 0.04);
}

.nav-liste {
  display: flex; gap: var(--space-6); margin: 0; padding: 0; list-style: none;
  font-size: 15px; line-height: 20px; font-weight: 500;
}
.nav-liste a { color: var(--ink-2); text-decoration: none; padding: var(--space-3) 0; display: inline-block; }
.nav-liste a:hover { color: var(--ink); }

/* ---------- Herofoto mit Logo ---------- */
/* Randabfallend im Seitenverhältnis der Aufnahme (3:2). Höchstens bildschirmhoch;
   wird beschnitten, dann oben wenig, damit das Logo im dunklen Himmel bleibt. */
.hero { position: relative; }
.hero-bild { margin: 0; }
.hero-bild img {
  width: 100%; height: auto; aspect-ratio: 3 / 2;
  max-height: 100vh; max-height: 100svh;
  object-fit: cover; object-position: 50% 45%;
  border-radius: var(--radius-none); background: #161515;
}
@media (max-width: 599px) {
  .hero-bild img { aspect-ratio: 5 / 4; object-position: 50% 80%; }
}
.nw { white-space: nowrap; }

/* Lockup mit Claim auf dem Bild. Sitzt im dunklen Himmelsband über dem Eisberg
   (gemessen: Kontrast der hellen Schrift dort 4,8 bis 6,5:1). Aufbau nach Designsystem:
   Wortmarke = halbe Bildmarkenhöhe, Abstand = ein Zehntel; Claim darunter. */
.hero-marke { position: absolute; left: 0; right: 0; top: 26%; }
.marke {
  --h: 64px;
  margin: 0; display: inline-flex; align-items: flex-start; gap: calc(var(--h) / 10);
  color: #efedeb; font: inherit;
}
@media (min-width: 600px) { .marke { --h: 96px; } }
@media (min-width: 1100px) { .marke { --h: 128px; } }
.marke img { height: var(--h); width: auto; flex: none; }
.marke-text { display: flex; flex-direction: column; padding-top: calc(var(--h) * 0.04); }
.marke .wm {
  font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.02em;
  font-size: calc(var(--h) / 2); line-height: 1;
}
.marke .claim {
  font-family: var(--font-sans); font-weight: 500; letter-spacing: 0.02em; word-spacing: 0.08em;
  font-size: max(13px, calc(var(--h) * 0.16)); line-height: 1.2;
  margin-top: calc(var(--h) * 0.1); color: #efedeb;
}

/* Parallax ohne JavaScript: das Foto bleibt stehen, der Inhalt schiebt sich
   auf Papier darüber (funktioniert auch auf iOS, anders als background-attachment: fixed) */
.parallax .hero { position: sticky; top: 0; z-index: 0; }
.parallax main, .parallax .fuss { position: relative; z-index: 1; background: var(--paper); }

/* Logo und Navigation liegen auf dem Bild: immer die Negativfassung,
   Schrift in der hellen Galerie-Tinte, unabhängig vom Farbschema */
.hero-kopf { position: absolute; top: 0; left: 0; right: 0; }
.hero-kopf .in { display: flex; justify-content: flex-end; align-items: flex-start; padding-top: var(--space-4); }
@media (min-width: 600px) { .hero-kopf .in { padding-top: var(--space-6); } }
.lockup-negativ { --h: 44px; color: #efedeb; }
.lockup-negativ:hover { color: #efedeb; }
@media (min-width: 600px) { .lockup-negativ { --h: 56px; } }
@media (min-width: 1100px) { .lockup-negativ { --h: 64px; } }
.hero-kopf .nav-liste a { color: #efedeb; }
.hero-kopf .nav-liste a:hover { color: #ffffff; text-decoration: underline; text-decoration-color: #f0606a; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.hero-kopf :focus-visible { box-shadow: 0 0 0 2px #161515, 0 0 0 4px #f0606a; }

/* ---------- Auftakt ---------- */
.auftakt { padding: var(--space-12) 0 var(--space-12); }
@media (min-width: 900px) { .auftakt { padding: var(--space-16) 0 var(--space-16); } }
.display {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 40px; line-height: 46px; letter-spacing: -0.01em;       /* title unter 600 px */
  margin: 0;
}
@media (min-width: 600px) {
  .display { font-size: 64px; line-height: 66px; letter-spacing: -0.015em; }
}
.untertitel {
  margin: var(--space-3) 0 0; letter-spacing: 0.01em;
  font-size: 17px; line-height: 24px; font-weight: 500; color: var(--ink-2);
  word-spacing: 0.12em;
}

/* ---------- Text ---------- */
.text { padding-top: var(--space-16); padding-bottom: var(--space-16); }
@media (min-width: 900px) { .text { padding-top: var(--space-24); padding-bottom: var(--space-24); } }
.lead {
  font-family: var(--font-serif); font-size: 21px; line-height: 31px;
  margin: 0 0 var(--space-6);
}
/* Einleitung über die volle Inhaltsbreite, groß gesetzt (Variante A, Standard):
   Newsreader in Displaygrößen, rund 60 Zeichen je Zeile auf dem Desktop */
.intro .lead {
  font-size: clamp(24px, 1rem + 2.2vw, 44px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 0.8em;
}
.intro .lead:last-child { margin-bottom: 0; }

/* Einzelne Wörter im Fließtext sehr groß (Variante E, Standard) */
.v-inline .intro .gross { font-size: 1.9em; line-height: 0.9; letter-spacing: -0.02em; }
@media (min-width: 600px) { .v-inline .intro .gross { font-size: 2.3em; } }
/* Variante: große Wörter in Karmin */
.v-rot .intro .gross { color: var(--karmin); }
.v-rot .intro a:hover .gross { color: var(--karmin-deep); }

/* Variante B: Lesegröße, nur die verlinkten Namen größer */
.v-links .intro .lead { font-size: clamp(21px, 1.2rem + 0.6vw, 26px); line-height: 1.5; letter-spacing: 0; max-width: 980px; }
.v-links .intro .lead a { font-size: 1.3em; letter-spacing: -0.01em; }

/* Variante C: erster Absatz groß, die übrigen in Lesegröße */
.v-zweistufig .intro .lead { font-size: clamp(20px, 1.1rem + 0.5vw, 25px); line-height: 1.5; letter-spacing: 0; max-width: 860px; }
.v-zweistufig .intro .lead:first-child { font-size: clamp(24px, 1rem + 2.2vw, 44px); line-height: 1.28; letter-spacing: -0.01em; max-width: none; margin-bottom: 1.1em; }
.v-zweistufig .intro .lead:first-child + .lead { margin-top: 0; }
.lead:last-child { margin-bottom: 0; }
.leise { color: var(--ink-3); }

.sektion { padding: var(--space-16) 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .sektion { padding: var(--space-24) 0; } }
.heading {
  font-family: var(--font-serif); font-size: 28px; line-height: 34px; font-weight: 400;
  letter-spacing: -0.005em; margin: 0 0 var(--space-8);
}
.body { margin: 0 0 var(--space-4); }
/* Bio in derselben Serif wie die Einleitung, eine Stufe kleiner */
#bio .body {
  font-family: var(--font-serif);
  font-size: clamp(18px, 0.95rem + 0.45vw, 22px);
  line-height: 1.55;
  margin-bottom: 0.9em;
}
.body:last-child { margin-bottom: 0; }

/* Navigation direkt unter dem Herofoto */
.unternav { border-bottom: 1px solid var(--line); }
.unternav .in { display: flex; justify-content: flex-end; }
.unternav .nav-liste a { padding: var(--space-4) 0; }
.nav-liste a[aria-current="page"] { color: var(--ink); }

/* Bio-Seite */
.bio-seite { padding: var(--space-16) 0 var(--space-24); }
.bio-titel { margin-bottom: var(--space-8); }

/* Bio mit Porträt: Text links, Porträt rechts (Desktop), Porträt oben (mobil) */
.bio-raster { display: grid; gap: var(--space-8); }
.portraet { margin: 0; max-width: 360px; }
.portraet img { width: 100%; border-radius: var(--radius-none); background: var(--paper-deep); }
.portraet figcaption { margin-top: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-3); }
@media (min-width: 900px) {
  .bio-raster { grid-template-columns: minmax(0, var(--measure)) minmax(0, 380px); justify-content: space-between; gap: var(--space-12); }
  .bio-raster .spalte { grid-row: 1; grid-column: 1; }
  .portraet { grid-row: 1; grid-column: 2; position: sticky; top: 96px; align-self: start; max-width: none; margin-top: 66px; }
}

/* ---------- Fußzeile ---------- */
.fuss { border-top: 1px solid var(--line); }
.fuss .in {
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); justify-content: space-between;
  padding-top: var(--space-6); padding-bottom: var(--space-8);
  font-size: 13px; line-height: 18px; color: var(--ink-3);
}
.fuss nav { display: flex; gap: var(--space-4); }
.fuss a { color: var(--ink-3); }
.fuss a:hover { color: var(--karmin-deep); }

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */
.rechtstext { padding: var(--space-16) 0 var(--space-24); }
.rechtstext h1 { font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 46px; letter-spacing: -0.01em; margin: 0 0 var(--space-8); }
.rechtstext h2 { font-family: var(--font-serif); font-size: 21px; line-height: 28px; font-weight: 500; margin: var(--space-12) 0 var(--space-3); }
.rechtstext h3 { font-size: 15px; line-height: 24px; font-weight: 600; margin: var(--space-6) 0 var(--space-1); }
.rechtstext p, .rechtstext ul, .rechtstext address { max-width: var(--measure); margin: 0 0 var(--space-4); font-style: normal; }
.caption { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.stand { margin-top: var(--space-12); }
