:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b675f;
  --line: #dcd7cc;
  --accent: #b5452b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1240px;
  --kopf-bg: #1c1b19;
  --kopf-text: #f6f4ef;
  --kopf-leise: #b4aea3;
  --kopf-akzent: #00b3b8;   /* leuchtendes Petrol für Kopfzeile + Navigation */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --surface: #1f1e1c;
    --text: #ece9e2;
    --muted: #a19c92;
    --line: #34322e;
    --accent: #e0805f;
    --kopf-bg: #0e0d0c;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 20;
  background: var(--kopf-bg); color: var(--kopf-text);
  border-bottom: 3px solid var(--kopf-akzent);
}
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.marke { text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.marke-name { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .02em; }
.marke-zeile { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--kopf-leise); margin-top: 4px; }
.nav { display: flex; gap: 6px 10px; flex-wrap: wrap; margin-right: -6px; }
.nav a { position: relative; text-decoration: none; color: var(--kopf-leise); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; padding: 7px 12px; }
.nav a:hover { color: var(--kopf-text); }
/* aktive Seite: rote Kontur, leicht nach rechts geneigt (wie die Knöpfe) */
.nav a[aria-current="page"] { color: var(--kopf-text); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--kopf-akzent); transform: skewX(-12deg); pointer-events: none; }

main { padding: 40px 0 72px; min-height: 60vh; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: 1.6rem; }
.unterzeile { color: var(--muted); margin: 0 0 28px; max-width: 60ch; }

/* Start */
body[data-seite="start"] main { padding-top: 0; }
.held { margin: 0 0 64px; }
.held-bild { display: block; width: 100%; padding: 0; border: 0; border-bottom: 3px solid var(--kopf-akzent); background: var(--kopf-bg); cursor: zoom-in; }
.held-bild img { width: 100%; height: calc(100svh - 160px); min-height: 360px; max-height: 1100px; object-fit: cover; object-position: var(--ausschnitt, 50% 40%); }
.held-text { background: var(--surface); border-bottom: 1px solid var(--line); text-align: center; padding: 28px 0 32px; }
.held-text h1 { margin-bottom: .2em; }
.held-text p { color: var(--muted); margin: 0 0 18px; }
.knoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.knopf { position: relative; isolation: isolate; display: inline-block; padding: 10px 22px; text-decoration: none; margin-top: 8px; font-size: .85rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.knopf::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 1px solid var(--kopf-akzent); background: transparent; transform: skewX(-12deg); transition: background .15s, border-color .15s; }
.knopf:hover { color: var(--kopf-text); }
.knopf:hover::before { background: var(--kopf-bg); border-color: var(--kopf-bg); }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.abschnitt-kopf a { color: var(--muted); font-size: .95rem; }
.abschnitt { margin-bottom: 64px; }

/* Filter */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter { gap: 10px 12px; padding-left: 4px; }
.filter button {
  position: relative; isolation: isolate;
  font: inherit; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  background: none; color: var(--text); border: 0; padding: 8px 18px;
}
/* viereckig, leicht nach rechts geneigt */
.filter button::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid var(--line); background: var(--surface);
  transform: skewX(-12deg); transition: background .15s, border-color .15s;
}
.filter button:hover::before { border-color: var(--kopf-akzent); }
.filter button[aria-pressed="true"] { color: var(--bg); }
.filter button[aria-pressed="true"]::before { background: var(--text); border-color: var(--text); }
.filter .anzahl { opacity: .6; margin-left: 4px; }
.ansicht { display: flex; gap: 0; margin-left: auto; }

/* Karten */
.karten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.karte { text-decoration: none; display: block; }
.karte .bild { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); transition: transform .35s ease, box-shadow .35s ease; }
.karte img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.karte h3 { transition: color .2s; }
/* Hervorhebung beim Darüberfahren: leicht nach rechts geneigt, Petrol-Kante unten */
@media (hover: hover) {
  .karte:hover .bild { transform: skewX(-1.5deg); box-shadow: 0 2px 0 var(--kopf-akzent), 0 10px 24px rgba(0,0,0,.12); }
  .karte:hover img { transform: scale(1.04); }
}
.karte h3 { font-size: 1.35rem; margin: 14px 0 2px; }
.karte .meta { color: var(--muted); font-size: .88rem; }

/* Bildraster (Masonry über Spalten) */
.raster { columns: 4 240px; column-gap: 16px; }
.raster button {
  display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; background: var(--line);
  cursor: zoom-in; break-inside: avoid;
}
.raster img { width: 100%; height: auto; transition: transform .5s ease; }
.raster button { overflow: hidden; transition: transform .35s ease, box-shadow .35s ease; }
/* gleiche Hervorhebung wie bei den Sammlungen */
@media (hover: hover) {
  .raster button:hover { transform: skewX(-1.5deg); box-shadow: 0 2px 0 var(--kopf-akzent), 0 10px 24px rgba(0,0,0,.12); position: relative; z-index: 1; }
  .raster button:hover img { transform: scale(1.04); }
}
.raster.drei { columns: 3; column-gap: 20px; }
.raster.drei button { margin-bottom: 20px; }
.pdf-bereich { margin-top: 48px; }
.raster .beschriftung { display: block; text-align: left; font-size: .8rem; color: var(--muted); background: var(--bg); padding: 4px 0 0; }

.zurueck { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 18px; font-size: .95rem; }
.zurueck:hover { color: var(--text); }
.pdfs { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 8px; max-width: 640px; }
.pdfs a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.pdfs a:hover { border-color: var(--text); }
.pdfs span:last-child { color: var(--muted); font-size: .85rem; white-space: nowrap; }

/* PDF zum Durchblättern */
.blaettern { margin: 0 0 56px; outline: none; }
.blae-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 12px; }
.blae-kopf h2 { font-size: 1.4rem; margin: 0; }
.blae-steuer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.blae-steuer button, .blae-pdf { font: inherit; font-size: .9rem; min-width: 44px; height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.blae-steuer button:hover:not(:disabled), .blae-pdf:hover { border-color: var(--text); }
.blae-steuer button:disabled { opacity: .35; cursor: default; }
.blae-zurueck, .blae-vor { font-size: 1.4rem !important; }
.blae-pos { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.blae-buehne { position: relative; background: #2a2926; display: flex; justify-content: center; align-items: center; padding: 16px; min-height: 240px; }
.blae-doppel { display: flex; justify-content: center; align-items: center; max-width: 100%; box-shadow: 0 4px 24px rgba(0,0,0,.35); }
.blae-seite { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; min-width: 0; }
.blaettern.doppelt .blae-seite { max-width: 50%; }
.blaettern.doppelt .blae-doppel { position: relative; }
.blaettern.doppelt .blae-doppel::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 36px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(0,0,0,.16) 50%, transparent); pointer-events: none; }
.blae-flaeche { position: absolute; top: 0; bottom: 0; width: 35%; background: none; border: 0; cursor: pointer; }
.blae-flaeche.links { left: 0; cursor: w-resize; } .blae-flaeche.rechts { right: 0; cursor: e-resize; }
.blae-daumen { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; scrollbar-width: thin; }
.blae-daumen button { flex: 0 0 auto; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: .6; }
.blae-daumen button.aktiv, .blae-daumen button:hover { opacity: 1; border-color: var(--accent); }
.blae-daumen img { height: 64px; width: auto; }

/* Flow */
.videos { display: flex; gap: 20px; flex-wrap: wrap; margin: 16px 0 24px; }
.video { margin: 0; flex: 0 1 auto; }
.video video { display: block; height: min(75vh, 640px); width: auto; max-width: 100%; background: #000; border-bottom: 2px solid var(--kopf-akzent); }
.video figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.jahr { font-size: 1.1rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 0; }
.beitrag h3 { font-size: 1.5rem; margin-top: 4px; }
.beitraege { display: grid; gap: 56px; max-width: 900px; }
.beitrag time { color: var(--muted); font-size: .9rem; }
.beitrag h2 { margin-top: 4px; }
.beitrag .text p { max-width: 65ch; }
.beitrag .raster { columns: 3 200px; margin-top: 16px; }
.mehr { font: inherit; cursor: pointer; background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; }

/* Text-Seiten */
.prosa { max-width: 70ch; }
.prosa h2 { font-size: 1.25rem; margin-top: 1.8em; }
.platzhalter { font-style: italic; color: #8a867e; }

/* Fuß */
.fuss { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.fuss .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; flex-wrap: wrap; }
.fuss nav { display: flex; gap: 18px; flex-wrap: wrap; }
.fuss a { transition: color .15s; }
.fuss a:hover, .instagram-hinweis a:hover { color: var(--kopf-akzent); }
.instagram-hinweis { color: var(--muted); margin-top: 28px; }
.start-instagram { color: var(--muted); font-size: .85rem; margin: 18px 0 0 !important; }
.start-instagram a { color: var(--muted); }
.start-instagram a:hover { color: var(--kopf-akzent); }
.instagram-hinweis a { color: var(--text); }

/* Lightbox */
.lb { position: fixed; inset: 0; background: #0c0c0b; display: none; z-index: 50; color: #eee; }
.lb.offen { display: grid; grid-template-rows: auto 1fr auto; height: 100dvh; }
.lb-oben { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 16px; font-size: .9rem; position: relative; z-index: 2; }
.lb-werkzeuge { display: flex; gap: 4px; }
.lb button { font: inherit; color: #eee; background: none; border: 0; cursor: pointer; }
.lb-werkzeuge button { width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; border-radius: 50%; }
.lb-werkzeuge button:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.lb-werkzeuge button:disabled { opacity: .3; cursor: default; }
.lb-buehne { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 64px; touch-action: none; }
.lb-buehne img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; transform-origin: center center; cursor: zoom-in; will-change: transform; }
.lb.gezoomt .lb-buehne img { cursor: grab; }
.lb.gezoomt .lb-buehne img:active { cursor: grabbing; }
.lb .pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 88px; font-size: 2.4rem; line-height: 1; opacity: .7; }
.lb .pfeil:hover { opacity: 1; }
.lb .links { left: 4px; } .lb .rechts { right: 4px; }
.lb.gezoomt .pfeil, .lb.einzeln .pfeil { display: none; }
.lb-tipp { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .85rem; white-space: nowrap; opacity: 0; transition: opacity .4s; pointer-events: none; }
.lb-tipp.sichtbar { opacity: 1; }
.lb-unten { text-align: center; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); font-size: .9rem; color: #bbb; min-height: 1em; }

@media (max-width: 760px) {
  main { padding-top: 28px; }
  .held-bild img { height: 62svh; min-height: 300px; }
  .marke-name { font-size: 1.35rem; }
  .kopf { position: static; }
  .blae-buehne { padding: 8px; }
  .blae-seite { max-height: 70vh; }
  .kopf .wrap { padding-top: 10px; padding-bottom: 8px; }
  .nav { gap: 4px 6px; margin-left: -12px; }
  .nav a { letter-spacing: .1em; }
  .marke-zeile { letter-spacing: .16em; }
  .raster, .beitrag .raster { columns: 1; }
  .videos { flex-direction: column; }
  .video video { width: 100%; height: auto; }
  .raster.drei { columns: 1; }
  .raster.drei button { margin-bottom: 14px; }
  .raster button { margin-bottom: 14px; }
  .karten { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .karte h3 { font-size: 1rem; }
  .lb-buehne { padding: 0; }
  .lb .pfeil { display: none; }
  .filter button { padding: 11px 16px; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
