/* Perry Mansion: large photo boxes never grow taller than the screen (screen height minus the 171px header). Photos are cropped to the box, never stretched. */
@media (min-width:768px){
  .hero-full,.split .media,.pair .media,.res-panel .inner{max-height:calc(100vh - 171px)}
  .hero-full,.split .media,.pair .media{overflow:hidden}
  .hero-full img,.split .media img,.pair .media img{max-height:calc(100vh - 171px);object-fit:cover}
}
/* home hero: full width, screen height. A 2.6:1 panorama fills the box; only the extended outer sides can trim on narrower screens, the house stays centered. 1412 x 700 at 1440 x 900. */
@media (min-width:1024px) and (min-aspect-ratio:6/5){
  .home-page .hero-full{position:relative;overflow:hidden;margin:0 14px;width:auto;aspect-ratio:auto;max-height:none;height:min(calc((100vw - 28px) * 700 / 1412),calc(100vh - 171px));background:none}
  .home-page .hero-full img.home-hero-photo{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:cover !important;object-position:50% 50% !important}
}

/* Laptop screens: photo boxes stay within the screen (screen height below the header), and the side-by-side
   top photo fills its full half of the page at that height. */
@media (min-width:1024px) and (max-height:1000px){
  main .split:first-of-type > .media:has(> img){aspect-ratio:auto;width:100%;height:calc(100vh - 171px);max-height:calc(100vh - 171px)}
}