:root {
  --gallery-ink: #162a21;
  --gallery-forest: #163c2f;
  --gallery-moss: #6d795e;
  --gallery-rust: #a65f37;
  --gallery-paper: #f3efe6;
  --gallery-sand: #ded2bd;
  --gallery-line: rgba(22, 42, 33, 0.18);
}

html {
  scroll-behavior: smooth;
}

.gallery-body {
  background: var(--gallery-paper);
}

.gallery-page {
  overflow: hidden;
  color: var(--gallery-ink);
  background: var(--gallery-paper);
  font-family: var(--font-body, "DM Sans", sans-serif);
}

.gallery-page h1,
.gallery-page h2,
.gallery-page p,
.gallery-page figure,
.gallery-page blockquote {
  margin: 0;
}

.gallery-page h1,
.gallery-page h2 {
  font-family: var(--font-display, "DM Serif Display", serif);
  font-weight: 400;
}

.gallery-page a {
  text-decoration: none;
}

.gallery-shell {
  width: min(100% - 48px, 1380px);
  margin-inline: auto;
}

.gallery-eyebrow,
.gallery-kicker {
  color: var(--gallery-rust);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.gallery-hero {
  position: relative;
  min-height: min(790px, calc(100svh - 50px));
  color: #fff;
  background: #18352c;
  isolation: isolate;
}

.gallery-hero__image,
.gallery-cta > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-hero__image {
  object-position: center 58%;
  animation: gallery-hero-reveal 1.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gallery-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 24, 18, 0.76) 0%, rgba(7, 24, 18, 0.3) 54%, rgba(7, 24, 18, 0.12) 100%),
    linear-gradient(0deg, rgba(7, 21, 17, 0.65) 0%, transparent 48%);
}

.gallery-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: inherit;
  padding-block: clamp(100px, 15vh, 155px) clamp(62px, 9vh, 92px);
}

.gallery-hero .gallery-eyebrow {
  margin-bottom: 1.3rem;
  color: #ead19b;
}

.gallery-hero h1 {
  max-width: 850px;
  color: #fff;
  font-size: clamp(4.3rem, 9.3vw, 8.6rem);
  line-height: 0.83;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.gallery-hero h1 em,
.gallery-cta h2 em {
  color: #e8c98d;
  font-weight: 400;
}

.gallery-hero__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 7vh, 5rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.44);
}

.gallery-hero__footer p {
  max-width: 400px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.7;
}

.gallery-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-scroll-link span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.gallery-scroll-link:hover {
  color: #fff;
}

.gallery-scroll-link:hover span {
  color: var(--gallery-ink);
  background: #fff;
  transform: translateY(3px);
}

.gallery-hero__index {
  position: absolute;
  top: 50%;
  right: 19px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: translateY(-50%) rotate(90deg) translateX(50%);
  transform-origin: right center;
}

.gallery-intro {
  padding-block: clamp(90px, 12vw, 170px);
}

.gallery-intro__grid {
  display: grid;
  grid-template-columns: minmax(42px, 0.7fr) minmax(0, 6fr) minmax(320px, 4.2fr);
  align-items: start;
  gap: clamp(28px, 4.2vw, 80px);
}

.gallery-intro__number {
  padding-top: 0.2rem;
  color: var(--gallery-rust);
  font-family: var(--font-display, "DM Serif Display", serif);
  font-size: 1.15rem;
}

.gallery-intro__copy {
  padding-top: clamp(36px, 6vw, 82px);
}

.gallery-intro__copy h2,
.gallery-collection__header h2 {
  color: var(--gallery-ink);
  font-size: clamp(2.7rem, 5.2vw, 5.25rem);
  line-height: 0.99;
  letter-spacing: -0.035em;
}

.gallery-intro__copy .gallery-kicker {
  margin-bottom: 1.3rem;
}

.gallery-intro__copy > p:last-child {
  max-width: 660px;
  margin-top: 2rem;
  color: #5f625b;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.8;
}

.gallery-intro__portrait {
  position: relative;
}

.gallery-intro__portrait::before {
  position: absolute;
  top: -24px;
  right: -24px;
  width: 55%;
  height: 65%;
  border: 1px solid #bba88b;
  content: "";
}

.gallery-intro__portrait img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(1.03);
}

.gallery-intro__portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  color: #6e6c65;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-collection {
  padding-block: clamp(82px, 10vw, 135px);
  background: #e6dece;
}

.gallery-collection__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gallery-line);
}

.gallery-collection__header .gallery-kicker {
  margin-bottom: 1rem;
}

.gallery-result-count {
  flex: 0 0 auto;
  padding-bottom: 0.55rem;
  color: #686a62;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gallery-filters {
  display: flex;
  gap: 0.35rem;
  margin-block: 2rem 2.7rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-filters::-webkit-scrollbar {
  display: none;
}

.gallery-filter {
  flex: 0 0 auto;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #5f615a;
  background: transparent;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.gallery-filter:hover,
.gallery-filter:focus-visible {
  color: var(--gallery-ink);
  border-color: rgba(22, 42, 33, 0.24);
  outline: none;
}

.gallery-filter.is-active {
  color: #fff;
  background: var(--gallery-forest);
  border-color: var(--gallery-forest);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(12px, 1.55vw, 24px);
}

.gallery-frame {
  position: relative;
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  background: #bcc0b4;
}

.gallery-frame[hidden],
.gallery-interlude[hidden] {
  display: none;
}

.gallery-frame--feature {
  grid-column: span 8;
  min-height: clamp(420px, 47vw, 660px);
}

.gallery-frame--portrait,
.gallery-frame--tall {
  min-height: clamp(420px, 47vw, 660px);
}

.gallery-frame--wide {
  grid-column: span 8;
  min-height: clamp(330px, 34vw, 490px);
}

.gallery-frame--standard {
  min-height: clamp(330px, 34vw, 490px);
}

.gallery-frame__link {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
}

.gallery-frame__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 750ms cubic-bezier(0.22, 1, 0.36, 1), filter 350ms ease;
}

.gallery-frame__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 21, 16, 0.82) 0%, rgba(8, 21, 16, 0.05) 62%);
  opacity: 0.82;
  transition: opacity 300ms ease;
}

.gallery-frame__meta {
  position: absolute;
  right: clamp(18px, 2.2vw, 32px);
  bottom: clamp(18px, 2.2vw, 30px);
  left: clamp(18px, 2.2vw, 32px);
  display: grid;
  gap: 0.25rem;
  transform: translateY(8px);
  transition: transform 300ms ease;
}

.gallery-frame__category {
  margin-bottom: 0.3rem;
  color: #e9cf9a;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gallery-frame__title {
  font-family: var(--font-display, "DM Serif Display", serif);
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  line-height: 1.05;
}

.gallery-frame__location {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-frame__open {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 250ms ease, transform 250ms ease, background 250ms ease;
}

.gallery-frame__link:hover {
  color: #fff;
}

.gallery-frame__link:hover img {
  filter: saturate(0.92);
  transform: scale(1.045);
}

.gallery-frame__link:hover .gallery-frame__veil {
  opacity: 1;
}

.gallery-frame__link:hover .gallery-frame__meta,
.gallery-frame__link:hover .gallery-frame__open {
  transform: none;
}

.gallery-frame__link:hover .gallery-frame__open {
  opacity: 1;
}

.gallery-interlude {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 750px) auto;
  align-items: end;
  justify-content: center;
  gap: 2rem;
  margin-block: clamp(34px, 6vw, 78px);
  padding: clamp(38px, 6vw, 82px);
  color: #fff;
  background: var(--gallery-forest);
}

.gallery-interlude__mark {
  align-self: start;
  color: #c79668;
  font-family: Georgia, serif;
  font-size: clamp(5rem, 9vw, 9rem);
  line-height: 0.8;
}

.gallery-interlude blockquote {
  font-family: var(--font-display, "DM Serif Display", serif);
  font-size: clamp(2rem, 3.8vw, 4rem);
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.gallery-interlude p {
  padding-bottom: 0.4rem;
  color: #cfc7b7;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gallery-empty {
  padding-block: 5rem;
  color: #666a61;
  text-align: center;
}

.gallery-cta {
  position: relative;
  min-height: clamp(580px, 70vw, 850px);
  color: #fff;
  background: #153328;
  isolation: isolate;
}

.gallery-cta > img {
  object-position: center;
}

.gallery-cta__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(8, 30, 22, 0.84) 0%, rgba(8, 30, 22, 0.48) 50%, rgba(8, 30, 22, 0.16) 100%);
}

.gallery-cta__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: inherit;
  padding-block: 90px;
}

.gallery-cta .gallery-eyebrow {
  margin-bottom: 1.4rem;
  color: #e8c98d;
}

.gallery-cta h2 {
  font-size: clamp(4rem, 8.4vw, 8.2rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
}

.gallery-cta__content > p:not(.gallery-eyebrow) {
  max-width: 480px;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.75;
}

.gallery-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 2.4rem;
  margin-top: 2.2rem;
  padding: 1rem 1.1rem 1rem 1.45rem;
  border: 1px solid #e8c98d;
  border-radius: 999px;
  color: var(--gallery-ink);
  background: #e8c98d;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.gallery-cta__button span {
  font-size: 1rem;
}

.gallery-cta__button:hover {
  color: #fff;
  background: transparent;
  transform: translateY(-2px);
}

.gallery-lightbox .fancybox-bg {
  background: #071a13;
}

.gallery-lightbox .fancybox-caption {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.87rem;
  letter-spacing: 0.02em;
}

@keyframes gallery-hero-reveal {
  from {
    opacity: 0;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 991.98px) {
  .gallery-intro__grid {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .gallery-intro__copy {
    padding-top: 0;
  }

  .gallery-intro__portrait {
    grid-column: 2;
    width: min(100%, 520px);
    margin-top: 2rem;
  }

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

  .gallery-interlude p {
    grid-column: 2;
  }
}

@media (max-width: 767.98px) {
  .gallery-shell {
    width: min(100% - 32px, 1380px);
  }

  .gallery-hero {
    min-height: 680px;
  }

  .gallery-hero__image {
    object-position: 61% center;
  }

  .gallery-hero__shade {
    background:
      linear-gradient(90deg, rgba(7, 24, 18, 0.72), rgba(7, 24, 18, 0.2)),
      linear-gradient(0deg, rgba(7, 21, 17, 0.8) 0%, transparent 65%);
  }

  .gallery-hero__content {
    padding-block: 90px 48px;
  }

  .gallery-hero h1 {
    font-size: clamp(3.65rem, 18.5vw, 6rem);
  }

  .gallery-hero__footer {
    display: grid;
    margin-top: 3.5rem;
  }

  .gallery-scroll-link {
    justify-self: start;
  }

  .gallery-hero__index {
    display: none;
  }

  .gallery-intro__grid {
    display: block;
  }

  .gallery-intro__number {
    margin-bottom: 1.1rem;
  }

  .gallery-intro__copy h2,
  .gallery-collection__header h2 {
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .gallery-intro__portrait {
    width: calc(100% - 18px);
    margin-top: 3.5rem;
  }

  .gallery-intro__portrait::before {
    top: -16px;
    right: -18px;
  }

  .gallery-collection__header {
    display: block;
  }

  .gallery-result-count {
    margin-top: 1.3rem;
    padding: 0;
  }

  .gallery-filters {
    margin-right: -16px;
    padding-right: 16px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .gallery-frame,
  .gallery-frame--feature,
  .gallery-frame--portrait,
  .gallery-frame--tall,
  .gallery-frame--wide,
  .gallery-frame--standard {
    grid-column: 1;
    min-height: auto;
    aspect-ratio: 4 / 5;
  }

  .gallery-frame--feature,
  .gallery-frame--wide {
    aspect-ratio: 4 / 3;
  }

  .gallery-frame__open {
    opacity: 1;
    transform: none;
  }

  .gallery-interlude {
    grid-column: 1;
    display: block;
    margin-block: 34px;
    padding: 44px 28px;
  }

  .gallery-interlude__mark {
    display: block;
    margin-bottom: 1rem;
  }

  .gallery-interlude p {
    margin-top: 1.5rem;
  }

  .gallery-cta {
    min-height: 660px;
  }

  .gallery-cta__shade {
    background: linear-gradient(90deg, rgba(8, 30, 22, 0.82), rgba(8, 30, 22, 0.32));
  }

  .gallery-cta h2 {
    font-size: clamp(3.7rem, 17vw, 6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gallery-hero__image {
    animation: none;
  }

  .gallery-frame img,
  .gallery-frame__meta,
  .gallery-frame__open,
  .gallery-scroll-link span,
  .gallery-cta__button {
    transition: none;
  }
}
