/* QUALIA / photo edition. Keep the original editorial aesthetic. */
.hero-photo { object-position: 50% 51%; }

/* One continuous loop, one outline: a quieter Qualia identity at small sizes. */
.brand-mark { width: 37px; height: 37px; min-width: 37px; border: 0; border-radius: 0; transform: none; }
.brand-mark::before, .brand-mark::after { content: none; display: none; }
.brand-mark svg { display: block; width: 100%; height: 100%; }

/* The original five images remain; the seven new archive images follow in order. */
.social-gallery {
  display: flex;
  grid-template-columns: none;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 18px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #899486 transparent;
}
.social-gallery > a,
.social-gallery > a:nth-child(4),
.social-gallery > a:nth-child(5) {
  display: block;
  position: relative;
  flex: 0 0 clamp(214px, 24vw, 340px);
  height: clamp(250px, 27vw, 340px);
  overflow: hidden;
  scroll-snap-align: start;
}
.social-gallery > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.social-gallery > a:focus-visible { outline: 3px solid #8e664f; outline-offset: -3px; }
.social-gallery .archive-photo::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(15, 25, 18, .6));
  pointer-events: none;
}
.social-gallery .archive-photo span {
  position: absolute;
  z-index: 1;
  bottom: 15px;
  left: 16px;
  right: 12px;
  color: #f7f5ed;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.gallery-hint {
  font: 600 10px/1.6 'DM Sans', Arial, sans-serif;
  letter-spacing: .11em;
  color: #767e70;
  margin: 18px 0 0;
  text-align: right;
}

/* Local context: three supplied photographs, in their exact Tulum/Cobá/Cenote order. */
.territory-section { background: #eae8df; }
.territory-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 34px;
  margin: 52px 0 42px;
}
.territory-heading h2 {
  font: 400 clamp(62px, 7.8vw, 124px)/.94 'Italiana', Georgia, serif;
  letter-spacing: -.045em;
  margin: 0;
}
.territory-heading h2 em { color: #865848; font-weight: 400; }
.territory-heading > p {
  max-width: 325px;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.9;
  color: #596357;
}
.territory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.territory-grid figure { min-width: 0; margin: 0; }
.territory-grid img { display: block; width: 100%; height: clamp(250px, 35vw, 450px); object-fit: cover; }
.territory-grid figure:nth-child(3) img { object-position: center 65%; }
.territory-grid figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #b9bcae;
  padding: 18px 0;
  color: #334236;
}
.territory-grid figcaption span { font-size: 10px; letter-spacing: .15em; }
.territory-grid figcaption strong { font-size: 12px; letter-spacing: .13em; font-weight: 700; }

@media (max-width: 780px) {
  .social-gallery > a,
  .social-gallery > a:nth-child(4),
  .social-gallery > a:nth-child(5) {
    flex-basis: min(76vw, 340px);
    height: 310px;
  }
  .territory-heading { display: block; margin: 35px 0 28px; }
  .territory-heading > p { margin-top: 22px; }
  .territory-grid { grid-template-columns: 1fr; gap: 25px; }
  .territory-grid img { height: auto; max-height: 410px; aspect-ratio: 4/3; object-fit: cover; }
}
@media (max-width: 420px) {
  .social-gallery { gap: 9px; }
  .social-gallery > a,
  .social-gallery > a:nth-child(4),
  .social-gallery > a:nth-child(5) { height: 280px; }
  .territory-heading h2 { font-size: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .social-gallery { scroll-behavior: auto; }
}
