/* Bassett Lane: motion details that CSS does best. The scroll-in entrances are in js/motion.js.
 * Everything that moves sits behind prefers-reduced-motion: no-preference. */

/* reading progress: a hairline under the header */
.top .scrollline{position:absolute;left:0;right:0;bottom:-1px;height:1.5px;background:var(--accent);transform-origin:left center;transform:scaleX(0);pointer-events:none;transition:opacity .4s ease}
body.overhero .top .scrollline{opacity:0}

@media (prefers-reduced-motion: no-preference){
  /* header links: an underline that draws in from the left and leaves to the right */
  @media (min-width:961px){
    .top nav a{position:relative;border-bottom-color:transparent!important}
    .top nav a::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:right center;transition:transform .5s cubic-bezier(.2,.65,.15,1)}
    .top nav a:hover::after,.top nav a[aria-current="true"]::after{transform:scaleX(1);transform-origin:left center}
  }
  /* phone menu: the links cascade in */
  @media (max-width:960px){
    .top.open #nav > a,.top.open #nav .navfoot{animation:navIn .55s cubic-bezier(.2,.65,.15,1) both;animation-delay:calc(var(--i,0) * 38ms + 60ms)}
  }
  @keyframes navIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

  /* hero: the small print arrives last */
  .photohero .stage,.photohero > .ai{animation:fadeIn 1.2s ease .9s both}

  /* buttons and links: small, quick responses */
  .btn{transition:background-color .3s ease,color .3s ease,border-color .3s ease,transform .2s ease}
  .btn svg{transition:transform .35s cubic-bezier(.2,.65,.15,1)}
  .btn:hover svg{transform:translateX(3px)}
  .arrow::before{transition:width .35s cubic-bezier(.2,.65,.15,1)}

  /* type plates and photos lean in a little on hover */
  .card .plate svg{transition:transform .9s cubic-bezier(.2,.65,.15,1)}
  .card:hover .plate svg{transform:scale(1.035)}
  .promises li svg{transition:transform .5s cubic-bezier(.2,.65,.15,1)}
  .promises li:hover svg{transform:translateY(-3px)}
  .feat svg{transition:transform .5s cubic-bezier(.2,.65,.15,1)}
  .feat:hover svg{transform:translateY(-2px)}

  /* answers open softly */
  .faq details[open] > :not(summary){animation:faqIn .5s cubic-bezier(.2,.65,.15,1) both}
  @keyframes faqIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

  /* meters glide to their new value */
  #mFill,#aFill,.mbar i,.pgbar i{transition:width .8s cubic-bezier(.2,.65,.15,1),left .8s cubic-bezier(.2,.65,.15,1),background-color .4s ease}
  #mCap{transition:left .8s cubic-bezier(.2,.65,.15,1)}

  /* form: a selected tile and a pressed chip settle in */
  .tile input:checked + span{animation:tileIn .35s cubic-bezier(.2,.65,.15,1)}
  @keyframes tileIn{from{transform:scale(.98)}to{transform:none}}
  .done:not([hidden]){animation:rise .8s cubic-bezier(.2,.65,.15,1) both}
}
