:root {
  --bg: #f1efea;
  --fg: #24231f;
  --muted: #77746b;
  --accent: #8a1f11;
  --card: #fbfaf7;
  --line: #d9d5ca;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15151a; --fg: #ebe8e0; --muted: #9a978d; --accent: #e08a6f; --card: #1e1e24; --line: #33333b; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.6;
}
body.lb-open { overflow: hidden; }

a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-header, .hero, main, .site-footer {
  width: min(1240px, 100% - 40px);
  margin-inline: auto;
}

/* Kopf */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font-family: var(--sans);
}
.logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .02em;
}
nav { display: flex; gap: 26px; font-size: .9rem; letter-spacing: .04em; }
nav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--fg); border-color: var(--accent); }
nav .ext { margin-left: .25em; font-size: .85em; }
.logo, nav a { white-space: nowrap; }
@media (max-width: 520px) { .site-header { flex-wrap: wrap; gap: 6px 16px; } nav { gap: 16px; font-size: .85rem; letter-spacing: .02em; } }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  padding: clamp(24px, 6vw, 70px) 0 clamp(40px, 8vw, 90px);
}
.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(3.4rem, 10vw, 7.5rem);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.01em;
  margin-bottom: 24px;
}
.lead { max-width: 30ch; font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--muted); margin-bottom: 30px; }
.knopf {
  display: inline-block;
  font-family: var(--sans);
  font-size: .85rem;
  letter-spacing: .08em;
  text-decoration: none;
  border: 1px solid var(--fg);
  padding: 12px 26px;
  transition: background .2s, color .2s;
}
.knopf:hover { background: var(--fg); color: var(--bg); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.knopf.leise { border-color: var(--muted); color: var(--fg); background: transparent; }
.knopf.leise:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.knopf .ext { margin-left: .35em; }

.hero-bild {
  display: block;
  background: var(--card);
  padding: clamp(10px, 2vw, 22px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 24px 50px -18px rgba(0, 0, 0, .35);
  transform: rotate(1.6deg);
  transition: transform .4s;
  cursor: zoom-in;
}
.hero-bild:hover { transform: rotate(0deg) scale(1.01); }
.hero-bild img { display: block; width: 100%; height: auto; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-bild { max-width: 440px; justify-self: center; }
}

/* Galerie (Masonry) */
main { padding-bottom: 40px; scroll-margin-top: 10px; }
.grid { display: flex; gap: 18px; align-items: flex-start; }
.col { flex: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 600px) { .grid, .col { gap: 10px; } }

.kachel {
  display: block;
  background: var(--card);
  padding: 8px;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .25s;
}
.kachel.sichtbar { opacity: 1; transform: none; }
.kachel:hover, .kachel:focus-visible {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .35);
}
.kachel img { display: block; width: 100%; height: auto; }
@media (max-width: 600px) { .kachel { padding: 5px; } }
@media (prefers-reduced-motion: reduce) {
  .kachel { opacity: 1; transform: none; transition: none; }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px 0 44px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--muted);
}

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(12, 12, 14, .95);
  font-family: var(--sans);
}
.lb[hidden] { display: none; }
.lb-stage {
  position: absolute;
  inset: 0 0 56px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 70px 0;
  overflow: hidden;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  padding: clamp(6px, 1.2vw, 14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lb.gezoomt .lb-stage img { cursor: grab; }
.lb-leiste {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #cfcdc6;
  font-size: .9rem;
}
.lb-knopf {
  background: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
  padding: 6px 16px;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.lb-knopf:hover { background: rgba(255, 255, 255, .12); }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  opacity: .7;
  line-height: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 8px; right: 16px; font-size: 3rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 4rem; padding: 20px 14px; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
.lb-toast {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #111;
  padding: 8px 18px;
  font-size: .85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.lb-toast.an { opacity: 1; }
@media (max-width: 600px) {
  .lb-stage { padding: 10px 6px 0; }
  .lb-prev, .lb-next { font-size: 2.8rem; padding: 8px 6px; top: auto; bottom: 0; transform: none; height: 56px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}

/* Übergang Kachel ↔ Großansicht */
::view-transition-group(bild) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(bild), ::view-transition-new(bild) { height: 100%; object-fit: contain; }

/* Über-Seite */
.text { max-width: 720px; margin-top: 30px; padding-bottom: 20px; }
.text h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 500; line-height: 1.05; margin-bottom: 20px; }
.text h2 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 36px 0 12px; }
.text p { margin-bottom: 18px; font-size: 1.3rem; }
.vita { display: grid; grid-template-columns: 200px 1fr; gap: 36px; align-items: start; }
.portrait { width: 100%; height: auto; display: block; background: var(--card); padding: 8px; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 18px 36px -16px rgba(0,0,0,.3); }
.lead-klein { color: var(--muted); }
.timeline { list-style: none; margin: 6px 0 28px; border-left: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 7.5em 1fr; gap: 14px; padding: 0 0 16px 20px; position: relative; font-size: 1.15rem; line-height: 1.5; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.jahr { font-family: var(--sans); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding-top: .3em; }
.text h2 { scroll-margin-top: 20px; }
.klein p { font-size: 1.05rem; }
.klein h3 { font-family: var(--sans); font-size: .9rem; font-weight: 600; margin: 22px 0 8px; }
@media (max-width: 640px) {
  .vita { grid-template-columns: 1fr; gap: 24px; }
  .portrait { max-width: 170px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
