/* Photo gallery lightbox — About / Quality factory and lab stills only.
   First sample; not promoted into components.css. No JS: the zoom
   anchors still open the photograph as a file.

   Full-viewport dialog carries the dimmer (not backdrop alone) so a
   translucent wash still covers the page. Alpha stays high enough
   that the line-stills bar does not read as lightbox chrome. The
   inner panel shrink-wraps the scaled photograph. Desktop nav stays
   off the still (same reason as .capability-controls sitting
   outside the film). */

.photo-gallery .photo-zoom {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}
.photo-gallery .photo-zoom:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.photo-gallery-hint {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.photo-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  background: rgba(10, 16, 32, 0.70);
  color: #e8edf3;
  box-sizing: border-box;
}
.photo-lightbox::backdrop {
  background: rgba(10, 16, 32, 0.70);
}

.photo-lightbox__panel {
  width: fit-content;
  max-width: 100%;
  padding: 12px 12px 14px;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  box-sizing: border-box;
}

.photo-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.photo-lightbox__count {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

/* Hairline icon chrome — same family as .capability-controls button. */
.photo-lightbox__icon {
  appearance: none;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: rgba(11, 18, 32, 0.55);
  color: #fff;
  cursor: pointer;
}
.photo-lightbox__icon:hover {
  background: rgba(255, 255, 255, 0.12);
}
.photo-lightbox__icon:focus-visible {
  outline: 2px solid #0785B1;
  outline-offset: 2px;
}
.photo-lightbox__nav:disabled {
  opacity: 0.32;
  cursor: default;
  background: rgba(11, 18, 32, 0.35);
}
.photo-lightbox__nav:disabled:hover {
  background: rgba(11, 18, 32, 0.35);
}

.photo-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
}
.photo-lightbox__frame {
  flex: 0 1 auto;
  min-width: 0;
  line-height: 0;
  background: #0b1220;
}
.photo-lightbox__frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1280px, calc(100vw - 168px));
  max-height: calc(100vh - 156px);
  margin: 0;
  object-fit: contain;
}
.photo-lightbox__frame img.is-changing {
  opacity: 0.4;
}
.photo-lightbox--single .photo-lightbox__frame img {
  max-width: min(1400px, calc(100vw - 48px));
}

.photo-lightbox__cap {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
}
.photo-lightbox__cap strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .photo-lightbox[open] {
    padding: 10px;
  }
  .photo-lightbox__panel {
    padding: 10px 10px 12px;
    width: 100%;
  }
  .photo-lightbox__stage {
    position: relative;
    display: block;
    width: 100%;
  }
  .photo-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
  }
  .photo-lightbox__nav[data-photo-prev] { left: 8px; }
  .photo-lightbox__nav[data-photo-next] { right: 8px; }
  .photo-lightbox__frame img,
  .photo-lightbox--single .photo-lightbox__frame img {
    max-width: 100%;
    max-height: calc(100vh - 168px);
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-gallery figure:hover {
    transform: none;
  }
  .photo-lightbox__frame img,
  .photo-lightbox__frame img.is-changing {
    opacity: 1;
  }
}
