/* Mobiele varianten (< 600 px): fotostapel in plaats van de fotoslider en projectrol in plaats van de helix.
   Bron: roybosch-mobiel/MOBIEL.md en reference/mobiel.css. Beide varianten worden gerenderd; deze regels tonen er één.
   Zonder JavaScript vallen beide terug op een horizontale snap-rij met echte links. */

:root { --nav-height-mobile: 60px; }

.only-mobile { display: none; }
@media (max-width: 599.98px) {
  .only-mobile { display: block; }
  .only-desktop { display: none !important; }
  /* Mobiele header: 60 px en sticky; de podia plakken eronder. */
  .rb-nav { position: sticky; top: 0; z-index: 300; }
  .rb-nav-main { min-height: var(--nav-height-mobile); }
  .rb-nav-name { font-size: 26px; }
  /* /fotografie/: rustig raster van 2 kolommen (photorows.js schuift onder 600 px niet), dus niet meer breder dan het scherm. */
  .photo-row { width: 100%; margin-left: 0; }
}

/* ---------- Gedeeld ---------- */
.m-stage {
  position: sticky; top: var(--nav-height-mobile);
  height: calc(min(100svh, 780px) - var(--nav-height-mobile));
  overflow: hidden; background: var(--paper);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.m-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.m-head { position: absolute; left: 20px; right: 20px; top: 28px; z-index: 200; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.m-label { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: var(--type-label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.m-title { margin: 0; font-family: var(--font-serif); font-size: 40px; line-height: 1; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); }
.m-title em { font-style: italic; }
.m-btn {
  min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--paper-raised); color: var(--ink); font: 600 15px/1 var(--font-sans); text-decoration: none; cursor: pointer;
}
.m-btn:hover { color: var(--ink); }
.m-btn--primary, .m-btn--primary:hover { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.m-icon-btn { width: 48px; min-height: 48px; padding: 0; font-size: 18px; }
:is(.fs, .or) :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Beelden en plaatshouders (zolang er nog geen versies zijn) vullen hun vlak. */
:is(.fs__photo, .or__link) > :is(picture, .placeholder) { position: absolute; inset: 0; }
:is(.fs__photo, .or__link) > .placeholder { background: transparent; }

/* ---------- Fotostapel ---------- */
.fs { position: relative; }
.fs.is-live { height: calc(min(100svh, 780px) - var(--nav-height-mobile) + var(--fs-run, 2200px)); }
.fs:not(.is-live) .m-stage { position: relative; top: 0; height: auto; padding: 120px 0 24px; touch-action: auto; }

.fs__deck { list-style: none; margin: 0; padding: 0; }
.fs.is-live .fs__deck {
  position: absolute; left: 50%; top: calc(50% - 14px);
  width: var(--fs-w, 280px); height: var(--fs-h, 325px); transform: translate(-50%, -50%);
}
.fs:not(.is-live) .fs__deck { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 8px; scrollbar-width: none; }
.fs:not(.is-live) .fs__card { flex: 0 0 78%; scroll-snap-align: center; aspect-ratio: 1 / 1.16; }

.fs.is-live .fs__card { position: absolute; inset: 0; will-change: transform, opacity; }
.fs__print {
  -webkit-user-drag: none;
  position: relative; width: 100%; height: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; padding: 10px 10px 0;
  border-radius: var(--radius-photo); background: var(--paper-raised); color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 2px rgba(52, 78, 65, 0.08), 0 22px 44px -24px rgba(52, 78, 65, 0.55);
  cursor: zoom-in;
}
.fs__print:hover { color: var(--ink); }
.fs__photo { position: relative; flex: 1 1 auto; display: block; overflow: hidden; border-radius: var(--radius-photo); background: var(--tint-foto); }
.fs__photo.alt { background: var(--paper-sunken); }
.fs__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.fs__glitch { position: absolute; inset: 0; opacity: 0; mix-blend-mode: multiply; box-shadow: inset 0 0 0 9999px rgba(49, 80, 184, 0.25); pointer-events: none; }
.fs__scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--cobalt); opacity: 0; pointer-events: none; }
.fs__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 4px 14px; min-width: 0; }
.fs__place { font-family: var(--font-serif); font-size: 24px; line-height: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs__land { flex: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

.fs__foot { position: absolute; left: 20px; right: 20px; bottom: 26px; z-index: 200; display: flex; flex-direction: column; gap: 14px; }
.fs:not(.is-live) .fs__foot { position: static; padding: 20px 20px 0; }
.fs__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fs__count { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }
.fs__count b { font-weight: 400; color: var(--signal); }
.fs__bars { display: flex; gap: 4px; }
.fs__bars span { flex: 1 1 0; height: 3px; border-radius: 2px; background: var(--line); transition: background-color 200ms ease; }
.fs__bars span.is-on { background: var(--signal); }
.fs__all { align-self: flex-end; }
.fs:not(.is-live) :is(.fs__meta, .fs__bars) { display: none; }

/* Lightbox (theater) binnen het podium */
.fs__lb {
  position: absolute; inset: 0; z-index: 500;
  display: flex; flex-direction: column; gap: 16px; padding: 18px 16px 22px;
  background: var(--theater-ground); color: var(--theater-ink);
  opacity: 0; transition: opacity 260ms ease;
}
.fs__lb[hidden] { display: none; }
.fs__lb.is-in { opacity: 1; }
.fs__lb :focus-visible { outline-color: var(--theater-focus); }
.fs__lb-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--theater-line); }
.fs__lb-count { font-family: var(--font-mono); font-size: 13px; color: var(--theater-ink-muted); }
.fs__lb-count b { font-weight: 400; color: var(--theater-accent); }
.fs__lb-btn { min-height: 48px; border: 1px solid var(--theater-line); border-radius: var(--radius-md); background: transparent; color: var(--theater-ink); font-size: 18px; cursor: pointer; }
.fs__lb-close { width: 44px; min-height: 44px; font-size: 22px; }
.fs__lb-stage { flex: 1 1 auto; display: flex; align-items: center; min-height: 0; }
.fs__lb-img {
  position: relative; width: 100%; max-height: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-photo);
  background: #2c3a5a; transform: scale(0.86); transition: transform 420ms var(--ease-out);
}
.fs__lb.is-in .fs__lb-img { transform: scale(1); }
.fs__lb-img.has-img { background: transparent; }
.fs__lb-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.fs__lb-img .lb-wm-sig { min-width: 72px; }
.fs__lb-place { font-family: var(--font-serif); font-size: 30px; line-height: 1; }
.fs__lb-exif { margin-top: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--theater-ink-muted); text-transform: uppercase; }
.fs__lb-nav { display: flex; gap: 10px; }
.fs__lb-nav .fs__lb-btn { flex: 1 1 0; }

/* ---------- Projectrol ---------- */
.or { position: relative; }
.or.is-live { height: calc(min(100svh, 780px) - var(--nav-height-mobile) + var(--or-run, 1600px)); }
.or:not(.is-live) .m-stage { position: relative; top: 0; height: auto; padding: 120px 0 24px; touch-action: auto; }
.or.is-headless:not(.is-live) .m-stage { padding-top: 64px; }

.or__fade { position: absolute; left: 0; right: 0; z-index: 150; pointer-events: none; }
.or__fade--top { top: 0; height: 26%; background: linear-gradient(to bottom, var(--paper) 0%, rgba(236, 234, 227, 0.9) 45%, rgba(236, 234, 227, 0) 100%); }
.or__fade--bottom { bottom: 0; height: 18%; background: linear-gradient(to top, var(--paper) 0%, rgba(236, 234, 227, 0.85) 40%, rgba(236, 234, 227, 0) 100%); }
.or:not(.is-live) :is(.or__fade, .or__brackets, .or__dots, .or__hint) { display: none; }

.or__cam { position: absolute; inset: 0; transform-origin: 50% 54%; transition: transform 600ms cubic-bezier(0.65, 0, 0.35, 1), filter 600ms ease; }
.or__cam.is-zoomed { transform: scale(1.9); filter: blur(14px); }
.or:not(.is-live) .or__cam { position: static; }
.or__persp { position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 54%; }
.or:not(.is-live) .or__persp { position: static; }
.or__drum { list-style: none; margin: 0; padding: 0; position: absolute; left: 50%; top: 54%; width: 0; height: 0; transform-style: preserve-3d; }
.or:not(.is-live) .or__drum { position: static; width: auto; height: auto; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 8px; scrollbar-width: none; }

.or__card { position: absolute; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.or:not(.is-live) .or__card { position: relative; flex: 0 0 82%; aspect-ratio: 4 / 3; scroll-snap-align: center; }
.or__link {
  -webkit-user-drag: none;
  position: absolute; inset: 0; display: block; box-sizing: border-box; overflow: hidden;
  border-radius: var(--radius-photo); background: var(--tint-project); color: var(--ink); text-decoration: none; cursor: pointer;
}
.or__link:hover { color: var(--ink); }
.or__link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.or__card--more .or__link, .or__card--more .or__link:hover { background: var(--graphite); color: var(--on-graphite); }
.or__shade { position: absolute; inset: 0; background: var(--ink); opacity: 0; pointer-events: none; }
.or__n { position: absolute; left: 12px; top: 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; }
.or__arrow { position: absolute; right: 12px; top: 8px; font-size: 18px; }
.or__text { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 2px; }
.or__title { font: 600 18px/1.2 var(--font-sans); }
.or__card--more .or__title { font: 400 30px/1.1 var(--font-serif); }
.or__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
/* Leesbaarheid van tekst op een echte foto */
.or__link:has(img) .or__text { padding: 10px 12px; margin: -10px -12px; border-radius: var(--radius-photo); background: rgba(246, 245, 241, 0.92); }
.or__link:has(img) :is(.or__n, .or__arrow) { padding: 2px 6px; margin: -2px -6px; border-radius: var(--radius-sm); background: rgba(246, 245, 241, 0.92); }

.or__brackets { position: absolute; left: 50%; top: 54%; z-index: 160; transform: translate(-50%, -50%); pointer-events: none; transition: opacity 200ms ease; }
.or__brackets i { position: absolute; width: 16px; height: 16px; border: 0 solid var(--ink); }
.or__brackets i:nth-child(1) { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.or__brackets i:nth-child(2) { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.or__brackets i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.or__brackets i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.or__dots { position: absolute; right: 8px; top: 54%; z-index: 200; display: flex; flex-direction: column; gap: 5px; transform: translateY(-50%); }
.or__dots span { width: 3px; height: 8px; border-radius: 2px; background: var(--line); transition: height 200ms ease, background-color 200ms ease; }
.or__dots span.is-on { height: 22px; background: var(--signal); }
.or__hint { position: absolute; left: 20px; bottom: 26px; z-index: 200; }

/* Modal (sheet) binnen het podium */
.or__modal { position: absolute; inset: 0; z-index: 500; pointer-events: none; }
.or__modal[hidden] { display: none; }
.or__modal.is-shown { pointer-events: auto; }
.or__backdrop { position: absolute; inset: 0; background: rgba(52, 78, 65, 0.25); opacity: 0; transition: opacity 600ms ease; }
.or__modal.is-zoomed .or__backdrop { opacity: 1; }
.or__sheet { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--paper-raised); opacity: 0; }
.or__sheet.is-up { opacity: 1; }
.or__hero { position: relative; aspect-ratio: 4 / 3; background: var(--tint-project); overflow: hidden; }
.or__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.or__close { position: absolute; right: 12px; top: 12px; width: 44px; min-height: 44px; padding: 0; font-size: 22px; opacity: 0; transition: opacity 200ms ease; }
.or__modal.is-shown .or__close { opacity: 1; }
.or__body { padding: 22px 20px 28px; display: flex; flex-direction: column; gap: 14px; opacity: 0; transform: translateY(-28px); }
.or__body h3 { margin: 0; font-family: var(--font-serif); font-size: 38px; line-height: 1; font-weight: 400; }
.or__body p { margin: 0; font-size: 17px; line-height: 1.6; }
.or__dl { margin: 4px 0 0; border-top: 1px solid var(--ink); font-family: var(--font-mono); font-size: 13px; }
.or__dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.or__dl dt { color: var(--ink-muted); }
.or__dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.or__actions { display: flex; gap: 8px; }
.or__actions .m-btn--primary { flex: 1 1 auto; }
.or__flyer { position: absolute; display: none; border-radius: var(--radius-photo); background: var(--tint-project) center / cover no-repeat; }

@media (prefers-reduced-motion: reduce) {
  :is(.fs, .or) *, :is(.fs, .or) *::before { transition: none !important; }
}
