/* Noah Raw · Galerie «Lichtspiel» (21.10.2026)
   Bildwand, die ständig läuft · Mosaik mit treibenden Spalten · Grossansicht mit Farbschein,
   Filmstreifen und Diashow. Ohne JavaScript: Mosaik als Spalten, Klick öffnet das Bild direkt. */

/* ---------- Bildwand ---------- */
.wand-buehne { position: relative; min-height: min(100svh, 62rem); display: grid; align-items: end; background: var(--nacht); color: var(--hell-auf-nacht); overflow: hidden; isolation: isolate; }
/* Der Rahmen ist genau so gross wie die Bühne und schneidet die schräge Wand selbst ab: so läuft die Bühne nicht über */
.wand-rahmen { position: absolute; inset: 0; overflow: hidden; z-index: -2; pointer-events: none; }
.wand-rahmen .wand { pointer-events: auto; }
.wand { --n: 5; position: absolute; inset: -18% -8%; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(.5rem, 1.2vw, 1rem); transform: rotate(-7deg) scale(1.08); z-index: -2; }
.wand__spalte { display: flex; flex-direction: column; gap: clamp(.5rem, 1.2vw, 1rem); animation: wand-auf var(--tempo, 80s) linear infinite; will-change: transform; }
.wand__spalte:nth-child(even) { animation-name: wand-ab; }
.wand__bild { display: block; width: 100%; border-radius: .35rem; background: var(--nacht-2) center / cover no-repeat; filter: saturate(.9) brightness(.82); transition: filter .6s var(--kurve); }
.wand__spalte:hover { animation-play-state: paused; }
.wand__bild:hover { filter: saturate(1.05) brightness(1); }
.wand.ist-pausiert .wand__spalte { animation-play-state: paused; }
@keyframes wand-auf { to { transform: translateY(-50%); } }
@keyframes wand-ab { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.wand-buehne__schleier { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(24,19,15,.55) 0%, rgba(24,19,15,.15) 30%, rgba(24,19,15,.55) 62%, rgba(24,19,15,.96) 100%),
              radial-gradient(120% 70% at 20% 100%, rgba(24,19,15,.9), transparent 70%); }
.wand-buehne__inhalt { width: min(100% - 2 * var(--rand), var(--breit)); margin: 0 auto; padding: 9rem 0 clamp(3rem, 7vw, 6rem); min-width: 0; }
.wand-buehne h1 { font-size: clamp(2.6rem, 1.4rem + 6vw, 7.2rem); max-width: 14ch; color: #fff; }
.wand-buehne h1 .kursiv { color: var(--glut); }
.wand-buehne__unter { max-width: 38rem; margin: 1.4rem 0 2rem; font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem); color: var(--hell-auf-nacht); }
.wand-buehne .augenbraue { color: var(--glut); }
.wand__pause { position: absolute; left: var(--rand); top: 5.4rem; z-index: 2; display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .55rem 1rem; border-radius: 2rem; border: 1px solid rgba(239,230,218,.45); background: rgba(24,19,15,.55); color: var(--hell-auf-nacht); font: inherit; font-size: .9rem; cursor: pointer; backdrop-filter: blur(6px); }
.wand__pause:hover { background: rgba(24,19,15,.85); }
.wand__pause svg { width: 1rem; height: 1rem; fill: currentColor; }
@media (max-width: 860px) {
  .wand { --n: 3; inset: -12% -20%; }
  .wand__spalte:nth-child(n+4) { display: none; }
  .wand-buehne__inhalt { padding-top: 10rem; }
}

/* ---------- Filter ---------- */
.galerie2 { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); scroll-margin-top: 4.5rem; }
.filter { position: sticky; top: 4.6rem; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .7rem 0; margin-bottom: 1.6rem; background: linear-gradient(var(--papier) 70%, rgba(245,239,230,0)); }
.filter button { display: inline-flex; align-items: baseline; gap: .45rem; min-height: 44px; padding: .55rem 1.05rem; border-radius: 2rem; border: 1px solid rgba(31,26,21,.25); background: transparent; color: var(--tinte); font: inherit; cursor: pointer; transition: background .3s var(--kurve), color .3s var(--kurve), border-color .3s; }
.filter button small { font-size: .78rem; opacity: .7; font-variant-numeric: tabular-nums; }
.filter button:hover { border-color: var(--tinte); }
.filter button[aria-pressed="true"] { background: var(--tinte); color: var(--papier); border-color: var(--tinte); }
.filter__zahl { margin: 0 0 0 auto; font-size: .9rem; color: var(--tinte-2); }
@media (max-width: 600px) { .filter { top: 4rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .filter::-webkit-scrollbar { display: none; } .filter button { flex: 0 0 auto; } .filter__zahl { display: none; } }

/* ---------- Mosaik ---------- */
.mosaik { columns: 3 17rem; column-gap: clamp(.6rem, 1.4vw, 1.1rem); }
.js .mosaik.ist-gebaut { columns: auto; display: grid; grid-template-columns: repeat(var(--spalten, 3), minmax(0, 1fr)); gap: clamp(.6rem, 1.4vw, 1.1rem); align-items: start; }
.mosaik__spalte { display: flex; flex-direction: column; gap: clamp(.6rem, 1.4vw, 1.1rem); min-width: 0; will-change: transform; }
.kachel { position: relative; display: block; margin-bottom: clamp(.6rem, 1.4vw, 1.1rem); break-inside: avoid; border-radius: .4rem; overflow: hidden; text-decoration: none; color: #fff; background: var(--papier-2); transform-style: preserve-3d; transition: transform .5s var(--kurve), box-shadow .5s var(--kurve); }
.ist-gebaut .kachel { margin-bottom: 0; }
.kachel[hidden] { display: none; }
.kachel__bild { display: block; overflow: hidden; }
.kachel img { width: 100%; height: auto; transform-origin: var(--ox, 50%) var(--oy, 50%); transition: transform 1.2s var(--kurve), filter .6s var(--kurve); }
.kachel::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,226,190,.32), rgba(255,226,190,0) 42%), linear-gradient(0deg, rgba(24,19,15,.72), rgba(24,19,15,0) 45%); }
.kachel__text { position: absolute; left: .9rem; right: .9rem; bottom: .8rem; z-index: 1; font-size: .88rem; line-height: 1.35; overflow-wrap: anywhere; hyphens: auto; opacity: 0; transform: translateY(.6rem); transition: opacity .4s var(--kurve), transform .5s var(--kurve); }
.kachel:hover, .kachel:focus-visible { box-shadow: 0 1.4rem 2.6rem -1.4rem rgba(24,19,15,.55); }
.kachel:hover::after, .kachel:focus-visible::after { opacity: 1; }
.kachel:hover .kachel__text, .kachel:focus-visible .kachel__text { opacity: 1; transform: none; }
.kachel:hover img, .kachel:focus-visible img { transform: scale(1.07); }
.js .kachel.ist-im-bild img { animation: atmen var(--atem, 16s) ease-in-out var(--verz, 0s) infinite alternate; }
.js .kachel.ist-im-bild:hover img { animation-play-state: paused; }
@keyframes atmen { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.06) translate3d(var(--dx, 1%), var(--dy, -1%), 0); } }
/* Auftritt: zugeschnitten wird das Bild, nie die Kachel selbst. Ein clip-path auf dem beobachteten Element
   rechnet Chrome in den IntersectionObserver ein: die Kachel galt nie als sichtbar (gemessen 21.10.2026). */
.js .kachel.wartet .kachel__bild { clip-path: inset(100% 0 0 0); }
.js .kachel.zeigt .kachel__bild { clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--kurve) var(--d, 0s); }
.kachel.raus { opacity: 0; transform: scale(.92); transition: opacity .25s, transform .3s; }

/* ---------- Grossansicht ---------- */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0f0b08; color: #f3eadf; overflow: hidden; }
.lb::backdrop { background: rgba(15,11,8,.96); }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb__grund { position: absolute; inset: -10%; z-index: 0; pointer-events: none; }
.lb__grund img { width: 100%; height: 100%; object-fit: cover; filter: blur(48px) saturate(1.3) brightness(.45); transform: scale(1.1); transition: opacity .8s; }
.lb__leiste { position: relative; z-index: 2; display: flex; align-items: center; gap: .6rem; padding: .8rem clamp(.8rem, 2vw, 1.4rem); }
.lb__zahl { margin-right: auto; font-variant-numeric: tabular-nums; font-size: .95rem; letter-spacing: .04em; }
.lb__knopf { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 44px; min-height: 44px; padding: .4rem .9rem; border-radius: 2rem; border: 1px solid rgba(243,234,223,.35); background: rgba(15,11,8,.45); color: inherit; font: inherit; font-size: .9rem; cursor: pointer; backdrop-filter: blur(8px); }
.lb__knopf:hover { background: rgba(243,234,223,.14); }
.lb__knopf svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb__zu { font-size: 1.5rem; padding: 0; }
.lb__buehne { position: relative; z-index: 1; margin: 0; display: grid; place-items: center; min-height: 0; padding: 0 clamp(.5rem, 5vw, 5.5rem); touch-action: pan-y; }
.lb__bild { max-width: 100%; max-height: calc(100svh - 12.5rem); width: auto; height: auto; object-fit: contain; border-radius: .3rem; box-shadow: 0 2rem 4rem -1.5rem rgba(0,0,0,.7); user-select: none; -webkit-user-drag: none; }
.lb__bild.kb { animation: kenburns 5.6s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.lb__text { position: absolute; left: 50%; bottom: .2rem; transform: translateX(-50%); width: min(90%, 44rem); text-align: center; font-size: .92rem; color: rgba(243,234,223,.85); text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.lb__pfeil { position: absolute; top: 50%; z-index: 3; width: 3.2rem; height: 3.2rem; margin-top: -1.6rem; border-radius: 50%; border: 1px solid rgba(243,234,223,.35); background: rgba(15,11,8,.45); color: #f3eadf; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(8px); transition: background .3s, transform .3s var(--kurve); }
.lb__pfeil:hover { background: rgba(243,234,223,.16); transform: scale(1.06); }
.lb__pfeil svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb__pfeil--zurueck { left: clamp(.5rem, 1.6vw, 1.4rem); }
.lb__pfeil--vor { right: clamp(.5rem, 1.6vw, 1.4rem); }
.lb__film { position: relative; z-index: 2; display: flex; gap: .4rem; overflow-x: auto; padding: .7rem clamp(.8rem, 2vw, 1.4rem) 1rem; scrollbar-width: thin; scrollbar-color: rgba(243,234,223,.3) transparent; }
.lb__film button { flex: 0 0 auto; width: 3.6rem; height: 3.6rem; padding: 0; border: 2px solid transparent; border-radius: .3rem; overflow: hidden; background: #1e1712; cursor: pointer; opacity: .5; transition: opacity .3s, border-color .3s, transform .3s var(--kurve); }
.lb__film button:hover { opacity: .85; }
.lb__film button[aria-current="true"] { opacity: 1; border-color: var(--glut); transform: translateY(-3px); }
.lb__film img { width: 100%; height: 100%; object-fit: cover; }
.lb .ist-weg-links { animation: weg-links .32s var(--kurve) forwards; }
.lb .ist-weg-rechts { animation: weg-rechts .32s var(--kurve) forwards; }
.lb .ist-rein-links { animation: rein-links .5s var(--kurve) both; }
.lb .ist-rein-rechts { animation: rein-rechts .5s var(--kurve) both; }
@keyframes weg-links { to { opacity: 0; transform: translateX(-6%) scale(.97); } }
@keyframes weg-rechts { to { opacity: 0; transform: translateX(6%) scale(.97); } }
@keyframes rein-links { from { opacity: 0; transform: translateX(6%) scale(.97); } }
@keyframes rein-rechts { from { opacity: 0; transform: translateX(-6%) scale(.97); } }
html.lb-offen { overflow: hidden; }
@media (max-width: 600px) {
  .lb__pfeil { top: auto; bottom: 5.6rem; margin: 0; width: 2.9rem; height: 2.9rem; }
  .lb__bild { max-height: calc(100svh - 13.5rem); }
  .lb__knopf span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wand__spalte, .js .kachel.ist-im-bild img, .lb__bild.kb { animation: none !important; }
  .js .kachel.wartet .kachel__bild { clip-path: none; }
  .lb .ist-weg-links, .lb .ist-weg-rechts, .lb .ist-rein-links, .lb .ist-rein-rechts { animation: none; }
  .wand__pause { display: none; }
}
