/* Kontrastreiche Serifenschrift für den Namen auf dem Eingangsbild. Mac/iOS nutzen die
   installierte Didot bzw. Bodoni 72; alle anderen die mitgelieferte Bodoni Moda (SIL OFL,
   Lizenz in fonts/OFL-BodoniModa.txt). Kein externer Font-Server. */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bodoni-moda-latin.woff2") format("woff2");
}

:root {
  --bg: #f7f6f3;
  --fg: #1c1c1b;
  --muted: #76736d;
  --line: #dcd9d2;
  --tile: #ebe8e2;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --header: 72px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  /* Alle Texte in Helvetica Neue UltraLight (100), auch das Hover-Overlay.
     Ausnahme: Name auf dem Eingangsbild (Serifenschrift). */
  --text-weight: 100;
  --serif: "Didot", "Bodoni 72", "Bodoni Moda", "Bodoni MT", serif;
  /* Schriftzug des Namens auf der Startseite; auch vom Hover-Titel verwendet. */
  --display-weight: var(--text-weight);
  --display-tracking: 0.04em;
}

* { box-sizing: border-box; }

html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  font: 15px/1.6 var(--font);
  font-weight: var(--text-weight);
  letter-spacing: 0.005em;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

img { display: block; }
h1, h2, h3, h4, strong, b, th { font-weight: var(--text-weight); }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header);
  padding: 0 var(--pad);
  background: var(--bg);
}
.logo {
  font-size: 14px;
  font-weight: var(--text-weight);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.site-nav { display: flex; gap: 28px; font-size: 14px; }
.site-nav a { color: var(--muted); }
.site-nav a[aria-current="page"] { color: var(--fg); }
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .site-nav { flex-wrap: wrap; gap: 6px 16px; }
  .js .menu-toggle {
    display: block;
    border: 0;
    background: none;
    padding: 8px 0;
    font: inherit;
    font-size: 14px;
    color: var(--fg);
    cursor: pointer;
  }
  .js .site-nav {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--pad) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 20px;
  }
  .js .site-nav a { padding: 8px 0; color: var(--fg); }
  .js .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
  .js.menu-open .site-nav { display: flex; }
}

/* ---------- Gemeinsame Seitenelemente ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 120px; }

.page-title {
  margin: 56px 0 64px;
  font-size: 13px;
  font-weight: var(--text-weight);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.t { color: var(--fg); }
figcaption { font-size: 13px; line-height: 1.45; color: var(--muted); }

/* ---------- Startseite ---------- */
.home { padding-left: 0; padding-right: 0; max-width: none; }

/* Begrüßung: Eingangsbild bildschirmfüllend (ohne Kopfzeile), Name im oberen Viertel,
   darunter das Menü. */
.entrance {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  background: #d9cbb5;
}
.entrance img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 50%;
}
/* Dezenter Verlauf nur oben, damit das Weiß auf der hellen Wand trägt. */
.entrance::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
  pointer-events: none;
}
/* Name und Menü bilden ein Raster: das Menü steht in der Spalte des Nachnamens und
   reicht genau von dessen linker bis zur rechten Kante. */
.entrance-title {
  position: absolute;
  inset: 0 0 auto 0;
  height: 30%;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 0.3em;
  align-content: center;
  justify-content: center;
  padding: 0 var(--pad);
  color: #fff;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 7.2vw, 124px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 28px rgba(0, 0, 0, 0.25);
}
.entrance-name { display: contents; font-size: inherit; }
.entrance-name span {
  opacity: var(--name-opacity, 1);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Platzhalter in der Spalte des Nachnamens; hält die Höhe, wenn das Menü angeheftet ist. */
.entrance-nav-slot {
  grid-column: 2;
  /* Breite allein vom Nachnamen bestimmen lassen. */
  width: 0;
  min-width: 100%;
  margin-top: clamp(10px, 1.6vw, 22px);
  /* Laufweite nach dem letzten Buchstaben des Namens abziehen: bündig mit dem Y. */
  margin-right: 0.06em;
}
/* Menü wie ein Satz: dicht hintereinander, rechtsbündig mit dem Nachnamen. */
.entrance-nav {
  --track: 0.14em;
  display: flex;
  justify-content: flex-end;
  /* Laufweite nach dem letzten Buchstaben ausgleichen, damit die Schrift bündig endet. */
  margin-right: calc(-1 * var(--track));
  font-family: var(--font);
  font-weight: var(--text-weight);
  flex-wrap: wrap;
  gap: 2px 1.1em;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: var(--track);
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s;
}
.entrance-nav a {
  color: inherit;
  transition: text-shadow 0.3s;
}
/* Kein Unterstrich, stattdessen ein dezentes Leuchten. */
.entrance-nav a:hover,
.entrance-nav a:focus-visible {
  text-decoration: none;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 16px rgba(255, 255, 255, 0.6);
}
/* Beim Scrollen bleibt das Menü oben stehen (main.js setzt die Klassen und Abstände). */
.nav-pinned .entrance-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 18px var(--nav-right, var(--pad)) 18px var(--nav-left, var(--pad));
}
/* Unterhalb des Eingangsbilds: dunkle Schrift auf hellem Grund. */
.nav-solid .entrance-nav {
  background: var(--bg);
  color: var(--fg);
  text-shadow: none;
}
.nav-solid .entrance-nav a:hover,
.nav-solid .entrance-nav a:focus-visible {
  text-shadow: 0 0 8px rgba(28, 28, 27, 0.35);
}
@media (max-width: 720px) {
  .entrance-nav { font-size: 11px; --track: 0.1em; }
}
.entrance + .hero { padding-top: 8vh; }
/* Hochformat: Ausschnitt nach links, damit das große Bild an der Wand sichtbar bleibt. */
@media (max-aspect-ratio: 1/1) {
  .entrance img { object-position: 22% 50%; }
}
.intro {
  display: flex;
  align-items: flex-end;
  min-height: calc(42vh - var(--header));
  min-height: calc(42svh - var(--header));
  padding: 0 var(--pad) 6vh;
}
.hero-name {
  margin: 0;
  font-size: clamp(36px, 8.5vw, 132px);
  font-family: var(--font);
  font-weight: var(--display-weight);
  line-height: 0.95;
  letter-spacing: var(--display-tracking);
  text-transform: uppercase;
}
.hero {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header));
  min-height: calc(100svh - var(--header));
  padding: 0 var(--pad);
}
.hero figure { margin: 0; width: fit-content; }
.hero img {
  width: min(100vw - 2 * var(--pad), (100vh - var(--header) - 72px) * var(--r), var(--w));
  width: min(100vw - 2 * var(--pad), (100svh - var(--header) - 72px) * var(--r), var(--w));
  height: auto;
  aspect-ratio: var(--r);
  background: var(--tile);
}
.hero figcaption { margin-top: 12px; }
/* Titel beim Überfahren mit der Maus (alle Bilder): Titel und Detailzeile in UltraLight,
   beide von Bildrand zu Bildrand eingepasst (Schriftgröße setzt main.js).
   Abschalten: Klasse "has-hover-titles" am <html> entfernen
   (werke.json -> website.hover_titel: false). Auf Touch-Geräten bleibt der Titel verborgen. */
.hover-frame { position: relative; }
.hover-title { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-hover-titles .hover-title {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    position: absolute;
    inset: 0;
    padding: 0 0 1.5%;
    overflow: hidden;
    /* Dezenter Verlauf nur am unteren Rand, damit Weiß auch auf hellen Partien trägt. */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0) 45%);
    color: #fff;
    font-family: var(--font);
    font-weight: var(--text-weight);
    line-height: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
  }
  .has-hover-titles .hover-frame:hover .hover-title { opacity: 1; }
  /* Laufweite wie beim Namensschriftzug; hier gesetzt, damit sie mit der Schriftgröße mitwächst. */
  .has-hover-titles .hover-text { display: block; white-space: nowrap; letter-spacing: var(--display-tracking); }
  .has-hover-titles .hover-sub { font-weight: var(--text-weight); line-height: 1; margin-top: 0.12em; }
  .has-hover-titles .hover-sub:empty { display: none; }
}

.statement {
  margin: 0;
  padding: 18vh var(--pad);
  text-align: center;
  font-size: clamp(24px, 5vw, 64px);
  font-weight: var(--text-weight);
  line-height: 1.15;
  letter-spacing: 0.12em;
}
.statement + .statement { padding-top: 0; }

.entry {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--pad);
  border-top: 1px solid var(--line);
}
.entry h2 {
  margin: 0 0 32px;
  font-size: 13px;
  font-weight: var(--text-weight);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.entry p { max-width: 40rem; margin: 0 0 1em; }
.entry .more a { color: var(--muted); }
.entry .more a::after { content: " →"; }
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: end;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}
.teaser-grid img { width: 100%; height: auto; aspect-ratio: var(--r); background: var(--tile); }
.plain { margin: 0 0 1em; padding: 0; list-style: none; }

@media (max-width: 700px) {
  .intro { min-height: 0; padding-top: 10vh; padding-bottom: 5vh; }
  .hero { min-height: 0; padding-bottom: 4vh; }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .statement { padding: 12vh var(--pad); }
}

/* ---------- Works: Filter ---------- */
/* Reiter nach Jahr bzw. Serie; ohne JavaScript ausgeblendet (dann sind alle Werke sichtbar). */
.filter { display: none; }
.js .filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0 0 28px;
}
.filter button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: var(--text-weight);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.filter button:hover { color: var(--fg); }
.filter button[aria-pressed="true"] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* ---------- Works: Mauerwerk-Raster ---------- */
/* Spalten mit fast keinem Abstand, jedes Bild in seinem Seitenverhältnis. Ohne JavaScript
   CSS-Spalten (Reihenfolge spaltenweise); mit JavaScript setzt main.js jede Kachel in die
   jeweils kürzeste Spalte, damit die Reihenfolge zeilenweise bleibt. */
.grid {
  --gap: 4px;
  --cols: 3;
  margin: 0;
  padding: 0;
  list-style: none;
  columns: var(--cols);
  column-gap: var(--gap);
}
.grid li { break-inside: avoid; margin-bottom: var(--gap); }
.js .grid { position: relative; columns: auto; }
.js .grid li {
  position: absolute;
  margin: 0;
  transition: top 0.4s ease, left 0.4s ease, opacity 0.3s ease;
}
.js .grid li[hidden] { display: block; opacity: 0; pointer-events: none; visibility: hidden; }
.grid figure { margin: 0; }
.grid .tile { display: block; }
.grid img { width: 100%; height: auto; aspect-ratio: var(--r); background: var(--tile); }
.grid .tile:hover { text-decoration: none; }
.grid figcaption {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 999px) { .grid { --cols: 2; } }
@media (min-width: 1600px) { .grid { --cols: 4; } }

/* Hover im Raster: farbige Fläche über dem ganzen Bild, Titel und Angaben unten links.
   Farbe hier ändern. Ersetzt im Raster den auf Bildbreite eingepassten Titel. */
.grid { --tint: rgba(23, 45, 120, 0.78); }
@media (hover: hover) and (pointer: fine) {
  .has-hover-titles .grid .hover-title {
    justify-content: flex-end;
    padding: 22px 24px;
    background: var(--tint);
    line-height: 1.25;
    text-shadow: none;
    transition: opacity 250ms ease;
  }
  .has-hover-titles .grid .hover-text {
    white-space: normal;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(18px, 1.7vw, 26px);
    letter-spacing: 0.02em;
  }
  .has-hover-titles .grid .hover-sub {
    margin-top: 6px;
    font-family: var(--font);
    font-weight: var(--text-weight);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
}

/* ---------- Works: Vergrößerung ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--fg);
}
.lightbox::backdrop { background: var(--bg); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; width: fit-content; }
.lightbox img {
  width: min(100vw - 2 * var(--pad) - 96px, (100vh - 140px) * var(--r));
  width: min(100vw - 2 * var(--pad) - 96px, (100svh - 140px) * var(--r));
  height: auto;
  aspect-ratio: var(--r);
  object-fit: contain;
  background: var(--tile);
}
.lightbox figcaption { margin-top: 12px; }
.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  padding: 12px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.lightbox button:hover { color: var(--fg); }
.lb-close { top: 16px; right: calc(var(--pad) - 12px); }
.lightbox .lb-prev, .lightbox .lb-next { top: 50%; transform: translateY(-50%); font-size: 22px; }
.lb-prev { left: calc(var(--pad) - 12px); }
.lb-next { right: calc(var(--pad) - 12px); }

@media (max-width: 700px) {
  .lightbox img {
    width: min(100vw - 2 * var(--pad), (100vh - 160px) * var(--r));
    width: min(100vw - 2 * var(--pad), (100svh - 160px) * var(--r));
  }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 8px; transform: none; }
}

/* ---------- Textseiten ---------- */
.text-page { max-width: 46rem; margin: 0 auto; }
.text-page h2 {
  margin: 64px 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: var(--text-weight);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.text-page h3 { margin: 28px 0 6px; font-size: 15px; font-weight: var(--text-weight); }
.text-page p { margin: 0 0 1em; }
.text-page ul { margin: 0; padding: 0; list-style: none; }
.text-page li { padding: 2px 0; }
.text-page h3 ~ .undated { margin-top: 28px; }
.text-page a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.text-page a:hover { text-decoration-color: currentColor; }
.dated .y { display: inline-block; min-width: 8em; color: var(--muted); font-variant-numeric: tabular-nums; }
.contact .mail { font-size: clamp(20px, 3vw, 28px); margin: 24px 0; }

.film { margin: 0; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: var(--r); background: #000; }
.film figcaption { margin-top: 10px; }
