/* =========================================================
   V40 · Seamless white photo dissolves
   - Every Home photograph fades toward pure white, never dark.
   - Photographs are full-bleed so no hard crop edge is exposed.
   - A soft white perimeter feather visually joins the image to the page.
   ========================================================= */

/* The canvas behind every cinematic photo is pure white. */
body.cinematic-home .cinema-scene,
body.cinematic-home .cinema-sticky{
  background:#fff!important;
}
body.cinematic-home .cinema-sticky::before{
  background:#fff!important;
}

/* Never expose an inset media rectangle while the photo fades. */
body.cinematic-home .cinema-media,
body.cinematic-home .cinema-scene-white-blend .cinema-media{
  inset:0!important;
  background:#fff!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
  -webkit-mask-image:none!important;
  mask-image:none!important;
  clip-path:none!important;
  -webkit-clip-path:none!important;
}

/* Keep the image slightly brighter as it approaches transparency so the
   transition visually dissolves into white instead of revealing a grey frame. */
body.cinematic-home .cinema-media img{
  filter:
    saturate(.94)
    contrast(1.01)
    brightness(var(--v40-photo-brightness,var(--v38-photo-brightness,1)))
    blur(var(--v38-photo-blur,0px))!important;
}

/* White feather around the physical edges of every photograph. It is an
   overlay, not a clipping mask: there is no rectangular reveal line. */
body.cinematic-home .cinema-media::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  inset:-1px!important;
  z-index:6!important;
  pointer-events:none!important;
  background:
    linear-gradient(90deg,
      #fff 0%,
      rgba(255,255,255,.82) 2.5%,
      rgba(255,255,255,.34) 6%,
      rgba(255,255,255,0) 12%,
      rgba(255,255,255,0) 88%,
      rgba(255,255,255,.34) 94%,
      rgba(255,255,255,.82) 97.5%,
      #fff 100%),
    linear-gradient(180deg,
      #fff 0%,
      rgba(255,255,255,.76) 2.5%,
      rgba(255,255,255,.24) 6%,
      rgba(255,255,255,0) 12%,
      rgba(255,255,255,0) 88%,
      rgba(255,255,255,.30) 94%,
      rgba(255,255,255,.80) 97.5%,
      #fff 100%)!important;
}

/* Existing dark readability overlays disappear faster than the photograph,
   so a partially faded scene can never turn into a dark/grey block. */
body.cinematic-home .cinema-overlay{
  opacity:var(--v40-overlay-opacity,var(--v38-overlay-opacity,.94))!important;
}

/* Team scene: stronger white blend on the copy side. The photograph remains
   full-bleed underneath, eliminating the old vertical cut completely. */
body.cinematic-home .cinema-scene-white-blend .cinema-media::after{
  background:
    linear-gradient(90deg,
      #fff 0%,
      #fff 18%,
      rgba(255,255,255,.995) 27%,
      rgba(255,255,255,.94) 36%,
      rgba(255,255,255,.72) 46%,
      rgba(255,255,255,.36) 58%,
      rgba(255,255,255,.08) 69%,
      rgba(255,255,255,0) 76%,
      rgba(255,255,255,0) 89%,
      rgba(255,255,255,.32) 95%,
      #fff 100%),
    linear-gradient(180deg,
      #fff 0%,
      rgba(255,255,255,.82) 3%,
      rgba(255,255,255,.22) 10%,
      rgba(255,255,255,0) 19%,
      rgba(255,255,255,0) 84%,
      rgba(255,255,255,.30) 92%,
      #fff 100%)!important;
}
body.cinematic-home .cinema-scene-white-blend .cinema-overlay{
  opacity:1!important;
}

/* On the white editorial scene, the photo itself does the focus pull, not a
   masked/inset container. */
body.cinematic-home .cinema-scene-white-blend .cinema-media img{
  object-position:64% 50%!important;
}

@media(max-width:700px){
  /* Wider feather on small screens hides the edges even during fast scroll. */
  body.cinematic-home .cinema-media::after{
    background:
      linear-gradient(90deg,
        #fff 0%,rgba(255,255,255,.70) 4%,rgba(255,255,255,.16) 11%,rgba(255,255,255,0) 19%,
        rgba(255,255,255,0) 81%,rgba(255,255,255,.18) 89%,rgba(255,255,255,.72) 96%,#fff 100%),
      linear-gradient(180deg,
        #fff 0%,rgba(255,255,255,.68) 4%,rgba(255,255,255,.12) 11%,rgba(255,255,255,0) 19%,
        rgba(255,255,255,0) 79%,rgba(255,255,255,.38) 88%,rgba(255,255,255,.88) 96%,#fff 100%)!important;
  }

  body.cinematic-home .cinema-scene-white-blend .cinema-media::after{
    background:
      linear-gradient(180deg,
        rgba(255,255,255,.32) 0%,
        rgba(255,255,255,.05) 24%,
        rgba(255,255,255,.50) 48%,
        rgba(255,255,255,.94) 67%,
        #fff 82%,
        #fff 100%),
      linear-gradient(90deg,
        #fff 0%,rgba(255,255,255,.42) 8%,rgba(255,255,255,0) 25%,
        rgba(255,255,255,0) 79%,rgba(255,255,255,.50) 93%,#fff 100%)!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body.cinematic-home .cinema-overlay{opacity:.94!important}
  body.cinematic-home .cinema-scene-white-blend .cinema-overlay{opacity:1!important}
}
