/* Give the finished work its own light. The gradient is concentrated under the copy. */
.hero:has(.banner-photo) { background: #23221e; }
.banner-photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 79%;
  z-index: -3;
  overflow: hidden;
}
body[data-page] .hero .banner-photo .hero-bg {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}
body[data-page] .hero:has(.banner-photo) .hero-shade {
  background: linear-gradient(90deg, #23221e 10%, #23221ef5 23%, #22211dd4 35%, #21201b8a 46%, transparent 69%),
              linear-gradient(180deg, #171713bd, #1717132e 19%, transparent 33%);
}
.hero:has(.banner-photo) .hero-description { max-width: min(48ch, 43vw); }
.hero:has(.banner-photo) h1 { max-width: min(19ch, 55vw); }
body:has(.project-intro-layout) .site-header { position: relative; background: var(--ink); }
.project-intro-layout figure {
  height: auto;
  background: transparent;
  justify-self: center;
}
.project-intro-layout figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(345px, 40vw, 570px);
}
@media (max-width: 720px) {
  body:has(.banner-photo) .site-header { position: relative; background: var(--ink); }
  .hero:has(.banner-photo) { --photo-height: clamp(215px, 58vw, 370px); }
  .banner-photo { inset: 0 0 auto; width: 100%; height: var(--photo-height); }
  body[data-page] .hero:has(.banner-photo) .hero-shade {
    background: linear-gradient(180deg, transparent calc(var(--photo-height) - 36px), #23221e var(--photo-height));
  }
  body[data-page] .hero:has(.banner-photo) { display: block; min-height: 0; }
  body[data-page] .hero:has(.banner-photo) .hero-content {
    padding-top: calc(var(--photo-height) + 16px);
    padding-bottom: 36px;
  }
  .hero:has(.banner-photo) h1, .hero:has(.banner-photo) .hero-description { max-width: 100%; }
  .hero:has(.banner-photo) .breadcrumb { margin-top: 0; margin-bottom: 16px; }
  .project-intro-layout figure img { max-height: min(108vw, 500px); }
}

/* Each listing opens with one photograph. Keep the entire project in frame. */
.portfolio-cover {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}
.portfolio-cover img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(350px, 38vw, 555px);
}
.portfolio-project.mirror .portfolio-cover { order: 1; }
.project-gallery-item img,
.canva-gallery .project-gallery-item img,
.project-lightbox .lightbox-image { object-fit: scale-down; }
@media (max-width: 950px) {
  .portfolio-project.mirror .portfolio-cover { order: 0; }
  .portfolio-cover img { max-height: min(108vw, 500px); }
}
.editorial-picture { display: contents; }
