/* ============================================================
   Hyper Keys — motion engine styles (OWNER: hero/motion agent)
   Reveal, parallax and sticky-scene primitives used by js/motion.js.
   Safety: the hidden state of [data-reveal] only applies after
   js/motion.js adds `.motion-on` to <html> — with JS off or
   reduced motion on, content is never invisible.
   ============================================================ */

/* ---- scroll reveal ----
   Usage (content agent): add data-reveal to any element entering the
   viewport. Optional stagger: data-reveal-delay="1" (= 80ms), 2 (= 160ms)… */
.motion-on:not(.motion-reduced) [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.motion-on [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---- parallax ----
   Usage: data-parallax="0.15" on an element inside a section/.scene-wrap.
   0.1..0.3 recommended. The engine translates Y by (sectionProgress - 0.5)
   * speed * 200px, eased each frame. Optional anchor override:
   data-parallax-root on an ancestor. */
[data-parallax] { will-change: transform; }

/* ---- sticky scenes (feature tour) ----
   Pattern for the content agent's tour scenes:

     <div class="scene-wrap" style="min-height: 280vh">   ← scroll room
       <div class="scene">pinned content</div>            ← sticks for the wrap's
     </div>                                                  extra height

   .scene-wrap needs extra height (inline style or a rule in
   css/sections.css — content agent's call). The scene itself sticks just
   below the fixed header (60px) for as long as its wrap is in view. */
.scene-wrap { position: relative; }
.scene { position: sticky; top: 60px; } /* 60px = sticky .site-head height */

/* ---- reduced motion: no reveal offset, no parallax movement ----
   (js/motion.js also reveals everything immediately and skips transforms.) */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  [data-reveal].in {
    opacity: 1;
    transform: none;
  }
  [data-parallax] {
    will-change: auto;
    transform: none;
  }
}
