/* Motion pass. Every rule here is scoped to html.motion, which motion.js adds only when
   the visitor hasn't asked for reduced motion. With JS off or reduced motion on, the
   page is fully static and nothing is hidden. Numbers match the list in README.md. */

/* 1. Hero entrance: photo settles in, headline rises out of a mask, name and buttons follow.
      The photo box clips the zoom so it never pokes out below the navy fade on phones. */
.motion .hero__photo{overflow:hidden;}
.motion .hero__photo img{transform:scale(1.07);transition:transform 2.4s cubic-bezier(.2,.7,.2,1);}
.motion.is-loaded .hero__photo img{transform:none;}
.motion .m-mask{display:block;overflow:hidden;padding-bottom:.04em;margin-bottom:-.04em;}
.motion .m-in{display:block;transform:translateY(105%);transition:transform 1s cubic-bezier(.2,.75,.15,1) .15s;}
.motion.is-loaded .m-in{transform:none;}
.motion .hero__name,
.motion .hero__cta{opacity:0;transform:translateY(16px);transition:opacity .7s ease, transform .9s cubic-bezier(.2,.7,.2,1);}
.motion .hero__name{transition-delay:.55s;}
.motion .hero__cta{transition-delay:.7s;}
.motion.is-loaded .hero__name,
.motion.is-loaded .hero__cta{opacity:1;transform:none;}

/* 2. Hero parallax (desktop): the photo drifts slower than the page as you scroll away.
      motion.js sets --hero-y. */
@media (min-width: 761px){
  .motion .hero__photo{transform:translate3d(0, var(--hero-y, 0px), 0);will-change:transform;}
}

/* 3. The Record: headline lines rise one after another; red block slides out from behind the photo */
.motion .record__h span{opacity:0;transform:translateY(.35em);transition:opacity .6s ease, transform .8s cubic-bezier(.2,.7,.2,1);}
.motion .record__h span:nth-child(2){transition-delay:.12s;}
.motion .record__h span:nth-child(3){transition-delay:.24s;}
.motion .record__h.in span{opacity:1;transform:none;}
.motion .record__photo::before{transform:translate(22px, -26px);transition:transform 1.1s cubic-bezier(.2,.7,.2,1) .35s;}
.motion .record__photo.is-in::before{transform:none;}
@media (max-width: 760px){
  .motion .record__photo::before{transform:translate(-13px, -15px);}
}

/* 4. Numbers count up (motion.js); nothing to style beyond keeping the width steady */
.motion .ledger__num{font-variant-numeric:tabular-nums;}

/* 5. Quote: the cutout of David rises into the band as it scrolls in. motion.js sets --cut-y. */
.motion .voice{overflow:hidden;}
.motion .voice__cut img{transform:translate3d(0, var(--cut-y, 0px), 0);will-change:transform;}

/* 6. The Meet David polaroid drops in and settles at its tilt */
.motion .snap--meet{opacity:0;transform:translate(12px, -34px) rotate(-11deg);transition:opacity .5s ease .45s, transform 1s cubic-bezier(.2,.8,.25,1.12) .45s;}
.motion .meet__photos.is-in .snap--meet{opacity:1;transform:rotate(-3deg);}

/* 7. Timeline draws itself: each dot pops, the line runs down to the next stop, the text fades in */
.motion .tl li::before{transform:scale(0);transition:transform .4s cubic-bezier(.3,1.6,.5,1) calc(var(--i, 0) * .18s + .2s);}
.motion .tl li::after{transform:scaleY(0);transform-origin:top;transition:transform .45s ease calc(var(--i, 0) * .18s + .35s);}
.motion .tl li > *{opacity:0;transform:translateX(-8px);transition:opacity .5s ease calc(var(--i, 0) * .18s + .25s), transform .6s ease calc(var(--i, 0) * .18s + .25s);}
.motion .tl.in li::before,
.motion .tl.in li::after,
.motion .tl.in li > *{transform:none;opacity:1;}

/* 8. Footer: the big outlined MASON slides in sideways as you reach the bottom. motion.js sets --foot-x. */
.motion .foot__mark{transform:translateX(calc(-50% + var(--foot-x, 0px)));}

/* 9. Header picks up a soft shadow once you've scrolled past the hero */
.top{transition:box-shadow .3s ease;}
.motion .top.is-scrolled{box-shadow:0 10px 24px -14px rgba(2,23,68,.55);}

/* 10. Buttons: a small lift on hover */
.motion .btn--big{transition:background .15s, color .15s, transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s;}
.motion .btn--big:hover{transform:translateY(-2px);box-shadow:0 10px 20px -12px rgba(2,23,68,.6);}
