/* Whole-image parallax, not a moving crop. The track reserves the full travel. */
.home-quality,
.services-page,
.about-page {
  --section-space: clamp(64px, 7.5vw, 112px);
}

.photography-interlude {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 0 var(--gutter);
  color: var(--text-secondary);
  view-timeline-name: --photography-passage;
  view-timeline-axis: block;
}

.home-quality .photography-interlude {
  width: min(100%, var(--portfolio-width));
}

.photography-interlude-track {
  display: grid;
  grid-template-columns: var(--photo-columns);
  gap: clamp(10px, 1.5vw, 24px);
  align-items: center;
  padding-block: 20px;
}

.photography-interlude-item {
  display: block;
  min-width: 0;
  color: inherit;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.photography-interlude-image,
.photography-interlude-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
}

.photography-interlude-image img {
  aspect-ratio: var(--photo-aspect);
  object-fit: contain;
}

.photography-interlude figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding-block: 4px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.photography-interlude figcaption a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--text-primary);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.3em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.photography-interlude figcaption a:is(:hover, :focus-visible) {
  color: var(--action-primary);
  text-decoration-color: currentColor;
}

/* No opacity animation: all photos remain visible without motion support or JS. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 641px) {
    .photography-interlude-image {
      animation: photography-passage linear both;
      animation-timeline: --photography-passage;
      animation-range: entry 0% exit 100%;
    }
    .photography-interlude-item:nth-child(2) .photography-interlude-image {
      animation-direction: reverse;
    }
  }
}

@keyframes photography-passage {
  from { transform: translate3d(0, 14px, 0); }
  to { transform: translate3d(0, -14px, 0); }
}

/* The shared link focus ring remains stationary and is never duplicated. */
.photography-interlude-item:focus-visible .photography-interlude-image {
  animation: none;
  transform: none;
}

@media (max-width: 640px) {
  .photography-interlude-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 8px;
    padding: 8px 8px 16px;
    scrollbar-width: thin;
  }
  .photography-interlude-item {
    flex: 0 0 76%;
    scroll-snap-align: start;
  }
  .photography-interlude figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}
