/* Split editorial photographs only. Full-bleed heroes, gallery tiles, cards
   and popup forms are excluded.
   Portrait tablets stack image-first; landscape tablets retain two columns.
   Matching frames stay the same size regardless of the source photograph's
   aspect ratio. Cover fills those frames without distortion or empty bands;
   existing image-specific focal points keep the important subjects in view. */
@media (min-width: 641px) and (max-width: 1100px) and (orientation: portrait),
       (min-width: 1001px) and (max-width: 1400px) and (min-height: 600px) and (orientation: landscape) {
  main .collective-intro > .collective-intro__image,
  main .travel-together__image,
  main .founder-hero__media,
  main .home-vision__media,
  main .seasonal__media,
  main .collective-invite__media,
  main .impact-follow__image,
  main .home-planning > .home-planning__media {
    position: relative;
    inset: auto;
    align-self: center;
    justify-self: center;
    width: calc(100% - 12px);
    max-width: none;
    height: min(760px, calc(100svh - 100px));
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    margin: 6px;
    background: var(--warm-ivory, #f5efe3);
    line-height: 0;
  }

  main .collective-intro__image > img,
  main .founder-hero__media > img,
  main .home-vision__media > img,
  main .seasonal__media > .seasonal__image,
  main .collective-invite__media > .collective-invite__image,
  main .impact-follow__image > img,
  main .home-planning > .home-planning__media > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    aspect-ratio: auto;
    margin: 0;
    object-fit: cover;
    border-radius: var(--photo-corner-radius, 18px);
    transform: none;
  }

  /* Use the same quiet ground behind static photos and the changing slides. */
  main .travel-together__image .scene-carousel__viewport {
    background: var(--warm-ivory, #f5efe3);
  }

  main .editorial-image.travel-together__image .scene-carousel__slide {
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--photo-corner-radius, 18px);
    transform: none;
    transition-property: opacity;
  }

  /* Home's photo credit moves with its photograph, never over a blank frame. */
  main .founder-hero > .founder-portrait {
    position: static;
    inset: auto;
    align-self: end;
    justify-self: center;
    width: calc(100% - 12px);
    max-width: none;
    height: min(760px, calc(100svh - 100px));
    min-height: 0;
    aspect-ratio: auto;
    margin: 6px;
    object-fit: cover;
    background: var(--warm-ivory, #f5efe3);
  }

  main .founder-hero > .founder-intro:not(.founder-copy) {
    grid-row: 1 / 3;
  }

  body main .founder-hero > .photo-caption {
    position: static;
    grid-row: 2;
    align-self: start;
    justify-self: center;
    width: 100%;
    max-width: 60ch;
    height: auto;
    margin: 12px 0 0;
    padding: 0 24px 32px;
    border-radius: 0;
    background: none;
    text-shadow: none;
  }

  body main .founder-hero .photo-caption .photo-caption__location {
    color: var(--text-accent);
  }

  body main .founder-hero .photo-caption .photo-caption__text {
    color: var(--text-secondary);
  }
}

@media (min-width: 641px) and (max-width: 1100px) and (orientation: portrait) {
  /* Stacked tablet actions share the page centre, not a narrow desktop
     reading measure. Keep the editorial headings and paragraphs left aligned. */
  main .collective-invite > .collective-invite__copy {
    grid-template-columns: minmax(0, 1fr);
  }

  main .collective-invite__copy > .collective-status {
    width: 100%;
    max-width: none;
    text-align: center;
  }

  main .collective-invite__copy > .conversion-cta {
    justify-self: center;
    margin-inline: auto;
  }

  main .home-vision[aria-labelledby="about-vision-title"] .home-vision__body {
    width: 100%;
    max-width: none;
  }

  main .collective-intro,
  main .travel-together,
  main .founder-hero,
  main .home-vision,
  main .seasonal,
  main .collective-invite,
  main .impact-follow,
  main .home-planning {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  main .collective-intro__image,
  main .travel-together__image,
  main .seasonal__media,
  main .collective-invite__media,
  main .home-vision__media,
  main .impact-follow__image,
  main .home-planning__media {
    grid-column: 1;
    grid-row: 1;
    order: 0;
  }

  main .collective-intro > .editorial-copy,
  main .travel-together > .editorial-copy,
  main .seasonal > .seasonal__copy,
  main .collective-invite > .collective-invite__copy,
  main .home-vision > .home-vision__content,
  main .impact-follow > .impact-follow__content,
  main .home-planning > .home-planning__form-panel {
    position: static;
    grid-column: 1;
    grid-row: 2;
    order: 0;
    height: auto;
    min-height: 0;
  }

  main .collective-intro > .editorial-copy,
  main .travel-together > .editorial-copy {
    padding: 64px clamp(32px, 7vw, 80px);
  }

  /* About has two separate biography blocks; retain their reading order. */
  main .founder-hero:has(> .founder-hero__media) {
    grid-template-areas: "media" "intro" "body";
    row-gap: 28px;
    padding: 64px 0;
  }

  main .founder-hero > .founder-copy {
    max-width: none;
    padding-inline: clamp(32px, 7vw, 80px);
  }

  main .founder-hero > .founder-portrait {
    grid-column: 1;
    grid-row: 1;
  }

  body main .founder-hero > .photo-caption {
    grid-column: 1;
    grid-row: 2;
  }

  main .founder-hero > .founder-intro:not(.founder-copy) {
    grid-column: 1;
    grid-row: 3;
    padding: 40px clamp(32px, 7vw, 80px) 64px;
  }

  main .home-planning .enquiry-raw {
    min-height: 0;
    padding-block: 64px;
  }
}
