/* The landing page's motion. Everything here adds to a page that is already whole: with reduced motion,
   or in a browser without scroll timelines, the page sits in its final state. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Arrival: the headline's two lines, then the words under it, then the phone. */
  .landing h1 span { animation: line-in .7s var(--out) both; }
  .landing h1 span + span { animation-delay: .07s; }
  .hero .kicker, .hero .lede, .hero .get { animation: settle .7s var(--out) .16s both; }
  .hero .get { animation-delay: .24s; }
  .hero-shot .phone { animation: phone-in .9s var(--out) .12s both; }
  .hero-shot::before { animation: glow-in 1.4s ease-out .2s both; }

  @keyframes line-in {
    from { opacity: 0; transform: translateY(.28em); }
  }
  @keyframes settle {
    from { opacity: 0; transform: translateY(.6rem); }
  }
  @keyframes phone-in {
    from { opacity: 0; transform: translateY(2rem); }
  }
  @keyframes glow-in {
    from { opacity: 0; }
  }

  .inside a, nav a { transition: color .15s ease-out; }

  @supports (animation-timeline: view()) {
    /* Phones rise into place as they scroll in; the back phone of a pair travels further. */
    .feature .shot {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    .duo .shot:last-child { animation-name: rise-far; animation-range: entry 0% entry 90%; }
    @keyframes rise {
      from { transform: translateY(2.5rem); }
    }
    @keyframes rise-far {
      from { transform: translateY(5.5rem); }
    }

    /* The eye opens, and its iris crosses from one flank to the other as the page scrolls past. */
    .eye-iris {
      animation: glance linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 62%;
    }
    @keyframes glance {
      from { transform: translateX(-218px); }
    }
  }
}
