/* Approved house crop and fade. Text geometry belongs to the flow layout
   in site.css / home-mobile.css and grows with CMS content. */
@media (min-width: 768px) {
  html:has(body.home),
  body.home {
    /* Safari can expose the document's background during bottom overscroll. */
    background: var(--ap-black);
  }

  .ap-home .ap-hero {
    /* The statistics end at 1096px on the 1920px reference canvas.
       Keep a deliberate 54px breathing room instead of the former 286px. */
    --ap-hero-fade-end: 100%;
    height: auto;
    min-height: min(60cqw, 1150px);
  }
  .ap-home .ap-hero__image {
    height: min(62cqw, 1190px);
    object-fit: cover;
    object-position: 50% 10%;
  }

  .ap-home .ap-hero::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    background:
      linear-gradient(to bottom, rgb(0 0 0 / .60) 0, rgb(0 0 0 / .60) 50%, rgb(0 0 0 / .20) 72%, transparent 100%),
      linear-gradient(to bottom, transparent 43%, rgb(0 0 0 / .16) 55%, rgb(0 0 0 / .7) 78%, #000 var(--ap-hero-fade-end));
    content: "";
    opacity: 1;
    pointer-events: none;
  }




}

/* Tablet is a separate, deliberately composed layout rather than a compressed
   desktop. Figma provides the canonical 1920px coordinates (Home 4083:417):
   divider y=865, intro y=917, statistics y=1298. There is no separate tablet
   frame, so these positions are scaled into a contained tablet scene. */
@media (min-width: 768px) and (max-width: 1199px) {
  .ap-home .ap-hero {
    /* Reach solid black before the image ends at 91.8% of this tablet scene,
       so no source-pixel row can meet the continuation on a hard edge. */
    --ap-hero-fade-end: 88%;
    height: auto;
    min-height: min(80vw, 820px);
  }

  .ap-home .ap-hero__image {
    height: min(73.49vw, 752px);
    object-position: 50% 10%;
  }






}

/* Deliberate mobile crop: keep the entrance axis and both main facade volumes. */
@media (max-width: 767px) {
  body .ap-home .ap-hero__image {
    height: 430px;
    object-fit: cover;
    object-position: 48% 22%;
  }
}
