/* ============================================================
   CADENCE — SCROLL MOTION LAYER
   Reveal-on-scroll fly-ins + a scroll-progress bar.
   The hidden start-state is gated on  html.js  and on
   (prefers-reduced-motion: no-preference), so with JS off OR
   reduced-motion on, everything is simply visible (no FOUC, no flash).
   Reveal targets are selector-based (no markup changes), and the
   auto-scrolling reel carousels are intentionally excluded.
   ============================================================ */

/* prevent the off-screen fly-in transforms from spawning a horizontal scrollbar */
html.js body{overflow-x:clip}

/* ---- top scroll-progress bar (pure CSS scroll-driven where supported) ---- */
.scroll-progress{position:fixed;inset:0 0 auto 0;height:3px;z-index:1200;transform-origin:0 50%;transform:scaleX(0);
  background:linear-gradient(90deg,var(--gold-700),var(--gold-300));box-shadow:0 0 12px rgba(201,178,138,.55);pointer-events:none}
@supports (animation-timeline: scroll()){
  .scroll-progress{animation:cm-progress linear both;animation-timeline:scroll(root block)}
}
@keyframes cm-progress{to{transform:scaleX(1)}}

/* ---- reveal-on-scroll ---- */
@media (prefers-reduced-motion: no-preference){
  html.js :is(
    .sec-head,
    .split > *,
    .jumps > .jump,
    .programs > .program,
    .team-grid > .tcard,
    .grid-4 > *,
    .cta-inner > *,
    .feature-panel
  ){
    opacity:0;transform:translateY(32px);
    transition:opacity .75s cubic-bezier(.16,1,.3,1), transform .85s cubic-bezier(.16,1,.3,1);
    transition-delay:var(--cm-d,0ms);will-change:opacity,transform;backface-visibility:hidden}

  /* directional fly-ins for the two-column split rows */
  html.js .split > *:nth-child(1){transform:translateX(-40px)}
  html.js .split > *:nth-child(2){transform:translateX(40px)}

  /* settled state */
  html.js :is(
    .sec-head,
    .split > *,
    .jumps > .jump,
    .programs > .program,
    .team-grid > .tcard,
    .grid-4 > *,
    .cta-inner > *,
    .feature-panel
  ).is-in{opacity:1;transform:none}
}
