/* ==========================================================================
   Enric Freund — Malerei
   CAD-purist: pure scroll, no interaction chrome
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #ffffff;
  --ink: #14130f;
  --grey: #6f6a5f;
  --line: #e6e2d8;
  --max-width: 1360px;
  --serif: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: auto; }

/* Sprungmarken nicht unter dem klebenden Header verstecken */
.work-section, .text-section, .works-title { scroll-margin-top: 92px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 2rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.main-nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }

.main-nav a {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
  cursor: pointer;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.is-active { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

.nav-works { position: relative; display: flex; align-items: center; }
.nav-works-menu {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 0.9rem;
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem 1.3rem;
  min-width: 180px;
  z-index: 60;
}
.nav-works:hover .nav-works-menu,
.nav-works:focus-within .nav-works-menu,
.nav-works.open-menu .nav-works-menu { display: flex; }
.nav-works-menu a {
  font-size: 0.76rem;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); }

/* ---------- Hero (carousel, bigger) ---------- */
.hero-image {
  width: 100%;
  padding: 0.5rem 0 0;
}
.hero-frame {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  background: var(--paper);
}
.hero-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 92vh;
  margin: 0 auto;
  transition: opacity 0.35s ease;
}
.hero-frame img.is-fading { opacity: 0; }

.hero-click-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 5;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}
.hero-click-zone--left {
  left: 0;
  cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSczMicgaGVpZ2h0PSczMic+PGNpcmNsZSBjeD0nMTYnIGN5PScxNicgcj0nMTQnIGZpbGw9J3JnYmEoMjAsMTksMTUsMC41NSknLz48cGF0aCBkPSdNMTggOSBMMTEgMTYgTDE4IDIzJyBzdHJva2U9J3doaXRlJyBzdHJva2Utd2lkdGg9JzIuNicgZmlsbD0nbm9uZScgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtbGluZWpvaW49J3JvdW5kJy8+PC9zdmc+') 16 16, pointer;
}
.hero-click-zone--right {
  right: 0;
  cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSczMicgaGVpZ2h0PSczMic+PGNpcmNsZSBjeD0nMTYnIGN5PScxNicgcj0nMTQnIGZpbGw9J3JnYmEoMjAsMTksMTUsMC41NSknLz48cGF0aCBkPSdNMTQgOSBMMjEgMTYgTDE0IDIzJyBzdHJva2U9J3doaXRlJyBzdHJva2Utd2lkdGg9JzIuNicgZmlsbD0nbm9uZScgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtbGluZWpvaW49J3JvdW5kJy8+PC9zdmc+') 16 16, pointer;
}

.hero-info {
  max-width: var(--max-width);
  margin: 1rem auto 0;
  padding: 0 2rem;
}
.hero-caption {
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--grey);
}
.work-h1 {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.work-meta-line { font-size: 0.8rem; color: var(--grey); margin-top: 0.2rem; }

.work-back {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding: 0 2rem;
}
.work-back a {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grey);
}
.work-back a:hover { color: var(--ink); }

.work-inquiry {
  margin-top: 1rem;
  font-size: 0.76rem;
  color: var(--grey);
}
.work-inquiry a { color: var(--grey); }
.work-inquiry a:hover { color: var(--ink); }

.works-inquiry {
  color: var(--ink);
  font-size: 0.85rem;
  margin-top: 0.8rem;
}
.works-inquiry a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.works-inquiry a:hover { color: var(--grey); }

.works-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.works-jump a {
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grey);
}
.works-jump a:hover { color: var(--ink); }

.hero-identity {
  text-align: center;
  padding: 2.6rem 1.75rem 1.6rem;
}
.hero-identity h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: 0.02em;
}
.hero-identity .hero-sub {
  color: var(--grey);
  margin-top: 0.35rem;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

/* ---------- Sections ---------- */
.work-section, .text-section {
  padding: 6rem 2rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-head {
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.6rem;
}
.work-section h2, .text-section h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
}
.section-intro {
  color: var(--grey);
  max-width: 62ch;
  font-size: 0.92rem;
  margin-top: 0.6rem;
}

/* ---------- Works page: pure scroll feed ---------- */
.works-title {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 0;
}
.works-title h1 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--grey);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.series-statement {
  max-width: 62ch;
  margin: 0 auto 5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.series-statement > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 0;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
}
.series-statement > summary::-webkit-details-marker { display: none; }
.series-statement > summary::after { content: " +"; }
.series-statement[open] > summary::after { content: " –"; }
.series-statement > summary:hover { color: var(--ink); }
.series-statement[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }
.series-statement > *:last-child { margin-bottom: 1.6rem; }
.statement-text { font-size: 1rem; line-height: 1.75; margin-bottom: 1.2rem; }
.statement-credit { color: var(--grey); font-size: 0.85rem; margin-top: -0.5rem; margin-bottom: 1.8rem; font-style: italic; }
.series-statement-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-style: normal;
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
}

.feed { display: flex; flex-direction: column; align-items: center; }

.feed-item {
  margin: 0 0 11rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.feed-item:last-child { margin-bottom: 4rem; }

.feed-item img {
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
  cursor: zoom-in;
}

/* Grossformatige Malerei (>= 200 cm) - nahezu Vollansicht */
.scale-l.orient-portrait  img { max-height: 94vh; }
.scale-l.orient-square    img { max-height: 90vh; }
.scale-l.orient-landscape img { max-height: 82vh; }

/* Mittlere Formate (100-200 cm) */
.scale-m.orient-portrait  img { max-height: 84vh; }
.scale-m.orient-square    img { max-height: 78vh; }
.scale-m.orient-landscape img { max-height: 72vh; }

/* Kleine Arbeiten - werden NICHT aufgeblasen */
.scale-s.orient-portrait  img { max-height: 62vh; max-width: 46%; }
.scale-s.orient-square    img { max-height: 56vh; max-width: 52%; }
.scale-s.orient-landscape img { max-height: 52vh; max-width: 62%; }

/* Raumaufnahmen - breit, aber nicht dominant */
.scale-room img { max-height: 80vh; }

/* Bildunterschrift: eine Schriftgroesse, ein Gewicht, eine Farbe */
.feed-item figcaption {
  margin-top: 1.3rem;
  text-align: center;
  max-width: 46ch;
}
.feed-item figcaption a { display: block; }
.archive-note {
  color: var(--grey);
  font-size: 0.78rem;
  margin-top: 0.7rem;
}
.cap-series {
  margin-top: 0.35rem;
  font-size: 0.72rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cap-line {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--grey);
}
.feed-item figcaption a:hover .cap-line { color: var(--ink); }

/* ---------- About ---------- */
.about-kicker {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 2.4rem;
}
.about-kicker span { display: block; color: var(--grey); font-size: 0.92rem; }
.cv-heading {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: 1.05rem;
}
.bio-text { max-width: 62ch; font-size: 0.98rem; color: var(--ink); margin-top: 2.6rem; }

/* ---------- CV / Exhibitions ---------- */
.cv-personal { color: var(--grey); margin-bottom: 2.2rem; font-size: 0.95rem; }
.cv-row {
  display: flex;
  gap: 2rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.cv-row .year { flex: 0 0 100px; color: var(--grey); }

/* ---------- Contact ---------- */
#kontakt p { font-size: 1rem; margin-bottom: 0.55rem; }
#kontakt a:hover { text-decoration: underline; }
.location { color: var(--grey); margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--grey);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}
.footer-inquiry {
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
}
.footer-inquiry a { color: var(--ink); }
.footer-inquiry a:hover { text-decoration: underline; }

/* ---------- Lightbox (click-to-zoom) ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 6, 0.96);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: auto;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  cursor: zoom-in;
  margin: auto;
}
.lightbox.zoomed {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
}
.lightbox.zoomed img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  cursor: zoom-in;
}
.lightbox.zoomed-2x img { width: 200%; height: auto; cursor: zoom-out; }
.lightbox-close {
  position: absolute;
  top: 1.3rem;
  right: 1.6rem;
  background: none;
  border: none;
  color: #f4f0e6;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 101;
}
.lightbox-caption {
  position: fixed;
  left: 1.5rem;
  bottom: 1.2rem;
  z-index: 101;
  color: #d8d3c6;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.5;
  max-width: 70vw;
  pointer-events: none;
}
.lightbox-caption .cap-line {
  display: block;
  font-style: normal;
  font-weight: 400;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #d8d3c6;
}
.lightbox.zoomed .lightbox-caption { display: none; }
.lightbox.zoomed-2x .lightbox-caption { display: none; }
@media (max-width: 780px) {
  .lightbox-caption { font-size: 0.74rem; left: 1rem; bottom: 1rem; max-width: 80vw; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .section-head { }
}

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    top: 58px;
    left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding: 0 2rem;
  }
  .main-nav.open { max-height: 85vh; overflow-y: auto; padding: 0.5rem 2rem 1rem; }
  .main-nav a { padding: 0.8rem 0; border-top: 1px solid var(--line); width: 100%; }
  .nav-works { width: 100%; flex-direction: column; align-items: flex-start; }
  .nav-works-menu {
    position: static;
    display: flex;
    border: none;
    padding: 0.2rem 0 0.4rem 1rem;
    min-width: 0;
  }
  .nav-works.open-menu .nav-works-menu { display: flex; }
  .nav-toggle { display: flex; }
  .hero-image { padding: 0.25rem 0; }
  .hero-frame img { max-height: 62vh; }
  .feed-item { margin-bottom: 5.5rem; }
  .scale-l img, .scale-m img, .scale-room img { max-height: 72vh; }
  .scale-s.orient-portrait img,
  .scale-s.orient-square img,
  .scale-s.orient-landscape img { max-height: 52vh; max-width: 82%; }
}
