/* LHM CRM motion finishing pass — compatible with mobile-first, V3 and V4.
 * Deliberately loaded last; no layout or API changes. */
.ai-home .ai-mobile-menu.is-open:not([hidden]){
  transform-origin:top right;
  animation:ai-p5-menu .24s cubic-bezier(.2,.8,.2,1) both;
}
.ai-home #clientLoginModal:not(.hidden),
.ai-home #trialModal:not(.hidden),
.ai-home #billingModal:not(.hidden){
  animation:ai-p5-backdrop .24s ease-out both;
}
.ai-home #clientLoginModal:not(.hidden)>.ai-mobile-dialog,
.ai-home #trialModal:not(.hidden)>.ai-mobile-dialog,
.ai-home #billingModal:not(.hidden)>div:first-child{
  animation:ai-p5-dialog .32s cubic-bezier(.16,.8,.2,1) both;
}
.ai-home .ai-mobile-dialog,
.ai-home #billingModal>div:first-child{
  transform-origin:center 38%;
}
@keyframes ai-p5-menu{
  from{opacity:0;transform:translate3d(0,-9px,0) scale(.985)}
  to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
@keyframes ai-p5-backdrop{from{opacity:0}to{opacity:1}}
@keyframes ai-p5-dialog{
  from{opacity:0;transform:translate3d(0,15px,0) scale(.98)}
  to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
/* Never leave the bottom action bar covering footer links. The existing
 * footer observer adds ai-footer-visible on <body>. */
@media(max-width:767px){
  .ai-home .ai-mobile-actions{
    transition:opacity .25s ease,transform .25s ease,visibility .25s ease!important;
  }
  .ai-home.ai-footer-visible .ai-mobile-actions{
    opacity:0!important;
    visibility:hidden!important;
    transform:translate3d(0,100%,0)!important;
    pointer-events:none!important;
  }
  .ai-home .ai-v3-footer{padding-bottom:calc(32px + env(safe-area-inset-bottom,0px))!important}
  .ai-home.ai-footer-visible .ai-v3-footer{padding-bottom:calc(32px + env(safe-area-inset-bottom,0px))!important}
  .ai-home .ai-mobile-modal:not(.hidden)~.ai-v4-progress{pointer-events:none}
  .ai-home .ai-laptop{will-change:auto!important}
}
@media(hover:none){
  .ai-home .ai-feature-card:hover,
  .ai-home #pricing .grid>div:hover{
    transform:none!important;
  }
}
/* Lower the GPU budget while form overlays are visible. */
.ai-home:has(.ai-mobile-modal:not(.hidden)) .ai-v3-bot,
.ai-home:has(.ai-mobile-modal:not(.hidden)) .ai-floating-chip,
.ai-home:has(.ai-mobile-modal:not(.hidden)) .ai-v4-sky span,
.ai-home:has(#billingModal:not(.hidden)) .ai-v3-bot{
  animation-play-state:paused!important;
}
@media(prefers-reduced-motion:reduce){
  .ai-home .ai-mobile-menu.is-open:not([hidden]),
  .ai-home #clientLoginModal:not(.hidden),
  .ai-home #trialModal:not(.hidden),
  .ai-home #billingModal:not(.hidden),
  .ai-home #clientLoginModal:not(.hidden)>.ai-mobile-dialog,
  .ai-home #trialModal:not(.hidden)>.ai-mobile-dialog,
  .ai-home #billingModal:not(.hidden)>div:first-child{
    animation:none!important;transform:none!important;
  }
  .ai-home .ai-mobile-actions{transition:none!important}
}
@media(prefers-reduced-data:reduce){
  .ai-home .ai-v4-sky span,.ai-home .ai-v4-orbit{
    animation:none!important;opacity:0!important;
  }
}
