.gallery-page {
  overflow: clip;
}

.gallery-page .section {
  position: relative;
}

.gallery-page .gallery-text-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-decoration: none;
  text-transform: uppercase;
}

.gallery-page .gallery-text-link::after {
  width: 1.5rem;
  height: 1px;
  margin-inline-start: var(--space-3);
  background: var(--color-accent);
  content: "";
  transition: width var(--transition-fast);
}

.gallery-page .gallery-text-link:hover::after,
.gallery-page .gallery-text-link:focus-visible::after {
  width: 2.5rem;
}

.gallery-page .gallery-image-link {
  display: block;
  width: 100%;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.gallery-page .gallery-image-link img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.gallery-page .gallery-image-link:hover img,
.gallery-page .gallery-image-link:focus-visible img {
  filter: saturate(0.9) sepia(0.04);
  transform: translateY(-2px);
}

.gallery-page .gallery-caption {
  min-width: 0;
  padding-block-start: var(--space-4);
  border-block-start: var(--border-hairline);
}

.gallery-page .gallery-caption__number {
  margin-block-end: var(--space-2);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  line-height: 1.3;
  text-transform: uppercase;
}

.gallery-page .gallery-caption h3 {
  margin-block-end: var(--space-2);
  font-size: var(--text-h5);
}

.gallery-page .gallery-caption p:not(.gallery-caption__number) {
  margin-block-end: 0;
  color: var(--color-charcoal);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.gallery-hero__grid,
.gallery-meal__grid,
.gallery-lounge__grid,
.gallery-gestures__grid,
.gallery-sequence__grid,
.gallery-reflection__grid,
.gallery-next__grid,
.gallery-closing__grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.25rem;
}

.gallery-hero__copy {
  min-width: 0;
  grid-column: 2 / span 5;
  align-self: center;
}

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

.gallery-hero__figure {
  min-width: 0;
  margin: var(--space-7) 0 0;
  grid-column: 7 / span 6;
}

.gallery-hero__figure .gallery-image-link {
  aspect-ratio: 16 / 10;
}

.gallery-hero__figure img {
  object-position: 60% center;
}

.gallery-meal__grid {
  row-gap: var(--space-6);
}

.gallery-meal__copy {
  min-width: 0;
  grid-column: 2 / span 4;
  align-self: start;
}

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

.gallery-meal__figure {
  min-width: 0;
  margin: var(--space-7) 0 0;
  grid-column: 7 / span 4;
}

.gallery-meal__figure .gallery-image-link {
  aspect-ratio: 4 / 5;
}

.gallery-meal__figure img {
  object-position: center 45%;
}

.gallery-meal__caption {
  min-width: 0;
  align-self: end;
  grid-column: 11 / span 2;
}

.gallery-meal__note {
  min-width: 0;
  padding-block-start: var(--space-5);
  border-block-start: var(--border-hairline);
  grid-column: 2 / span 4;
}

.gallery-meal__note p {
  max-width: 30rem;
  margin-block-end: 0;
}

.gallery-lounge__grid {
  row-gap: var(--space-7);
}

.gallery-lounge__copy {
  min-width: 0;
  grid-column: 2 / span 5;
}

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

.gallery-lounge__figure {
  min-width: 0;
  margin: 0;
  grid-column: 8 / span 4;
}

.gallery-lounge__figure .gallery-image-link {
  aspect-ratio: 3 / 4;
}

.gallery-lounge__figure img {
  object-position: 55% center;
}

.gallery-lounge__quote {
  min-width: 0;
  margin-block-end: 0;
  padding-block-start: var(--space-5);
  grid-column: 2 / span 7;
}

.gallery-gestures__grid {
  row-gap: var(--space-6);
}

.gallery-gestures__heading {
  min-width: 0;
  grid-column: 2 / span 6;
}

.gallery-gestures__heading h2 {
  max-width: 42rem;
}

.gallery-gestures__copy {
  min-width: 0;
  grid-column: 2 / span 4;
}

.gallery-gestures__copy p {
  max-width: 36rem;
  margin-block-end: 0;
}

.gallery-gestures__figure {
  min-width: 0;
  margin: calc(var(--space-8) * -1) 0 0;
  grid-column: 8 / span 4;
  grid-row: 1 / span 3;
}

.gallery-gestures__figure .gallery-image-link {
  aspect-ratio: 1;
}

.gallery-gestures__figure img {
  object-position: center;
}

.gallery-gestures__note {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-block-start: var(--space-5);
  border-block-start: var(--border-hairline);
  grid-column: 2 / span 4;
}

.gallery-gestures__note p {
  max-width: 30rem;
  margin-block-end: 0;
}

.gallery-sequence__intro {
  min-width: 0;
  grid-column: 2 / span 5;
}

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

.gallery-sequence__list {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-column: 7 / span 6;
}

.gallery-sequence__list li {
  min-width: 0;
  border-block-start: var(--border-hairline);
}

.gallery-sequence__list li:last-child {
  border-block-end: var(--border-hairline);
}

.gallery-sequence__list a {
  display: grid;
  min-width: 0;
  min-height: 8rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 5fr);
  gap: var(--space-4);
  padding-block: var(--space-4);
  color: inherit;
  text-decoration: none;
}

.gallery-sequence__number {
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  line-height: 1.3;
}

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

.gallery-sequence__content strong {
  font-family: var(--font-display);
  font-size: var(--text-h5);
  font-weight: 600;
  line-height: 1.1;
}

.gallery-sequence__content span {
  max-width: 36rem;
  color: var(--color-charcoal);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.gallery-reflection__grid {
  row-gap: var(--space-6);
}

.gallery-reflection__main {
  min-width: 0;
  grid-column: 4 / span 6;
}

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

.gallery-reflection__next {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-block-start: var(--space-5);
  border-block-start: var(--border-hairline);
  grid-column: 7 / span 4;
}

.gallery-reflection__next p {
  max-width: 32rem;
  margin-block-end: 0;
}

.gallery-next__copy {
  min-width: 0;
  grid-column: 2 / span 5;
}

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

.gallery-next__panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
  padding: var(--space-6);
  border: var(--border-hairline);
  border-radius: var(--radius-default);
  background: var(--color-paper);
  grid-column: 8 / span 4;
}

.gallery-next__panel h3,
.gallery-next__panel p {
  margin-block-end: 0;
}

.gallery-next__panel h3 {
  font-size: var(--text-h4);
}

.gallery-next__panel p {
  font-size: var(--text-sm);
  line-height: 1.55;
}

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

.gallery-next__actions > * {
  min-width: 0;
}

.gallery-closing__grid {
  row-gap: var(--space-6);
}

.gallery-closing__copy {
  min-width: 0;
  grid-column: 4 / span 5;
}

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

.gallery-closing__rule {
  width: 100%;
  min-width: 0;
  height: 1px;
  background: var(--color-line);
  grid-column: 3 / span 8;
}

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

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

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 70rem);
  max-height: min(90vh, 56rem);
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-modal);
  background: var(--color-paper);
  box-shadow: var(--shadow-modal);
}

.gallery-lightbox__figure {
  display: grid;
  min-width: 0;
  max-height: calc(min(90vh, 56rem) - 2rem);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--space-3);
}

.gallery-lightbox__figure img {
  width: 100%;
  max-width: 100%;
  max-height: min(65vh, 40rem);
  min-width: 0;
  object-fit: contain;
}

.gallery-lightbox__figure figcaption {
  min-width: 0;
  padding-inline: var(--space-2);
}

.gallery-lightbox__figure figcaption h2 {
  margin-block-end: var(--space-2);
  font-size: var(--text-h4);
}

.gallery-lightbox__figure figcaption p:not(.gallery-caption__number) {
  margin-block-end: 0;
  font-size: var(--text-sm);
}

.gallery-lightbox__close,
.gallery-lightbox__previous,
.gallery-lightbox__next {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-default);
  background: var(--color-ivory);
  color: var(--color-ink);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.gallery-lightbox__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  padding-inline: var(--space-3);
}

.gallery-lightbox__previous,
.gallery-lightbox__next {
  width: 2.75rem;
  overflow: hidden;
  padding: 0;
  font-size: 0;
}

.gallery-lightbox__previous::before {
  content: "←";
  font-size: 1.25rem;
}

.gallery-lightbox__next::before {
  content: "→";
  font-size: 1.25rem;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__previous:hover,
.gallery-lightbox__next:hover {
  background: var(--color-ink);
  color: var(--color-accent-ink);
  transform: translateY(-2px);
}

@media (max-width: 61.25rem) {
  .gallery-hero__copy {
    grid-column: 1 / span 5;
  }

  .gallery-hero__figure {
    grid-column: 6 / span 7;
  }

  .gallery-meal__copy {
    grid-column: 1 / span 5;
  }

  .gallery-meal__figure {
    grid-column: 7 / span 4;
  }

  .gallery-meal__caption {
    align-self: start;
    grid-column: 7 / span 4;
  }

  .gallery-meal__note {
    grid-column: 1 / span 5;
  }

  .gallery-lounge__copy {
    grid-column: 1 / span 6;
  }

  .gallery-lounge__figure {
    grid-column: 7 / span 6;
  }

  .gallery-lounge__quote {
    grid-column: 1 / span 8;
  }

  .gallery-gestures__heading,
  .gallery-gestures__copy,
  .gallery-gestures__note {
    grid-column: 1 / span 6;
  }

  .gallery-gestures__figure {
    margin-block-start: 0;
    grid-column: 7 / span 6;
  }

  .gallery-sequence__intro {
    grid-column: 1 / span 6;
  }

  .gallery-sequence__list {
    grid-column: 7 / span 6;
  }

  .gallery-reflection__main {
    grid-column: 2 / span 8;
  }

  .gallery-reflection__next {
    grid-column: 6 / span 6;
  }

  .gallery-next__copy {
    grid-column: 1 / span 6;
  }

  .gallery-next__panel {
    grid-column: 7 / span 6;
  }

  .gallery-closing__copy {
    grid-column: 1 / span 7;
  }

  .gallery-closing__rule {
    grid-column: 1 / span 10;
  }
}

@media (max-width: 56.25rem) {
  .gallery-meal__grid,
  .gallery-lounge__grid,
  .gallery-gestures__grid,
  .gallery-next__grid {
    row-gap: var(--space-5);
  }

  .gallery-meal__copy {
    grid-column: 1 / span 6;
  }

  .gallery-meal__figure {
    grid-column: 8 / span 5;
  }

  .gallery-meal__caption {
    grid-column: 8 / span 5;
  }

  .gallery-lounge__copy,
  .gallery-lounge__figure {
    grid-column: span 6;
  }

  .gallery-lounge__quote {
    grid-column: 1 / span 9;
  }

  .gallery-sequence__intro {
    grid-column: 1 / span 12;
  }

  .gallery-sequence__list {
    grid-column: 5 / span 8;
  }

  .gallery-reflection__main {
    grid-column: 1 / span 8;
  }

  .gallery-reflection__next {
    grid-column: 4 / span 7;
  }

  .gallery-next__copy {
    grid-column: 1 / span 6;
  }

  .gallery-next__panel {
    grid-column: 7 / span 6;
  }
}

@media (max-width: 43.75rem) {
  .gallery-page .section--spacious {
    padding-block: var(--space-8);
  }

  .gallery-hero__grid,
  .gallery-meal__grid,
  .gallery-lounge__grid,
  .gallery-gestures__grid,
  .gallery-sequence__grid,
  .gallery-reflection__grid,
  .gallery-next__grid,
  .gallery-closing__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-5);
  }

  .gallery-hero__copy,
  .gallery-hero__figure,
  .gallery-meal__copy,
  .gallery-meal__figure,
  .gallery-meal__caption,
  .gallery-meal__note,
  .gallery-lounge__copy,
  .gallery-lounge__figure,
  .gallery-lounge__quote,
  .gallery-gestures__heading,
  .gallery-gestures__copy,
  .gallery-gestures__figure,
  .gallery-gestures__note,
  .gallery-sequence__intro,
  .gallery-sequence__list,
  .gallery-reflection__main,
  .gallery-reflection__next,
  .gallery-next__copy,
  .gallery-next__panel,
  .gallery-closing__copy,
  .gallery-closing__rule {
    width: 100%;
    min-width: 0;
    grid-column: 1;
    grid-row: auto;
  }

  .gallery-hero__copy .lead,
  .gallery-meal__copy > p:not(.eyebrow),
  .gallery-meal__note p,
  .gallery-lounge__copy > p:not(.eyebrow),
  .gallery-gestures__copy p,
  .gallery-gestures__note p,
  .gallery-sequence__intro > p:not(.eyebrow),
  .gallery-sequence__content span,
  .gallery-reflection__main > p:not(.eyebrow),
  .gallery-reflection__next p,
  .gallery-next__copy > p:not(.eyebrow),
  .gallery-closing__copy > p:not(.eyebrow) {
    max-width: none;
  }

  .gallery-hero__figure,
  .gallery-meal__figure,
  .gallery-lounge__figure,
  .gallery-gestures__figure {
    margin-block-start: 0;
  }

  .gallery-meal__figure {
    width: 88%;
    justify-self: end;
  }

  .gallery-lounge__figure {
    width: 92%;
    justify-self: start;
  }

  .gallery-gestures__figure {
    width: 84%;
    justify-self: end;
  }

  .gallery-meal__caption {
    width: 100%;
  }

  .gallery-lounge__quote {
    width: 85%;
    padding-block-start: var(--space-5);
    font-size: clamp(1.875rem, 9vw, 2.125rem);
  }

  .gallery-sequence__list a {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
    padding-block: var(--space-5);
  }

  .gallery-sequence__content strong {
    font-size: var(--text-h5);
  }

  .gallery-reflection__next {
    width: 100%;
  }

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

  .gallery-closing__rule {
    margin-block-start: var(--space-2);
  }

  .gallery-lightbox {
    align-items: end;
    padding: var(--space-3);
  }

  .gallery-lightbox__dialog {
    width: 100%;
    max-height: 92vh;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-5) var(--space-3) var(--space-3);
    overflow-y: auto;
  }

  .gallery-lightbox__figure {
    max-height: none;
  }

  .gallery-lightbox__figure img {
    max-height: 55vh;
  }

  .gallery-lightbox__previous,
  .gallery-lightbox__next {
    position: absolute;
    top: 50%;
    z-index: 2;
    background: var(--color-ivory);
    transform: translateY(-50%);
  }

  .gallery-lightbox__previous {
    left: var(--space-3);
  }

  .gallery-lightbox__next {
    right: var(--space-3);
  }

  .gallery-lightbox__previous:hover,
  .gallery-lightbox__next:hover {
    transform: translateY(calc(-50% - 2px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-page .gallery-image-link img,
  .gallery-page .gallery-text-link::after,
  .gallery-lightbox__close,
  .gallery-lightbox__previous,
  .gallery-lightbox__next {
    transition: none;
  }

  .gallery-page .gallery-image-link:hover img,
  .gallery-page .gallery-image-link:focus-visible img,
  .gallery-lightbox__close:hover,
  .gallery-lightbox__previous:hover,
  .gallery-lightbox__next:hover {
    transform: none;
  }
}
