/* Petra Amtsberg Hoffmann – ruhiges, weißes Layout, damit die Bilder wirken */
:root {
  --ink: #232325;
  --muted: #8a8a8d;
  --line: #e6e6e6;
  --panel: #f6f6f5;
  --bg: #fff;
  --accent: #232325;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 3.5vw, 40px);
  --gap: clamp(10px, 1.6vw, 22px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kopf ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 26px; padding-bottom: 22px;
}
.brand {
  font-family: var(--serif); font-size: clamp(21px, 2vw, 26px); letter-spacing: .005em;
  text-decoration: none; white-space: nowrap;
}
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; justify-content: flex-end; }
.site-nav a { text-decoration: none; font-size: 15px; color: var(--ink); transition: color .15s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--muted); }
.site-nav .lang { display: flex; gap: 8px; margin-left: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.site-nav .lang a { font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.site-nav .lang a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.menu-toggle { display: none; }

/* ---------- Seitentitel ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 6px 0 22px; }
h1 {
  font: 400 clamp(28px, 3.2vw, 40px)/1.1 var(--sans);
  text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 22px;
}
.page-head h1 { margin: 0; }
.view-toggle {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px;
}
.view-toggle:hover { color: var(--ink); }

/* ---------- Galerie: Karussell ---------- */
.gallery { position: relative; }
.track {
  list-style: none; margin: 0; padding: 0 0 8px;
  display: flex; gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }
.card { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); scroll-snap-align: start; min-width: 0; }
.frame {
  display: flex; align-items: center; justify-content: center;
  background: var(--panel);
  height: min(68vh, 640px); min-height: 300px;
  padding: 11% 13%;
  cursor: zoom-in;
}
.frame img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  object-fit: contain;
  box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 22px rgba(0,0,0,.16);
  transition: transform .4s ease;
}
.frame:hover img { transform: scale(1.015); }
.caption { padding: 14px 2px 0 18px; font-size: 14px; line-height: 1.5; }
.caption h2 { font: 500 15px/1.4 var(--sans); margin: 0 0 4px; letter-spacing: .01em; }
.caption p { margin: 0; color: var(--muted); }
.caption .series, .artwork-info .series { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 6px; }

.nav-btn {
  position: absolute; top: calc(min(68vh, 640px) / 2); transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.92);
  font-size: 19px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: opacity .2s, background .2s;
}
.nav-btn:hover { background: #fff; }
.nav-btn.prev { left: 12px; }
.nav-btn.next { right: 12px; }
.nav-btn[disabled] { opacity: 0; pointer-events: none; }

/* ---------- Galerie: Übersicht (Raster) ---------- */
.gallery.is-grid .track {
  display: grid; overflow: visible; scroll-snap-type: none;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 34px var(--gap);
}
.gallery.is-grid .frame { height: auto; aspect-ratio: 1 / 1; min-height: 0; padding: 12%; }
.gallery.is-grid .nav-btn { display: none; }
.gallery.is-grid .caption { padding-left: 2px; }

.gallery-text { max-width: 720px; margin: 46px 0 0; color: #555; font-size: 15px; }

/* ---------- Einzelnes Werk ---------- */
.crumbs { margin: 0 0 18px; font-size: 14px; }
.crumbs a, .pager a, .inquiry a { color: var(--muted); text-decoration: none; }
.crumbs a:hover, .pager a:hover, .inquiry a:hover { color: var(--ink); }
.artwork-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.artwork-image { margin: 0; background: var(--panel); padding: clamp(20px, 6%, 70px); display: flex; justify-content: center; }
.artwork-image img { max-height: 78vh; width: auto; box-shadow: 0 10px 26px rgba(0,0,0,.16); }
.artwork-info h1 { text-transform: none; letter-spacing: .01em; font-size: clamp(26px, 2.6vw, 34px); margin: 0 0 12px; }
.artwork-info .details { color: var(--muted); margin: 0 0 22px; }
.inquiry { margin: 26px 0; }
.inquiry a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 30px; font-size: 14px; }

/* ---------- Textseiten ---------- */
.page .prose { max-width: 760px; }
.prose h2 { font: 500 13px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .12em; margin: 48px 0 16px; color: var(--ink); }
.prose h3 { font: italic 400 20px/1.4 var(--serif); margin: 0 0 16px; }
.prose p { margin: 0 0 1.1em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.1em; }
.prose li { margin: 0 0 .3em; }
.prose a { text-underline-offset: 3px; }
.prose em { color: #555; }
.rows { margin: 0 0 1.4em; }
.rows > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; }
.text-figure { margin: 30px 0 34px; }
.text-figure img { width: auto; max-width: 100%; max-height: 75vh; }
.text-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.prose blockquote { margin: 0 0 1.2em; padding: 2px 0 2px 20px; border-left: 2px solid var(--line); font: italic 18px/1.6 var(--serif); }
.prose blockquote p { margin: 0; }
.lead { color: #555; margin-bottom: 34px; }
.page .gallery { margin: 34px 0 40px; }
.section-label { font: 500 12px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 46px 0 18px; }

/* ---------- Texte (aufklappbar, wie Vorlage) ---------- */
.text-list { max-width: 820px; border-top: 1px solid var(--line); margin-top: 8px; }
.text-entry { border-bottom: 1px solid var(--line); }
.text-entry summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 18px 0;
}
.text-entry summary::-webkit-details-marker { display: none; }
.te-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.te-title { font: 400 21px/1.3 var(--serif); }
.te-author { font-size: 13px; color: var(--muted); }
.te-arrow { font-size: 20px; color: var(--muted); transition: transform .25s; flex: none; width: 28px; text-align: center; }
.text-entry[open] .te-arrow { transform: rotate(180deg); }
.text-entry summary:hover .te-title { color: var(--muted); }
.te-body { padding: 4px 0 30px; font-size: 17px; line-height: 1.7; max-width: 720px; }
.te-link a { color: var(--muted); }

/* ---------- Ausstellungen ---------- */
.badge { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; padding: 4px 9px; border-radius: 2px; margin-bottom: 10px; }
.badge-upcoming { background: var(--ink); color: #fff; }
.badge-current { background: #c8102e; color: #fff; }
.ex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px var(--gap); }
.ex-card-img { display: block; background: var(--panel); aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 14px; }
.ex-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ex-card-img:hover img { transform: scale(1.02); }
.ex-card h3 { font: 400 22px/1.3 var(--serif); margin: 0 0 6px; }
.ex-card h3 a, .ex-row { text-decoration: none; }
.ex-meta { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.more { font-size: 14px; text-underline-offset: 4px; }
.ex-year { display: grid; grid-template-columns: 110px 1fr; gap: 0 20px; border-top: 1px solid var(--line); padding: 14px 0 6px; }
.ex-year-label { font: 400 20px/1.4 var(--serif); margin: 0; }
.ex-list { list-style: none; margin: 0; padding: 0; }
.ex-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px; gap: 4px 20px; align-items: center; padding: 6px 0 12px; min-height: 40px; }
.ex-title { font-size: 16px; }
.ex-place { font-size: 14px; color: var(--muted); }
.ex-thumb img { width: 96px; height: 72px; object-fit: cover; }
.has-page .ex-title { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
a.ex-row:hover .ex-title { text-decoration-color: var(--ink); }
.ex-head { margin-bottom: 26px; }
.ex-head h1 { text-transform: none; letter-spacing: .01em; margin: 0 0 10px; }
.exhibition .prose { max-width: 760px; }
.ex-link a { color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap); }
.photo-grid figure { margin: 0; }
.photo-grid .frame { height: auto; min-height: 0; aspect-ratio: 4 / 3; padding: 0; background: var(--panel); }
.photo-grid .frame img { width: 100%; height: 100%; max-height: none; object-fit: cover; box-shadow: none; }
.photo-grid figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.page-type-texts .prose:empty { display: none; }
@media (min-width: 861px) {
  .page-vita .prose { max-width: 980px; }
  .page-vita .prose > .text-figure:first-child { float: right; width: min(36%, 340px); margin: 4px 0 24px 40px; }
  .page-vita .prose > .text-figure:first-child img { width: 100%; height: auto; max-height: none; }
  .page-vita .prose > h2:first-of-type { clear: both; padding-top: 10px; }
  .page-vita .prose > p, .page-vita .prose > h2, .page-vita .prose > dl, .page-vita .prose > ul { max-width: 560px; }
}

/* ---------- Fuß ---------- */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px;
  margin-top: 90px; padding-top: 22px; padding-bottom: 34px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.98);
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 0 24px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; object-fit: contain; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.lightbox figcaption { margin-top: 16px; font-size: 14px; text-align: center; color: var(--muted); }
.lightbox figcaption strong { color: var(--ink); font-weight: 500; }
.lightbox figcaption a { color: var(--muted); }
.lightbox button { background: none; border: 0; cursor: pointer; font-size: 24px; width: 64px; height: 64px; }
.lb-close { position: absolute; top: 6px; right: 6px; font-size: 34px !important; }
body.lb-open { overflow: hidden; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .card { flex-basis: calc((100% - var(--gap)) / 2); }
}

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .site-header { padding-top: 18px; padding-bottom: 16px; position: relative; }
  .menu-toggle {
    display: block; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; position: relative; margin-right: -8px;
  }
  .menu-toggle span:first-child, .menu-toggle span:first-child::before, .menu-toggle span:first-child::after {
    position: absolute; left: 9px; width: 22px; height: 1.5px; background: var(--ink); content: ""; transition: transform .2s, top .2s;
  }
  .menu-toggle span:first-child { top: 19px; }
  .menu-toggle span:first-child::before { left: 0; top: -7px; }
  .menu-toggle span:first-child::after { left: 0; top: 7px; }
  .menu-toggle[aria-expanded="true"] span:first-child { background: transparent; }
  .menu-toggle[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
    background: #fff; border-bottom: 1px solid var(--line); padding: 4px var(--gutter) 18px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; font-size: 18px; padding: 9px 0; }
  .site-nav .lang { margin: 8px 0 0; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); gap: 18px; }
  .site-nav .lang a { font-size: 15px; padding: 4px 0; }
  .ex-year { grid-template-columns: 1fr; }
  .ex-row { grid-template-columns: minmax(0, 1fr) 72px; }
  .ex-place { grid-column: 1; }
  .ex-thumb { grid-column: 2; grid-row: 1 / span 2; }
  .ex-thumb img { width: 72px; height: 54px; }
  .artwork-grid { grid-template-columns: 1fr; }
  .artwork-image { margin: 0 calc(-1 * var(--gutter)); }
}

@media (max-width: 700px) {
  .card { flex-basis: 84%; }
  .frame { height: 62vh; min-height: 260px; padding: 10%; }
  .nav-btn { display: none; }
  .caption { padding-left: 4px; }
  .gallery.is-grid .track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .gallery.is-grid .caption { font-size: 13px; }
  .rows > div { grid-template-columns: 96px 1fr; gap: 12px; }
  .lightbox { grid-template-columns: 1fr; }
  .lightbox .lb-prev, .lightbox .lb-next { display: none; }
  .lightbox figure { padding: 56px 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
