/* =====================================================================
   windmill.css - home page hero: the wind turbine's blades turn.

   Layers, all behind the hero content:
     .wmSky     the hero photo with its three blades removed
     .wmCanvas  the turning blades, drawn in 3D by windmill.js
     .wmFront   the same photo again, masked: the spinner nose (covers the
                blade roots) and the fog (blades fade as they dip into it)
   Nothing here applies until windmill.js adds the class "wmOn" to
   .landingContainer; until then, and in browsers that cannot do this,
   the page keeps the original still photo from home.css.
   ===================================================================== */
.heroBg {
  display: none;
}

@supports (width: 1cqw) and (aspect-ratio: 1) {
  .landingContainer.wmOn {
    position: relative;
    background-image: none;
  }
  .wmOn .heroBg {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    container-type: size;
    background-color: #decfc4;
  }
  /* The stage is the photo. It is sized like "background-size: cover", anchored
     top-left, exactly as the old background image was. */
  .wmStage {
    position: absolute;
    left: 0;
    top: 0;
    width: max(100cqw, 139.8058cqh);
    aspect-ratio: 1440 / 1030;
  }
  .wmSky,
  .wmFront {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../Asset/Home/landingContainer/windmill-sky.webp") 0 0 / 100% 100% no-repeat;
  }
  .wmFront {
    -webkit-mask-image: radial-gradient(ellipse 1.3953% 1.7231% at 63.179% 47.161%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 49.144%, rgba(0,0,0,0.15) 51.745%, rgba(0,0,0,0.38) 54.996%, rgba(0,0,0,0.55) 58.247%, rgba(0,0,0,0.7) 60.848%, rgba(0,0,0,0.85) 63.449%, rgba(0,0,0,0.95) 66.050%, #000 68.001%);
    mask-image: radial-gradient(ellipse 1.3953% 1.7231% at 63.179% 47.161%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 49.144%, rgba(0,0,0,0.15) 51.745%, rgba(0,0,0,0.38) 54.996%, rgba(0,0,0,0.55) 58.247%, rgba(0,0,0,0.7) 60.848%, rgba(0,0,0,0.85) 63.449%, rgba(0,0,0,0.95) 66.050%, #000 68.001%);
  }
  /* the part of the photo the blades can reach (same numbers as AREA in windmill.js) */
  .wmCanvas {
    position: absolute;
    left: 48.808%;
    top: -0.000%;
    width: 41.393%;
    height: 68.651%;
  }

  /* Phones and small tablets: same crop as the old mobile background (MobilelandingBg2) */
  @media screen and (max-width: 845px) {
    .wmStage {
      --wv: max(100cqw, 63.3284cqh);
      left: calc(var(--wv) * -1.46902);
      top: calc(var(--wv) * -0.28576);
      width: calc(var(--wv) * 3.17915);
      transform-origin: 0 0;
      transform: scaleY(0.83721);
    }
  }
}
