.galeria-page {
  background: radial-gradient(circle at 18% 8%, rgba(122, 75, 42, 0.1), transparent 28rem), var(--color-bg);
}

.galeria-page .eyebrow {
  margin-bottom: var(--space-3);
}

.gallery-photo-button,
.gallery-index__button {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-photo-button img,
.gallery-index__button img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-hero {
  padding-block: var(--space-7) var(--space-9);
}

.gallery-hero__frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 38.75rem;
  overflow: hidden;
  background: var(--color-surface);
}

.gallery-hero__media,
.gallery-hero__copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
}

.gallery-hero__media {
  width: 100%;
  height: 100%;
}

.gallery-hero__image-button {
  height: 100%;
}

.gallery-hero__media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(21, 20, 18, 0.92) 0%, rgba(21, 20, 18, 0.74) 39%, rgba(21, 20, 18, 0.18) 74%, rgba(21, 20, 18, 0.08) 100%);
  content: "";
  pointer-events: none;
}

.gallery-hero__copy {
  z-index: 1;
  align-self: center;
  width: min(52%, 40rem);
  min-width: 0;
  margin-left: var(--space-8);
  padding-block: var(--space-8);
}

.gallery-hero__copy .lead {
  max-width: 39rem;
}

.gallery-text-link {
  display: inline-block;
  max-width: 100%;
  font-size: var(--text-sm);
  font-weight: 700;
}

.gallery-quiet-button {
  display: block;
  width: fit-content;
  min-width: 0;
  margin-top: var(--space-4);
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--color-brass);
  background: transparent;
  color: var(--color-cream);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.5;
}

.gallery-quiet-button:hover {
  color: var(--color-brass-light);
  border-bottom-color: var(--color-brass-light);
}

.gallery-rhythms__layout {
  display: grid;
  grid-template-columns: minmax(16.25rem, 0.3fr) minmax(0, 0.7fr);
  gap: var(--space-7);
  align-items: start;
}

.gallery-rhythms__intro,
.gallery-rhythms__items,
.gallery-rhythm {
  min-width: 0;
}

.gallery-rhythms__intro p:not(.eyebrow) {
  max-width: 31rem;
  color: var(--color-parchment);
}

.gallery-rhythms__items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.gallery-rhythm {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-brass);
  color: var(--color-cream);
  text-decoration: none;
}

.gallery-rhythm--felt {
  border-top-color: var(--color-felt-light);
}

.gallery-rhythm__number,
.gallery-index__number {
  color: var(--color-brass);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.gallery-rhythm h3,
.gallery-rhythm p,
.gallery-index__item h3,
.gallery-index__item p {
  margin: 0;
}

.gallery-rhythm p {
  max-width: 26rem;
  color: var(--color-parchment);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
}

.gallery-rhythm:hover h3,
.gallery-rhythm:focus-visible h3 {
  color: var(--color-brass-light);
}

.gallery-interior__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: var(--space-8);
  align-items: center;
}

.gallery-interior__copy,
.gallery-feature-figure {
  min-width: 0;
}

.gallery-interior__copy > p:not(.eyebrow) {
  max-width: 40rem;
}

.gallery-interior__transition {
  color: var(--color-parchment);
}

.gallery-feature-figure,
.gallery-kitchen__card,
.gallery-poker__figure,
.gallery-detail__figure {
  margin: 0;
}

.gallery-feature-figure .gallery-photo-button {
  aspect-ratio: 4 / 3;
}

.gallery-feature-figure figcaption,
.gallery-kitchen__card figcaption,
.gallery-poker__figure figcaption,
.gallery-detail__figure figcaption {
  max-width: 100%;
  margin-bottom: 0;
}

.gallery-feature-figure figcaption span,
.gallery-kitchen__card figcaption span,
.gallery-poker__figure figcaption span {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-brass);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.gallery-kitchen__intro {
  width: min(48%, 38.125rem);
  min-width: 0;
}

.gallery-kitchen__intro .lead {
  max-width: 38rem;
}

.gallery-kitchen__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.gallery-kitchen__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-3);
}

.gallery-kitchen__card .gallery-photo-button {
  aspect-ratio: 4 / 3;
}

.gallery-kitchen__card figcaption {
  max-width: 34rem;
}

.gallery-kitchen__card .gallery-text-link {
  width: fit-content;
}

.gallery-kitchen__bridge {
  max-width: 46rem;
  margin-top: var(--space-6);
  margin-bottom: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-felt-light);
  color: var(--color-parchment);
}

.gallery-poker {
  margin-top: var(--space-4);
  background: linear-gradient(135deg, #123b2d, var(--color-felt));
}

.gallery-poker__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: var(--space-7);
}

.gallery-poker__copy,
.gallery-poker__ornament,
.gallery-poker__figure {
  min-width: 0;
}

.gallery-poker__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.gallery-poker__copy h2,
.gallery-poker__copy p,
.gallery-poker__copy .eyebrow {
  margin: 0;
}

.gallery-poker__copy p:not(.eyebrow) {
  max-width: 40rem;
  color: var(--color-parchment);
}

.gallery-poker__action {
  border-color: var(--color-brass);
}

.gallery-poker__ornament {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-right: var(--space-7);
}

.gallery-poker__ornament span {
  display: block;
  width: 1px;
  height: 42%;
  background: rgba(241, 231, 210, 0.28);
}

.gallery-poker__ornament span:nth-child(2) {
  height: 64%;
  background: var(--color-brass);
}

.gallery-poker__figure {
  grid-column: 1 / -1;
}

.gallery-poker__figure .gallery-photo-button {
  aspect-ratio: 3 / 2;
}

.gallery-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
  gap: var(--space-8);
  align-items: start;
}

.gallery-detail__figure,
.gallery-detail__copy {
  min-width: 0;
}

.gallery-detail__figure .gallery-photo-button {
  aspect-ratio: 1;
}

.gallery-detail__copy {
  padding-top: var(--space-4);
}

.gallery-detail__copy .eyebrow {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-brass);
}

.gallery-detail__copy > p:not(.eyebrow) {
  max-width: 36rem;
}

.gallery-detail__hint {
  display: block;
  width: fit-content;
  max-width: 36rem;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--color-brass);
  background: transparent;
  color: var(--color-parchment);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
  text-align: left;
}

.gallery-detail__hint:hover {
  color: var(--color-brass-light);
}

.gallery-index {
  background: rgba(33, 30, 26, 0.52);
}

.gallery-index__intro {
  max-width: 38.75rem;
}

.gallery-index__intro .lead {
  max-width: 38.75rem;
}

.gallery-index__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6) var(--space-5);
  margin-top: var(--space-6);
}

.gallery-index__item {
  min-width: 0;
}

.gallery-index__button {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-index__button img {
  transition: filter var(--transition-base);
}

.gallery-index__button:hover img,
.gallery-index__button:focus-visible img {
  filter: brightness(1.08);
}

.gallery-index__number {
  margin: var(--space-3) 0 var(--space-1);
}

.gallery-index__item h3 {
  font-size: var(--text-xl);
}

.gallery-index__item > p:last-child {
  max-width: 22rem;
  color: var(--color-parchment);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
}

.gallery-closing__panel {
  display: flex;
  width: min(100%, 47.5rem);
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-inline: auto;
  padding: var(--space-8) 4.5rem;
  border: 1px solid var(--color-border-brass);
  background: var(--color-surface);
  box-shadow: var(--shadow-deep);
  text-align: center;
}

.gallery-closing__panel .eyebrow,
.gallery-closing__panel h2,
.gallery-closing__panel p {
  margin: 0;
}

.gallery-closing__panel p:not(.eyebrow) {
  max-width: 35rem;
  color: var(--color-parchment);
}

.gallery-closing__button {
  min-width: 11.25rem;
}

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

.gallery-lightbox {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.gallery-lightbox__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 72rem);
  max-height: min(92vh, 56rem);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border-brass);
  background: var(--color-bg);
  box-shadow: var(--shadow-deep);
}

.gallery-lightbox__topbar,
.gallery-lightbox__footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
}

.gallery-lightbox__topbar {
  border-bottom: 1px solid var(--color-border-light);
}

.gallery-lightbox__footer {
  border-top: 1px solid var(--color-border-light);
}

.gallery-lightbox__count {
  min-width: 0;
  margin: 0;
  color: var(--color-parchment);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  min-width: 0;
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border-brass);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-cream);
  font-size: var(--text-sm);
  font-weight: 700;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
  border-color: var(--color-brass-light);
  color: var(--color-brass-light);
}

.gallery-lightbox__media-wrap {
  min-height: 0;
  background: #0b0a09;
}

.gallery-lightbox__image {
  width: 100%;
  height: 100%;
  max-height: 42rem;
  object-fit: contain;
}

.gallery-lightbox__caption {
  min-width: 0;
}

.gallery-lightbox__caption h2,
.gallery-lightbox__caption p {
  margin: 0;
}

.gallery-lightbox__caption h2 {
  font-size: var(--text-xl);
}

.gallery-lightbox__caption p {
  color: var(--color-parchment);
  font-size: var(--text-sm);
  line-height: var(--leading-small);
}

.gallery-lightbox__controls {
  display: flex;
  min-width: 0;
  gap: var(--space-2);
}

@media (max-width: 61.25rem) {
  .gallery-rhythms__layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .gallery-rhythm:last-child {
    grid-column: 1 / 2;
  }
}

@media (max-width: 56.25rem) {
  .gallery-hero {
    padding-block: var(--space-6) var(--space-8);
  }

  .gallery-hero__frame {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: visible;
    background: transparent;
  }

  .gallery-hero__media {
    height: auto;
  }

  .gallery-hero__image-button {
    aspect-ratio: 4 / 5;
    height: auto;
  }

  .gallery-hero__media::after {
    display: none;
  }

  .gallery-hero__copy {
    width: 100%;
    margin: 0;
    padding: var(--space-5);
    background: var(--color-surface);
  }

  .gallery-hero__copy .lead {
    max-width: 42rem;
  }

  .gallery-interior__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .gallery-feature-figure {
    grid-row: 1;
  }

  .gallery-interior__copy {
    grid-row: 2;
  }

  .gallery-feature-figure .gallery-photo-button {
    aspect-ratio: 4 / 5;
  }

  .gallery-kitchen__intro {
    width: 100%;
  }

  .gallery-poker__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .gallery-poker__ornament {
    display: none;
  }

  .gallery-poker__figure {
    grid-column: 1;
  }

  .gallery-poker__figure .gallery-photo-button {
    aspect-ratio: 4 / 5;
  }

  .gallery-detail__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .gallery-detail__figure {
    grid-row: 1;
  }

  .gallery-detail__copy {
    grid-row: 2;
    padding-top: 0;
  }

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

@media (max-width: 47.5rem) {
  .gallery-kitchen__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-kitchen__card .gallery-photo-button {
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 37.5rem) {
  .gallery-rhythms__layout {
    gap: var(--space-5);
  }

  .gallery-rhythms__items {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .gallery-rhythm:last-child {
    grid-column: 1;
  }

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

  .gallery-index__button {
    aspect-ratio: 4 / 5;
  }

  .gallery-closing__panel {
    padding: var(--space-6) var(--space-5);
  }

  .gallery-closing__button {
    width: 100%;
  }

  .gallery-lightbox {
    padding: var(--space-2);
  }

  .gallery-lightbox__dialog {
    max-height: 96vh;
  }

  .gallery-lightbox__topbar,
  .gallery-lightbox__footer {
    align-items: flex-start;
    padding: var(--space-3);
  }

  .gallery-lightbox__footer {
    flex-direction: column;
  }

  .gallery-lightbox__controls {
    width: 100%;
  }

  .gallery-lightbox__nav {
    width: 50%;
  }
}
