/* GW Mechanical — light build: GWLightHero scenes mounted inside the fixed #gw-video-stage (desktop >=768px).
   The module scenes run in data-gwl-mode="external": the site's own scroll logic (app.js) feeds setProgress(),
   exactly where the black build scrubs its videos. This file only flattens the module's sticky scroll tracks
   into the fixed stage. Mobile (<=767px) keeps its own layer (mobile.css/mobile.js) — module hosts are hidden there. */

@media (min-width: 768px) {
  /* solid page colour behind the scenes; the old poster image is not used on desktop */
  #gw-video-stage[data-gwl-stage] {
    background: #FBF8F4 !important;
    background-image: none !important;
  }

  /* old desktop videos stay in the DOM (app.js reads their box) but never paint */
  #gw-video-stage[data-gwl-stage] > video {
    visibility: hidden !important;
    opacity: 0 !important;
  }

  #gw-video-stage .gwl-host {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  }
  #gw-video-stage .gwl-host > [data-gwl] {
    position: absolute; inset: 0; height: 100% !important; background: transparent;
  }
  #gw-video-stage .gwl-host .gwl-track {
    position: absolute; inset: 0; height: 100% !important; background: transparent;
  }
  #gw-video-stage .gwl-host .gwl-stage {
    position: absolute; inset: 0; top: 0; height: 100%; background: transparent;
  }
  /* the page-colour edge fades are for the in-page scroll track, not for the fixed stage */
  #gw-video-stage .gwl-host .gwl-stage::before,
  #gw-video-stage .gwl-host .gwl-stage::after { display: none; }

  /* rails host starts hidden (app.js crossfades it in where the black build fades its first rails clip in) */
  #gw-video-stage .gwl-host[data-gwl-host="rails"] { opacity: 0; }

  /* the hero scene paints its own flat page-colour background; the rails sit over it */
  #gw-video-stage .gwl-host[data-gwl-host="hero"] .gwl-stage { background: #FBF8F4; }

  /* rails: top bundle hugs the top edge, bottom bundle the bottom edge (same as the black frames) */
  #gw-video-stage .gwl-host[data-gwl-host="rails"] [data-gwl="rails-top"] .gwl-stage.gwl-center { align-items: flex-start; }
  #gw-video-stage .gwl-host[data-gwl-host="rails"] [data-gwl="rails-bottom"] .gwl-stage.gwl-center { align-items: flex-end; }

  /* expander inside the "more projects" link: fill the rounded rect like the old <video> did */
  [data-more-work-rect] > video[data-scrub-video="expander-boiler"] {
    visibility: hidden !important; opacity: 0 !important; position: absolute; inset: 0;
  }
  [data-more-work-rect] > .gwl-expander-host {
    position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; background: #FBF8F4;
  }
  [data-more-work-rect] > .gwl-expander-host.gwl-track, [data-more-work-rect] > .gwl-expander-host .gwl-track { position: absolute; inset: 0; height: 100% !important; background: transparent; }
  [data-more-work-rect] > .gwl-expander-host .gwl-stage { position: absolute; inset: 0; height: 100%; background: transparent; }
  [data-more-work-rect] > .gwl-expander-host .gwl-stage::before,
  [data-more-work-rect] > .gwl-expander-host .gwl-stage::after { display: none; }
  [data-more-work-rect] > .gwl-expander-host .gwl-expander { width: 100%; height: 100%; margin: 0; }
  [data-more-work-rect] > .gwl-expander-host .gwl-expander img { width: 100%; height: 100%; object-fit: contain; }
}

@media (max-width: 767px) {
  .gwl-host, .gwl-expander-host { display: none !important; }
}

/* round 2 (Alisa 19.11): труби без тіней і засвітів, фон рівний — прибрано drop-shadow після settle */
.gwl-hero[data-settled="1"] .gwl-pipes,
.gwl-rails[data-settled="1"] img,
.gwl-expander[data-settled="1"] img { filter: none !important; }
.gwl-stage::before, .gwl-stage::after { display: none !important; }
