/* flxlhr.com — Seitenlayout auf Basis von tokens.css und components.css (pf-…).
   Hier steht nur, was das Designsystem für diese Seiten offenlässt: Abschnitte, Übersicht, Projekte, Rechtliches. */

[hidden] { display: none !important; }

[id] { scroll-margin-top: var(--space-4); }

/* Sprunglink, sichtbar nur bei Tastaturfokus */
.skip {
  position: absolute;
  left: var(--page-margin);
  top: var(--space-2);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--surface-inverse);
  color: var(--ink-inverse);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; outline-color: var(--focus); }

/* Fluid: die Display-Größen des Systems auf kleinen Schirmen */
.display-l { font-size: clamp(56px, 10vw, 144px); }
.display-m { font-size: clamp(44px, 6.1vw, 88px); }
.heading-l { font-size: clamp(32px, 3.4vw, 48px); }

/* ---------- Einstieg: Navigation und Hero füllen den ersten Bildschirm ---------- */
.intro {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.intro .pf-hero { flex: 1; }
.intro--short { min-height: 0; }
.intro--short .pf-hero { padding-top: var(--space-10); }

.pf-hero__title { text-wrap: balance; }

/* Logo in der Navigation: das Quadrat, flx vorne, lhr darunter dahinter. Der Spalt ist eine Kontur
   in Flächenfarbe, deshalb kann lhr beim Überfahren nach unten rutschen, bis seine Oberlängen frei stehen. */
.pf-nav__logo { display: block; overflow: visible; }
/* Oben derselbe Abstand wie links: Der Link ist 44 px hoch, das Logo 40 px, also 2 px weniger Polster */
.pf-nav:has(.pf-nav__logo-front) { padding-top: calc(var(--page-margin) - 2px); }
/* Produktlogos (Appoint) sind 30,6 px hoch, also gut 13 px Luft im Link */
.pf-nav:has(.pf-nav__logo):not(:has(.pf-nav__logo-front)) { padding-top: calc(var(--page-margin) - 6.7px); }
.pf-nav__logo-front {
  fill: currentColor;
  stroke: var(--surface);
  paint-order: stroke;
  stroke-linejoin: miter;
  stroke-miterlimit: 4;
}
.pf-nav__logo-back { fill: currentColor; transition: transform 520ms cubic-bezier(.2, .8, .2, 1); }
.pf-nav__name:hover .pf-nav__logo-back,
.pf-nav__name:focus-visible .pf-nav__logo-back { transform: var(--open); }

/* ---------- Abschnitte: Label links, Inhalt rechts ---------- */
.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-5);
  margin-top: var(--space-9);
  padding: var(--space-4) var(--page-margin) 0;
  border-top: var(--stroke-hair) solid var(--line);
}
.section:first-child { margin-top: 0; }

.section__label {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}
.section__no { color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Label und Porträt teilen sich die linke Spalte */
.section__aside {
  display: grid;
  align-content: start;
  gap: var(--space-6);
}

/* Piktogramme: 1,5 px Strich in Tinte, eckige Enden, wie das Zeichen des Theme-Schalters.
   Keine Flächen außer kleinen Punkten (.fill), keine Farbe.
   Die viewBox ist auf die Zeichnung zugeschnitten, damit sie links bündig mit dem Text steht
   und ohne Leerraum darüber oder darunter. --w/--h sind ihre Maße im 24er-Raster. */
.pict {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
  overflow: visible;
}
.pict * { vector-effect: non-scaling-stroke; }
.pict .fill { fill: currentColor; stroke: none; }
.pict--section { width: calc(var(--w) * 2px); height: calc(var(--h) * 2px); }
.pict--figure { width: 100%; max-width: 232px; height: auto; }
.pict--hub { width: calc(var(--w) * 2px); height: calc(var(--h) * 2px); }

/* Circuits-Grafik: ein Signal läuft von Baustein zu Baustein (motion.js) */
.circuit__chip { pointer-events: all; }
.circuit__head,
.circuit__pulse { opacity: 0; }
.circuit__pulse.is-on { opacity: 1; }
.circuit__head.is-on { animation: chip-flash 1100ms ease forwards; }
@keyframes chip-flash {
  0% { opacity: 0; }
  15%, 50% { opacity: 1; }
  100% { opacity: 0; }
}

/* Bewegung nur, wenn motion.js läuft (also nicht bei „Bewegung reduzieren“) */
.motion .pict.is-drawing:not(.is-drawn) *:not(.circuit__head):not(.circuit__pulse) { opacity: 0; }
.motion .pict.is-drawing .fill:not(.circuit__head):not(.circuit__pulse) { transition: opacity 400ms ease 700ms; }
.motion .reveal > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms ease, transform 900ms cubic-bezier(.2, .7, .2, 1);
}
.motion .reveal.is-in > * { opacity: 1; transform: none; }
.motion .reveal.is-in > * + * { transition-delay: 120ms; }

/* Freigestelltes Porträt */
.portrait {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
}
/* Startseite: das Porträt steht oben neben dem Einstieg */
.section--portrait .section__aside { align-content: start; }
/* Der Schnitt unten läuft weich aus, statt hart in der Luft zu enden */
.section--portrait .portrait {
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.section__body {
  display: grid;
  align-content: start;
  gap: var(--space-7);
  min-width: 0;
}

.statement { text-wrap: balance; }
.statement > span { display: block; }

.prose { max-width: var(--measure); text-wrap: pretty; }
.prose > * + * { margin-top: var(--space-4); }
.prose.body > * + * { margin-top: var(--space-3); }
.prose h2 { margin-top: var(--space-7); }
.prose h2:first-child { margin-top: 0; }
.prose h2 + * { margin-top: var(--space-2); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Mehr lesen: der Text läuft nach dem ersten Absatz aus (motion.js) ---------- */
@property --fade { syntax: "<length>"; inherits: false; initial-value: 0px; }
.readmore {
  --fade: 0px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
  transition: max-height 800ms cubic-bezier(.2, .7, .2, 1), --fade 500ms ease;
}
.readmore.is-short { --fade: 5em; }
.readmore__toggle {
  justify-self: start;
  min-height: 44px;
  margin-top: calc(var(--space-6) * -1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  text-decoration: underline;
  text-decoration-thickness: var(--stroke-hair);
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.readmore__toggle:hover { text-decoration-thickness: var(--stroke-strong); }

/* ---------- Zeitleiste (Rec Room) ---------- */
.timeline-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--stroke-hair) solid var(--line);
}
.timeline-list li { position: relative; display: grid; align-content: start; gap: var(--space-1); padding: var(--space-4) var(--space-4) 0 0; }
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: -5px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-round);
  background: var(--ink);
}
.timeline-list__when { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.motion .reveal .timeline-list li { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease, transform 700ms cubic-bezier(.2, .7, .2, 1); }
.motion .reveal.is-in .timeline-list li { opacity: 1; transform: none; }
.motion .reveal.is-in .timeline-list li:nth-child(2) { transition-delay: 250ms; }
.motion .reveal.is-in .timeline-list li:nth-child(3) { transition-delay: 400ms; }
.motion .reveal.is-in .timeline-list li:nth-child(4) { transition-delay: 550ms; }

/* ---------- Übersicht auf der Startseite: jede Unterseite eine Zeile über die ganze Breite (pf-index) ---------- */
.section--hub .pf-index { grid-column: 1 / -1; margin: 0 calc(var(--page-margin) * -1); }
.hub__row {
  grid-template-columns: 4rem minmax(0, 1.1fr) minmax(0, 1fr) auto;
  align-items: center;
  padding-block: var(--space-5);
}
.hub__title { font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
.hub__text { max-width: 44ch; text-wrap: pretty; }
.hub__arrow {
  width: 30px;
  height: 24px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  transition: transform 360ms cubic-bezier(.2, .8, .2, 1);
}
.hub__arrow path { vector-effect: non-scaling-stroke; }
.hub__row:hover .hub__arrow,
.hub__row:focus-visible .hub__arrow { transform: translateX(8px); }

/* Vorschau: beim Überfahren schwebt neben dem Zeiger eine kleine Karte mit bewegtem Bild der Unterseite.
   motion.js setzt translate und rotate; nur mit Maus und breitem Schirm, sonst bleibt die Zeile, wie sie ist. */
.hub__row { position: relative; }
.vs { display: block; }
html:not(.motion) .hub__vorschau { display: none; }
@media not ((hover: hover) and (min-width: 721px)) {
  .hub__vorschau { display: none !important; }
}
@media (hover: hover) and (min-width: 721px) {
  .motion .hub__vorschau {
    position: absolute;
    left: 0;
    top: 50%;
    z-index: 3;
    width: 320px;
    height: 200px;
    overflow: hidden;
    background: var(--surface);
    color: var(--ink);
    border: var(--stroke-hair) solid var(--line);
    pointer-events: none;
    opacity: 0;
    translate: 0 -50%;
    scale: .9;
    transition: opacity 220ms ease, scale 420ms cubic-bezier(.2, .8, .2, 1);
  }
  .motion .hub__row:hover .hub__vorschau,
  .motion .hub__row:focus-visible .hub__vorschau { opacity: 1; scale: 1; }
}
.vs * { animation-play-state: paused !important; }
.hub__row:hover .vs *,
.hub__row:focus-visible .vs * { animation-play-state: running !important; }
.vs__name { position: absolute; left: var(--space-3); top: var(--space-2); color: var(--ink-muted); }
.vs svg { display: block; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
.vs .fill { fill: currentColor; stroke: none; }
.vs .leise { stroke: var(--ink-muted); stroke-width: 1; opacity: .4; }

/* Projekte: links füllt sich ein Appoint-Board, rechts fliegt ein Lauf ab */
.vs--projekte { display: grid; grid-template-columns: 1fr 1fr; }
.vs--projekte .vs__feld { position: relative; display: grid; place-items: center; padding: var(--space-6) var(--space-4) var(--space-4); }
.vs--projekte .vs__feld + .vs__feld { border-left: var(--stroke-hair) solid var(--line-subtle); }
.vs--projekte svg { width: 112px; height: 92px; }
.vs__zelle { opacity: 0; animation: vs-markieren 5s var(--d) infinite both; }
@keyframes vs-markieren {
  0%, 6% { opacity: 0; }
  14%, 90% { opacity: var(--o); }
  100% { opacity: 0; }
}
.vs__band { opacity: 0; animation: vs-band 5s infinite both; }
@keyframes vs-band {
  0%, 52% { opacity: 0; }
  58%, 88% { opacity: 1; }
  96%, 100% { opacity: 0; }
}

/* Fotos: vier Abzüge fächern sich auf, einer nach dem anderen hebt sich */
.vs--fotos { display: grid; place-items: center; }
.vs__abzug {
  position: absolute;
  left: calc(50% - 48px);
  top: calc(50% - 64px);
  width: 96px;
  height: 120px;
  padding: 4px;
  background: var(--surface);
  border: var(--stroke-hair) solid var(--line);
  translate: 0 0;
  rotate: calc((var(--n) - 1.5) * 2deg);
  transition: translate 560ms cubic-bezier(.2, .8, .2, 1), rotate 560ms cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--n) * 40ms);
  animation: vs-heben 4.8s calc(var(--n) * 1.2s + 600ms) infinite;
}
.vs__abzug img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--surface-sunken); }
.hub__row:hover .vs__abzug,
.hub__row:focus-visible .vs__abzug { translate: calc((var(--n) - 1.5) * 60px) var(--tief, 0px); rotate: calc((var(--n) - 1.5) * 6deg); }
@keyframes vs-heben {
  0%, 30%, 100% { transform: none; }
  10%, 20% { transform: translateY(-12px) scale(1.06); }
}

/* Rec Room: Erinnerungen kreisen wie in der Galaxie (motion.js) */
.vs--recroom {
  background:
    radial-gradient(1px 1px at 12% 22%, #fff8, transparent),
    radial-gradient(1px 1px at 78% 14%, #fff9, transparent),
    radial-gradient(1px 1px at 64% 82%, #fff7, transparent),
    radial-gradient(1px 1px at 30% 70%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 88% 58%, #fffa, transparent),
    radial-gradient(1px 1px at 46% 10%, #fff7, transparent),
    radial-gradient(120% 90% at 50% 50%, #1b1a2e, #0a0a12);
  color: #efefef;
  border-color: #0a0a12;
}
.vs--recroom .vs__name { color: #b0b0b0; z-index: 20; }
.vs__stern { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; background: #fff; border-radius: 50%; box-shadow: 0 0 12px 4px #fff4; }
.vs__erinnerung {
  position: absolute;
  left: 0;
  top: 0;
  width: 72px;
  height: 40px;
  margin: -20px 0 0 -36px;
  object-fit: cover;
  background: #222;
  outline: var(--stroke-hair) solid #fff3;
}

/* Abseits: vier kleine Szenen für Tag, Freunde, Musik und Laufen */
.vs--abseits { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.vs--abseits .vs__feld { position: relative; display: grid; place-items: center; padding-top: var(--space-4); }
.vs--abseits .vs__feld:nth-child(even) { border-left: var(--stroke-hair) solid var(--line-subtle); }
.vs--abseits .vs__feld:nth-child(n + 3) { border-top: var(--stroke-hair) solid var(--line-subtle); }
.vs--abseits svg { width: 64px; height: 44px; }
.vs__schritt { animation: var(--a) 4s infinite both; }
@keyframes vs-tag-a { 0%, 35% { transform: none; } 55%, 100% { transform: translateY(10px); } }
@keyframes vs-tag-b { 0%, 35% { transform: translateY(30px); } 55%, 100% { transform: none; } }
.vs--abseits .vs__tag { animation: vs-blenden 4s infinite both; }
@keyframes vs-blenden { 0% { opacity: 0; } 8%, 90% { opacity: 1; } 100% { opacity: 0; } }
.vs__freund { animation: var(--a) 3.6s ease-in-out infinite both; }
@keyframes vs-freund-l { 0%, 15%, 85%, 100% { transform: none; } 40%, 60% { transform: translateX(3px); } }
@keyframes vs-freund-r { 0%, 15%, 85%, 100% { transform: none; } 40%, 60% { transform: translateX(-3px); } }
.vs__funke { opacity: 0; animation: vs-funke 3.6s infinite both; transform-origin: 32px 8px; transform-box: view-box; }
@keyframes vs-funke { 0%, 38%, 66%, 100% { opacity: 0; transform: scale(.4); } 46%, 58% { opacity: 1; transform: none; } }
.vs__ton { transform-box: fill-box; transform-origin: 50% 100%; animation: vs-ton var(--t) ease-in-out infinite alternate; }
@keyframes vs-ton { from { transform: scaleY(.2); } to { transform: scaleY(1); } }

/* ---------- Unterseiten: der Titel steht direkt auf der Linie des ersten Abschnitts ---------- */
.page-title--seite + .section { margin-top: 0; }

/* ---------- Projekte (/projekte/): links das Produktlogo, rechts Video und Text ---------- */
.project { gap: var(--space-5); }
.project__logo { line-height: 0; }
.project__logo-bild { display: block; width: auto; height: 40px; }
.project__media { margin: 0; border: var(--stroke-hair) solid var(--line); }
.project__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #efefef; }
.project__text { display: grid; justify-items: start; gap: var(--space-3); max-width: var(--measure); }
.project__text .pf-button { margin-top: var(--space-3); }
/* Trace macht Videos im Hochformat: das Video steht schmal neben dem Text */
.project--hochkant { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; }
.project__video--hochkant { aspect-ratio: 9 / 16; background: #111; }
.project__hinweis { color: var(--ink-muted); }

/* Aus Rec Room: eine Reihe Titelbilder, darunter die Namen, alles führt auf die Rec-Room-Seite */
.rr-verweis { display: grid; gap: var(--space-5); color: inherit; text-decoration: none; }
.rr-verweis__bilder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.rr-verweis__bilder img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-sunken);
  transition: translate 420ms cubic-bezier(.2, .8, .2, 1);
}
.rr-verweis:hover .rr-verweis__bilder img { translate: 0 -6px; }
.rr-verweis:hover .rr-verweis__bilder img:nth-child(2) { transition-delay: 40ms; }
.rr-verweis:hover .rr-verweis__bilder img:nth-child(3) { transition-delay: 80ms; }
.rr-verweis:hover .rr-verweis__bilder img:nth-child(4) { transition-delay: 120ms; }
.rr-verweis__namen { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); color: var(--ink-muted); }
.rr-verweis__weiter { display: inline-flex; align-items: center; gap: var(--space-3); }
.rr-verweis__weiter .hub__arrow { width: 22px; height: 18px; }
.rr-verweis:hover .rr-verweis__weiter .hub__arrow { transform: translateX(8px); }
.rr-verweis:hover .rr-verweis__titel { text-decoration-thickness: var(--stroke-strong); }
.rr-verweis__titel { text-decoration: underline; text-decoration-thickness: var(--stroke-hair); text-underline-offset: 0.12em; }

/* ---------- Liste mit Hairlines (Appoint: So geht's) ---------- */
.rows { border-top: var(--stroke-hair) solid var(--line); }
.rows > li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: baseline;
  gap: var(--space-2) var(--space-5);
  padding: var(--space-4) 0 var(--space-5);
  border-bottom: var(--stroke-hair) solid var(--line);
}
.rows__no { color: var(--ink-muted); font-variant-numeric: tabular-nums; }


/* ---------- Kontakt: eigene Fläche mit Haarlinie, daneben der Umschlag ----------
   Beim Schreiben rutscht der Brief hinein, die Klappe schließt sich und der Umschlag fliegt
   nach rechts aus dem Bild (motion.js). Der Abschnitt schneidet ihn seitlich ab, ohne Scrollbalken. */
.contact { position: relative; overflow-x: clip; }
.contact__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-7);
  padding: var(--space-8) var(--space-7);
  border: var(--stroke-hair) solid var(--line);
}
.contact__content {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  min-width: 0;
}
.contact__text { color: var(--ink-muted); }
.envelope { width: 232px; height: auto; }
.envelope__paper,
.envelope__body { fill: var(--surface); }
.envelope__flap-back,
.envelope__flap { transform-origin: 58px 34px; }
/* Nie ganz auf 0 stauchen: mit vector-effect zeichnet der Browser sonst einen Rest */
.envelope__flap { transform: scaleY(.02); opacity: 0; }
.envelope__letter { transition: transform 360ms cubic-bezier(.2, .8, .2, 1); }
.motion .envelope { cursor: pointer; }
.motion .contact__card:has([data-mail]:hover, [data-mail]:focus-visible) .envelope__letter,
.motion .envelope:hover .envelope__letter { transform: translateY(-5px); }
.contact__trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
}
.contact__mail {
  margin-top: var(--space-3);
  color: inherit;
  font-size: clamp(32px, 4.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-decoration: underline;
  text-decoration-thickness: var(--stroke-hair);
  text-underline-offset: 0.12em;
  overflow-wrap: anywhere;
}
.contact__mail:hover { text-decoration-thickness: var(--stroke-strong); }
.contact__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }

/* ---------- Fußzeile: nur noch das Rechtliche ---------- */
.site-footer { margin-top: var(--space-9); padding-top: var(--space-5); }
.site-footer .pf-footer__legal { padding-top: 0; border-top: 0; }
.pf-footer__lead p { max-width: 36ch; }
.pf-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
}
.legal-links { display: flex; flex-wrap: wrap; gap: var(--space-5); }

/* ---------- Seitenende der Unterseiten: ein Weg führt nach Hause ----------
   Ein Punkt läuft die Linie entlang bis zum Logo; kommt er an, rutscht lhr unter flx an seinen Platz (motion.js).
   Beim Überfahren geht das Logo auf, der Punkt läuft noch einmal heim, und es schließt sich hinter ihm. */
.heimweg {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: var(--space-5) var(--space-6);
  padding-bottom: var(--space-7);
  color: inherit;
  text-decoration: none;
}
.heimweg__text { display: grid; gap: var(--space-3); }
.heimweg__kicker { color: var(--ink-muted); }
.heimweg__titel {
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: underline;
  text-decoration-thickness: var(--stroke-hair);
  text-underline-offset: 0.12em;
}
.heimweg:hover .heimweg__titel { text-decoration-thickness: var(--stroke-strong); }
.heimweg:focus-visible { outline-offset: 8px; }
.heimweg__bahn { position: relative; display: flex; align-items: center; height: 80px; min-width: 96px; }
/* Ohne Skript eine gerade Linie */
.heimweg__bahn::before { content: ""; position: absolute; left: 0; right: 92px; top: 50%; border-top: var(--stroke-hair) solid var(--line); }
.heimweg--js .heimweg__bahn::before { content: none; }
.heimweg__weg {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
}
.heimweg__punkt {
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: var(--radius-round);
  background: var(--ink);
  opacity: 0;
  transition: opacity 200ms ease;
}
.heimweg__punkt.ist-sichtbar { opacity: 1; }
.heimweg__logo { flex: none; width: 79px; height: 80px; overflow: visible; }
.heimweg__logo-front { fill: currentColor; stroke: var(--surface); paint-order: stroke; stroke-linejoin: miter; stroke-miterlimit: 4; }
.heimweg__logo-back { fill: currentColor; transition: transform 700ms cubic-bezier(.2, .8, .2, 1), opacity 300ms ease; }
.heimweg.ist-unterwegs .heimweg__logo-back { transform: translate(0px, 520px); opacity: 0; }
.heimweg.ist-offen .heimweg__logo-back { transform: var(--open); }
.legal-links a { display: inline-flex; align-items: center; min-height: 32px; }
.colophon { max-width: 64ch; }

/* ---------- Rechtliches und Fehlerseite ---------- */
.page-title {
  padding: var(--space-10) var(--page-margin) var(--space-7);
  text-wrap: balance;
}
.legal-address { font-style: normal; }

/* ---------- Mittlere Breite ---------- */
@media (max-width: 1023px) {
  .section { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
  .rows > li { grid-template-columns: 3rem minmax(0, 1fr); }
  .rows__text { grid-column: 2; }
}

/* ---------- Schmal ---------- */
@media (max-width: 720px) {
  /* Hero steht hier als Spalte; der Titel bleibt trotzdem unten im Viewport */
  .intro .pf-hero { justify-content: flex-end; }
  .section {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-8);
  }
  /* Schmal: erst das Porträt, dann der Text */
  .section--portrait .section__aside { display: contents; }
  .pict--section { width: calc(var(--w) * 40px / 24); height: calc(var(--h) * 40px / 24); }
  .pict--figure { max-width: 193px; }
  .pict--hub { width: calc(var(--w) * 1.5px); height: calc(var(--h) * 1.5px); grid-row: span 2; align-self: start; margin-top: var(--space-1); }
  .hub__row { grid-template-columns: 2.5rem minmax(0, 1fr) auto; row-gap: var(--space-2); padding-block: var(--space-4) var(--space-5); }
  .hub__title { grid-column: 2; font-size: 32px; }
  .hub__text { grid-column: 2; grid-row: 2; }
  .hub__arrow { grid-column: 3; grid-row: 1 / span 2; width: 22px; height: 18px; }
  .rows > li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .rows__title { font-size: 24px; }
  .section--portrait .portrait { max-width: 320px; }
  .timeline-list { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: var(--stroke-hair) solid var(--line); margin-left: 4px; }
  .timeline-list li { padding: 0 0 var(--space-5) var(--space-5); }
  .timeline-list li:last-child { padding-bottom: 0; }
  .timeline-list li::before { left: -5px; top: 4px; }
  .pf-nav__links { flex-wrap: wrap; gap: 0 var(--space-4); }
  .pf-nav__links a { white-space: nowrap; }
  .prose, .rows__text { hyphens: auto; }
  .site-footer { margin-top: var(--space-8); }
  .heimweg { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--space-6); }
  .project--hochkant { grid-template-columns: minmax(0, 1fr); }
  .project--hochkant .project__media { max-width: 280px; }
  .rr-verweis__bilder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heimweg__bahn { height: 56px; }
  .heimweg__bahn::before { right: 68px; }
  .heimweg__logo { width: 55px; height: 56px; }
  .contact__card { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6) var(--space-5); }
  .envelope { order: -1; width: 140px; }
  .page-title { padding-top: var(--space-8); }
  .intro--short .pf-hero { padding-top: var(--space-8); }
}

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

@media print {
  .pf-theme-toggle, .skip { display: none !important; }
  .pf-inverse { background: none; color: inherit; }
  .intro { min-height: 0; }
}
