/* 0.8.26 — Bali Villa hero framing: the house is the focus, centred. Loaded last. */

/* Project page hero (scoped so Bowenpally is unchanged) */
.p-bali .bh .art{aspect-ratio:4/3;background:#ece8de}
.p-bali .bh .art img{object-fit:cover;object-position:50% 50%}
@media(min-width:768px){
  .p-bali .bh .art{aspect-ratio:5/2;height:auto;min-height:360px;max-height:calc(100svh - var(--hh) - 170px)}
  .p-bali .bh .art img{object-position:50% 50%}
}

/* Homepage slideshow — desktop: fill the frame, house centred */
.hs .s.dw{background:#ece8de}
.hs .s.dw img{
  object-fit:cover!important;
  object-position:50% 50%!important;
  transform:none!important;
  animation:none!important;
}

/* Homepage selected-work card, projects grid, services card, next-project teaser */
.hpc .im img[src*="bl-east"],
.hpc .im img[src*="bl-hero"],
.pcard .im img[src*="bl-east"],
.pcard .im img[src*="bl-hero"],
.ksvc-card .im img[src*="bl-east"],
.ksvc-card .im img[src*="bl-hero"],
.nxt .bg img[src*="bl-east"],
.nxt .bg img[src*="bl-hero"]{
  object-fit:cover;
  object-position:50% 50%;
}

/* Projects: Bali is the architecture card; contain was showing the full sky */
.pcard[data-cat~="architecture"] .im{aspect-ratio:4/3;background:#ece8de}
.pcard[data-cat~="architecture"] .im img{object-fit:cover;object-position:50% 50%}
@media(min-width:960px){
  .pcard[data-cat~="architecture"] .im,
  .pcard:nth-child(1)[data-cat~="architecture"] .im{aspect-ratio:5/2;height:auto}
}

/* Walkthrough placeholder still uses the elevation if no film is set */
.vph img{object-fit:cover;object-position:50% 50%}

/* —— Phones / portrait: show the WHOLE house (eaves, roof to plinth). Do not cover-crop. —— */
@media(max-width:767px){
  /* Tall homepage slider: full-width house, upper-middle, blurred tinted fill behind.
     Headline and buttons sit on the existing dark gradient below. */
  .hs .s.dw{
    background:#1a1918;
    overflow:hidden;
  }
  .hs .s.dw::before{
    content:"";
    position:absolute;
    inset:-20%;
    z-index:0;
    background:url(img/bl-hero43-1600.webp) 50% 60%/cover no-repeat;
    filter:blur(32px) saturate(.75) brightness(.45);
    pointer-events:none;
  }
  .hs .s.dw img{
    position:relative;
    z-index:1;
    object-fit:contain!important;
    object-position:50% 32%!important;
  }

  /* Selected-work card: 4/3 matches the crop, so the full facade is visible */
  .hpc .im:has(img[src*="bl-hero"]),
  .hpc .im:has(img[src*="bl-east"]){aspect-ratio:4/3}

  /* Next-project teaser (tall) — same idea as the slider */
  .nxt:has(img[src*="bl-hero"]) .bg,
  .nxt:has(img[src*="bl-east"]) .bg{background:#1a1918;overflow:hidden}
  .nxt:has(img[src*="bl-hero"]) .bg::before,
  .nxt:has(img[src*="bl-east"]) .bg::before{
    content:"";
    position:absolute;
    inset:-20%;
    z-index:0;
    background:url(img/bl-hero43-1600.webp) 50% 60%/cover no-repeat;
    filter:blur(32px) saturate(.75) brightness(.45);
    pointer-events:none;
  }
  .nxt .bg img[src*="bl-hero"],
  .nxt .bg img[src*="bl-east"]{
    object-fit:contain;
    object-position:50% 38%;
    position:relative;
    z-index:1;
  }
}
