/* Motion for the hero demo. Keyframe stops use percents, so this file stays
   out of the HTML. The page CSP allows this same-origin sheet only. */
@media (prefers-reduced-motion: no-preference) {
  .hero-demo h1,
  .hero-demo .lead,
  .hero-demo .btns,
  .hero-demo .hero-support,
  .hero-demo .handset {
    animation-name: hero-rise;
    animation-duration: .7s;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
    animation-fill-mode: both;
  }
  .hero-demo .lead { animation-delay: .06s; }
  .hero-demo .btns { animation-delay: .1s; }
  .hero-demo .hero-support { animation-delay: .16s; }
  .hero-demo .handset { animation-duration: .85s; animation-delay: .12s; }
  .demo-play:checked ~ .handset .stage .scene {
    animation-name: hero-cycle;
    animation-duration: 24s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  .demo-play:checked ~ .handset .stage .s1 { animation-delay: 0s; }
  .demo-play:checked ~ .handset .stage .s2 { animation-delay: -16s; }
  .demo-play:checked ~ .handset .stage .s3 { animation-delay: -8s; }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-cycle {
  0% { opacity: 0; }
  3% { opacity: 1; }
  30% { opacity: 1; }
  34% { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-demo h1,
  .hero-demo .lead,
  .hero-demo .btns,
  .hero-demo .hero-support,
  .hero-demo .handset { animation: none; }
  .scene { animation: none; opacity: 0; }
  .scene.s1 { opacity: 1; }
  .demo-play:checked ~ .handset .stage .scene { animation: none; opacity: 0; }
  .demo-play:checked ~ .handset .stage .s1 { opacity: 1; }
}
