/* A common frame and reading grid for project imagery. */
.project-story .story-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 48px;
  padding: 44px 0;
}
.project-story .story-label { grid-column: 1 / -1; padding-top: 0; }
.project-story .story-section > div:not(.story-label):not(.project-scenes) {
  grid-column: 1 / -1;
  min-width: 0;
}
.project-story .story-section-with-media > div:not(.story-label):not(.project-scenes) { grid-column: 1; }
.project-story .story-section h2 { font-size: clamp(24px, 2.2vw, 29px); }
.project-scenes {
  display: grid;
  grid-column: 2;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  margin: 0;
  scroll-margin-top: 36px;
}
.project-scenes-pair { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-scene { min-width: 0; width: 100%; margin: 0; }
.project-scene-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--detail-soft);
}
.project-scene-image:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.project-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--scene-position, 50% 50%);
}
.project-scene-document img { object-fit: contain; padding: 18px; }
.project-scene figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
/* Intro visuals share a separate wide frame, including portrait posters. */
.detail-page .detail-figure {
  display: block;
  width: calc(100% - var(--page-gutter) - var(--page-gutter));
  max-width: 960px;
  margin: 0 auto 56px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.detail-page .detail-figure img {
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--detail-soft);
}
.detail-page .detail-figure figcaption {
  max-width: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.8;
}
@media (max-width: 800px) {
  .project-story .story-section { display: block; padding: 30px 0; }
  .project-story .story-label { margin-bottom: 18px; }
  .project-story .story-section h2 { font-size: 24px; }
  .project-scenes { margin-top: 24px; }
  .project-scenes-pair { grid-template-columns: minmax(0, 1fr); }
  .project-scene-image { border-radius: 14px; }
  .project-scene-document img { padding: 12px; }
  .project-scene figcaption { margin-top: 8px; font-size: 10px; }
  .detail-page .detail-figure { margin-bottom: 36px; }
  .detail-page .detail-figure img { padding: 12px; border-radius: 14px; }
  .detail-page .detail-figure figcaption { font-size: 10px; }
}

.detail-media-intro { display: block; border-radius: 18px; }
.detail-media-intro:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
