/* ==========================================================================
   Ernesto Marques - Entwurf
   Keine externen Abhaengigkeiten: keine Google Fonts, kein CDN, kein Tracking.
   ========================================================================== */

:root {
  --bg:        #faf8f5;
  --bg-2:      #f2eee8;
  --flaeche:   #ffffff;
  --text:      #17130f;
  --text-2:    #5f574e;
  --text-3:    #8d8378;
  --linie:     #e2dbd1;
  --linie-2:   #cfc6b9;
  --akzent:    #a8322b;
  --akzent-bg: #a8322b12;

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --breite:      1180px;   /* Galerien */
  --breite-text:  660px;   /* Fliesstext - bewusst schmal */
  --kopf:          64px;

  --rund: 2px;
  --schatten: 0 1px 2px #17130f0a, 0 8px 24px -12px #17130f24;
  --tempo: 180ms cubic-bezier(.2, .6, .3, 1);
}

/* Akzentfarbe je Bereich - kleine Verbeugung vor den Farbbalken der alten Seite */
body[data-bereich="werk"]          { --akzent: #1d4f8c; --akzent-bg: #1d4f8c12; }
body[data-bereich="projekte"]      { --akzent: #6a5a2a; --akzent-bg: #6a5a2a12; }
body[data-bereich="ausstellungen"] { --akzent: #8d2f5e; --akzent-bg: #8d2f5e12; }
body[data-bereich="vita"]          { --akzent: #2c6152; --akzent-bg: #2c615212; }

/* Bewusst kein Dunkelmodus: die Seite bleibt immer hell. */

/* -------------------------------------------------- Grundlagen */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--kopf) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: var(--linie-2); text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--akzent); }

:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: var(--rund); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.18; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1.1em; }

.huelle      { max-width: var(--breite);      margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }
.huelle-text { max-width: var(--breite-text); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }

.marke {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--akzent);
  font-weight: 600;
  margin: 0 0 .6em;
}

.lead { font-size: 1.12rem; color: var(--text-2); }
.klein { font-size: .88rem; color: var(--text-2); }
.nur-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprung-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--flaeche); color: var(--text); padding: 10px 16px;
  border: 1px solid var(--linie); border-radius: var(--rund);
  transition: top var(--tempo);
}
.sprung-link:focus { top: 12px; }

/* -------------------------------------------------- Kopfzeile */
.kopf {
  position: sticky; top: 0; z-index: 50;
  height: var(--kopf);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--linie);
}
.kopf > .huelle { display: flex; align-items: center; gap: 28px; width: 100%; }

.logo {
  font-family: var(--sans);
  font-size: 1.02rem; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  margin-right: auto;
}
@media (max-width: 900px) { .logo { font-size: .92rem; letter-spacing: .15em; } }
.logo span { color: var(--text-3); font-weight: 400; }

.nav { display: flex; gap: 26px; align-items: center; }
.nav a {
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; color: var(--text-2);
  padding: 4px 0; position: relative;
  transition: color var(--tempo);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--akzent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--tempo);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--text); }

.nav-schalter {
  display: none; background: none; border: 1px solid var(--linie-2);
  border-radius: var(--rund); padding: 7px 9px; cursor: pointer; color: var(--text);
}
.nav-schalter svg { display: block; }

@media (max-width: 760px) {
  .nav-schalter { display: block; }
  .nav {
    position: fixed; inset: var(--kopf) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--linie);
    padding: 8px clamp(18px, 5vw, 40px) 20px;
    box-shadow: var(--schatten);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--linie); font-size: .95rem; }
  .nav a::after { display: none; }
  .nav a:last-child { border-bottom: 0; }
}

/* -------------------------------------------------- Hero */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); }
.hero-raster {
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: center;
}
@media (max-width: 860px) { .hero-raster { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--akzent); }
.hero-bild { margin: 0; }
.hero-bild img {
  display: block; width: 100%; height: auto;
  border-radius: var(--rund); box-shadow: var(--schatten); background: var(--bg-2);
}
.hero-bild figcaption { padding: 10px 2px 0; font-size: .8rem; color: var(--text-2); }

.knopf-reihe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.knopf {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 11px 22px; border-radius: var(--rund);
  font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--text); background: var(--text); color: var(--bg);
  transition: opacity var(--tempo), transform var(--tempo);
}
.knopf:hover { opacity: .85; transform: translateY(-1px); }
.knopf.leer { background: transparent; color: var(--text); border-color: var(--linie-2); }
.knopf.leer:hover { border-color: var(--text); }

/* -------------------------------------------------- Abschnitte */
.abschnitt { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--linie); }
.abschnitt:first-of-type { border-top: 0; }
.abschnitt-kopf { margin-bottom: clamp(24px, 4vw, 40px); max-width: var(--breite-text); }
.abschnitt-kopf p { margin-top: .6em; color: var(--text-2); }

/* -------------------------------------------------- Filter */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter button {
  font: inherit; font-size: .82rem;
  padding: 7px 15px; cursor: pointer;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--linie); border-radius: 100px;
  transition: all var(--tempo);
}
.filter button:hover { border-color: var(--linie-2); color: var(--text); }
.filter button[aria-pressed="true"] {
  background: var(--akzent-bg); border-color: var(--akzent); color: var(--akzent); font-weight: 500;
}
.filter button i { font-style: normal; opacity: .55; font-size: .78em; margin-left: .35em; }

/* -------------------------------------------------- Werkraster */
.raster {
  display: grid; gap: clamp(18px, 2vw, 26px); align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.kachel {
  margin: 0; padding: 0; border: 0; background: none;
  cursor: zoom-in; display: block; width: 100%;
}
.kachel img {
  display: block; width: 100%; height: auto;
  background: var(--bg-2); border-radius: var(--rund);
  transition: box-shadow var(--tempo), opacity var(--tempo);
}
.kachel:hover img, .kachel:focus-visible img { box-shadow: var(--schatten); }
/* Titel immer unter dem Bild, nie darauf */
.kachel figcaption { padding: 8px 2px 0; text-align: left; color: var(--text-2); }
.kachel figcaption b { display: block; font-weight: 500; font-size: .84rem; line-height: 1.35; color: var(--text); }
.kachel figcaption span { display: block; font-size: .74rem; color: var(--text-2); }

.leer-hinweis { color: var(--text-2); padding: 40px 0; }

/* -------------------------------------------------- Leuchtkasten */
.lk {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: 1fr auto;
  background: color-mix(in srgb, var(--bg) 96%, #000);
  padding: clamp(12px, 3vw, 28px);
  animation: einblenden 200ms ease;
}
.lk[hidden] { display: none; }
@keyframes einblenden { from { opacity: 0; } }

.lk-buehne { display: grid; place-items: center; min-height: 0; position: relative; }
.lk-buehne img {
  max-width: min(100%, 620px); max-height: 100%;
  object-fit: contain; border-radius: var(--rund); box-shadow: var(--schatten);
}
.lk-text { text-align: center; padding-top: 18px; }
.lk-text b { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; display: block; }
.lk-text span { font-size: .85rem; color: var(--text-2); }
.lk-text em { display: block; font-style: normal; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin-top: .6em; }

.lk button {
  position: absolute; background: var(--flaeche); color: var(--text);
  border: 1px solid var(--linie); border-radius: 100px;
  width: 44px; height: 44px; cursor: pointer;
  display: grid; place-items: center;
  transition: all var(--tempo);
}
.lk button:hover { border-color: var(--text-3); transform: scale(1.06); }
.lk-zu  { top: 0; right: 0; }
.lk-zur { left: 0;  top: 50%; transform: translateY(-50%); }
.lk-vor { right: 0; top: 50%; transform: translateY(-50%); }
.lk-zur:hover, .lk-vor:hover { transform: translateY(-50%) scale(1.06); }
@media (max-width: 620px) {
  .lk-zur { left: 0; top: auto; bottom: 0; transform: none; }
  .lk-vor { right: 0; top: auto; bottom: 0; transform: none; }
  .lk-zur:hover, .lk-vor:hover { transform: scale(1.06); }
}

/* -------------------------------------------------- Karten / Listen */
.karten { display: grid; gap: clamp(16px, 2.4vw, 26px); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.karte {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--rund); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--tempo), transform var(--tempo), box-shadow var(--tempo);
}
a.karte { text-decoration: none; }
a.karte:hover { border-color: var(--linie-2); transform: translateY(-2px); box-shadow: var(--schatten); }
.karte > img { display: block; width: 100%; height: auto; background: var(--bg-2); }
.karte-inhalt { padding: 18px 20px 22px; }
.karte-inhalt h3 { margin-bottom: .25em; }
.karte-inhalt .klein { margin: 0; }

/* News */
.news-liste { display: grid; gap: clamp(20px, 3vw, 34px); }
.news {
  display: grid; gap: clamp(16px, 3vw, 30px);
  grid-template-columns: 190px minmax(0, 1fr);
  padding-bottom: clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--linie);
}
.news:last-child { border-bottom: 0; }
.news > img { display: block; width: 100%; height: auto; background: var(--bg-2); border-radius: var(--rund); }
.news-datum { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--akzent); }
.news h3 { margin: .3em 0 .45em; }
.news p { margin: 0; color: var(--text-2); font-size: .95rem; }
@media (max-width: 620px) { .news { grid-template-columns: 110px minmax(0, 1fr); } }

/* Tabellarische Listen (Vita, Veroeffentlichungen) */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li {
  display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 20px;
  padding: 13px 0; border-bottom: 1px solid var(--linie);
}
.liste li:last-child { border-bottom: 0; }
.liste b { font-weight: 500; color: var(--akzent); font-variant-numeric: tabular-nums; font-size: .92rem; }
@media (max-width: 560px) { .liste li { grid-template-columns: 1fr; gap: 2px; } }

.punkte { list-style: none; margin: 0; padding: 0; }
.punkte li { padding: 9px 0 9px 20px; border-bottom: 1px solid var(--linie); position: relative; }
.punkte li:last-child { border-bottom: 0; }
.punkte li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 7px; height: 1px; background: var(--linie-2); }

/* Presse */
.presse { display: grid; gap: clamp(20px, 3vw, 32px); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.presse article { border: 1px solid var(--linie); border-radius: var(--rund); background: var(--flaeche); overflow: hidden; }
.presse img { width: 100%; background: var(--bg-2); }
.presse .karte-inhalt { padding: 18px 20px 20px; }

/* Kontakt */
.kontakt-raster { display: grid; gap: clamp(28px, 5vw, 56px); grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: start; }
@media (max-width: 820px) { .kontakt-raster { grid-template-columns: 1fr; } }
.daten { list-style: none; margin: 0; padding: 0; }
.daten li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--linie); }
.daten li:last-child { border-bottom: 0; }
.daten span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding-top: .35em; }
.daten a { text-decoration: none; border-bottom: 1px solid var(--linie-2); }

/* Rechtstexte */
.rechtstext h2 { font-size: 1.3rem; margin: 2.2em 0 .7em; }
.rechtstext h3 { font-size: 1.02rem; font-family: var(--sans); font-weight: 600; margin: 1.8em 0 .5em; }
.rechtstext ul { padding-left: 1.15em; color: var(--text-2); }
.rechtstext li { margin-bottom: .4em; }
.rechtstext p { color: var(--text-2); font-size: .96rem; }
.rechtstext a { word-break: break-word; }

/* -------------------------------------------------- Fusszeile */
.fuss { border-top: 1px solid var(--linie); background: var(--bg-2); margin-top: clamp(48px, 8vw, 96px); padding: clamp(40px, 6vw, 64px) 0 32px; }
.fuss-raster { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.fuss h4 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; font-weight: 600; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 9px; }
.fuss a { font-size: .92rem; text-decoration: none; color: var(--text-2); }
.fuss a:hover { color: var(--text); }
.fuss-unten {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--linie);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: .8rem; color: var(--text-3);
}

/* -------------------------------------------------- 404 */
.leer-seite { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }

/* -------------------------------------------------- Zitat und Flyer (Kunstroute) */
.zitat {
  margin: 22px 0 0; padding: 2px 0 2px 16px;
  border-left: 2px solid var(--akzent);
  color: var(--text-2); font-style: italic;
}
.zitat cite { display: block; margin-top: .5em; font-style: normal; font-size: .82rem; color: var(--text-3); }

.flyer {
  max-width: 320px; justify-self: end;
  border: 1px solid var(--linie); border-radius: var(--rund);
  overflow: hidden; background: var(--bg-2);
}
.flyer img { display: block; width: 100%; height: auto; }
.flyer figcaption {
  padding: 10px 14px; font-size: .78rem; color: var(--text-2);
  border-top: 1px solid var(--linie); background: var(--bg);
}
@media (max-width: 860px) { .flyer { max-width: 240px; justify-self: start; } }

.breitbild { margin: clamp(26px, 4vw, 40px) 0 0; }
.breitbild img {
  display: block; width: 100%; height: auto;
  border-radius: var(--rund); background: var(--bg-2);
}
.breitbild figcaption { padding: 10px 2px 0; font-size: .8rem; color: var(--text-2); }

/* -------------------------------------------------- Abschnitt „Die 3D-Galerie“ */
/* Der Blick in die Galerie steht neben dem Text und darf breiter sein */
.galerie-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 620px); }
@media (max-width: 960px) { .galerie-raster { grid-template-columns: 1fr; } }
