:root {
  --wall: #dadeda;       /* Galeriegrau */
  --wall-2: #cfd4cf;
  --ink: #1d272b;        /* Schiefer */
  --muted: #59666a;
  --cyan: #234a7c;       /* Cyanotypie */
  --line: #b9c0bb;
  --dark: #0f1213;       /* Großansicht */

  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Albert Sans", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --gap: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wall: #191d1e;
    --wall-2: #222829;
    --ink: #e3e7e3;
    --muted: #9aa5a6;
    --cyan: #9dbdeb;
    --line: #343c3d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Passwort-Tür ---------- */
.gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}
.gate[hidden], main[hidden] { display: none; }
.gate__inner { width: min(100%, 420px); }
.gate__title {
  font: 400 clamp(44px, 9vw, 72px)/0.95 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.gate__text { color: var(--muted); margin: 0 0 28px; max-width: 34ch; }
.gate__form { display: flex; border-bottom: 1.5px solid var(--ink); }
.gate__form input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; color: var(--ink);
  font: 400 20px/1 var(--sans);
  padding: 12px 0;
}
.gate__form input:focus { outline: none; }
.gate__form:focus-within { border-color: var(--cyan); }
.gate__form button {
  border: 0; background: none; padding: 12px 0 12px 16px;
  font-weight: 600; color: var(--cyan);
}
.gate__remember { display: flex; gap: 8px; align-items: center; margin-top: 16px; font-size: 15px; color: var(--muted); }
.gate__remember input { accent-color: var(--cyan); }
.gate__error { color: #a3342b; min-height: 1.5em; font-size: 15px; }
@media (prefers-color-scheme: dark) { .gate__error { color: #f0948a; } }
.gate.shake .gate__form { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- Startseite ---------- */
.hero {
  position: relative;
  height: min(88svh, 900px);
  overflow: hidden;
  background: var(--wall-2);
}
.hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: develop 2.2s cubic-bezier(.2,.6,.2,1) both;
}
/* Einmaliger Moment: das Bild "entwickelt" sich wie im Labor */
@keyframes develop {
  from { filter: grayscale(1) brightness(1.6) contrast(.6); transform: scale(1.04); }
  to   { filter: none; transform: none; }
}
/* sanfter Verlauf, damit der Name auch auf hellen Fotos lesbar bleibt */
.hero::after {
  content: "";
  position: absolute; inset: 45% 0 0;
  background: linear-gradient(to bottom, rgba(10,14,15,0), rgba(10,14,15,.45));
  pointer-events: none;
}
.hero__title {
  z-index: 1;
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: -0.16em;
  margin: 0;
  font: 400 clamp(64px, 15vw, 230px)/0.85 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.035em;
  color: var(--wall);
  text-wrap: balance;
}

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 56px var(--gutter) 24px;
}
.intro p { margin: 0; max-width: 38ch; font-size: 19px; color: var(--muted); }
@media (min-width: 800px) {
  .intro { grid-template-columns: 1fr auto; align-items: end; }
}

.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.filters button {
  border: 0; background: none; padding: 6px 0;
  font-size: 16px; color: var(--muted);
  border-bottom: 1.5px solid transparent;
}
.filters button[aria-pressed="true"] { color: var(--ink); border-color: var(--cyan); }
.filters button:hover { color: var(--ink); }

/* Albenliste: die Typografie ist das Bild */
.albums { list-style: none; margin: 0; padding: 0 var(--gutter) 96px; }
.albums li { border-top: 1px solid var(--line); }
.albums li:last-child { border-bottom: 1px solid var(--line); }
.album-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 4px 24px;
  padding: 22px 0 20px;
  text-decoration: none;
}
.album-link__title {
  font: 400 clamp(36px, 7vw, 104px)/1 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
  transition: color .2s, font-style .2s;
}
.album-link:hover .album-link__title,
.album-link:focus-visible .album-link__title { color: var(--cyan); font-style: italic; }
.album-link__meta { color: var(--muted); font-size: 15px; text-align: right; white-space: nowrap; }
.album-link__thumb { display: none; }

/* Auf Touch-Geräten: kleines Vorschaubild statt schwebender Vorschau */
@media (hover: none), (max-width: 700px) {
  .album-link { grid-template-columns: 1fr 84px; align-items: center; }
  .album-link__thumb { display: block; grid-row: span 2; width: 84px; height: 84px; object-fit: cover; }
  .album-link__meta { text-align: left; grid-column: 1; }
}

.peek {
  position: fixed; left: 0; top: 0; z-index: 5;
  width: 300px; height: auto;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.45);
}
.peek.on { opacity: 1; }
@media (hover: none) { .peek { display: none; } }

.site-foot {
  padding: 0 var(--gutter) 48px;
  color: var(--muted); font-size: 14px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-foot a { color: var(--muted); text-underline-offset: 3px; }

/* ---------- Albumseite ---------- */
.album-head {
  padding: 28px var(--gutter) 40px;
  display: grid; gap: 28px;
}
.back {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--muted); font-size: 16px;
}
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.back:hover { color: var(--ink); }
.album-head h1 {
  margin: 0;
  font: 400 clamp(48px, 10vw, 150px)/0.9 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
}
.album-head__info { display: grid; gap: 6px; max-width: 60ch; }
.album-head__info p { margin: 0; }
.album-head__where { color: var(--muted); }
@media (min-width: 900px) {
  .album-head { grid-template-columns: 1fr minmax(260px, 34ch); align-items: end; }
  .back { grid-column: 1 / -1; }
}

/* Bildraster ohne Beschnitt: Zeilen werden per Script exakt eingepasst */
.grid { padding: 0 var(--gutter) 64px; }
.grid__row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.tile {
  position: relative;
  display: block; padding: 0; border: 0;
  background: var(--wall-2);
  overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .5s; opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { opacity: .9; }
.tile__play {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 8px;
  background: rgba(15,18,19,.7); color: #fff;
  font-size: 13px; border-radius: 99px;
}
.tile__play svg { width: 14px; height: 14px; fill: currentColor; }

.album-foot { padding: 0 var(--gutter) 64px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.album-foot a { color: var(--cyan); text-underline-offset: 3px; }

/* ---------- Großansicht ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--dark); color: #e9ece9;
}
.lightbox::backdrop { background: var(--dark); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox__stage {
  min-height: 0;
  display: grid; place-items: center;
  padding: 56px 16px 8px;
  touch-action: pan-y;
}
.lightbox__stage img, .lightbox__stage video {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  animation: lbIn .25s ease-out;
}
@keyframes lbIn { from { opacity: 0; } }
.lightbox__meta {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 20px 20px;
  font-size: 15px;
}
.lightbox__meta p { margin: 0; }
.lightbox__count { color: #8d9799; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 0; background: none; color: #e9ece9;
  opacity: .75;
}
.lb-btn:hover { opacity: 1; }
.lb-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.lb-close { top: 6px; right: 6px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
@media (hover: none) { .lb-prev, .lb-next { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Filme: ein dunkler "Vorführraum" ---------- */
.films-home {
  background: var(--dark);
  color: #e9ece9;
  padding: 56px 0 64px;
  margin-bottom: 48px;
}
.films-home__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px 24px; flex-wrap: wrap;
  padding: 0 var(--gutter) 28px;
}
.films-home h2 {
  margin: 0;
  font: 400 clamp(36px, 7vw, 104px)/1 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
}
.films-home__head a { color: #b9cdea; text-underline-offset: 3px; }
.film-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(260px, 40vw, 560px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  padding: 0 var(--gutter) 12px;
  scrollbar-width: thin;
  scrollbar-color: #3a4244 transparent;
}
.film-strip .film { scroll-snap-align: start; }

.film {
  display: grid; gap: 4px;
  padding: 0; border: 0; background: none;
  text-align: left; color: inherit;
}
.film__poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1d2224;
  margin-bottom: 10px;
}
.film__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.film:hover .film__poster img { transform: scale(1.03); }
.film__play {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px;
  background: rgba(15,18,19,.72); color: #fff;
  font-size: 13px; font-variant-numeric: tabular-nums;
  border-radius: 99px;
}
.film__play svg { width: 14px; height: 14px; fill: currentColor; }
.film__title { font: 400 22px/1.2 var(--serif); font-optical-sizing: auto; }
.film__meta { font-size: 14px; color: #8d9799; }

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 40px 24px;
  padding: 0 var(--gutter) 80px;
}
body.cinema { background: var(--dark); color: #e9ece9; }
body.cinema .back, body.cinema .album-head__where { color: #8d9799; }
body.cinema .back:hover { color: #fff; }
