/* Lars Kunte – Website
   Schlicht, weiß, viel Raum für die Arbeiten.
   Systemschrift: lädt nichts von fremden Servern (DSGVO-freundlich). */

:root {
  --text: #111;
  --grau: #767676;
  --linie: #e4e4e4;
  --platzhalter: #ececea;
  --rand: clamp(20px, 4vw, 56px);
  --schrift: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- Kopf ---------- */
.kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding: 32px var(--rand) 0;
}
.name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.menue, .untermenue {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 0; padding: 0; list-style: none;
}
.menue a, .untermenue a { color: var(--grau); }
.menue a:hover, .untermenue a:hover { color: var(--text); text-decoration: none; }
.menue a.aktiv, .untermenue a.aktiv { color: var(--text); }

.untermenue {
  padding: 22px var(--rand) 0;
  font-size: 14px;
}

/* ---------- Inhalt ---------- */
main { padding: 56px var(--rand) 96px; }
.schmal { max-width: 720px; }

h1 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 36px;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 48px 0 14px;
}
p { margin: 0 0 1em; }

/* Ansicht umschalten */
.leiste {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
}
.leiste h1 { margin: 0; }
.ansicht, .sprache { display: flex; gap: 18px; font-size: 14px; }
.ansicht button, .sprache button {
  font: inherit; background: none; border: 0; padding: 0;
  color: var(--grau); cursor: pointer;
}
.ansicht button.aktiv, .sprache button.aktiv { color: var(--text); }

/* ---------- Werke: Einzelansicht (untereinander) ---------- */
.werke.einzeln {
  display: flex;
  flex-direction: column;
  gap: 96px;
}
.werke.einzeln .werk { max-width: 1100px; }
.werke.einzeln .bildrahmen img,
.werke.einzeln .platzhalter { max-height: 78vh; width: auto; }

/* ---------- Werke: Übersicht (Raster) ---------- */
.werke.raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 56px 32px;
  align-items: end;
}
.werke.raster .unterschrift { font-size: 13px; }

.werk { margin: 0; }
.bildrahmen {
  display: block;
  cursor: zoom-in;
  background: none; border: 0; padding: 0;
}
.platzhalter {
  background: var(--platzhalter);
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 12px;
}
.werke.einzeln .platzhalter { height: 70vh; }
.werke.einzeln .platzhalter.portrait    { aspect-ratio: 3 / 4; }
.werke.einzeln .platzhalter.landscape    { aspect-ratio: 4 / 3; height: auto; width: min(100%, 900px); }
.werke.einzeln .platzhalter.square { aspect-ratio: 1; }
.werke.raster .platzhalter { width: 100%; }
.werke.raster .platzhalter.portrait    { aspect-ratio: 3 / 4; }
.werke.raster .platzhalter.landscape    { aspect-ratio: 4 / 3; }
.werke.raster .platzhalter.square { aspect-ratio: 1; }

.unterschrift {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.unterschrift .titel,
.liste .titel { font-style: italic; }
.unterschrift .angaben { color: var(--grau); }

/* ---------- Großansicht ---------- */
.gross {
  position: fixed; inset: 0;
  background: #fff;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px var(--rand);
  z-index: 10;
}
.gross.offen { display: flex; }
.gross img, .gross .platzhalter { max-width: 100%; max-height: 80vh; }
.gross .platzhalter { height: 70vh; }
.gross .platzhalter.portrait { aspect-ratio: 3/4; }
.gross .platzhalter.landscape { aspect-ratio: 4/3; height: auto; width: min(90vw, 1000px); }
.gross .platzhalter.square { aspect-ratio: 1; }
.gross .unterschrift { text-align: center; }
.gross button {
  font: inherit; background: none; border: 0; cursor: pointer;
  color: var(--grau); position: absolute; padding: 12px;
}
.gross button:hover { color: var(--text); }
.gross .zu { top: 18px; right: calc(var(--rand) - 12px); }
.gross .zurueck { left: calc(var(--rand) - 12px); top: 50%; }
.gross .weiter { right: calc(var(--rand) - 12px); top: 50%; }

/* ---------- Listen (Ausstellungen, Biografie) ---------- */
.liste { margin: 0; padding: 0; list-style: none; }
.liste li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--linie);
}
.liste .jahr { color: var(--grau); white-space: nowrap; }
.liste .ort { color: var(--grau); }

/* ---------- Fuß ---------- */
.fuss {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 24px var(--rand) 40px;
  border-top: 1px solid var(--linie);
  margin: 0 var(--rand);
  padding-left: 0; padding-right: 0;
  font-size: 13px;
  color: var(--grau);
}
.fuss nav { display: flex; gap: 22px; }

@media (max-width: 640px) {
  .kopf { flex-direction: column; }
  main { padding-top: 40px; }
  .werke.einzeln { gap: 64px; }
  .werke.einzeln .platzhalter { height: auto; width: 100%; }
  .werke.einzeln .platzhalter.landscape { width: 100%; }
  .werke.raster { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
}

/* ---------- Startseite ---------- */
.start img, .start .platzhalter { max-height: 78vh; width: auto; }
.start .platzhalter { height: 70vh; }
.start .platzhalter.portrait { aspect-ratio: 3/4; }
.start .platzhalter.landscape { aspect-ratio: 4/3; height: auto; width: min(100%, 900px); }
.start .platzhalter.square { aspect-ratio: 1; }
.start a:hover { text-decoration: none; }
@media (max-width: 640px) { .start .platzhalter { height: auto; width: 100%; } }

/* Bildrahmen füllt die Spalte */
.bildrahmen { width: 100%; text-align: left; }

/* Hauptmenü in gleicher Größe wie der Name */
.menue { font-size: 17px; }

/* Übersicht: alle Bilder in gleich hohen Feldern, Unterschriften auf einer Linie */
.werke.raster { align-items: start; }
.werke.raster .bildrahmen {
  height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.werke.raster .bildrahmen img { max-height: 100%; max-width: 100%; width: auto; height: auto; }
.werke.raster .platzhalter { max-height: 100%; max-width: 100%; }
.werke.raster .platzhalter.portrait { height: 100%; width: auto; }
.werke.raster .platzhalter.square { height: 100%; width: auto; }
.werke.raster .platzhalter.landscape { width: 100%; height: auto; }
@media (max-width: 640px) {
  .werke.raster .bildrahmen { height: 180px; }
}

/* Übersicht: alle Bilder exakt gleich hoch (Breite ergibt sich aus dem Format) */
.werke.raster {
  display: flex;
  flex-wrap: wrap;
  gap: 56px 40px;
  align-items: flex-start;
}
.werke.raster .werk { width: min-content; }
.werke.raster .bildrahmen { height: 280px; width: auto; display: block; }
.werke.raster .bildrahmen img { height: 280px; width: auto; max-width: none; max-height: none; }
.werke.raster .platzhalter,
.werke.raster .platzhalter.portrait,
.werke.raster .platzhalter.square,
.werke.raster .platzhalter.landscape { height: 280px; width: auto; max-width: none; }
.werke.raster .unterschrift { min-width: 180px; }
@media (max-width: 640px) {
  .werke.raster { gap: 36px 20px; }
  .werke.raster .bildrahmen,
  .werke.raster .bildrahmen img,
  .werke.raster .platzhalter { height: 150px !important; }
  .werke.raster .unterschrift { min-width: 120px; }
}

/* Hauptmenü in Großbuchstaben, wie der Name */
.menue { text-transform: uppercase; letter-spacing: .02em; }

/* Jahreszeile direkt unter der Unterkategorie */
nav + nav .untermenue { padding-top: 10px; }

/* Großansicht: Bild so groß wie möglich, Titel und Angaben darunter, ohne Verzögerung */
.gross { padding: 24px var(--rand); transition: none; }
.gross .inhalt { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.gross .inhalt img,
.gross .inhalt .platzhalter {
  max-width: calc(100vw - 2 * var(--rand) - 60px);
  max-height: calc(100vh - 130px);
  width: auto; height: auto;
}
.gross .inhalt .platzhalter.portrait  { height: calc(100vh - 130px); aspect-ratio: 3/4; }
.gross .inhalt .platzhalter.square    { height: calc(100vh - 130px); aspect-ratio: 1; }
.gross .inhalt .platzhalter.landscape { width: min(calc(100vw - 2 * var(--rand) - 60px), calc((100vh - 130px) * 4 / 3)); aspect-ratio: 4/3; }
.gross .unterschrift { margin-top: 16px; text-align: center; }

/* Mehr Abstand zwischen Hauptmenü und Unterkategorien */
.kopf + nav .untermenue { padding-top: 48px; }
nav + nav .untermenue { padding-top: 12px; }

/* Großansicht deckt die Seite vollständig ab */
.gross { background: #fff; }
body.gross-offen { overflow: hidden; }

/* Name, Hauptmenü und Unterkategorien gleichmäßig größer (ca. +18 %) */
.name { font-size: 20px; }
.menue { font-size: 20px; }
.untermenue { font-size: 16.5px; }
@media (max-width: 640px) {
  .name, .menue { font-size: 18px; }
  .untermenue { font-size: 15px; }
}

/* Installation views below the exhibition list */
main.ansichten { padding-top: 0; }
main.ansichten h2 { margin-bottom: 24px; }

/* Detailansicht: kleine transparente Pfeile auf dem Bild */
.gross .bildfeld { position: relative; display: inline-block; line-height: 0; }
.gross .bildfeld .d-pfeil {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; padding: 0; line-height: 32px;
  border-radius: 50%; font-size: 22px; text-align: center;
  color: #111; background: rgba(255, 255, 255, 0.6);
  opacity: 0.75; transition: opacity 0.15s;
}
.gross .bildfeld .d-pfeil:hover { opacity: 1; color: #111; }
.gross .bildfeld .d-zurueck { left: 10px; }
.gross .bildfeld .d-weiter { right: 10px; }

/* Einzelne Werke kleiner darstellen (scale in inhalt.js, z. B. wegen geringer Auflösung) */
.werke.raster .bildrahmen img.klein { display: block; height: calc(280px * var(--s)); margin-top: calc(280px * (1 - var(--s))); }
.werke.einzeln .bildrahmen img.klein { max-height: calc(78vh * var(--s)); }
.gross .inhalt img.klein { max-height: calc((100vh - 130px) * var(--s)); }
@media (max-width: 640px) {
  .werke.raster .bildrahmen img.klein { height: calc(150px * var(--s)) !important; margin-top: calc(150px * (1 - var(--s))); }
}

/* Sehr breite Bilder (Serien-Übersichten) nie breiter als der Bildschirm */
.werke.raster .bildrahmen { display: flex; align-items: flex-end; }
.werke.raster .bildrahmen img:not(.klein) {
  height: auto; max-height: 280px;
  max-width: calc(100vw - 2 * var(--rand) - 16px);
}
@media (max-width: 640px) {
  .werke.raster .bildrahmen img:not(.klein) { height: auto !important; max-height: 150px; }
}
