/* DC — Bento Gallery (compact, more copy in header) */
.dc-gallery {
  background: var(--sf-paper);
  color: var(--sf-ink);
  padding-block: clamp(60px, 6.5vw, 100px);
}
.dc-gallery__head {
  display: grid;
  grid-template-columns: 1.5fr auto;
  gap: 30px;
  align-items: end;
  margin-bottom: 30px;
}
.dc-gallery__title { margin: 14px 0 14px; max-width: 18ch; font-size: clamp(26px, 2.8vw, 40px); font-weight: 600; }
.dc-gallery__lead { margin: 0; color: var(--sf-ink-mute); font-size: 14.5px; line-height: 1.6; max-width: 56ch; }

.dc-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(130px, 13vw, 200px);
  gap: 12px;
}
.dc-gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 3px solid var(--sf-surface);
  display: block;
  box-shadow: var(--dc-shadow-soft);
  transition: transform var(--dc-dur) var(--dc-ease), box-shadow var(--dc-dur) var(--dc-ease);
}
.dc-gallery__item:nth-child(2) { transform: translateY(8px); }
.dc-gallery__item:nth-child(5) { transform: translateY(8px); }
.dc-gallery__item:hover { transform: translateY(-4px) !important; box-shadow: var(--dc-shadow-card); }
.dc-gallery__item--md   { grid-column: span 2; }
.dc-gallery__item--lg   { grid-column: span 2; grid-row: span 2; }
.dc-gallery__item--tall { grid-row: span 2; }
.dc-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--dc-ease), filter 1.4s var(--dc-ease);
}
.dc-gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(13,74,61,0.78) 100%);
  opacity: 0.5;
  transition: opacity var(--dc-dur) var(--dc-ease);
}
.dc-gallery__item:hover img { transform: scale(1.06); }
.dc-gallery__item:hover::after { opacity: 0.85; }

.dc-gallery__caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--dc-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sf-light);
  z-index: 2;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity var(--dc-dur) var(--dc-ease), transform var(--dc-dur) var(--dc-ease);
  font-weight: 700;
}
.dc-gallery__item:hover .dc-gallery__caption { opacity: 1; transform: translateY(0); }
.dc-gallery__arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sf-yellow);
  color: var(--sf-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dc-gallery__arrow svg { width: 12px; height: 12px; }

/* Lightbox */
.dc-gallery__lightbox[hidden] { display: none !important; }
.dc-gallery__lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 74, 61, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vw;
}
.dc-gallery__lb-figure { margin: 0; max-width: min(1200px, 90vw); max-height: 86vh; }
.dc-gallery__lb-figure img {
  width: auto;
  max-width: 100%;
  max-height: 86vh;
  border-radius: 18px;
  display: block;
}
.dc-gallery__lb-figure figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: var(--dc-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(252,250,243,0.65);
  font-weight: 700;
}
.dc-gallery__lb-close,
.dc-gallery__lb-nav {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(252,250,243,0.3);
  background: rgba(252,250,243,0.08);
  color: var(--sf-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dc-gallery__lb-close { top: 24px; right: 24px; transform: rotate(45deg); }
.dc-gallery__lb-close svg { width: 20px; height: 20px; }
.dc-gallery__lb-nav:hover,
.dc-gallery__lb-close:hover { background: var(--sf-red); border-color: var(--sf-red); }
.dc-gallery__lb-nav { top: 50%; transform: translateY(-50%); }
.dc-gallery__lb-nav--prev { left: 24px; transform: translateY(-50%) scaleX(-1); }
.dc-gallery__lb-nav--next { right: 24px; }
.dc-gallery__lb-nav svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .dc-gallery__head { grid-template-columns: 1fr; }
  .dc-gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .dc-gallery__item--md,
  .dc-gallery__item--lg { grid-column: span 2; }
  .dc-gallery__item--lg,
  .dc-gallery__item--tall { grid-row: span 1; }
}
