/* Enterprise Magazine: motion layer */

/* scroll reveal: opacity + a short lift, never on hover states */
[data-rv] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  will-change: opacity, transform;
}
[data-rv].is-in {
  opacity: 1;
  transform: none;
}
[data-rv-d="1"] { transition-delay: .09s; }
[data-rv-d="2"] { transition-delay: .18s; }
[data-rv-d="3"] { transition-delay: .27s; }
[data-rv-d="4"] { transition-delay: .36s; }

/* image wipe: the plate uncovers from the bottom */
.plate[data-wipe] img {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.25s var(--ease), transform 1.15s var(--ease);
}
.plate[data-wipe].is-in img {
  clip-path: inset(0 0 0 0);
}

/* hairline rules draw in */
[data-draw] {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.15s var(--ease);
}
[data-draw].is-in { transform: scaleX(1); }

/* count-up numerals hold their box so nothing reflows */
.stat b { font-variant-numeric: tabular-nums; }

/* page transition tint */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: .42s;
    animation-timing-function: var(--ease);
  }
}

/* honour the setting: everything resolves to its final state */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-rv] { opacity: 1; transform: none; }
  .plate[data-wipe] img { clip-path: none; }
  [data-draw] { transform: scaleX(1); }
  .hero-media img { animation: none; transform: none; }
  .scroll-cue i::after { animation: none; }
}
