/* Fotogalerie (fotografie.html, en/photography.html) */
:root {
  --bg: #0a0a0a;
  --fg: #ffffff;
  --muted: #9a9a9a;
  --line: rgba(255, 255, 255, 0.10);
  --magenta: #d7006b;
  --pink: #ff99cc;
  --plum: #2a0821;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --row: 260px;
  --gap: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
::selection { background: var(--magenta); color: #fff; }

.g-bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 48px; padding: 0 16px; background: rgba(42, 8, 33, .7); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); font-size: 12px; }
.g-name { font-size: 13px; font-weight: 300; letter-spacing: .02em; white-space: nowrap; }
.g-name b { font-weight: 600; color: var(--pink); }
.g-links { display: flex; gap: 18px; white-space: nowrap; }
.g-links a:hover { color: var(--pink); }

.g-head { padding: 72px 16px 40px; }
.g-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.g-eyebrow::before { content: "+ "; color: var(--magenta); }
h1 { margin: 12px 0 20px; font-size: clamp(44px, 11vw, 168px); line-height: .95; letter-spacing: -.045em; font-weight: 500; }
.g-intro { max-width: 560px; margin: 0; font-size: 17px; color: rgba(255, 255, 255, .82); }

.g-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.g-jump a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 22px; font-size: 13px; }
.g-jump a:hover { border-color: var(--pink); color: var(--pink); }
.g-series h2 { scroll-margin-top: 80px; }

.g-series { padding: 40px 16px 24px; }
.g-series-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
h2 { margin: 0; font-size: clamp(22px, 3vw, 36px); letter-spacing: -.02em; font-weight: 500; }

/* Zeilen in gleicher Höhe, jedes Foto im Originalformat (--r = Breite/Höhe) */
.g-grid { display: flex; flex-wrap: wrap; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.g-grid::after { content: ""; flex-grow: 1000000; }
.g-grid li { flex: var(--r) 1 calc(var(--r) * var(--row)); }
.g-item { display: block; position: relative; overflow: hidden; background: #161616; cursor: zoom-in; }
.g-item img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .3s; }
.g-item:hover img { transform: scale(1.03); }

/* Scroll-Animation (Klassen setzt galerie.js; ohne JavaScript bleibt alles sichtbar).
   Bewegt wird der Link, beobachtet wird das <li>, damit nichts flackert. */
.g-anim .g-grid li .g-item {
  opacity: 0;
  transform: translateY(80px) scale(.94);
  transition: opacity .6s ease var(--delay, 0ms), transform .9s cubic-bezier(.2, .7, .2, 1) var(--delay, 0ms);
}
.g-anim .g-grid li.is-above .g-item { transform: translateY(-80px) scale(.94); }
.g-anim .g-grid li.is-in .g-item,
.g-anim .g-grid li .g-item:focus-visible { opacity: 1; transform: none; }

.g-more { padding: 48px 16px 72px; color: var(--muted); }
.g-more a { color: var(--pink); }

.g-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.g-foot a:hover { color: #fff; }

/* Großansicht */
.lb { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 5, 5, .97); color: #fff; }
.lb[open] { display: grid; grid-template-rows: 56px minmax(0, 1fr) 72px; grid-template-columns: minmax(0, 1fr); }
.lb::backdrop { background: #050505; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 0 16px; font-size: 12px; color: var(--muted); }
.lb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 16px; overflow: hidden; touch-action: pinch-zoom; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: grab; user-select: none; -webkit-user-drag: none; }
.lb-stage.is-dragging, .lb-stage.is-dragging img { cursor: grabbing; }
.lb-bottom { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 16px; }
.lb-cap { margin: 0; text-align: center; font-size: 13px; }
.lb button { min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 22px; background: none; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.lb button:hover { border-color: var(--pink); color: var(--pink); }
body.lb-open { overflow: hidden; }

@media (max-width: 760px) {
  :root { --row: 150px; --gap: 6px; }
  .g-head { padding-top: 48px; }
  .g-name .g-full { display: none; }
}
@media (min-width: 761px) { .g-name .g-short { display: none; } }
@media (max-width: 480px) { .g-grid li { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .g-item img { transition: none; }
}
