/* DNA YOUR ART — editorial masonry gallery */
.gallery-visual {
  --gallery-gap: clamp(8px, .9vw, 14px);
  background: #f3efe7;
  color: #11110f;
  padding: clamp(96px, 9vw, 132px) clamp(12px, 2vw, 30px) clamp(34px, 4vw, 64px);
  min-height: 100svh;
}

.gallery-visual__intro {
  max-width: 1480px;
  margin: 0 auto clamp(22px, 3vw, 40px);
  padding: 0 clamp(2px, .4vw, 8px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(17,17,15,.2);
  padding-bottom: 14px;
}
.gallery-visual__eyebrow {
  font: 700 12px/1.2 Arial, sans-serif;
  letter-spacing: .26em;
}
.gallery-visual__intro p {
  margin: 0;
  font: 400 clamp(15px, 1.15vw, 19px)/1.3 Georgia, "Times New Roman", serif;
  color: rgba(17,17,15,.72);
}

/* Masonry via CSS columns: natural photo ratios, no empty black blocks */
.gallery-visual__grid {
  max-width: 1480px;
  margin: 0 auto;
  column-count: 3;
  column-gap: var(--gallery-gap);
}

.gallery-photo {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--gallery-gap);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
  break-inside: avoid;
  vertical-align: top;
}
.gallery-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .3s ease;
}
.gallery-photo::after {
  content: "+";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.85);
  background: rgba(10,10,9,.34);
  color: #fff;
  display: grid;
  place-items: center;
  font: 300 22px/1 Arial, sans-serif;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .22s ease, transform .22s ease, background .22s ease;
}
.gallery-photo:focus-visible {
  outline: 2px solid #b18b4a;
  outline-offset: 3px;
}
@media (hover:hover) and (pointer:fine) {
  .gallery-photo:hover img { transform: scale(1.018); }
  .gallery-photo:hover::after { opacity: 1; transform: none; }
}

/* Viewer */
.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5,5,5,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  touch-action: pan-y;
}
.gallery-viewer.is-open { display: flex; }
.gallery-viewer__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(58px, env(safe-area-inset-top)) clamp(18px, 5vw, 90px) max(42px, env(safe-area-inset-bottom));
}
.gallery-viewer__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-viewer__close,
.gallery-viewer__nav {
  position: absolute;
  z-index: 3;
  border: 0;
  color: #fff;
  background: rgba(15,15,15,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.gallery-viewer__close {
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font: 300 32px/1 Arial, sans-serif;
}
.gallery-viewer__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 74px;
  font: 300 46px/1 Georgia, serif;
}
.gallery-viewer__nav--prev { left: max(10px, env(safe-area-inset-left)); }
.gallery-viewer__nav--next { right: max(10px, env(safe-area-inset-right)); }
.gallery-viewer__close:hover { background: rgba(198,163,97,.78); transform: scale(1.04); }
.gallery-viewer__nav:hover { background: rgba(198,163,97,.78); }
.gallery-viewer__dots {
  position: absolute;
  bottom: max(15px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}
.gallery-viewer__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
}
.gallery-viewer__dot.is-active { background: #fff; transform: scale(1.35); }
body.gallery-viewer-open { overflow: hidden; }

@media (max-width: 980px) {
  .gallery-visual__grid { column-count: 2; }
  .gallery-visual { padding-top: 92px; }
}

@media (max-width: 620px) {
  .gallery-visual {
    padding: 82px 7px calc(92px + env(safe-area-inset-bottom));
  }
  .gallery-visual__intro {
    margin-bottom: 10px;
    padding: 0 7px 11px;
    align-items: center;
  }
  .gallery-visual__eyebrow { font-size: 10px; letter-spacing: .22em; }
  .gallery-visual__intro p { font-size: 14px; }
  .gallery-visual__grid {
    column-count: 2;
    column-gap: 5px;
  }
  .gallery-photo { margin-bottom: 5px; }
  .gallery-photo::after {
    opacity: .88;
    width: 28px;
    height: 28px;
    right: 7px;
    bottom: 7px;
    font-size: 18px;
  }
  .gallery-viewer__stage {
    padding: max(62px, env(safe-area-inset-top)) 8px max(58px, env(safe-area-inset-bottom));
  }
  .gallery-viewer__nav {
    top: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    background: rgba(8,8,8,.38);
  }
  .gallery-viewer__nav--prev { left: 18px; }
  .gallery-viewer__nav--next { right: 18px; }
  .gallery-viewer__dots { bottom: max(34px, calc(env(safe-area-inset-bottom) + 16px)); }
  .gallery-viewer__close { width: 44px; height: 44px; }
}

@media (max-width: 390px) {
  .gallery-visual__intro p { display: none; }
}
