/* ============================================================
   ITERA — INSTALLATION SECTION (scaffold for 3 layout variants)
   Shared chrome + lightbox; variant classes: A=.ig  B=.reel/.pstrip  C=.feat
   This file is only linked by the install-*.html comparison pages, so the
   shipped index.html is untouched until a variant is chosen.
============================================================ */

.install {
  padding: clamp(70px, 13vh, 160px) var(--gutter);
  background: var(--bg-soft);
}
.install__inner { max-width: var(--max); margin: 0 auto; }
.install__lede {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(18px, 2.1vw, 24px); line-height: 1.45; letter-spacing: -0.005em;
  color: var(--ink-dim); max-width: 760px; margin: 0 0 clamp(36px, 5vw, 60px);
}
.install__lede em { color: var(--gold); font-style: italic; }

/* shared media chrome */
.inst-media {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); background: #000;
}
img.inst-media { cursor: zoom-in; transition: filter 0.4s ease; }
img.inst-media:hover { filter: brightness(1.08); }
.inst-cap {
  margin-top: 0.8em;
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--ink-dim); line-height: 1.4;
}

/* ---------- Wide block: one landscape clip full-width (OR has a 16:9 clip) ---------- */
.install__wide { margin: 0 0 clamp(22px, 3.4vw, 40px); }
.install__wide .inst-media { width: 100%; }

/* ---------- Variant A: documentary masonry gallery (.ig) ---------- */
.ig { columns: 3; column-gap: clamp(12px, 1.6vw, 20px); }
@media (max-width: 900px) { .ig { columns: 2; } }
@media (max-width: 560px) { .ig { columns: 1; } }
.ig__item { break-inside: avoid; margin: 0 0 clamp(12px, 1.6vw, 20px); }

/* ---------- Variant B: vertical-reel wall + photo strip ---------- */
.reel {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.6vw, 20px);
}
@media (max-width: 900px) { .reel { grid-template-columns: repeat(2, 1fr); } }
.reel__item { margin: 0; }
.pstrip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
  margin-top: clamp(22px, 3.4vw, 40px);
}
@media (max-width: 760px) { .pstrip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .pstrip { grid-template-columns: repeat(2, 1fr); } }
.pstrip__item { margin: 0; }

/* ---------- Variant C: feature split + secondary strip ---------- */
.feat {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.6vw, 36px); align-items: stretch;
}
/* Mobile: stack, and give the abs-positioned feature video a box to fill. */
@media (max-width: 820px) { .feat { grid-template-columns: 1fr; } .feat__main { aspect-ratio: 3 / 4; } }
/* Desktop: feature has no intrinsic height (abs media), so the grid row height
   equals the side block; align-items:stretch then makes the feature exactly as
   tall as the side grid, and the video fills it cropped from the BOTTOM. */
.feat__main { margin: 0; position: relative; }
.feat__main .inst-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
}
.feat__side {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 18px);
}
.feat__cell { margin: 0; }
/* Uniform side cells: every cell is the same 3:4 shape, cropped from the
   bottom, so each row's bottom edges line up. */
.feat__cell .inst-media {
  width: 100%; aspect-ratio: 3 / 4;
  object-fit: cover; object-position: top;
}
.feat__strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
  margin-top: clamp(22px, 3.4vw, 40px);
}
@media (max-width: 620px) { .feat__strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- lightbox (photos only) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  display: none; align-items: center; justify-content: center;
  padding: clamp(20px, 5vw, 72px);
  background: rgba(2, 2, 2, 0.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.4s ease;
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox__img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox__close {
  position: absolute; top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px);
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  font-size: 26px; line-height: 1; cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.lightbox__close:hover { border-color: var(--gold); color: var(--gold); background: rgba(214, 178, 105, 0.08); }
