/* =====================================================================
   Infome motion kit (site-wide) — assets/css/motion.css + assets/js/motion.js
   1 smooth scrolling (Lenis, desktop mouse only)   5 page-to-page fade
   2 reveal on scroll                               6 count-up numbers ([data-mo-count])
   3 smart header (shrink / hide down / show up)    7 menus that glide
   4 product card hover                             8 images fade in as they load
   Only transform + opacity are animated. "Reduce motion" turns it all off (bottom of file).
   ===================================================================== */
:root{
  --mo-ease:cubic-bezier(.22,1,.36,1);      /* soft "ease-out-quint" */
  --mo-fast:.25s;
  --mo-slow:.7s;
}

/* ---------- 1. smooth scrolling ---------- */
html{scroll-behavior:smooth}                 /* in-page links glide everywhere (phones too) */
html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.lenis.lenis-stopped{overflow:hidden}
.lenis.lenis-scrolling iframe{pointer-events:none}

/* ---------- 2. reveal on scroll (classes are added by motion.js only, so nothing hides without it) ---------- */
.mo-reveal{opacity:0;transform:translate3d(0,22px,0)}
.mo-reveal.mo-in{opacity:1;transform:none;transition:opacity var(--mo-slow) var(--mo-ease),transform var(--mo-slow) var(--mo-ease);transition-delay:var(--mo-delay,0ms)}

/* ---------- 3. smart header ---------- */
#myHeader,.navbar-fixed-area{transition:transform .4s var(--mo-ease),box-shadow .3s ease,background-color .3s ease}
#myHeader.mo-hide,.navbar-fixed-area.mo-hide{transform:translate3d(0,-110%,0)}
#myHeader .navbar-brand img{transition:height .3s var(--mo-ease),width .3s var(--mo-ease)}
@media (min-width:769px){
  #myHeader.sticky .navbar{padding-top:.2rem;padding-bottom:.2rem;transition:padding .3s var(--mo-ease)}
  #myHeader.sticky .navbar-brand img{height:40px;width:auto}
}
@media (max-width:768px){
  .navbar-fixed-area.mo-scrolled{box-shadow:0 1px 0 rgba(0,0,0,.06),0 8px 24px rgba(0,0,0,.08)}
}

/* ---------- 4. product card hover ---------- */
.ime-best-card{transition:transform .45s var(--mo-ease),box-shadow .45s var(--mo-ease),border-color .3s ease}
.ime-best-card::after{content:"";position:absolute;left:0;top:0;height:3px;width:100%;background:var(--ime-red,#C8302A);
  transform:scaleX(0);transform-origin:left;transition:transform .5s var(--mo-ease);z-index:2;pointer-events:none}
.ime-best-card:hover,.ime-best-card:focus-within{transform:translate3d(0,-6px,0);box-shadow:0 18px 40px rgba(20,22,27,.12),0 2px 6px rgba(20,22,27,.05);border-color:transparent}
.ime-best-card:hover::after,.ime-best-card:focus-within::after{transform:scaleX(1)}
.ime-best-card .ime-best-media img{transition:transform .8s var(--mo-ease)}
.ime-best-card:hover .ime-best-media img{transform:scale(1.06)}
.ime-best-card .ime-best-title{transition:color .25s ease}
.ime-best-card:hover .ime-best-title{color:var(--ime-red,#C8302A)}
.ime-quote-btn,.ime-btn-red,.btn{transition:transform .15s ease,background-color .2s ease,box-shadow .2s ease,color .2s ease}
.ime-quote-btn:active,.ime-btn-red:active,.btn:active{transform:scale(.97)}
.blog_card{transition:transform .45s var(--mo-ease),box-shadow .45s var(--mo-ease)}
.blog_card:hover{transform:translate3d(0,-4px,0);box-shadow:0 16px 36px rgba(20,22,27,.10)}

/* ---------- 5. page-to-page fade (browsers without support just load normally) ---------- */
@view-transition{navigation:auto}
::view-transition-old(root){animation:moPageOut .18s ease-in both}
::view-transition-new(root){animation:moPageIn .32s var(--mo-ease) both}
@keyframes moPageOut{to{opacity:0}}
@keyframes moPageIn{from{opacity:0;transform:translate3d(0,8px,0)}}

/* ---------- 6. count-up: no styles needed (numbers keep their own look) ---------- */
[data-mo-count]{font-variant-numeric:tabular-nums}

/* ---------- 7. menus that glide ---------- */
@media (min-width:992px){
  .navbar .dropdown-menu.show{animation:moDrop .28s var(--mo-ease) both}
}
@keyframes moDrop{from{opacity:0;transform:translate3d(0,10px,0)}}

/* ---------- 8. images fade in as they load ---------- */
img.mo-img{opacity:0;transition:opacity .6s ease}
img.mo-img.mo-img-in{opacity:1}

/* ---------- people who asked their device for less motion get none of it ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  @view-transition{navigation:none}
  .mo-reveal,.mo-reveal.mo-in{opacity:1!important;transform:none!important;transition:none!important}
  img.mo-img{opacity:1!important;transition:none!important}
  #myHeader,.navbar-fixed-area,.ime-best-card,.ime-best-card::after,.ime-best-card .ime-best-media img,.blog_card{transition:none!important}
  #myHeader.mo-hide,.navbar-fixed-area.mo-hide{transform:none!important}
  .ime-best-card:hover,.ime-best-card:focus-within,.blog_card:hover{transform:none}
  .ime-best-card:hover .ime-best-media img{transform:none}
  .navbar .dropdown-menu.show{animation:none}
}
