/* Hero scroll story. Desktop + motion allowed only; otherwise hero stays as built.
   Uses translate/scale/opacity (not transform) so it composes with the site's own Motion transforms.
   Vars set by hero-story.js on #start: --b (focus), --t (tap), --c (dashboard), --d (words), each 0..1. */
@media (min-width:1100px) and (prefers-reduced-motion:no-preference){
  #start.hs-on{height:300vh;overflow:visible}
  #start.hs-on>.hero-act{position:sticky;top:var(--hs-top,89px);height:calc(100vh - var(--hs-top,89px));display:flex;align-items:center;overflow:clip}
  #start.hs-on .hero-layout{width:100%}

  /* B: copy steps back, scene moves to centre */
  #start.hs-on .hero-copy{opacity:calc(1 - var(--b));translate:0 calc(var(--b) * -40px)}
  #start.hs-away .hero-copy{visibility:hidden}
  #start.hs-on .hero-scene{translate:calc(var(--b) * -24vw) 0;scale:calc(1 + var(--b) * .08)}
  #start.hs-on .scene-cursor{opacity:calc(1 - var(--b))}

  /* tap on the first kiosk tile */
  #start.hs-on .kiosk-tiles>:first-child{scale:calc(1 - var(--t) * (1 - var(--t)) * .3);box-shadow:0 0 0 calc(var(--t) * 16px) rgb(6 73 255 / calc(.4 * (1 - var(--t)) * min(1, var(--t) * 20)))}

  /* C: kiosk leaves, dashboard flattens and grows */
  #start.hs-on .hero-kiosk-plane{opacity:calc(1 - var(--c));translate:calc(var(--c) * -180px) calc(var(--c) * 40px);scale:calc(1 - var(--c) * .12)}
  #start.hs-on .hero-dashboard-plane{translate:calc(var(--c) * -150px) calc(var(--c) * -110px);scale:calc(1 + var(--c) * .4);opacity:calc(1 - var(--d) * .8)}
  #start.hs-on .hero-dashboard{transform:perspective(1000px) rotateY(calc(-16deg * (1 - var(--c)))) rotateX(calc(8deg * (1 - var(--c)))) rotate(calc(-4deg * (1 - var(--c))))}
  #start.hs-on .tag-top{translate:calc(var(--c) * 120px) calc(var(--c) * -50px);opacity:calc(1 - var(--d))}
  #start.hs-on .tag-bottom{translate:calc(var(--c) * 150px) calc(var(--c) * 60px);opacity:calc(1 - var(--d))}
  #start.hs-on .scene-grid,#start.hs-on .scene-orbit{opacity:calc(1 - var(--d) * .7)}

  /* D: three words */
  .hs-words{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;padding-left:max(48px,calc((100vw - 1280px) / 2));pointer-events:none;margin:0}
  .hs-words span{display:block;font-weight:600;font-size:clamp(56px,7vw,112px);line-height:1;letter-spacing:-.055em;color:#171e20;opacity:calc(var(--w) * 1);translate:0 calc((1 - var(--w)) * 40px)}
  .hs-words span:last-child{color:#0649ff}
}
.hs-words{display:none}
@media (min-width:1100px) and (prefers-reduced-motion:no-preference){#start.hs-on .hs-words{display:flex}}
