:root {
  --gallery-black: #0a0a0a;
  --gallery-surface: #131313;
  --gallery-line: rgba(161, 141, 126, 0.26);
  --gallery-text: #e5e2e1;
  --gallery-muted: #a18d7e;
  --gallery-amber: #d4842e;
  --gallery-primary: #ffb875;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.gallery-page {
  margin: 0;
  overflow-x: hidden;
  background: var(--gallery-black);
  color: var(--gallery-text);
  font-family: "Montserrat", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.gallery-page::selection {
  background: var(--gallery-amber);
  color: #17100a;
}

.gallery-nav {
  position: fixed;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.86), transparent);
  transition: background-color 400ms ease, border-color 400ms ease;
}

.gallery-nav.is-scrolled {
  border-color: var(--gallery-line);
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(14px);
}

.gallery-nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1200px, calc(100% - 48px));
  min-height: 96px;
  margin: 0 auto;
}

.gallery-nav__brand {
  color: var(--gallery-primary);
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.gallery-nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.gallery-nav__links a,
.gallery-nav__mobile a {
  position: relative;
  color: var(--gallery-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: color 220ms ease;
}

.gallery-nav__links a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  background: var(--gallery-primary);
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.gallery-nav__links a:hover,
.gallery-nav__links a.is-active,
.gallery-nav__mobile a:hover,
.gallery-nav__mobile a.is-active {
  color: var(--gallery-primary);
}

.gallery-nav__links a:hover::after,
.gallery-nav__links a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.gallery-nav__cta {
  justify-self: end;
  border: 1px solid var(--gallery-amber);
  background: var(--gallery-amber);
  color: #17100a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 14px 22px;
  text-decoration: none;
  transition: background-color 220ms ease, border-color 220ms ease;
}

.gallery-nav__cta:hover {
  border-color: var(--gallery-primary);
  background: var(--gallery-primary);
}

.gallery-nav__toggle,
.gallery-nav__mobile {
  display: none;
}

.gallery-hero {
  position: relative;
  display: flex;
  min-height: 92svh;
  align-items: flex-end;
  overflow: hidden;
  background: #0e0e0e;
}

.gallery-hero__image,
.gallery-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gallery-hero__image {
  object-fit: cover;
  object-position: center;
  animation: gallery-hero-in 1800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gallery-hero__shade {
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.35) 55%, rgba(10, 10, 10, 0.5) 100%),
    linear-gradient(0deg, var(--gallery-black) 0%, transparent 54%, rgba(10, 10, 10, 0.34) 100%);
}

.gallery-hero__content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 160px 0 72px;
}

.gallery-eyebrow {
  display: block;
  color: var(--gallery-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.5;
}

.gallery-hero h1 {
  max-width: 760px;
  margin: 22px 0 60px;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.88;
}

.gallery-hero h1 em,
.gallery-intro h2 em,
.gallery-statement em {
  color: var(--gallery-primary);
  font-weight: 400;
}

.gallery-hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  padding-top: 24px;
}

.gallery-hero__foot p {
  max-width: 560px;
  margin: 0;
  color: #d9c3b1;
  font-size: 15px;
  line-height: 1.75;
}

.gallery-hero__foot a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--gallery-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.gallery-hero__foot .material-symbols-outlined {
  font-size: 19px;
}

.gallery-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 80px;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 144px 0 88px;
}

.gallery-intro h2 {
  margin: 18px 0 0;
  color: var(--gallery-text);
  font-family: "Playfair Display", serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.gallery-intro__copy {
  margin: 0;
  border-left: 1px solid var(--gallery-amber);
  color: var(--gallery-muted);
  font-size: 14px;
  line-height: 1.85;
  padding-left: 28px;
}

.gallery-collection {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 144px;
}

.gallery-filters {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  border-bottom: 1px solid var(--gallery-line);
  margin-bottom: 48px;
  scrollbar-width: none;
}

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

.gallery-filters button {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #756a62;
  cursor: pointer;
  font: 700 11px/1 "Montserrat", sans-serif;
  letter-spacing: 0.14em;
  padding: 0 0 20px;
  transition: color 220ms ease;
}

.gallery-filters button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--gallery-primary);
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.gallery-filters button:hover,
.gallery-filters button.is-active {
  color: var(--gallery-primary);
}

.gallery-filters button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.gallery-filters span {
  margin-left: 5px;
  color: var(--gallery-muted);
  font-size: 9px;
  vertical-align: top;
}

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

.gallery-card {
  position: relative;
  grid-column: span 6;
  grid-row: span 2;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #1c1b1b;
  color: var(--gallery-text);
  cursor: zoom-in;
  padding: 0;
  text-align: left;
}

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

.gallery-card--portrait {
  grid-column: span 4;
}

.gallery-card--landscape {
  grid-column: span 6;
  grid-row: span 1;
}

.gallery-card[hidden] {
  display: none;
}

.gallery-card::after {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(0deg, rgba(10, 10, 10, 0.88), transparent 55%);
  content: "";
  transition: border-color 500ms ease, background-color 500ms ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
  transition: filter 700ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card:hover::after,
.gallery-card:focus-visible::after {
  border-color: rgba(255, 184, 117, 0.62);
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  filter: saturate(1) contrast(1.02);
  transform: scale(1.04);
}

.gallery-card:focus-visible {
  outline: 1px solid var(--gallery-primary);
  outline-offset: 4px;
}

.gallery-card__index,
.gallery-card__caption,
.gallery-card__open {
  position: absolute;
  z-index: 2;
}

.gallery-card__index {
  top: 24px;
  left: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.gallery-card__caption {
  right: 24px;
  bottom: 24px;
  left: 24px;
}

.gallery-card__caption small {
  display: block;
  margin-bottom: 8px;
  color: var(--gallery-primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.gallery-card__caption strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
}

.gallery-card__open {
  right: 24px;
  top: 22px;
  color: var(--gallery-primary);
  font-size: 20px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 300ms ease, transform 300ms ease;
}

.gallery-card:hover .gallery-card__open,
.gallery-card:focus-visible .gallery-card__open {
  opacity: 1;
  transform: scale(1);
}

.gallery-statement {
  display: flex;
  min-height: 570px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-top: 1px solid var(--gallery-line);
  background:
    radial-gradient(circle at center, rgba(122, 65, 0, 0.16), transparent 52%),
    #0e0e0e;
  padding: 96px 24px;
  text-align: center;
}

.gallery-statement__mark {
  height: 62px;
  color: rgba(255, 184, 117, 0.26);
  font-family: "Playfair Display", serif;
  font-size: 112px;
  line-height: 1;
}

.gallery-statement blockquote {
  max-width: 920px;
  margin: 28px auto 36px;
  color: var(--gallery-text);
  font-family: "Playfair Display", serif;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border: 0;
  background: rgba(10, 10, 10, 0.98);
  color: var(--gallery-text);
  padding: 0;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.gallery-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  border-bottom: 1px solid var(--gallery-line);
  color: var(--gallery-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 0 32px;
}

.gallery-lightbox__bar button,
.gallery-lightbox__arrow {
  border: 0;
  background: transparent;
  color: var(--gallery-text);
  cursor: pointer;
}

.gallery-lightbox__bar button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 10px/1 "Montserrat", sans-serif;
  letter-spacing: 0.16em;
}

.gallery-lightbox__bar .material-symbols-outlined {
  color: var(--gallery-primary);
  font-size: 21px;
}

.gallery-lightbox__stage {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  height: calc(100% - 80px);
  gap: 24px;
  padding: 32px;
}

.gallery-lightbox__stage figure {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0;
}

.gallery-lightbox__stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100% - 56px);
  object-fit: contain;
}

.gallery-lightbox__stage figcaption {
  height: 56px;
  color: var(--gallery-text);
  font-family: "Playfair Display", serif;
  font-size: 20px;
  line-height: 56px;
}

.gallery-lightbox__arrow {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid var(--gallery-line);
  transition: border-color 220ms ease, color 220ms ease;
}

.gallery-lightbox__arrow:hover,
.gallery-lightbox__arrow:focus-visible {
  border-color: var(--gallery-primary);
  color: var(--gallery-primary);
}

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

@media (max-width: 900px) {
  .gallery-nav__inner {
    grid-template-columns: 1fr auto;
    min-height: 80px;
  }

  .gallery-nav__links,
  .gallery-nav__cta {
    display: none;
  }

  .gallery-nav__toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--gallery-primary);
    cursor: pointer;
    padding: 0;
  }

  .gallery-nav__mobile:not([hidden]) {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
    border-top: 1px solid var(--gallery-line);
    background: rgba(10, 10, 10, 0.98);
    padding: 28px 24px 32px;
  }

  .gallery-nav__mobile-cta {
    width: 100%;
    background: var(--gallery-amber);
    color: #17100a !important;
    padding: 14px;
    text-align: center;
  }

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

  .gallery-grid {
    grid-auto-rows: 230px;
  }

  .gallery-card,
  .gallery-card--wide,
  .gallery-card--portrait {
    grid-column: span 6;
  }

  .gallery-card--landscape {
    grid-column: span 12;
  }
}

@media (max-width: 620px) {
  .gallery-nav__inner,
  .gallery-hero__content,
  .gallery-intro,
  .gallery-collection {
    width: min(100% - 32px, 1200px);
  }

  .gallery-nav__brand {
    font-size: 21px;
  }

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

  .gallery-hero__shade {
    background:
      linear-gradient(90deg, rgba(10, 10, 10, 0.68), rgba(10, 10, 10, 0.18)),
      linear-gradient(0deg, var(--gallery-black) 0%, rgba(10, 10, 10, 0.18) 65%, rgba(10, 10, 10, 0.5) 100%);
  }

  .gallery-hero__content {
    padding: 128px 0 48px;
  }

  .gallery-hero h1 {
    margin: 18px 0 40px;
    font-size: clamp(56px, 19vw, 78px);
    line-height: 0.92;
  }

  .gallery-hero__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 26px;
  }

  .gallery-hero__foot p {
    font-size: 14px;
  }

  .gallery-intro {
    padding: 96px 0 64px;
  }

  .gallery-intro h2 {
    font-size: 40px;
  }

  .gallery-collection {
    padding-bottom: 96px;
  }

  .gallery-filters {
    gap: 26px;
    margin-bottom: 28px;
  }

  .gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .gallery-card,
  .gallery-card--wide,
  .gallery-card--portrait,
  .gallery-card--landscape {
    width: 100%;
    height: 440px;
  }

  .gallery-card--landscape {
    height: 300px;
  }

  .gallery-card__caption strong {
    font-size: 23px;
  }

  .gallery-statement {
    min-height: 480px;
    padding: 72px 20px;
  }

  .gallery-lightbox__bar {
    height: 68px;
    padding: 0 18px;
  }

  .gallery-lightbox__stage {
    position: relative;
    display: flex;
    height: calc(100% - 68px);
    padding: 20px 16px 88px;
  }

  .gallery-lightbox__stage figure {
    width: 100%;
  }

  .gallery-lightbox__arrow {
    position: absolute;
    bottom: 20px;
    z-index: 2;
  }

  .gallery-lightbox__arrow--prev {
    left: calc(50% - 64px);
  }

  .gallery-lightbox__arrow--next {
    right: calc(50% - 64px);
  }
}

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

  .gallery-hero__image,
  .reveal,
  .gallery-card img {
    animation: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
