.primary-nav .is-current::after {
  transform: scaleX(1) !important;
}

.gallery-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(76px, 9vw, 124px) 0 clamp(78px, 9vw, 118px);
  color: var(--cream);
  background:
    radial-gradient(circle at 8% 16%, rgba(235, 94, 40, 0.28) 0 1px, transparent 2px) 0 0 / 19px 19px,
    linear-gradient(135deg, var(--green-2), var(--green));
}

.gallery-hero::after {
  position: absolute;
  right: -140px;
  bottom: -240px;
  width: 560px;
  height: 560px;
  content: "";
  border: 1px solid rgba(255, 250, 240, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 250, 240, 0.025), 0 0 0 140px rgba(255, 250, 240, 0.018);
}

.gallery-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(50px, 7vw, 96px);
}

.gallery-hero__copy h1 {
  max-width: 720px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.1vw, 6.4rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.gallery-hero__copy h1 em {
  color: #ffb28f;
  font-weight: inherit;
}

.gallery-hero__copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 28px 0 0;
  color: rgba(255, 250, 240, 0.72);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.gallery-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 27px;
}

.gallery-hero__facts span {
  padding: 8px 13px;
  color: rgba(255, 250, 240, 0.84);
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.gallery-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.gallery-hero__collage {
  position: relative;
  min-height: 570px;
}

.gallery-hero__photo {
  position: absolute;
  overflow: hidden;
  margin: 0;
  border: 7px solid rgba(255, 250, 240, 0.96);
  border-radius: 24px;
  background: var(--green-2);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.35);
}

.gallery-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-hero__photo--main {
  inset: 70px 86px 44px 0;
  transform: rotate(-2.5deg);
}

.gallery-hero__photo--top {
  top: 0;
  right: 0;
  width: 39%;
  height: 47%;
  transform: rotate(4.5deg);
}

.gallery-hero__photo--bottom {
  right: 0;
  bottom: 0;
  width: 50%;
  height: 33%;
  transform: rotate(2.5deg);
}

.gallery-hero__seal {
  position: absolute;
  z-index: 2;
  right: 34px;
  bottom: 132px;
  width: 106px;
  height: 106px;
  display: grid;
  place-content: center;
  color: var(--green-2);
  background: var(--orange);
  border: 5px solid var(--green-2);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--orange);
  text-align: center;
  transform: rotate(-7deg);
}

.gallery-hero__seal strong,
.gallery-hero__seal small {
  display: block;
  line-height: 1;
}

.gallery-hero__seal strong {
  font-family: var(--serif);
  font-size: 2.1rem;
}

.gallery-hero__seal small {
  margin-top: 4px;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-section {
  padding: clamp(76px, 9vw, 124px) 0;
  background:
    radial-gradient(circle at 4% 7%, rgba(235, 94, 40, 0.12) 0 1px, transparent 2px) 0 0 / 20px 20px,
    var(--ivory);
}

.gallery-section__heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: end;
  gap: clamp(40px, 8vw, 100px);
  margin-bottom: clamp(42px, 6vw, 72px);
}

.gallery-section__heading h2 {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(2.45rem, 5vw, 5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.gallery-section__intro > p:first-child {
  margin: 0;
  color: var(--muted);
}

.gallery-source {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.5;
}

.gallery-source > span:first-child {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--green);
  border-radius: 50%;
  font-size: 0.68rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 132px;
  gap: 13px;
}

.gallery-card {
  position: relative;
  grid-row: span 2;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--green-2);
  box-shadow: 0 12px 34px rgba(21, 56, 47, 0.12);
  cursor: zoom-in;
}

.gallery-card--wide {
  grid-column: span 2;
}

.gallery-card--portrait {
  grid-row: span 3;
}

.gallery-card--tall {
  grid-row: span 4;
}

.gallery-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(4, 20, 16, 0.48), transparent 42%);
  opacity: 0.72;
  transition: opacity 220ms ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card > span {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 11px;
  color: var(--cream);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.045);
}

.gallery-card:hover::after,
.gallery-card:focus-visible::after {
  opacity: 1;
}

.gallery-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 34px clamp(58px, 8vw, 130px);
  color: var(--cream);
  border: 0;
  background: rgba(5, 19, 16, 0.96);
}

.gallery-lightbox[open] {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.gallery-lightbox::backdrop {
  background: rgba(5, 19, 16, 0.96);
}

.gallery-lightbox figure {
  min-width: 0;
  height: calc(100vh - 68px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  margin: 0;
}

.gallery-lightbox figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-lightbox figcaption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.78rem;
}

.gallery-lightbox figcaption strong {
  color: var(--cream);
  white-space: nowrap;
}

.gallery-lightbox button {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.gallery-lightbox button:hover {
  background: var(--orange);
  transform: scale(1.06);
}

.gallery-lightbox__close {
  position: fixed;
  z-index: 2;
  top: 22px;
  right: 22px;
  font-size: 1.8rem;
}

.gallery-lightbox__nav {
  font-size: 1.25rem;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .gallery-hero__grid {
    grid-template-columns: 1fr;
  }

  .gallery-hero__copy {
    max-width: 820px;
  }

  .gallery-hero__collage {
    width: min(760px, 100%);
    min-height: 540px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gallery-hero {
    padding-top: 62px;
  }

  .gallery-hero__collage {
    min-height: 430px;
  }

  .gallery-hero__photo--main {
    inset: 42px 44px 44px 0;
  }

  .gallery-hero__seal {
    right: 8px;
    bottom: 104px;
    width: 88px;
    height: 88px;
  }

  .gallery-section__heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 112px;
  }

  .gallery-card--wide {
    grid-column: span 2;
  }

  .gallery-lightbox {
    padding: 70px 18px 22px;
  }

  .gallery-lightbox[open] {
    grid-template-columns: 1fr 1fr;
    align-content: stretch;
    gap: 12px;
  }

  .gallery-lightbox figure {
    grid-column: 1 / -1;
    grid-row: 1;
    height: calc(100vh - 160px);
  }

  .gallery-lightbox__nav {
    grid-row: 2;
    justify-self: center;
  }

  .gallery-lightbox__nav--previous {
    grid-column: 1;
  }

  .gallery-lightbox__nav--next {
    grid-column: 2;
  }
}

@media (max-width: 480px) {
  .gallery-hero__actions .button {
    width: 100%;
  }

  .gallery-hero__collage {
    min-height: 350px;
  }

  .gallery-hero__photo {
    border-width: 4px;
    border-radius: 16px;
  }

  .gallery-hero__photo--main {
    inset: 32px 34px 32px 0;
  }

  .gallery-hero__photo--top {
    width: 42%;
    height: 46%;
  }

  .gallery-hero__photo--bottom {
    width: 54%;
    height: 31%;
  }

  .gallery-hero__seal {
    bottom: 80px;
    width: 76px;
    height: 76px;
  }

  .gallery-hero__seal strong {
    font-size: 1.6rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 11px;
  }

  .gallery-card,
  .gallery-card--wide,
  .gallery-card--portrait,
  .gallery-card--tall {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }

  .gallery-card--portrait,
  .gallery-card--tall {
    aspect-ratio: 3 / 4;
  }

  .gallery-lightbox figcaption {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card img,
  .gallery-lightbox button {
    transition: none;
  }
}
