/* Opt-in photograph treatment for the public pages other than index.html.
   Match Collective's 18px corners and 24px / 16px breathing room without
   changing image sources, focal points or motion. Single full-screen hero
   images, brand marks and icons are excluded.
   Round the existing clipping frame for layered/animated images, not the
   moving image itself, so overlays and slides follow the same fixed edge. */
:root {
  --photo-corner-radius: 18px;
  --photo-frame-inset: 24px;
}

/* About: carousel cards, founder portrait and the split Our Vision photograph. */
main .zuvani-pillars .zuvani-pillar-card,
main .founder-hero__media,
main .home-vision__media,
/* Journeys: the two split-section photographs, not the full-screen hero. */
main .seasonal__image,
main .collective-invite__image,
/* Collective: keep the established carousel frames and include the form photo. */
main .editorial-image,
.collective-signup-dialog__image,
/* Impact Fund: individual gallery tiles and the split lion photograph. */
main .impact-gallery__item,
main .impact-follow__image,
/* Blog: individual collage panels and the existing photographic story card. */
main .hero-collage .hero-panel,
main .articles .article-card.featured-story-card,
main .articles:is(.is-all-stories, .is-experiences) .article-card.featured-story-card,
/* Article photography (and its already-rounded video/poster frame). */
main .hero-image.rhino-hero-image,
main .article-photo,
/* Enquiry: the split/compact photo panel, not a full-screen backdrop. */
main .home-planning__media {
  border-radius: var(--photo-corner-radius);
}

/* Previously edge-to-edge panels: keep the space outside the clipped frame,
   so all four corners are visible. Already-inset portraits, carousel cards,
   article-body photos and the Collective panels keep their existing gutters. */
main .home-vision__media,
main .seasonal__image,
main .collective-invite__image,
main .impact-follow__image,
main .home-planning__media,
.collective-signup-dialog__image {
  width: calc(100% - 2 * var(--photo-frame-inset));
  margin: var(--photo-frame-inset);
}

/* Grid images otherwise retain 100% height plus their new vertical margins. */
main .seasonal__image,
main .collective-invite__image {
  height: calc(100% - 2 * var(--photo-frame-inset));
}

/* Leave one equal gutter between adjacent photos, not two stacked margins. */
main .impact-gallery,
main .hero-collage {
  padding: var(--photo-frame-inset);
  gap: var(--photo-frame-inset);
}

main .hero-image.rhino-hero-image {
  width: calc(100% - 2 * var(--photo-frame-inset));
  margin-inline: var(--photo-frame-inset);
}

/* The enquiry frame can still grow beside its form without adding a second
   viewport-height floor inside the photograph. */
@media (min-width: 761px) {
  main .home-planning__media {
    min-height: calc(100svh - 2 * var(--photo-frame-inset));
  }
  main .home-planning__media img {
    min-height: 0;
  }
}

@media (max-width: 900px) {
  main .seasonal__image,
  main .collective-invite__image {
    height: clamp(360px, 62vw, 520px);
  }
}

@media (max-width: 640px) {
  :root { --photo-frame-inset: 16px; }

  /* The mobile Impact section already supplies 16px on its top and sides. */
  main .impact-follow__image {
    width: 100%;
    margin: 0 0 var(--photo-frame-inset);
  }
}
