/* =========================================================================
   Ruth Lustenberger – Skulpturen
   Palette: Steingrau-Papier, nasser Schiefer (Tinte), Flechten-Oliv (Akzent)
   Typografie: Newsreader (eine literarische Antiqua für alles)
   ========================================================================= */

:root {
  --paper:      #e9e7df;   /* kühles Steingrau-Papier */
  --paper-soft: #f1efe8;   /* hellere Fläche */
  --ink:        #262b29;   /* nasser Schiefer */
  --ink-soft:   #3b403d;
  --stone:      #64695f;   /* gedämpftes Grau-Grün */
  --stone-pale: #a6a89d;
  --accent:     #5c6a49;   /* Flechten-Oliv */
  --accent-deep:#434e34;
  --line:       rgba(38, 43, 41, 0.16);
  --line-soft:  rgba(38, 43, 41, 0.09);

  --maxw: 1180px;
  --measure: 60ch;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--paper-soft); }

/* --- Layout ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3.5rem); }
.flow > * + * { margin-top: 1.1em; }

/* --- Kopfzeile / Navigation -------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead__inner {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; padding-top: 1.05rem; padding-bottom: 1.05rem;
}
.brand {
  font-size: 1.18rem; letter-spacing: 0.01em; text-decoration: none;
  white-space: nowrap; font-weight: 500;
}
.brand span { color: var(--stone); font-weight: 400; }
.nav { display: flex; align-items: baseline; gap: clamp(0.9rem, 2.4vw, 1.9rem); flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink-soft);
  font-size: 0.98rem; padding-bottom: 2px;
  border-bottom: 1px solid transparent; transition: color .25s var(--ease), border-color .25s var(--ease);
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav__lang {
  margin-left: 0.4rem; padding-left: 1rem; border-left: 1px solid var(--line);
  color: var(--stone); font-style: italic;
}
.nav__lang:hover { color: var(--accent); }

/* mobiles Menü */
.nav-toggle { display: none; }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero__grid {
  display: grid; grid-template-columns: 1fr clamp(240px, 34%, 400px);
  gap: clamp(2rem, 6vw, 5rem); align-items: end;
}
.hero__role {
  font-style: italic; color: var(--stone); font-size: 1.1rem; margin: 0 0 1.2rem;
}
.hero__name {
  font-weight: 300; line-height: 0.98; letter-spacing: -0.015em;
  font-size: clamp(2.9rem, 9vw, 6rem); margin: 0;
}
.hero__name em { font-style: italic; font-weight: 300; }
.hero__statement {
  max-width: 32ch; font-size: clamp(1.18rem, 2.3vw, 1.5rem);
  line-height: 1.42; color: var(--ink-soft); margin: 1.8rem 0 0; font-weight: 400;
}
.hero__sub { color: var(--stone); margin: 1.4rem 0 0; font-size: 1rem; }
.hero__works { display: inline-block; margin-top: 1.15rem; font-weight: 500; }
.hero__fig { margin: 0; }
.hero__fig img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  filter: saturate(0.96) contrast(1.02);
}

/* --- Abschnitte --------------------------------------------------------- */
section { scroll-margin-top: 5rem; }
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band + .band { border-top: 1px solid var(--line-soft); }

.section-head { max-width: 52ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head h2 {
  font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.1; margin: 0; letter-spacing: -0.01em;
}
.section-head p { color: var(--stone); margin: 0.7rem 0 0; font-size: 1.1rem; }

/* --- Werkgruppen-Kacheln ------------------------------------------------ */
.series-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: clamp(1.4rem, 3vw, 2.4rem);
}
.series-card { text-decoration: none; color: inherit; display: block; }
.series-card__frame {
  background: var(--paper-soft); aspect-ratio: 1 / 1;
  border: 1px solid var(--line-soft);
  display: grid; place-items: center; overflow: hidden;
  padding: clamp(1.1rem, 3.5vw, 2.4rem);
}
.series-card__frame img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain;
  box-shadow: 0 10px 26px rgba(38, 43, 41, 0.18);
  transition: transform .9s var(--ease), filter .6s var(--ease);
  filter: saturate(0.95);
}
.series-card:hover .series-card__frame img,
.series-card:focus-visible .series-card__frame img { transform: scale(1.04); filter: saturate(1.03); }
.series-card__meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-top: 0.85rem; padding-bottom: 0.4rem;
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.series-card:hover .series-card__meta { border-bottom-color: var(--accent); }
.series-card__name { font-size: 1.3rem; }
.series-card__name small { display: block; color: var(--stone); font-size: 0.92rem; font-style: italic; }
.series-card__count { color: var(--stone); font-size: 0.92rem; white-space: nowrap; }

/* --- Galerie-Raster (Werkserie) ---------------------------------------- */
.gallery {
  columns: 3 230px; column-gap: clamp(1rem, 2.5vw, 2rem);
}
.gallery figure {
  break-inside: avoid; margin: 0 0 clamp(1rem, 2.5vw, 2rem);
  cursor: zoom-in;
}
/* Mit JavaScript: geordnetes Masonry (links -> rechts) statt Spaltenfluss */
.gallery.is-ordered {
  columns: auto; display: flex; align-items: flex-start;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.gallery.is-ordered .gallery__col {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.gallery.is-ordered figure { margin: 0; }
.gallery figure img {
  width: 100%; height: auto; background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  transition: filter .5s var(--ease), opacity .5s var(--ease);
  filter: saturate(0.93);
}
.gallery figure:hover img { filter: saturate(1.02); }
.gallery figcaption {
  margin-top: 0.55rem; font-style: italic; color: var(--ink-soft);
  font-size: 0.98rem;
}
.gallery figcaption.untitled { color: var(--stone-pale); }

/* --- Lightbox (natives dialog) ----------------------------------------- */
dialog.lb {
  border: none; padding: 0; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; margin: 0; background: transparent;
  color: var(--paper-soft); overflow: hidden;
}
dialog.lb::backdrop { background: rgba(21, 24, 22, 0.94); }
.lb__stage {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3.5rem);
}
.lb__img {
  max-width: min(92vw, 1000px); max-height: 82vh; width: auto; height: auto;
  object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lb__cap {
  position: fixed; left: 0; right: 0; bottom: clamp(1rem, 3vw, 2rem);
  text-align: center; font-style: italic; color: var(--paper-soft);
  font-size: 1.05rem; padding: 0 1rem; text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.lb__btn {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--paper-soft); cursor: pointer;
  font-family: inherit; font-size: 2.6rem; line-height: 1; opacity: 0.6;
  padding: 1rem 1.2rem; transition: opacity .2s var(--ease);
}
.lb__btn:hover { opacity: 1; color: #fff; }
.lb__prev { left: 0; } .lb__next { right: 0; }
.lb__close {
  position: fixed; top: clamp(0.5rem, 2vw, 1.4rem); right: clamp(0.7rem, 2vw, 1.6rem);
  background: none; border: none; color: var(--paper-soft); cursor: pointer;
  font-family: inherit; font-size: 1.1rem; font-style: italic; opacity: 0.7;
  padding: 0.5rem;
}
.lb__close:hover { opacity: 1; }

/* --- Biographie --------------------------------------------------------- */
.bio__grid {
  display: grid; grid-template-columns: clamp(200px, 30%, 320px) 1fr;
  gap: clamp(2rem, 6vw, 4.5rem); align-items: start;
}
.bio__portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(0.95);
  border: 1px solid var(--line-soft);
}
.prose { max-width: var(--measure); font-size: 1.12rem; line-height: 1.75; }
.prose p { margin: 0 0 1.1em; }
.prose p:first-child { font-size: 1.22rem; color: var(--ink); }

/* --- Publikationen ------------------------------------------------------ */
.book {
  display: grid; grid-template-columns: clamp(180px, 32%, 300px) 1fr;
  gap: clamp(2rem, 6vw, 4rem); align-items: start;
}
.book__cover img { width: 100%; box-shadow: 0 20px 45px rgba(38,43,41,.22); }
.book__body h2 { font-weight: 400; font-style: italic; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 1rem; }
.book__avail { color: var(--stone); margin-top: 1.4rem; font-style: italic; }

/* --- Kontakt ------------------------------------------------------------ */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.addr { font-style: normal; font-size: 1.22rem; line-height: 1.7; }
.addr .muted { color: var(--stone); }
.mail-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.mail-link:hover { border-bottom-color: var(--accent); }

/* --- Call-to-action-Links ---------------------------------------------- */
.textlink {
  display: inline-block; text-decoration: none; color: var(--accent);
  font-style: italic; font-size: 1.1rem; border-bottom: 1px solid var(--line);
  padding-bottom: 2px; transition: border-color .3s var(--ease), color .3s var(--ease);
}
.textlink:hover { border-bottom-color: var(--accent); color: var(--accent-deep); }

/* --- Fusszeile ---------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line); margin-top: clamp(3rem, 7vw, 6rem);
  padding: clamp(2.2rem, 5vw, 3.5rem) 0;
}
.foot__inner { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; align-items: baseline; color: var(--stone); font-size: 0.95rem; }
.foot a { color: var(--stone); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot__name { font-size: 1.05rem; color: var(--ink-soft); }

/* --- Page-Header (Unterseiten) ----------------------------------------- */
.page-head { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-head .kicker { font-style: italic; color: var(--stone); margin: 0 0 0.6rem; font-size: 1.05rem; }
.page-head h1 { font-weight: 300; font-size: clamp(2.3rem, 7vw, 4.2rem); line-height: 1; margin: 0; letter-spacing: -0.015em; }
.page-intro { max-width: var(--measure); color: var(--ink-soft); font-size: 1.12rem; margin: 1.6rem 0 0; }

/* --- Serien-Navigation (zwischen Galerien blättern) -------------------- */
.series-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; margin: 2rem 0 0; }
.series-nav a { text-decoration: none; color: var(--stone); font-style: italic; font-size: 1rem; }
.series-nav a[aria-current="page"] { color: var(--ink); }
.series-nav a:hover { color: var(--accent); }

/* --- Reveal (eine einzige Lade-Inszenierung) --------------------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }

/* --- Responsiv ---------------------------------------------------------- */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__fig { max-width: 340px; }
  .bio__grid { grid-template-columns: 1fr; }
  .bio__portrait { max-width: 300px; }
  .book { grid-template-columns: 1fr; }
  .book__cover { max-width: 240px; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  #werke { scroll-margin-top: 9rem; }
  .masthead__inner { flex-wrap: wrap; gap: 0.6rem 1.1rem; }
  .nav { width: 100%; justify-content: flex-start; gap: 0.5rem 1.15rem; }
  .nav a { font-size: 0.94rem; }
  .nav__lang { margin-left: 0; padding-left: 0; border-left: none; }
  .gallery { columns: 2 150px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal, .series-card__frame img { transition: none !important; transform: none !important; opacity: 1 !important; }
}
