/* ============================================================
   Photography — Editorial Gallery (BOLD EDITION)
   Dark gallery wall · contain-fit prints · immersive lightbox
   ============================================================ */

.ph-gallery {
  max-width: var(--max-w, 1480px);
  margin: 0 auto;
  padding: 5rem var(--pad-x, clamp(1.5rem, 5vw, 6rem));
}

/* Overlay labels */
.ph-num {
  position: absolute; z-index: 3;
  font-family: var(--f-disp, sans-serif);
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.22em;
  color: var(--paper, #f1ece1);
  background: rgba(10, 10, 12, 0.55);
  padding: 0.35rem 0.6rem; border-radius: 2px;
  backdrop-filter: blur(4px);
}
.ph-num-tl { top: 1rem; left: 1rem; }
.ph-caption {
  position: absolute; z-index: 3;
  font-size: 0.58rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(241, 236, 225, 0.6);
}
.ph-caption-br { bottom: 1rem; right: 1rem; }

/* Image containers — dark frames */
.ph-full-img, .ph-grid3-cell, .ph-double-cell, .ph-split-img {
  position: relative; overflow: hidden; border-radius: 2px; background: #08080a; cursor: pointer;
}
.ph-full-img img, .ph-split-img img, .ph-grid3-cell img, .ph-double-cell img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center center; display: block;
  filter: brightness(0.82) saturate(0.78);
  transition: filter 0.7s ease, transform 0.9s var(--ease, ease);
}
.ph-full-img:hover img, .ph-split-img:hover img, .ph-grid3-cell:hover img, .ph-double-cell:hover img {
  filter: brightness(1) saturate(1); transform: scale(1.02);
}

/* 001 / 007: full-width 16:9 */
.ph-full { margin: 4rem 0; }
.ph-full-img { width: 100%; aspect-ratio: 16 / 9; }

/* Splits */
.ph-split { display: flex; align-items: stretch; margin: 1.5rem 0; gap: 1.5rem; min-height: 460px; }
.ph-split-flip { flex-direction: row-reverse; }
.ph-w60 { flex: 0 0 60%; } .ph-w40 { flex: 1; min-width: 0; }
.ph-w58 { flex: 0 0 58%; } .ph-w42 { flex: 1; min-width: 0; }
.ph-split-img { flex-shrink: 0; min-height: 380px; }
.ph-split-type { display: flex; flex-direction: column; justify-content: center; padding: 3rem 2.5rem; }
.ph-type-num { font-family: var(--f-disp, sans-serif); font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; color: transparent; -webkit-text-stroke: 1px var(--faint, rgba(241,236,225,0.28)); }
.ph-type-word { font-family: var(--f-disp, sans-serif); font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; color: var(--txt, #141414); }
.ph-type-lime, .ph-type-accent { color: var(--accent-text, #5f7a14); }
.ph-type-body { margin-top: 2rem; font-family: var(--f-serif, Georgia); font-style: italic; font-size: 1.15rem; font-weight: 400; color: var(--muted, #aaa); line-height: 1.7; }

/* Camera data strip */
.ph-data-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line, rgba(241,236,225,0.12)); border-radius: 2px; margin: 3rem 0; }
.ph-data-cell { padding: 2rem 1.75rem; border-right: 1px solid var(--line, rgba(241,236,225,0.12)); display: flex; flex-direction: column; gap: 0.5rem; }
.ph-data-cell:last-child { border-right: none; }
.ph-data-lbl { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted, #999); }
.ph-data-val { font-family: var(--f-disp, sans-serif); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; color: var(--accent-text, #5f7a14); }

/* Grids */
.ph-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 1.5rem 0; }
.ph-grid3-cell { aspect-ratio: 3 / 4; }
.ph-double { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.ph-double-cell { aspect-ratio: 4 / 5; }

/* End mark */
.ph-end { display: flex; flex-direction: column; align-items: center; padding: 6rem 0 3rem; gap: 1.5rem; }
.ph-end-mark { font-family: var(--f-disp, sans-serif); font-size: clamp(3rem, 8vw, 7rem); font-weight: 800; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px var(--faint, rgba(241,236,225,0.28)); }
.ph-end-sub { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted, #999); }

/* Scroll reveal */
.ph-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1), transform 0.85s cubic-bezier(0.16,1,0.3,1); }
.ph-reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   IMMERSIVE LIGHTBOX (injected/controlled by JS)
   ============================================================ */
.lb {
  position: fixed; inset: 0; z-index: 9200;
  background: rgba(6, 6, 8, 0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease, ease), visibility 0.5s;
}
.lb.open { opacity: 1; visibility: visible; }
.lb-stage { position: relative; width: 92vw; height: 86vh; display: flex; align-items: center; justify-content: center; }
.lb-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 2px; box-shadow: 0 30px 90px rgba(0,0,0,0.6);
  opacity: 0; transform: scale(0.96); transition: opacity 0.5s var(--ease, ease), transform 0.6s var(--spring, ease);
}
.lb.open .lb-img { opacity: 1; transform: scale(1); }
.lb-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.06; border-radius: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.lb-close { position: absolute; top: 1.5rem; right: 1.75rem; width: 48px; height: 48px; border: 1px solid var(--line, rgba(255,255,255,0.15)); border-radius: 50%; background: none; color: var(--paper, #f1ece1); cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.lb-close:hover { background: var(--accent, #c9f73a); border-color: var(--accent, #c9f73a); color: #0a0a0c; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border: 1px solid var(--line, rgba(255,255,255,0.15)); border-radius: 50%; background: rgba(10,10,12,0.4); color: var(--paper, #f1ece1); cursor: pointer; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; transition: background 0.3s, border-color 0.3s; }
.lb-nav:hover { background: var(--accent, #c9f73a); border-color: var(--accent, #c9f73a); color: #0a0a0c; }
.lb-prev { left: 1.5rem; } .lb-next { right: 1.5rem; }
.lb-meta { position: absolute; bottom: -2.75rem; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; }
.lb-counter { font-family: var(--f-disp, sans-serif); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--accent, #c9f73a); }
.lb-caption { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted, #999); }

/* Responsive */
@media (max-width: 968px) {
  .ph-split, .ph-split-flip { flex-direction: column !important; min-height: auto; gap: 0; }
  .ph-w60, .ph-w40, .ph-w58, .ph-w42 { flex: none; width: 100%; }
  .ph-split-img { aspect-ratio: 4 / 3; min-height: 0; }
  .ph-split-type { padding: 2.5rem 0; }
  .ph-grid3 { grid-template-columns: 1fr 1fr; }
  .ph-grid3-cell:last-child { grid-column: span 2; aspect-ratio: 16 / 9; }
  .ph-data-strip { grid-template-columns: repeat(2, 1fr); }
  .ph-data-cell:nth-child(2) { border-right: none; }
  .ph-data-cell:nth-child(3), .ph-data-cell:nth-child(4) { border-top: 1px solid var(--line, rgba(241,236,225,0.12)); }
  .lb-stage { width: 94vw; height: 80vh; }
  .lb-nav { width: 44px; height: 44px; }
}
@media (max-width: 640px) {
  .ph-gallery { padding: 3rem var(--pad-x, 1.5rem); }
  .ph-full { margin: 2.5rem 0; }
  .ph-grid3 { grid-template-columns: 1fr; }
  .ph-grid3-cell:last-child { grid-column: auto; aspect-ratio: 3 / 4; }
  .ph-double { grid-template-columns: 1fr; }
  .ph-double-cell { aspect-ratio: 4 / 3; }
  .lb-prev { left: 0.5rem; } .lb-next { right: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-reveal { opacity: 1 !important; transform: none !important; }
}
