/* hero-motion.css — hero entrance, desktop only. 25 Oct (Ali): TWO steps, not three, and quicker.
   Step 1 (0s):     the nav drops in and the laptop rises + fades in together; its screen switches on
                    a third of the way through the fade.
   Step 2 (0.35s):  the headline, the sub-line and the buttons rise in as one block.
   Everything is in by ~1.1s (it was 2.4s). Phones keep everything visible at once (T042) and reduced
   motion gets no animation. The pointer-follow on the laptop itself is in hero-why.css / hero-laptop.js. */
@media (min-width: 769px) {
  /* step 2: the copy. The headline's own styles.css .reveal-load animation is re-timed here so the
     three rise together instead of one after another. */
  #page-home .hero h1.reveal-load,
  #page-home .hero__sub,
  #page-home .hero__cta,
  #page-home .hero__example {
    /* #page-home so this outranks mono.css's `.hero .hero__sub { opacity: 1 }` and fx.css's own
       staggered delays (0.15 / 0.3 / 0.4s), which would otherwise split step 2 back into four */
    opacity: 0;
    transform: translateY(22px);
    animation: hero-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s forwards;
  }
  /* step 1: the nav and the laptop */
  .nav {
    animation: hero-nav-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0s both;
  }
  .laptop--photo {
    /* the rise is on the laptop (backwards, not both: once it ends the pointer-follow transform in
       hero-why.css must take over); the fade is on its two layers separately, because a group opacity
       over the 3-D screen re-renders the whole laptop every frame and starved the frame rate */
    animation: hero-laptop-in 0.7s cubic-bezier(0.18, 0.78, 0.22, 1) 0s backwards;
  }
  .laptop--photo .laptop__img {
    animation: hero-laptop-fade 0.7s cubic-bezier(0.18, 0.78, 0.22, 1) 0s backwards;
  }
  .laptop--photo .laptop__screen {
    /* the screen "switches on" as a step (fading a 3-D-transformed layer kept the compositor busy
       enough to stall other transitions on weak renderers), a third of the way into the photo's fade,
       when the ease-out curve already has it past half opacity, so laptop and panel arrive together
       and the photo's own black display never shows. */
    animation: hero-screen-on 0.01s linear 0.22s backwards;
  }
}
@keyframes hero-rise {
  to { opacity: 1; transform: none; }
}
@keyframes hero-nav-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-laptop-in {
  /* translate only (the prototype's extra scale(0.975) re-rasterises the 3-D screen every frame) */
  from { transform: translateY(42px); }
  to { transform: none; }
}
@keyframes hero-laptop-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes hero-screen-on {
  from { visibility: hidden; }
  to { visibility: visible; }
}
@media (prefers-reduced-motion: reduce) {
  #page-home .hero h1.reveal-load,
  #page-home .hero__sub,
  #page-home .hero__cta,
  #page-home .hero__example,
  .nav,
  .laptop--photo,
  .laptop--photo .laptop__img,
  .laptop--photo .laptop__screen {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
