/* ============================================================
   FINNS — Project detail + gallery + lightbox
   ============================================================ */

.proj-meta {
  display: flex; flex-wrap: wrap; gap: 14px 40px;
  margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line);
}
.proj-meta__item .k { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.proj-meta__item .v { font-size: 1rem; color: var(--text); margin-top: 5px; }

/* ---- gallery ---- */
.gallery { display: grid; gap: 14px; }
.gallery__main {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--line); cursor: zoom-in;
}
.gallery__thumbs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.gthumb {
  position: relative; aspect-ratio: 4/3; border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.gthumb:hover { border-color: var(--gold-line); transform: translateY(-2px); }
.gthumb.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.gthumb img, .gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__main .ph, .gthumb .ph { position: absolute; inset: 0; }
.gallery__zoom {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(8,9,11,0.7); border: 1px solid var(--line-2);
  color: var(--text); border-radius: 999px; padding: 8px 14px;
  font-size: 0.82rem; font-weight: 600;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.gallery__zoom svg { width: 15px; height: 15px; color: var(--gold); }

/* ---- body: narrative + sidebar ---- */
.proj-body { display: grid; grid-template-columns: 1fr 0.45fr; gap: clamp(32px, 5vw, 64px); align-items: start; margin-top: clamp(40px, 5vw, 64px); }
.proj-narr h3 { font-size: var(--fs-h3); margin: 32px 0 12px; }
.proj-narr h3:first-child { margin-top: 0; }
.proj-narr p { color: var(--text-muted); }
.proj-narr p + p { margin-top: 14px; }

.proj-side { position: sticky; top: calc(var(--header-h) + 24px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-elev); padding: 30px; }
.proj-side h4 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.specs { display: grid; gap: 0; }
.specs__row { display: grid; gap: 3px; padding: 14px 0; border-top: 1px solid var(--line); }
.specs__row:first-child { border-top: 0; padding-top: 0; }
.specs__row .k { font-size: 0.8rem; color: var(--text-dim); }
.specs__row .v { font-size: 0.96rem; color: var(--text); }
.proj-side .btn { width: 100%; margin-top: 22px; }

/* ---- next / back ---- */
.proj-nav { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-top: clamp(40px, 5vw, 64px); padding-top: 30px; border-top: 1px solid var(--line); }

/* ---- lightbox ---- */
.lb {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(6,7,9,0.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb__bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; color: var(--text-muted); }
.lb__count { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; }
.lb__close { width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: 1.5rem; line-height: 1; }
.lb__close:hover { border-color: var(--gold-line); color: var(--gold-bright); }
.lb__stage { flex: 1; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 16px 16px; min-height: 0; }
.lb__fig { flex: 1; max-width: min(1100px, 92vw); height: 100%; display: flex; align-items: center; justify-content: center; }
.lb__fig img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
.lb__fig .ph { width: min(1100px, 88vw); aspect-ratio: 16/9; max-height: 78vh; border-radius: var(--radius); }
.lb__nav {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--line-2); background: rgba(19,21,25,0.8); color: var(--text);
  display: grid; place-items: center; transition: border-color 0.2s, color 0.2s;
}
.lb__nav:hover { border-color: var(--gold); color: var(--gold-bright); }
.lb__nav svg { width: 22px; height: 22px; }
.lb__caption { text-align: center; color: var(--text-muted); font-size: 0.9rem; padding: 0 22px 18px; }

@media (max-width: 980px) {
  .proj-body { grid-template-columns: 1fr; }
  .proj-side { position: static; }
  .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .gallery__thumbs { grid-template-columns: repeat(3, 1fr); }
  .lb__nav { width: 42px; height: 42px; }
}
