/*
Theme Name: Stefan Pecher
Author: Stefan Pecher
Description: Portfolio theme — Index, Archive, Project, Info, Imprint. All-caps 13px Helvetica system.
Version: 1.4.1
Requires PHP: 7.4
Text Domain: stefanpecher
*/

/* ── Fluid scale ─────────────────────────────────────────────────────────
   All sizes are in rem (1rem = 16px at the design size). Between 1380 and 1700px wide the whole
   page scales strictly in proportion to the window (like zooming an image: no line re-wraps
   while resizing). From 1700px up: design size. Below 1380px: fixed at 81%. Phones keep 100%. */
html { font-size: clamp(13px, calc(100vw / 106.25), 16px); }
@media (max-width: 700px) { html { font-size: 16px; } }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --soft: #6f6f6f;          /* one grey for the whole site (4.9:1 on white) */
  --ph: #eeeeee;            /* image placeholder */
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --fs: 0.8125rem; --lh: 1.1875rem; --track: 0.04em;
  --pad: 2.5rem;              /* page side margin */
  --gap: 1.5rem;              /* column gap */
  --header-h: 3.75rem;
  --top: 2.4375rem;              /* content starts this far below the header */
  --cols: minmax(0,1fr) minmax(0,1.25fr) minmax(0,1.25fr) minmax(0,1.25fr) 5.25rem;
}
/* dark mode (B/W toggle on the home page, remembered per browser) */
html.is-dark { --bg: #0a0a0a; --ink: #f2f2f2; --soft: #8e8e8e; --ph: #1a1a1a; color-scheme: dark; }
@media (max-width: 700px) {
  :root { --pad: 1.25rem; --header-h: 3.25rem; --top: 2rem; --fs: 0.75rem; --lh: 1.125rem; } /* phones: 12/18 type */
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* iPhone landscape: no automatic text enlarging */
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: var(--fs); line-height: var(--lh); letter-spacing: var(--track);
  text-transform: uppercase; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--ink); outline-offset: 0.1875rem; }
.soft { color: var(--soft); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Arrows: the ↗ glyph on desktop; a drawn arrow on phones (iOS turns ↗ into an emoji). */
.arr-m { display: none; width: .62em; height: .62em; margin-left: .35em; vertical-align: .02em; }
@media (max-width: 700px), (hover: none) and (pointer: coarse) { .arr-d { display: none; } .arr-m { display: inline-block; } } /* all touch devices: iOS shows ↗ as an emoji */

/* ── Header (fixed; slides away on scroll down, back on scroll up) ─────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: var(--bg);
  display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  padding: 1.375rem var(--pad) 1.125rem; transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.site-header.is-hidden { transform: translateY(-100%); }
html.is-resizing *, html.is-resizing *::before, html.is-resizing *::after { transition: none !important; }
html.is-resizing, html.is-resizing body { overflow-anchor: none; } /* scroll position is kept by site.js while resizing */
.site-nav { display: flex; gap: 1.375rem; }
.site-nav a { border-bottom: 1px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.burger { display: none; }
main { padding: calc(var(--header-h) + var(--top)) var(--pad) 5rem; }

@media (max-width: 700px) {
  .site-header { padding: 1.125rem var(--pad); align-items: center; }
  .site-nav { display: none; }
  .burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 0.3125rem; padding: 0.75rem; margin: -0.75rem; }
  .burger span { display: block; width: 1.5rem; height: 1.5px; background: var(--ink); }
}

/* Mobile menu overlay */
.menu {
  /* hidden when closed so Safari doesn't keep tinting its bars with the menu's colour */
  position: fixed; inset: 0; z-index: 20; background: var(--bg);
  display: flex; flex-direction: column; padding: 1.125rem var(--pad);
  transform: translateX(-100%); visibility: hidden;
  transition: transform .42s cubic-bezier(.7,0,.2,1), visibility 0s linear .42s;
  font-size: 0.875rem; line-height: 1.25rem;
}
@media (max-width: 700px) {
  /* iPhone Safari draws the page behind its floating bottom bar, but never fixed layers. So on
     phones the menu is part of the page (absolute, placed at the current scroll position by
     site.js) and as tall as the whole screen; the page is locked while it is open. The bottom
     padding (= bar height) keeps the links above the bar. */
  .menu { position: absolute; inset: auto; top: 0; left: 0; right: 0; height: calc(100vh + 10rem); height: calc(100lvh + 10rem);
    padding-bottom: calc(100lvh - 100svh + 10rem); font-size: 0.8125rem; line-height: 1.1875rem; } /* +10rem: reaches past the very bottom edge; the links don't move */
  html.menu-open { overflow: hidden; }
}
.menu.is-open { transform: none; visibility: visible; transition: transform .42s cubic-bezier(.7,0,.2,1), visibility 0s; }
.menu-close { align-self: flex-end; position: relative; width: 1.5rem; height: 1rem; padding: 0.75rem; margin: -0.75rem; box-sizing: content-box; }
.menu-close span { position: absolute; left: 0.75rem; top: 1.1875rem; width: 1.5rem; height: 1.5px; background: var(--ink); }
.menu-close span:first-child { transform: rotate(45deg); }
.menu-close span:last-child { transform: rotate(-45deg); }
.menu-bottom { margin-top: auto; margin-bottom: calc(2rem + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.menu-nav { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 0.375rem; }
.menu-nav a { border-bottom: 1px solid transparent; }
.menu-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.menu-filter { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 0.375rem; }
.menu-filter .opt { color: var(--soft); }
@media (min-width: 701px) { .menu { display: none; } }

/* ── Index ──────────────────────────────────────────────────────────────── */
.filter { display: flex; gap: 1.125rem; white-space: nowrap; flex-wrap: wrap; margin-top: calc(0.375rem - var(--top)); }
.home-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: calc(0.375rem - var(--top)); }
.home-bar .filter { margin-top: 0; }
.bw { color: var(--soft); transition: color .2s ease; }
.bw:hover { color: var(--ink); }
.bw-abs { position: absolute; right: var(--pad); top: calc(var(--header-h) + 0.375rem); } /* project page: same spot as on the index */
.back-abs { position: absolute; left: var(--pad); top: calc(var(--header-h) + 0.375rem); color: var(--soft); transition: color .2s ease; }
.back-abs:hover { color: var(--ink); }
@media (max-width: 700px) { .bw-abs, .back-abs { display: none; } }
/* B/W switch: whole page cross-fades */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; animation-timing-function: ease; }
/* moving between pages: the page fades to white (header stays), then the next page fades in (site.js + header.php) */
html.sp-leaving main, html.sp-leaving .menu-close, html.sp-leaving .menu-bottom { opacity: 0; transition: opacity .25s ease; } /* the menu panel itself stays: only its links fade, so the page behind never shows through */
html.sp-arriving main { animation: sp-arrive .45s ease both; }
/* home: switching the category fades only the projects */
html.sp-filtering .masonry { opacity: 0; transition: opacity .25s ease; }
html.sp-filter-in .masonry { animation: sp-arrive .45s ease both; }
@keyframes sp-arrive { from { opacity: 0; } }
/* B/W fade (phones): the colour variables themselves fade, once, on <html> — every text, line and surface follows in the
   same frame. (Fading each element on its own made nested texts lag behind.) */
@property --bg { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #0a0a0a; }
@property --soft { syntax: '<color>'; inherits: true; initial-value: #6f6f6f; }
@property --ph { syntax: '<color>'; inherits: true; initial-value: #eeeeee; }
html.bw-fade { transition: --bg .5s ease, --ink .5s ease, --soft .5s ease, --ph .5s ease !important; }
html.bw-fade *, html.bw-fade *::before, html.bw-fade *::after { transition: none !important; }
.menu-left { display: flex; flex-direction: column; align-items: flex-start; gap: calc(0.375rem + 1px); padding-bottom: 1px; } /* "Selected" on the line of Imprint, "B/W" on the line of Info */
.filter button { color: var(--soft); transition: color .2s ease; }
.filter button:hover, .filter .is-current { color: var(--ink); }
.filter .opt[hidden] { display: none; }
.masonry { display: flex; gap: var(--gap); align-items: flex-start; margin-top: 2.25rem; }
/* desktop home: projects take the left ~70%, the right column shows details on hover + contact/time at the bottom */
.home-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); column-gap: 4rem; align-items: start; margin-top: 0.875rem; }
.home-grid .masonry { margin-top: 0; }
.home-info { position: sticky; top: calc(var(--header-h) + 1.25rem); opacity: 0; transition: opacity .2s ease; }
.home-info.is-on { opacity: 1; }
.home-info .hi-head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1.1875rem; }
.home-info .hi-head span:last-child, .home-info .kv span:last-child { text-align: right; }
.home-info .kv > span:first-child { flex: none; white-space: nowrap; }
.home-info .kv > span:last-child { max-width: 50%; } /* long credits break onto a second line, between two names */
.home-corner { position: fixed; z-index: 5; right: var(--pad); bottom: 1.75rem; width: calc((100% - 2 * var(--pad) - 4rem) * 0.3); text-align: right; }
.masonry .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.cell { display: block; }
.cell img { width: 100%; background: var(--ph); }
.cell video { display: block; width: 100%; height: auto; object-fit: cover; background: var(--ph); }
.cell video.is-live { background: transparent !important; }
.cap { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.5rem; color: var(--soft); transition: color .2s ease; }
.cell:hover .cap { color: var(--ink); }
.cap span:last-child { text-align: right; }
/* tablet portrait / narrow desktop windows: projects use the full width, tighter rhythm, no side info */
@media (min-width: 701px) and (max-width: 1100px) {
  .home-grid { display: block; }
  .home-info, .home-corner { display: none; }
  .masonry .col { gap: 1rem; }
  .cap { padding-top: 0.375rem; }
}
@media (max-width: 700px) {
  .filter { display: none; }
  /* phones: the category filter sits top left on the home page (B/W stays in the menu) */
  .home-bar { justify-content: flex-start; margin-top: calc(0.375rem - var(--top)); margin-bottom: 1rem; }
  .home-bar .filter { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; } /* open: the other categories stack underneath */
  .home-bar .bw { display: none; }
  .masonry { margin-top: 0; }
  .home-grid { display: block; margin-top: 0; }
  .home-info, .home-corner { display: none; }
  .masonry .col { gap: 1rem; }
  .cap { color: var(--ink); }
}

/* ── Archive ────────────────────────────────────────────────────────────── */
.archive-list { position: relative; z-index: 1; margin-top: -0.5rem; }
.row { display: grid; grid-template-columns: var(--cols); column-gap: var(--gap); padding: 0.5rem 0; color: var(--soft); transition: color .15s ease; }
.row.is-hot { color: var(--ink); }
.row > span { justify-self: start; }
.row > .right { justify-self: end; }
.row .m-only { display: none; }
.hover-still {
  position: fixed; z-index: 0; pointer-events: none; width: min(41.75rem, 46vw); max-height: 70vh; object-fit: contain;
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .2s ease;
}
.hover-still.is-on { opacity: 1; }
@media (max-width: 700px) {
  .archive-list { margin-top: -0.5625rem; }
  .row { grid-template-columns: 2.75rem minmax(0,1fr) auto; column-gap: 0.75rem; padding: 0.5625rem 0; color: var(--ink); }
  .row .d-only { display: none; }
  .row .m-only { display: block; }
  .row .sub { grid-column: 2 / 4; color: var(--soft); }
  .hover-still { display: none; }
}

/* ── Project ────────────────────────────────────────────────────────────── */
.p-line { display: grid; grid-template-columns: var(--cols); column-gap: var(--gap); padding-bottom: 0.875rem; }
.p-line .m-only { display: none; }
/* location + role share the last two columns, so a long role grows to the left instead of wrapping */
.p-line .end { grid-column: 4 / 6; display: flex; justify-content: space-between; gap: var(--gap); min-width: 0; }
.p-line .end .right { white-space: nowrap; }
.video { position: relative; background: var(--ph); }
.video img, .video video, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0; }
.video .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.625rem; color: #fff; text-shadow: 0 0 0.75rem rgba(0,0,0,.35); }
.video.is-playing .play, .video.is-playing img { display: none; }
/* phones: the player waits underneath the still, taps go through to it (site.js) */
.video.is-pre iframe { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.video.is-pre img { position: relative; z-index: 1; }
.video.is-pre .play { z-index: 2; }
.video.is-armed img, .video.is-armed .play { pointer-events: none; } /* player ready: taps go through to it */
/* cinema mode (site.js): first the page blurs, then it darkens — overlapping, 2.5 s in total.
   The frame around a non-16:9 film takes exactly the dimmed page colour, so the film stands free (no bars). */
:root { --easy: cubic-bezier(.33, 0, .67, 1); } /* "easy ease" like in After Effects */
.cine { position: fixed; inset: 0; z-index: 15; pointer-events: none; visibility: hidden;
  background-color: rgba(0,0,0,0); -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  transition: background-color .6s ease, -webkit-backdrop-filter .6s ease, backdrop-filter .6s ease, visibility 0s linear .6s; }
html.is-cinema .cine { visibility: visible; background-color: rgba(0,0,0,.82); -webkit-backdrop-filter: blur(2.4px); backdrop-filter: blur(2.4px);
  transition: -webkit-backdrop-filter 1.5s var(--easy), backdrop-filter 1.5s var(--easy), background-color 2.1s var(--easy) .4s, visibility 0s; } /* blur first, darkening follows — easy ease in & out */
.video.cine-focus { z-index: 17; }
.v-block { position: relative; }
.video { transition: background-color .6s ease; }
html.is-dark .p-film .video { background-color: #000; } /* dark mode: black frame right away */
html.is-cinema .p-film .video.cine-focus { background-color: rgb(46,46,46); transition: background-color 2.1s var(--easy) .4s; } /* white page dimmed by 82%, same curve as the darkening */
/* dark mode: half the dimming */
html.is-dark.is-cinema .cine { background-color: rgba(0,0,0,.41); -webkit-backdrop-filter: blur(2.52px); backdrop-filter: blur(2.52px); }
html.is-dark.is-cinema .p-film .video.cine-focus { background-color: rgb(6,6,6); } /* #0a0a0a dimmed by 41% */
/* cinema: a clear layer lies over the film, so the first mouse move over the film brings the page back */
html.is-cinema .video.cine-focus::after { content: ""; position: absolute; inset: 0; z-index: 5; }
.video iframe { color-scheme: light; } /* Chrome paints embedded players white when the page is dark */
.video .soon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 1rem; text-align: center; color: #fff; text-shadow: 0 0 0.75rem rgba(0,0,0,.35); pointer-events: none; } /* no film yet */
.v-meta { display: flex; justify-content: space-between; padding-top: 0.5rem; color: var(--soft); }
.v-block + .v-block { padding-top: 3rem; }
.p-about { display: grid; grid-template-columns: var(--cols); column-gap: var(--gap); padding-top: 3.5rem; }
.p-about .text { grid-column: 2 / 4; max-width: 35rem; text-wrap: pretty; }
.p-about .text p + p { margin-top: 1.1875rem; } /* one empty line between paragraphs */
.p-about .credits { grid-column: 4 / 6; }
/* desktop project page: the film on the left (~70%, like the home page), all details + credits on the right */
.p-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); column-gap: 4rem; align-items: start; }
.p-side .hi-head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1.1875rem; }
.p-side .hi-head span:last-child { text-align: right; }
.p-side .kv > span:first-child { flex: none; white-space: nowrap; }
.p-side .kv > span:last-child { max-width: 50%; } /* long credits break onto a second line, between two names */
.kv .nm { display: inline-block; }
.p-side .hi-head.tight { padding-bottom: 0.375rem; } /* status sits right under the project name */
.p-side .gap { height: 1.1875rem; }
@media (min-width: 701px) {
  .p-line { display: none; }                         /* the details now sit next to the film */
  .p-about .credits { display: none; }
  .p-about.no-text { display: none; }
  /* about: label + text start where they were, the text ends at the film's right edge */
  body.single-project main { container-type: inline-size; }
  /* about sits in the film column: label column as before, text runs to the film's right edge */
  .p-film .p-about { grid-template-columns: calc((100cqw - 11.25rem) / 4.75) minmax(0, 1fr); column-gap: 1.5rem; }
  .p-film .p-about .text { grid-column: 2; max-width: none; }

  .p-top .v-block:first-child .v-meta:not(.has-label) { display: none; } /* length is in the column */
}
.kv { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.375rem; }
.kv span:last-child { text-align: right; }
.stills { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--gap); padding-top: 4.5rem; }
.stills img { width: 100%; aspect-ratio: var(--still-ratio, auto); object-fit: cover; }
.p-nav { display: flex; justify-content: space-between; padding-top: 4.5rem; }
.p-nav a { color: var(--soft); transition: color .15s ease; }
.p-nav a:hover { color: var(--ink); }
@media (max-width: 700px) {
  .p-line { grid-template-columns: 2.75rem minmax(0,1fr) auto; column-gap: 0.75rem; padding-bottom: 0.75rem; }
  .p-line .d-only { display: none; }
  .p-line .end { display: contents; }
  .p-line .end .right { white-space: normal; }
  .p-line .m-only { display: block; }
  .v-block + .v-block { padding-top: 2rem; }
  .p-top { display: block; }
  .p-side { display: none; }
  .p-about { display: block; padding-top: 2rem; }
  .p-about .label { display: none; }
  .p-about .credits { padding-top: 1.75rem; }
  .p-about .credits .kv > span:last-child { max-width: 55%; } /* long credits break early, between two names */
  .p-fest .label { display: block; padding-bottom: 0.75rem; }
  .stills { grid-template-columns: 1fr; gap: 1rem; padding-top: 2.25rem; }
  .p-nav { padding-top: 2.25rem; }
}

/* ── Info / Imprint ─────────────────────────────────────────────────────── */
.section { display: grid; grid-template-columns: var(--cols); column-gap: var(--gap); }
.section + .section { padding-top: 4rem; }
.section > h2 { all: unset; color: var(--soft); }
.section > .body { grid-column: 2 / 6; min-width: 0; }
.sub-row { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1.25fr) minmax(0,1.25fr) 5.25rem; column-gap: var(--gap); padding: 0.6875rem 0; }
.contact-d .sub-row { grid-template-columns: minmax(max-content,1.25fr) minmax(0,1.25fr) minmax(0,1.25fr) 5.25rem; } /* the e-mail never runs into Instagram */
.sub-row:first-child { padding-top: 0; }
.sub-row .mid { display: contents; }
.about-grid { display: grid; grid-template-columns: minmax(0,2.5fr) minmax(0,1.25fr) 5.25rem; column-gap: var(--gap); }
.about-grid .bio { max-width: 40rem; }
.about-grid .bio p + p { margin-top: 1.1875rem; }
.about-grid .portrait { grid-column: 2 / 4; }
.about-grid .portrait img { width: 100%; height: auto; }
.portrait-m { display: none; }
.pub .read { color: var(--soft); transition: color .15s ease; }
.pub:hover .read { color: var(--ink); }
.fest-link .go { color: var(--soft); opacity: 0; transition: opacity .15s ease; }
.fest-link:hover .go { opacity: 1; }
@media (hover: none) { .fest-link .go { opacity: 1; } }
.more { display: inline-block; margin-top: 1.1875rem; color: var(--soft); }
.more:hover { color: var(--ink); }
.is-extra[hidden] { display: none; }
.imprint-grid { display: grid; grid-template-columns: minmax(0,2.5fr) minmax(0,2.5fr); column-gap: var(--gap); align-items: start; }
.imprint-grid .blocks p + p { margin-top: 1.1875rem; }
.ink-link:hover { text-decoration: underline; text-underline-offset: 0.1875rem; }
/* long text pages (e.g. Privacy) */
.prose { max-width: 40rem; }
.prose h3 { font: inherit; margin: 2.375rem 0 0; }
.prose h3:first-child { margin-top: 0; }
.prose p + p, .prose h3 + p, .prose ul { margin-top: 1.1875rem; }
.prose ul { padding-left: 1.2em; margin-bottom: 0; }
.prose a { text-decoration: underline; text-underline-offset: 0.1875rem; }
@media (max-width: 700px) {
  .section { display: block; }
  .section + .section { padding-top: 2.5rem; }
  .section > h2 { display: block; margin-bottom: 0.75rem; }
  .about-grid, .imprint-grid { display: block; }
  .about-grid .portrait { display: none; }
  .info-main { display: flex; flex-direction: column; }
  .info-main > * { order: 3; }
  .info-main .portrait-m { display: block; order: 0; margin-bottom: 2.5rem; }
  .info-main .portrait-m img { width: 100%; height: auto; }
  .info-main .contact-d { order: 1; padding-top: 0; }
  .info-main .contact-d .sub-row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; padding: 0; }
  .info-main .about-s { order: 2; padding-top: 2.5rem; }
  .about-grid { display: flex; flex-direction: column-reverse; }
  .sub-row { grid-template-columns: minmax(0,1fr) auto; column-gap: 0.75rem; padding: 0.5625rem 0; }
  .sub-row .c1 { grid-row: 1; grid-column: 1; }
  .sub-row .c4 { grid-row: 1; grid-column: 2; }
  .sub-row .mid { display: block; grid-row: 2; grid-column: 1; color: var(--soft); } /* stays left of the year: wraps instead of running under it */
  .sub-row .mid > span { display: inline; }
  .sub-row .mid > span + span::before { content: " · "; }
  .imprint-grid .notes { padding-top: 2rem; }
}

/* 35mm page: a gallery across the whole width. Title fixed top right (inverts over photos), photos scroll under it.
   Every photo is placed by hand on a 12-column grid (Seiten → 35mm anordnen): start column, width, space above.
   Sizes are in cqw (share of the page width), so the admin preview and the page match. */
.ph-main { position: relative; }
.ph-side { position: fixed; z-index: 5; top: calc(var(--header-h) + var(--top)); right: var(--pad); text-align: right;
  color: #fff; mix-blend-mode: difference; pointer-events: none; }
.ph-soft { opacity: .62; }
.ph-text { padding-top: 1.1875rem; max-width: 18rem; margin-left: auto; }
.ph-stage { container-type: inline-size; margin: calc(-1 * (var(--header-h) + var(--top))) calc(-1 * var(--pad)) 0; }
.ph-wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.7cqw; align-items: start; margin: 0 2.8cqw; padding: 14cqw 0 8cqw; }
.ph { margin: calc(var(--m, 0) * 2cqw) 0 0; grid-column: var(--c, 1) / span var(--w, 6); min-width: 0; }
.ph-open { all: unset; display: block; cursor: zoom-in; }
.ph img { display: block; width: 100%; height: auto; background: var(--ph); }
.ph-open:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
/* full screen view */
.lb { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 1.375rem var(--pad); z-index: 2; }
.lb-bar button { all: unset; cursor: pointer; }
.lb-img { max-width: calc(100vw - 2 * var(--pad)); max-height: calc(100vh - 8rem); max-height: calc(100svh - 8rem); width: auto; height: auto; display: block; transition: opacity .2s ease; }
.lb-img.is-loading { opacity: 0; }
.lb-nav { all: unset; position: absolute; top: 4rem; bottom: 0; width: 50%; color: transparent; z-index: 1; }
.lb-prev { left: 0; cursor: w-resize; }
.lb-next { right: 0; cursor: e-resize; }
html.lb-open { overflow: hidden; }
@media (max-width: 700px) {
  .ph-side { position: static; color: inherit; mix-blend-mode: normal; text-align: left; padding-bottom: 2rem; }
  .ph-soft { opacity: 1; color: var(--soft); }
  .ph-text { margin-left: 0; }
  .ph-stage { margin: 0; container-type: normal; }
  .ph-wall { display: block; margin: 0; padding: 0; }
  .ph { margin: 0 0 2.5rem; }
  .lb-img { max-width: 100vw; }
  .lb-nav { top: 3.5rem; }
}
