/* ============================================================
   V&V Renovations — NoirBuilder Stylesheet
   cdn.lnza.me/styles.css
   ============================================================ */

/* ---- Scroll animations ---- */
.scroll-hidden {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
}

/* ---- Instagram-style Gallery Grid ---- */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

@media (min-width: 640px) {
  .ig-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .ig-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ig-cell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #111;
  cursor: pointer;
  outline: none;
}

.ig-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease;
  opacity: 0.88;
}

.ig-cell:hover img,
.ig-cell:focus img {
  transform: scale(1.06);
  opacity: 1;
}

.ig-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  padding: 0.75rem 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ig-cell:hover .ig-overlay,
.ig-cell:focus .ig-overlay {
  opacity: 1;
}

.ig-overlay span {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ---- Focus ring for keyboard nav ---- */
.ig-cell:focus-visible {
  box-shadow: inset 0 0 0 3px #c9a84c;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none; /* toggled to flex by JS */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox.open {
  opacity: 1;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.lb-frame {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#lb-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

#lb-caption {
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

/* Close button */
.lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lb-close:hover {
  background: rgba(201, 168, 76, 0.3);
}

.lb-close:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 3px;
}

/* Prev / Next arrows */
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.25rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.lb-arrow:hover {
  background: rgba(201, 168, 76, 0.25);
}

.lb-arrow:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 3px;
}

.lb-prev {
  left: 1rem;
}

.lb-next {
  right: 1rem;
}

.lb-prev:hover  { transform: translateY(-50%) translateX(-2px); }
.lb-next:hover  { transform: translateY(-50%) translateX(2px); }

@media (max-width: 640px) {
  .lb-arrow {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }
  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }
}

/* ============================================================
   MISC HELPERS (kept from original)
   ============================================================ */
.hero-gradient {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.85) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Nav Grid Split-Layout */
.h-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.75rem 4rem;
  background: transparent;
  transition: background 0.4s, opacity 0.4s;
}
.h-nav.scrolled { 
  background: rgba(255, 250, 242, 0.88); 
  backdrop-filter: blur(8px); 
  border-bottom: 1px solid rgba(80, 80, 80, 0.05);
}

/* Left & Right Container Sides */
.h-nav-side-left { 
  display: flex; gap: 3.5rem; justify-content: flex-end; padding-right: 4rem; 
  list-style: none; margin: 0; padding-top: 0.25rem;
}
.h-nav-side-right { 
  display: flex; gap: 3.5rem; justify-content: flex-start; padding-left: 4rem; 
  list-style: none; margin: 0; padding-top: 0.25rem;
}

/* Links & Active Underline Indicators */
.h-nav-side-left a, .h-nav-side-right a {
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9); text-decoration: none;
  font-weight: 400;
  position: relative;
  padding-bottom: 0.4rem;
  transition: color 0.2s;
}

/* Scrolled dark text state fallback if cloud overlay lightens up */
.h-nav.scrolled a {
  color: var(--h-text);
}

.h-nav-side-left a:hover, .h-nav-side-right a:hover { 
  color: var(--h-primary); 
}

/* Elegant line matching WORK.jpg */
.h-nav-side-left a.active::after, .h-nav-side-right a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  height: 1.5px;
  background-color: currentColor;
}

/* Center Brand Area */
.h-nav-logo { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.h-nav-logo-name {
  font-family: 'Gelica Medium Italic', serif;
  font-size: 1.4rem; font-weight: 500; letter-spacing: 0.08em;
  color: #9e2a2b; line-height: 1; /* Crimson red brand color matching your mockup */
}
.h-nav-logo-tag {
  font-size: 0.55rem; letter-spacing: 0.32em; color: #9e2a2b;
  text-transform: uppercase; margin-top: 2px; opacity: 0.85;
}