/* Background drawing layer (photos page only) */
body.photos::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: url("../assets/bg/drawing.webp") center / cover no-repeat;
  opacity: 0.99;
  mix-blend-mode: multiply;
  filter: contrast(1.15) saturate(0.9);
}

.photos header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.photos .title {
  font-size: 2rem;
  letter-spacing: 0.4px;
  margin-bottom: 1.2rem;
}

.photos .page-note {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.9;
}

/* Gallery */
.gallery {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
}

figure {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.thumb {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  cursor: zoom-in;
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
}
.thumb:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

figcaption {
  font-family: monospace;
  font-size: 0.8rem;
  opacity: 0.7;
  letter-spacing: 0.3px;
  color: #e7d7d7;
}

.gallery-message { color: #fff; }

/* Film strip */
.filmstage {
  position: relative;
  margin-top: 3rem;
  --gutter: 80px;
  padding: 2.4rem var(--gutter);
  border-radius: 12px;
  width: 100%;
}

.filmstage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  z-index: 0;
  background: linear-gradient(to bottom, #3a2a2a, #2b1f1f);
  opacity: 0.95;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 10px 30px rgba(0,0,0,0.2);
}

.filmstage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  z-index: 0;

  --hole-w: 20px;
  --hole-h: 22px;
  --hole-gap: 15px;
  --hole-x: 16px;
  --hole-top: 24px;

  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent var(--hole-gap),
      var(--bg-color) var(--hole-gap),
      var(--bg-color) calc(var(--hole-gap) + var(--hole-h)),
      transparent calc(var(--hole-gap) + var(--hole-h)),
      transparent calc(var(--hole-gap) + var(--hole-h) + var(--hole-gap))
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent var(--hole-gap),
      var(--bg-color) var(--hole-gap),
      var(--bg-color) calc(var(--hole-gap) + var(--hole-h)),
      transparent calc(var(--hole-gap) + var(--hole-h)),
      transparent calc(var(--hole-gap) + var(--hole-h) + var(--hole-gap))
    );

  background-size:
    var(--hole-w) calc((var(--hole-gap) * 2) + var(--hole-h)),
    var(--hole-w) calc((var(--hole-gap) * 2) + var(--hole-h));

  background-position:
    var(--hole-x) var(--hole-top),
    right var(--hole-x) top var(--hole-top);

  background-repeat: repeat-y;
}

.filmstage .gallery {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(0, 0, 0, 0.78);
  z-index: 1000;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  width: 100%;
  max-width: 1200px;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  height: auto;
  width: auto;
  border-radius: 3px;
  cursor: zoom-out;
}

.lightbox-caption {
  color: rgba(255,255,255,0.92);
  font-family: monospace;
  font-size: 0.9rem;
  text-align: center;
  max-width: 900px;
  line-height: 1.5;
  padding: 0 0.5rem;
}

.lightbox-hint {
  color: rgba(255,255,255,0.7);
  font-family: monospace;
  font-size: 0.8rem;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
