/* ============================================================================
   Entrance motion, build 2, 7 Oct 2026.
   Spec: bridge/design-studies/shiftlab-direction-2026-10-07/MOTION-ADDENDUM.md
   ("i like the animations too", 7 Oct), published at b32bb4b.

   SAFETY MODEL, read before changing anything here.
   Content is visible by default. The hidden pre-animation state applies only
   under html[data-motion="on"], and that attribute is set by js/motion.js ,
   the same file that removes it again. So there is no path where content stays
   hidden: no JavaScript, nothing is ever hidden; script fails to load, nothing
   is ever hidden; reduced motion, the script declines to set the attribute.
   ========================================================================= */

:root{
  /* Revised to claude-web's #540 reading of the reference: entrances are
     short, from a small offset, mostly opacity. The page should feel as if it
     was already there and the light came up, not as if it is being assembled.
     These sit inside the addendum's proposed ranges, at the restrained end. */
  --rise:14px;      /* #540; addendum proposed 16-22px */
  --arrive:560ms;   /* #540; addendum proposed 600-700ms */
  --step:90ms;      /* #540; addendum proposed 80-120ms between groups */
  --ease:cubic-bezier(.2,.7,.2,1);
}

html[data-motion="on"] [data-reveal]{
  opacity:0;
  transform:translateY(var(--rise));
  transition:opacity var(--arrive) var(--ease),transform var(--arrive) var(--ease);
  transition-delay:calc(var(--i,0) * var(--step));
}
html[data-motion="on"] [data-reveal].is-in{opacity:1;transform:none}

/* Whole photographs fade with NO transform: the picture is the mechanism and
   it should not slide, scale or parallax (#540). */
html[data-motion="on"] [data-reveal="fade"]{transform:none}

/* If the preference is turned on after load, nothing can be left mid-flight. */
@media(prefers-reduced-motion:reduce){
  html[data-motion="on"] [data-reveal]{
    opacity:1!important;transform:none!important;transition:none!important;
  }
}

/* The animated nav underline trialled in build 2 is REMOVED at #540's request:
   the rising fill and the focus outline are enough feedback, and a third moving
   thing in the header makes it busy. system.css's plain text-decoration hover
   stands. Do not reintroduce it without Design asking. */
