/* Photographic chapters: a tactile, horizontal family album rather than a repeated grid. */
.photo-albums {
  padding: 0 0 100px;
  overflow: hidden;
}

.photo-album {
  padding: 55px 0 65px;
  border-top: 1px solid var(--line);
}

.album-heading {
  padding: 0 6% 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.album-heading > div:first-child {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(260px, 1fr);
  align-items: end;
  gap: 6vw;
}

.album-heading h2 {
  font-size: clamp(34px, 4vw, 59px);
  line-height: 1.12;
}

.album-heading p {
  max-width: 430px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.album-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.album-controls button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 20px;
  transition: background .2s, color .2s;
}

.album-controls button:hover {
  background: var(--ink);
  color: var(--paper);
}

.album-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 6%;
  padding: 0 6% 20px;
  scrollbar-width: none;
}

.album-rail::-webkit-scrollbar {
  display: none;
}

.photo-albums .album-card {
  flex: 0 0 min(54vw, 760px);
  scroll-snap-align: start;
  margin: 0;
}

.photo-albums .album-card--portrait {
  flex-basis: min(33vw, 470px);
}

.photo-albums .album-card img,
.photo-albums .album-card:nth-child(4n+2) img,
.photo-albums .album-card:nth-child(4n+3) img {
  height: clamp(390px, 45vw, 610px);
  object-fit: cover;
}

.photo-albums .album-card > span {
  padding-top: 12px;
  margin: 0;
  border-top: 1px solid transparent;
}

.photo-albums .album-card:hover > span {
  border-top-color: var(--ink);
}

@media (max-width: 700px) {
  .photo-albums { padding-bottom: 60px; }
  .photo-album { padding: 38px 0 45px; }
  .album-heading { padding: 0 6% 22px; display: block; }
  .album-heading > div:first-child { display: block; }
  .album-heading h2 { font-size: 31px; }
  .album-heading p { font-size: 13px; margin-top: 12px; }
  .album-controls { display: none; }
  .album-rail { gap: 14px; }
  .photo-albums .album-card { flex-basis: 84vw; }
  .photo-albums .album-card--portrait { flex-basis: 68vw; }
  .photo-albums .album-card img,
  .photo-albums .album-card:nth-child(4n+2) img,
  .photo-albums .album-card:nth-child(4n+3) img {
    height: 410px;
    max-height: none;
  }
  .photo-albums .album-card > span { font-size: 12px; }
}
