/*
 * GALLERY PAGE
 */

.gallery-page {
  overflow-x: hidden;
}

.gallery-page main {
  min-width: 0;
  min-height: 0;
}

/* GALLERY INTRO */

.gallery-page .page-hero {
  min-height: 0;
  padding: clamp(45px, 5vw, 75px) clamp(24px, 5vw, 96px) clamp(60px, 7vw, 105px);
  display: block;
}

.gallery-heading .eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.gallery-heading h1 {
  margin: 0;
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(44px, 4.2vw, 62px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

/* ARTWORK GRID */

.art-grid {
  width: auto;
  margin: 0 clamp(24px, 5vw, 96px);
  padding: 0 0 clamp(20px, 2vw, 30px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1px;
  grid-auto-flow: dense;
  align-items: start;
  column-gap: clamp(28px, 4vw, 70px);
  row-gap: 0;
}

.art-card,
.art-card:nth-child(even),
.art-card:nth-child(3n) {
  width: 100%;
  min-width: 0;
  margin: 0;
  grid-column: auto;
  align-self: start;
  transform: none;
}

.art-open {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.art-open img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: initial;
  object-position: initial;
  transition:
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.35s ease;
}

.art-open:hover img {
  transform: scale(1.012);
  opacity: 0.9;
}

/* CAPTIONS */

.art-card figcaption {
  width: 100%;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  border-top: 0;
}

.art-card figcaption span {
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(17px, 1.25vw, 20px);
  font-weight: 400;
  line-height: 1.3;
}

.art-card figcaption small {
  flex-shrink: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* MOBILE */

@media (max-width: 800px) {
  .gallery-page .page-hero {
    padding: clamp(32px, 5vh, 44px) 24px 60px;
    display: block;
  }

  .gallery-heading h1 {
    font-size: 46px;
  }

  .art-grid {
    margin: 0 18px;
    padding-bottom: 35px;
    display: block;
  }

  .art-card,
  .art-card:nth-child(even),
  .art-card:nth-child(3n) {
    width: 100%;
    margin: 0 0 50px;
    grid-row-end: auto !important;
    transform: none;
  }

  .art-card:last-child {
    margin-bottom: 0;
  }

  .art-card figcaption {
    padding-top: 14px;
    align-items: flex-start;
    gap: 18px;
  }

  .art-card figcaption span {
    font-size: 18px;
  }

  .art-card figcaption small {
    padding-top: 4px;
    font-size: 8px;
    text-align: right;
  }

  .gallery-page .site-footer {
    margin-top: 0;
  }
}
