/* product-motion.css: the product line page's own motion, on top of the
   engine's shared entrances (core/assets/motion.css: .reveal, .fade, .stagger).
   Loaded only by themes/ulric/_product-showcase.php, with product-motion.js,
   which writes the scroll-tied transforms ([data-pp-depth], [data-pp-drift],
   [data-pp-zoom], [data-pp-grow]) and runs the counters ([data-pp-count]).

   Motion never gates content. Every start state here is either a keyframe's
   "from" (an animation that does not run leaves the element as it is drawn)
   or sits under html.fx, the class the engine removes for reduced motion,
   ?nofx=1 and a failed script. Nothing here pins or follows the scroll: that
   is the script's part, and it only ever translates or scales. */

@keyframes pp-rise{from{opacity:0;transform:translate3d(0,26px,0)}}
@keyframes pp-settle{from{opacity:0;transform:translate3d(0,56px,0) scale(.97)}}
@keyframes pp-float{to{transform:translate3d(0,-9px,0)}}

/* the hero's words arrive in reading order, then the picture's layers back to front */
html.fx .pp-hero-text>*{animation:pp-rise .8s cubic-bezier(.2,.7,.2,1) both}
html.fx .pp-hero-text>:nth-child(2){animation-delay:.08s}
html.fx .pp-hero-text>:nth-child(3){animation-delay:.18s}
html.fx .pp-layer>*{animation:pp-settle 1.1s cubic-bezier(.2,.7,.2,1) both}
html.fx .pp-layer--ring>*{animation-delay:.2s}
html.fx .pp-layer--desk>*{animation-delay:.28s}
html.fx .pp-layer--phone>*{animation-delay:.42s}
html.fx .pp-layer--chip>*{animation-delay:.6s}
html.fx .pp-layer--chip2>*{animation-delay:.72s}

/* the layers the scroll moves */
html.fx [data-pp-depth],html.fx [data-pp-drift],html.fx [data-pp-grow]{will-change:transform}

/* desks: the two cards breathe once they have landed (a phone has no cards, and no idle motion) */
@media (min-width:900px){
  html.fx .pp-layer--chip>*{animation:pp-settle 1.1s cubic-bezier(.2,.7,.2,1) .6s both,pp-float 6.5s ease-in-out 1.7s infinite alternate}
  html.fx .pp-layer--chip2>*{animation:pp-settle 1.1s cubic-bezier(.2,.7,.2,1) .72s both,pp-float 8s ease-in-out 1.9s infinite alternate}
}

/* the case study's figures slide up into their line as the row arrives, then count */
.pp-stats b{overflow:hidden}
.pp-num{display:inline-block;font-variant-numeric:tabular-nums}
html.fx .pp-stats .fade .pp-num{transform:translate3d(0,105%,0);transition:transform .8s cubic-bezier(.2,.7,.2,1) .1s}
html.fx .pp-stats .fade:nth-child(2) .pp-num{transition-delay:.19s}
html.fx .pp-stats .fade:nth-child(3) .pp-num{transition-delay:.28s}
html.fx .pp-stats .fade:nth-child(4) .pp-num{transition-delay:.37s}
html.fx .pp-stats .fade.in .pp-num{transform:none}

@media (prefers-reduced-motion:reduce){
  .pp-hero-text>*,.pp-layer>*{animation:none!important}
  .pp-stats .fade .pp-num{transform:none!important;transition:none!important}
}
