/* Dreams in frames — The Darkroom */

:root {
  --bg: #0c0b09;
  --text: #e8e4dc;
  --muted: #8a8578;
  --border: #2a2722;
  --accent: #e8e4dc;
  --gap: 12px;
  --row-gap: clamp(40px, 8vw, 144px);
  --inner-gap: clamp(18px, 3.5vw, 48px);
  --content-pad: clamp(20px, 7vw, 112px);
  --home-row-gap: clamp(64px, 12vw, 220px);
  --home-top-pad: clamp(28px, 7vw, 72px);
  --top-gap: clamp(16px, 4vw, 48px);
  --shoot-gap: clamp(20px, 3.6vw, 56px);
  --title-top-gap: clamp(10px, 2.2vw, 20px);
  --title-bottom-gap: clamp(14px, 2.8vw, 24px);
  --title-size: clamp(18px, 4vw, 40px);
  --max: 1400px;
  --header: clamp(68px, 11vw, 128px);
  --font-mono: "IBM Plex Mono", "SF Mono", "Fira Mono", "Roboto Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Lock scroll when lightbox is open */
body.lb-open { overflow: hidden; }

/* Film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/png;base64,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");
  background-repeat: repeat;
  background-size: 150px 150px;
  animation: grainShift 0.8s steps(4) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2px, 3px); }
  50%  { transform: translate(3px, -1px); }
  75%  { transform: translate(-1px, -3px); }
  100% { transform: translate(2px, 1px); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

/* ── Scroll progress bar (shoot pages) ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 10001;
}

@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: progressGrow linear forwards;
    animation-timeline: scroll();
  }
  @keyframes progressGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }
}

/* ── Scroll-down hint arrow ── */
.scroll-hint {
  position: fixed;
  bottom: clamp(18px, 4vw, 36px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  opacity: 0.9;
  transition: opacity 400ms ease;
  animation: hintBounce 2s ease-in-out infinite;
}
.scroll-hint svg {
  width: clamp(48px, 8vw, 68px);
  height: clamp(48px, 8vw, 68px);
  display: block;
}
.scroll-hint:hover { opacity: 1; color: var(--text); }
.scroll-hint.hidden { opacity: 0; pointer-events: none; }

@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
}

/* ── Home: two albums per row with film strip carousels ── */
.home .home-list {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 96px);
  padding: clamp(32px, 6vh, 80px) 0 clamp(48px, 8vw, 96px);
}
.home .shoot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--title-bottom-gap);
  min-width: 0; /* prevent grid blowout from film strip */
}

/* Visible shoot title on homepage */
.home .shoot .shoot-title {
  display: block;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.home .shoot .shoot-title span {
  display: inline-block;
  font-size: clamp(16px, 2.2vw, 26px);
  line-height: 1.15;
}
.home .shoot .shoot-title:hover { opacity: 0.8; }

/* "View contact sheet" link under the film strip on home */
.shoot-link {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.4vw, 13px);
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 200ms ease;
  align-self: flex-end;
  margin-top: 4px;
}
.shoot-link:hover { color: var(--accent); }


img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--content-pad); }

.site-header {
  position: static;
  top: auto;
  z-index: auto;
  height: var(--header);
  background: var(--bg);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.brand-logo { height: clamp(100px, 20vw, 200px); width: auto; display: block; mix-blend-mode: lighten; }
video.brand-logo { object-fit: contain; }

.home-list { display: flex; flex-direction: column; gap: var(--home-row-gap); padding: var(--home-top-pad) 0 var(--home-row-gap); }

.shoot { display: block; }
.shoot:hover .shoot-title { opacity: 0.9; }

/* Mobile overrides */
@media (max-width: 820px) {
  :root { --content-pad: 0; }
  .shoot-grid .cell { align-items: stretch; }
  .shoot-grid .image { width: 100%; margin: 0; max-width: 100%; }
  .shoot-header { padding-left: 0; width: auto; margin: 0; }
  .shoot-grid .cell { width: auto; max-width: none; margin: 0; }
}

/* ── Album grid — base image styles ── */
.shoot-grid .image {
  border: none;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 4px 20px rgba(0,0,0,0.4);
}

/* Subtle vignette (album grid — "developed" photos) */
.shoot-grid .image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background:
    radial-gradient(circle at 50% 50%,
      transparent 55%, rgba(0,0,0,0.15) 100%
    );
}

.shoot-grid .image img { width: 100%; height: auto; transform: translateZ(0); }

/* ── Frame burn loading effect ── */
.shoot-grid .image {
  background: linear-gradient(105deg,
    #d4852e 0%,
    #a04510 16%,
    #4a1800 38%,
    var(--bg) 62%
  );
}

.shoot-grid .image:not(.loaded) {
  min-height: 200px;
  animation: burnFlicker 2.5s ease-in-out infinite;
}

@keyframes burnFlicker {
  0%, 100% { background-position: 0% 0%; opacity: 1; }
  50%      { opacity: 0.88; }
}

.shoot-grid .image img,
.shoot-grid .image picture {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.shoot-grid .image.loaded img,
.shoot-grid .image.loaded picture {
  opacity: 1;
}

.shoot-title { display: none; }

/* ── 35mm Film Strip Carousel (homepage) ──
   135 still film geometry: 24x36mm frame, 35mm strip width,
   4.75mm perforation pitch, 8 perfs per frame, 2mm frame gap. */
.film-carousel {
  --film-frame-h: 160px;
  --film-frame-w: calc(var(--film-frame-h) * 1.5);
  --film-rail: calc(var(--film-frame-h) * 0.22917);
  --film-gap: calc(var(--film-frame-h) * 0.08333);
  --film-perf-pitch: calc(var(--film-frame-h) * 0.19792);
  --film-strip-h: calc(var(--film-frame-h) * 1.45833);
  --film-base: #2b1908;
  --film-window: #382210;
  --film-edge: #3d2810;
  width: 100%;
  display: flex;
  align-items: center;
  min-height: var(--film-strip-h);
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 0;
  clip-path: inset(0 100% 0 0);
  animation: filmUnroll 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.film-carousel::-webkit-scrollbar { display: none; }
.film-carousel.dragging { cursor: grabbing; }

.film-track {
  display: flex;
  align-items: center;
  gap: var(--film-gap);
  padding: var(--film-rail) 0;
  background-color: var(--film-base);
  min-width: max-content;
  position: relative;
  /* KS perforations, scaled from a 4.75x5.5mm rail cell. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 475 550'%3E%3Crect x='98' y='176' width='279' height='198' rx='45' fill='%230c0b09'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 475 550'%3E%3Crect x='98' y='176' width='279' height='198' rx='45' fill='%230c0b09'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(255,255,255,0.035), transparent 12%, transparent 88%, rgba(255,255,255,0.025));
  background-size: var(--film-perf-pitch) var(--film-rail), var(--film-perf-pitch) var(--film-rail), 100% 100%;
  background-position: left top, left bottom, center;
  background-repeat: repeat-x, repeat-x, no-repeat;
  border-top: 2px solid var(--film-edge);
  border-bottom: 2px solid var(--film-edge);
  counter-reset: filmframe;
}

/* Thin separator lines at rail/image boundary */
.film-track::before,
.film-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
  z-index: 2;
}
.film-track::before { top: var(--film-rail); }
.film-track::after  { bottom: var(--film-rail); }

/* Unroll animation — strip reveals left to right */
@keyframes filmUnroll {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* After animation: remove clip-path so hover/scroll work normally */
.film-carousel.ready {
  animation: none;
  clip-path: none;
}

/* Staggered frame reveal */
@keyframes frameReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Tail — empty film base */
.film-tail {
  flex-shrink: 0;
  width: calc(var(--film-perf-pitch) * 8);
  height: var(--film-frame-h);
}

/* Individual film frames */
.film-frame {
  flex-shrink: 0;
  width: var(--film-frame-w);
  height: var(--film-frame-h);
  display: block;
  overflow: visible;
  background: var(--film-window);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  counter-increment: filmframe;
  /* Staggered reveal — each frame fades in after the unroll starts */
  opacity: 0;
  animation: frameReveal 0.5s ease-out both;
  animation-delay: calc(0.5s + var(--i, 0) * 0.07s);
}
/* After animation completes, restore normal transitions for hover */
.film-carousel.ready .film-frame {
  animation: none;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.film-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  clip-path: inset(0);
}
/* Portrait photos — pillarboxed inside the standard landscape frame */
.film-frame.portrait img {
  object-fit: contain;
}

/* Edge numbers, aligned on both outer rebates of the 8-perf frame repeat. */
.film-frame::before,
.film-frame::after {
  content: counter(filmframe, decimal-leading-zero);
  position: absolute;
  left: calc(var(--film-perf-pitch) * 0.45);
  font-family: var(--font-mono);
  font-size: clamp(8px, 1.2vw, 11px);
  color: rgba(214, 176, 102, 0.68);
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  opacity: 0.8;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0,0,0,0.65);
}
.film-frame::before { top: calc(var(--film-rail) * -0.98); }
.film-frame::after { top: calc(100% + var(--film-rail) * 0.72); }

/* Hover — brighten frame */
@media (hover: hover) and (pointer: fine) {
  .film-frame { transition: opacity 0.15s ease, box-shadow 0.15s ease; }
  .film-carousel:not(.dragging) .film-frame:hover {
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.12),
      0 0 12px rgba(255,255,255,0.06);
  }
  /* Dim siblings on hover */
  .film-track:has(.film-frame:hover) .film-frame:not(:hover) {
    opacity: 0.5;
  }
}

/* Mobile film strip */
@media (max-width: 820px) {
  .film-carousel {
    --film-frame-h: 110px;
  }
}

/* ── Contact Sheet — cut film strips laid on photographic paper ── */
.contact-sheet {
  --cs-frame-basis: 15.9292035%; /* 36 / (6*36 + 5*2) */
  --cs-frame-gap: 0.8849558%; /* 2 / 226 */
  --cs-rail-x: 2.4336283%; /* 5.5 / 226 */
  --cs-rail-y: 15.7142857%; /* 5.5 / 35 */
  --cs-perf-pitch: 2.1017699%; /* 4.75 / 226 */
  --cs-strip-ratio: 226 / 35;
  --cs-strip-gap: clamp(8px, 1.5vw, 14px);
  --cs-pad: clamp(16px, 3vw, 32px);
  --cs-base: #2b1908;
  --cs-window: #1a1408;
  background: #141210;
  border: 1px solid #2a2520;
  padding: var(--cs-pad);
  margin-top: var(--shoot-gap);
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03),
    0 8px 40px rgba(0,0,0,0.5);
}

/* Subtle paper texture */
.contact-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAaklEQVR4nO3QMQEAAAjDMKZf8cBgJxXBd/bM7NV7YIUREUZEGBFhRIQREUZEGBFhRIQREUZEGBFhRIQREUZEGBFhRIQREUZEGBFhRIQREUZEGBFhRIQREUZEGBFhRIQREUZEGBFxAKg9A7GhPmZEAAAAAElFTkSuQmCC");
  background-repeat: repeat;
  background-size: 50px 50px;
}

.cs-header {
  display: flex;
  align-items: baseline;
  gap: clamp(12px, 3vw, 24px);
  margin-bottom: clamp(10px, 2vw, 18px);
  padding-bottom: clamp(8px, 1.5vw, 12px);
  border-bottom: 1px solid #2a2520;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.cs-stock {
  font-family: var(--font-mono);
  font-size: clamp(8px, 1.2vw, 11px);
  color: #6b5a42;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cs-label {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.3vw, 12px);
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

.cs-info {
  font-family: var(--font-mono);
  font-size: clamp(8px, 1.2vw, 11px);
  color: #5a5347;
  letter-spacing: 0.06em;
  margin-left: auto;
}

/* Vertical stack of film strips — show at most 3 rows */
.cs-grid {
  display: flex;
  flex-direction: column;
  gap: var(--cs-strip-gap);
  position: relative;
  z-index: 2;
}
.cs-strip:nth-child(n+4) { display: none; }

/* Each strip = one cut piece of film with sprocket holes */
.cs-strip {
  display: flex;
  align-items: stretch;
  gap: var(--cs-frame-gap);
  background-color: var(--cs-base);
  padding: var(--cs-rail-x) 0;
  position: relative;
  aspect-ratio: var(--cs-strip-ratio);
  overflow: hidden;
  /* KS perforations, 8 per frame, scaled to the contact-strip width. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 475 550'%3E%3Crect x='98' y='176' width='279' height='198' rx='45' fill='%23141210'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 475 550'%3E%3Crect x='98' y='176' width='279' height='198' rx='45' fill='%23141210'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(255,255,255,0.03), transparent 14%, transparent 86%, rgba(255,255,255,0.02));
  background-size: var(--cs-perf-pitch) var(--cs-rail-y), var(--cs-perf-pitch) var(--cs-rail-y), 100% 100%;
  background-position: left top, left bottom, center;
  background-repeat: repeat-x, repeat-x, no-repeat;
  border-top: 1.5px solid #3d2810;
  border-bottom: 1.5px solid #3d2810;
}

/* Thin lines at rail/image boundary */
.cs-strip::before,
.cs-strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
  z-index: 2;
}
.cs-strip::before { top: var(--cs-rail-y); }
.cs-strip::after  { bottom: var(--cs-rail-y); }

/* Six full-frame exposures: 36mm image + 2mm inter-frame gap. */
.cs-frame {
  flex: 0 0 var(--cs-frame-basis);
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: visible;
  background: var(--cs-window);
  --cs-frame-rail: 22.9167%; /* 5.5mm rail relative to 24mm image height */
}

.cs-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease-out;
  clip-path: inset(0);
}

.cs-frame.loaded img {
  opacity: 1;
}

/* Edge numbers sit on both outer rebates, outside the sprocket rows. */
.cs-num,
.cs-frame::after {
  position: absolute;
  left: 3%;
  font-family: var(--font-mono);
  font-size: clamp(6px, 0.8vw, 9px);
  color: rgba(214, 176, 102, 0.62);
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 3;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0,0,0,0.65);
}
.cs-num {
  top: calc(var(--cs-frame-rail) * -0.98);
}
.cs-frame::after {
  content: attr(data-frame);
  top: calc(100% + var(--cs-frame-rail) * 0.72);
}

/* Hover states */
@media (hover: hover) and (pointer: fine) {
  .cs-frame {
    transition: box-shadow 0.15s ease;
  }
  .cs-frame:hover {
    z-index: 4;
    box-shadow: 0 0 0 2px rgba(232, 228, 220, 0.3);
  }
  .cs-strip:has(.cs-frame:hover) .cs-frame:not(:hover) {
    opacity: 0.5;
    transition: opacity 0.15s ease;
  }
}

/* Mobile — 3×3 contact sheet */
@media (max-width: 820px) {
  .contact-sheet {
    --cs-frame-basis: 32.1428571%; /* 36 / (3*36 + 2*2) */
    --cs-frame-gap: 1.7857143%; /* 2 / 112 */
    --cs-rail-x: 4.9107143%; /* 5.5 / 112 */
    --cs-perf-pitch: 4.2410714%; /* 4.75 / 112 */
    --cs-strip-ratio: 112 / 35;
    --cs-strip-gap: 8px;
  }
  /* Show only 3 frames per strip on mobile */
  .cs-frame:nth-of-type(n+4) { display: none; }
  .cs-header { gap: 8px; }
  .cs-info { margin-left: 0; width: 100%; }
}

/* "Scanned roll" CTA — pinned to bottom of hero, same spot as home arrow */
.develop-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 8px 16px clamp(18px, 4vw, 36px);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  opacity: 0.9;
  transition: opacity 400ms ease;
  animation: developBounce 2s ease-in-out infinite;
}
.develop-cta:hover { opacity: 1; }
.develop-cta .develop-text {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.6vw, 13px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.develop-cta svg {
  width: clamp(48px, 8vw, 68px);
  height: clamp(48px, 8vw, 68px);
  display: block;
}

@keyframes developBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .develop-cta { animation: none; }
  .film-carousel { animation: none; clip-path: none; }
  .film-frame { animation: none; opacity: 1; }
}

/* ── Shoot detail page ── */
.shoot-detail { padding: 0 0 var(--row-gap); }
.container > .shoot-detail { margin-top: 0; }

/* Title + contact sheet — fills the first viewport */
.shoot-hero {
  min-height: calc(100svh - var(--header-total, var(--header)));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: clamp(32px, 6vh, 80px);
  gap: var(--title-bottom-gap);
}

.shoot-header { text-align: left; padding-left: 0; margin-top: 0; }
.shoot-header h1 {
  margin: 0 0 var(--title-bottom-gap);
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  font-size: clamp(16px, 2.2vw, 26px);
  line-height: 1.15;
  color: var(--accent);
  padding-bottom: var(--title-bottom-gap);
  border-bottom: 1px solid var(--border);
}

/* ── Contact-sheet grid (shoot pages) — starts on a new "page" ── */
.shoot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--shoot-gap);
  align-items: start;
  counter-reset: frame;
  padding-top: clamp(20px, 4vw, 48px);
}
.shoot-grid .cell {
  overflow: visible;
  border-radius: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  counter-increment: frame;
  transition: opacity 0.3s ease;
}
.shoot-grid .cell::before {
  content: counter(frame, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.4vw, 12px);
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.shoot-grid .image { position: relative; width: 100%; overflow: hidden; }
.shoot-grid .image a { display: block; cursor: zoom-in; }
.shoot-grid .cell img { width: 100%; height: auto; display: block; }

/* Under-photo captions (shoot grid) */
.shoot-grid .image-caption {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--muted);
  font-size: clamp(10px, 1.4vw, 12px);
  letter-spacing: 0.04em;
  display: none !important;
}

/* ── :has() hover — dim siblings ── */
@media (hover: hover) and (pointer: fine) {
  .shoot-grid:has(.cell:hover) .cell:not(:hover) {
    opacity: 0.35;
  }
}

/* ── Scroll to top (album pages) ── */
.scroll-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: clamp(32px, 6vw, 64px) auto 0;
  padding: 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  color: var(--muted);
  opacity: 0.7;
  transition: opacity 200ms ease, color 200ms ease, border-color 200ms ease;
}
.scroll-top:hover {
  opacity: 1;
  color: var(--accent);
  border-color: rgba(232, 228, 220, 0.3);
}
.scroll-top svg {
  width: clamp(32px, 5vw, 44px);
  height: clamp(32px, 5vw, 44px);
  display: block;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(14px, 2.5vw, 22px) 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.site-footer .footer-inner { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* ── Responsive grid ── */
@media (min-width: 700px) {
  :root { --gap: 14px; }
  .shoot-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
  }
  .shoot-grid .cell.span-2 { grid-column: span 2; }
}

@media (min-width: 1100px) {
  :root { --gap: 16px; --max: 1440px; }
  .shoot-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
  }
  .shoot-grid .cell.span-2 { grid-column: span 2; }
}

/* ── Hover: lift the album grid card ── */
@media (hover: hover) and (pointer: fine) {
  .shoot-grid .image { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .shoot-grid .cell:hover .image {
    transform: translateY(-3px);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.08),
      0 8px 30px rgba(0,0,0,0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shoot-grid .cell img { transition: none; }
  .shoot-grid .image-caption { transition: none; }
}

/* ── Scroll-driven reveal animations ── */
@supports (animation-timeline: view()) {
  .shoot-grid .cell {
    animation: cellReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }

  @keyframes cellReveal {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  .home .shoot {
    animation: shootReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }

  @keyframes shootReveal {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .shoot-grid .cell,
  .home .shoot {
    animation: none !important;
  }
}

/* ── JS Lightbox ── */
.lb {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 11, 9, 0.97);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.lb.active {
  opacity: 1;
  visibility: visible;
}

.lb-img {
  max-width: 96vw;
  max-height: 94vh;
  object-fit: contain;
  border: 3px solid var(--text);
  opacity: 0;
  transition: opacity 300ms ease;
  will-change: transform;
}
.lb-img.loaded { opacity: 1; }

/* Counter */
.lb-counter {
  position: absolute;
  bottom: clamp(10px, 2.5vw, 20px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.4vw, 13px);
  color: var(--muted);
  letter-spacing: 0.1em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 7vw, 60px);
  height: clamp(44px, 7vw, 60px);
  border: 1px solid rgba(232, 228, 220, 0.2);
  background: rgba(12, 11, 9, 0.5);
  color: var(--text);
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 400ms ease, background-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.lb-close svg, .lb-prev svg, .lb-next svg {
  width: clamp(20px, 3.5vw, 30px);
  height: auto;
  display: block;
  pointer-events: none;
}

.lb-close { top: clamp(10px, 2.5vw, 20px); right: clamp(10px, 2.5vw, 20px); }
.lb-prev { left: clamp(8px, 2vw, 20px); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(8px, 2vw, 20px); top: 50%; transform: translateY(-50%); }

/* Show controls on hover/touch */
.lb:hover .lb-close,
.lb:hover .lb-prev,
.lb:hover .lb-next,
.lb:hover .lb-counter,
.lb.ui-active .lb-close,
.lb.ui-active .lb-prev,
.lb.ui-active .lb-next,
.lb.ui-active .lb-counter { opacity: 1; }

.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(232, 228, 220, 0.1);
  border-color: rgba(232, 228, 220, 0.4);
}

/* Touch devices — always show controls */
@media (hover: none) and (pointer: coarse) {
  .lb.active .lb-close,
  .lb.active .lb-prev,
  .lb.active .lb-next,
  .lb.active .lb-counter { opacity: 1; }
  .lb-prev, .lb-next {
    width: 44px;
    height: 44px;
  }
}

/* Mobile — edge-to-edge image */
@media (max-width: 820px) {
  .lb-img {
    max-width: 100vw;
    max-height: 92vh;
    border-width: 0;
  }
}
