/* Stermasi – öffentliche Galerie. Keine externen Schriften/Skripte (DSGVO-freundlich). */
:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --text: #1d1b19;
  --muted: #77716a;
  --line: #e4dfd7;
  --accent: #b0563a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 2px;
  color-scheme: light;
}

/* Dunkel nur, wenn in den Einstellungen „automatisch“ gewählt ist (data-scheme="auto") */
@media (prefers-color-scheme: dark) {
  :root[data-scheme="auto"] {
    --bg: #141312;
    --surface: #1d1b1a;
    --text: #ece8e2;
    --muted: #9c958c;
    --line: #2e2b28;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; margin-bottom: 1rem;
}
a.eyebrow:hover { color: var(--accent); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.55rem; letter-spacing: .02em; }
.brand-tag { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a, .nav-label {
  text-decoration: none; font-size: .95rem; color: var(--muted); padding: 6px 0;
  border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; cursor: pointer;
}
.site-nav a:hover, .site-nav a.active, .nav-label.active, .nav-group:hover .nav-label { color: var(--text); border-bottom-color: var(--accent); }
.nav-group { position: relative; }
.nav-sub {
  position: absolute; top: 100%; left: -18px; min-width: 220px; padding: 10px 0;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.08);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub a { display: block; padding: 8px 18px; border: 0; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--text); margin: 6px 0; transition: .2s; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a, .nav-label { padding: 12px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .nav-sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 16px; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 28px; border: 1px solid var(--text); background: var(--text); color: var(--bg);
  font: 500 .92rem/1 var(--sans); letter-spacing: .04em; text-decoration: none; cursor: pointer;
  border-radius: var(--radius); transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-block { width: 100%; }
.link-arrow { text-decoration: none; color: var(--muted); font-size: .95rem; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover { color: var(--accent); }

/* ---------- Layout ---------- */
main { min-height: 60vh; }
.section { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) 0; }
.section-tight { padding-top: 24px; }
.section.narrow, .narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.page-head { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 8px; }
.page-head.narrow { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(32px, 5vw, 72px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center;
}
.hero-text h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero-art { position: relative; display: block; text-decoration: none; }
.hero-art img { width: auto; max-width: 100%; height: auto; max-height: 78vh; margin-left: auto;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); }
.hero-caption { display: block; margin-top: 14px; font-size: .85rem; color: var(--muted); text-align: right; font-style: italic; font-family: var(--serif); }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { margin: 0 auto; }
  .hero-caption { text-align: left; }
}

/* ---------- Justified Gallery ---------- */
.justified { display: flex; flex-wrap: wrap; gap: clamp(12px, 2vw, 28px); }
.justified::after { content: ""; flex-grow: 999; }
.tile {
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * 300px);
  max-width: calc(var(--r) * 520px);
  text-decoration: none; display: block;
}
.tile-img { display: block; position: relative; overflow: hidden; background: var(--line); }
.tile-img picture, .tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-img img { object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .4s; }
.tile:hover .tile-img img { transform: scale(1.025); }
.tile-caption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: .9rem; }
.tile-title { font-family: var(--serif); font-size: 1.02rem; }
.tile-meta { color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-sold { background: #c0392b; }
.dot-reserved { background: #d8a03a; }
@media (max-width: 640px) {
  .tile { flex-basis: 100%; max-width: none; }
}

/* ---------- Serien ---------- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(12px, 2vw, 28px); }
.series-card { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--line); text-decoration: none; color: #fff; }
.series-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.series-card:hover img { transform: scale(1.04); }
.series-info {
  position: absolute; inset: auto 0 0 0; padding: 60px 22px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); display: flex; flex-direction: column;
}
.series-name { font-family: var(--serif); font-size: 1.5rem; }
.series-count { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }

/* ---------- Filter Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.5rem; }
.chip {
  padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  font-size: .88rem; color: var(--muted); transition: .15s;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Werk-Detail ---------- */
.artwork {
  max-width: var(--max); margin: 0 auto; padding: clamp(24px, 4vw, 56px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(32px, 5vw, 80px); align-items: start;
}
.artwork-stage { display: flex; justify-content: center; }
.artwork-zoom { border: 0; padding: 0; background: none; cursor: zoom-in; max-width: 100%; }
.artwork-img { width: auto; max-width: 100%; height: auto; max-height: 84vh; box-shadow: 0 30px 70px -35px rgba(0,0,0,.45); }
.artwork-info { position: sticky; top: 110px; }
.artwork-info h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 1.5rem 0; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.availability { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; margin-bottom: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status { font-size: .85rem; display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #3f9a5b; }
.status-reserved::before { background: #d8a03a; }
.status-sold::before { background: #c0392b; }
.status-not_for_sale::before { background: var(--muted); }
.price { font-family: var(--serif); font-size: 1.5rem; }
.prose { margin-top: 1.75rem; }
.prose p { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.25rem; font-size: .88rem; }
.tags a { color: var(--muted); text-decoration: none; }
.tags a:hover { color: var(--accent); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .88rem; }
.pager a { text-decoration: none; color: var(--muted); max-width: 48%; }
.pager a:hover { color: var(--text); }
@media (max-width: 1000px) {
  .artwork { grid-template-columns: 1fr; }
  .artwork-info { position: static; }
  .artwork-img { max-height: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(12,11,10,.96);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 96vw; max-height: 94vh; object-fit: contain; }
.lightbox.zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lightbox.zoomed img { max-width: none; max-height: none; cursor: grab; }
.lightbox-close { position: fixed; top: 14px; right: 20px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* ---------- Formular ---------- */
.inquiry { display: grid; gap: 16px; margin-top: 1.5rem; }
.inquiry label { display: grid; gap: 6px; font-size: .9rem; }
.inquiry input, .inquiry textarea {
  font: inherit; color: var(--text); background: var(--surface); width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; transition: border-color .15s;
}
.inquiry input:focus, .inquiry textarea:focus { outline: none; border-color: var(--text); }
.inquiry .check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.inquiry .check input { width: auto; margin-top: 4px; }
.inquiry .btn { justify-self: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 18px; border-radius: var(--radius); font-size: .95rem; }
.notice-ok { background: color-mix(in srgb, #3f9a5b 14%, var(--surface)); }
.notice-err { background: color-mix(in srgb, #c0392b 14%, var(--surface)); }
.contact-direct { display: flex; gap: 24px; flex-wrap: wrap; font-size: 1.1rem; }

/* ---------- CTA / Leerzustand ---------- */
.cta { max-width: 760px; margin: clamp(64px, 9vw, 128px) auto 0; padding: 0 var(--gutter); text-align: center; }
.cta p { color: var(--muted); margin-bottom: 1.75rem; }
.empty-state { text-align: center; padding: 18vh var(--gutter); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; font-size: .9rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.site-footer .brand-name { font-size: 1.25rem; }

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

/* ---------- Unterseiten ---------- */
.page-head.narrow { max-width: 760px; }
.prose h2, .prose h3, .prose h4 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin: 2.2em 0 .6em; }
.prose h4 { font-size: 1.15rem; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .25em; }
.prose a { color: var(--accent); }

/* ---------- Logo ---------- */
.brand-with-logo { flex-direction: row; align-items: center; gap: 14px; }
.brand-text { display: flex; flex-direction: column; }
.brand-img img { display: block; height: auto; width: auto; max-height: 52px; max-width: min(260px, 55vw); }
.brand-img .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  [data-scheme="auto"] .brand-img.has-dark .logo-light { display: none; }
  [data-scheme="auto"] .brand-img.has-dark .logo-dark { display: block; }
}
@media (max-width: 760px) { .brand-img img { max-height: 40px; } }

.on-view { margin: 0 0 1.25rem; }
.on-view .eyebrow { margin-bottom: .2rem; }

/* ---------- Echtheitsprüfung ---------- */
.verify { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 1.5rem; }
.verify strong { display: block; margin-bottom: 4px; }
.verify-ok { background: color-mix(in srgb, #3f9a5b 14%, var(--surface)); }
.verify-bad { background: color-mix(in srgb, #c0392b 12%, var(--surface)); }
.verify-work { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; margin-bottom: 2rem; }
.verify-work:not(:has(a)) { grid-template-columns: 1fr; }
.verify-work img { width: 100%; height: auto; border-radius: 2px; }
.verify-work dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.verify-work dt { color: var(--muted); }
.verify-work dd { margin: 0; }
@media (max-width: 640px) { .verify-work { grid-template-columns: 1fr; } }
.verify-form { display: grid; gap: 6px; max-width: 420px; }
.verify-form div { display: flex; gap: 10px; }
.verify-form input { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; flex: 1; min-width: 0; letter-spacing: .06em; text-transform: uppercase; }
