/* ==========================================================================
   MAHI ELECTRONICS — Motion layer
   Subtle, fast, professional: fade-up on scroll, image reveal, counter
   animation, staggered cards, hover transitions. Nothing playful.
   Reveals are scoped behind .has-js so content is never hidden without JS,
   and everything stops for prefers-reduced-motion.
   ========================================================================== */

/* Fade-up reveal ---------------------------------------------------------*/
.has-js .rv{
  opacity:0;transform:translateY(22px);
  transition:opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.has-js .rv.is-in{opacity:1;transform:none}

/* Staggered children -----------------------------------------------------*/
.has-js .stag > *{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s cubic-bezier(.22,.61,.36,1)}
.has-js .stag.is-in > *{opacity:1;transform:none}
.has-js .stag.is-in > *:nth-child(1){transition-delay:.02s}
.has-js .stag.is-in > *:nth-child(2){transition-delay:.09s}
.has-js .stag.is-in > *:nth-child(3){transition-delay:.16s}
.has-js .stag.is-in > *:nth-child(4){transition-delay:.23s}
.has-js .stag.is-in > *:nth-child(5){transition-delay:.3s}
.has-js .stag.is-in > *:nth-child(6){transition-delay:.37s}
.has-js .stag.is-in > *:nth-child(7){transition-delay:.44s}
.has-js .stag.is-in > *:nth-child(8){transition-delay:.51s}
.has-js .stag.is-in > *:nth-child(9){transition-delay:.58s}

/* Image reveal — a clipped wipe, then the image settles ------------------*/
.has-js .img-rv{overflow:hidden}
.has-js .img-rv > img,.has-js .img-rv .fig,.has-js .img-rv picture{
  clip-path:inset(0 0 100% 0);transform:scale(1.04);
  transition:clip-path 1s cubic-bezier(.22,.61,.36,1), transform 1.2s cubic-bezier(.22,.61,.36,1);
}
.has-js .img-rv.is-in > img,.has-js .img-rv.is-in .fig,.has-js .img-rv.is-in picture{
  clip-path:inset(0 0 0 0);transform:none;
}

/* A rule that draws itself ----------------------------------------------*/
.has-js .draw{transform:scaleX(0);transform-origin:left;transition:transform 1s cubic-bezier(.22,.61,.36,1)}
.has-js .draw.is-in{transform:scaleX(1)}

/* Counter — the number holds its space while it animates -----------------*/
.counter{font-variant-numeric:tabular-nums}

/* Slide-in from the left (used for ruled index rows) ---------------------*/
.has-js .rv-l{opacity:0;transform:translateX(-18px);transition:opacity .7s ease,transform .7s cubic-bezier(.22,.61,.36,1)}
.has-js .rv-l.is-in{opacity:1;transform:none}

/* Parallax shell ---------------------------------------------------------*/
.parallax{will-change:transform}

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
  html{scroll-behavior:auto}
  .rv,.rv-l,.stag > *{opacity:1 !important;transform:none !important}
  .img-rv > img,.img-rv .fig,.img-rv picture{clip-path:none !important;transform:none !important}
  .draw{transform:scaleX(1) !important}
  .sticky-col{position:static}
}
