/* QuantCommerce motion layer, 2026-11-24.
   (1) a scripted run in the product window, (2) headline words that arrive
   through a short blur, (3) figures that count up. One curve. Everything is
   scoped under .qm-js, which the head script adds only when the visitor has not
   asked for reduced motion. Without it the page is unchanged. */

:root {
  --qm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- 2. headline words arrive through a blur ---------------------------- */
/* The headline is held back for the few ms before the script splits it, so it
   never paints once and then jumps. If the script never runs it shows anyway. */
.qm-js main h1:not(.qm-split) {
  visibility: hidden;
  animation: qm-failsafe 0s linear 1.4s forwards;
}
@keyframes qm-failsafe {
  to {
    visibility: visible;
  }
}
.qm-split .qm-w {
  display: inline-block;
}
.qm-split .qm-wi {
  display: inline-block;
  opacity: 0;
  filter: blur(9px);
  transform: translate3d(0, 0.42em, 0);
}
.qm-split.is-in .qm-wi {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition:
    opacity 520ms var(--qm-ease),
    filter 520ms var(--qm-ease),
    transform 520ms var(--qm-ease);
  transition-delay: calc(var(--qm-l, 0) * 85ms + var(--qm-i, 0) * 22ms + var(--qm-d, 0ms));
}
/* a layer per word only while it is moving */
.qm-split.is-in:not(.is-done) .qm-wi {
  will-change: transform, opacity, filter;
}
.qm-split.is-done .qm-wi {
  filter: none;
}

/* ---- 3. a share shown as a bar that grows from zero --------------------- */
.qm-js .qm-ratio {
  position: relative;
}
.qm-bar {
  position: absolute;
  left: 0;
  bottom: -11px;
  width: min(100%, 190px);
  height: 3px;
  border-radius: 2px;
  background: var(--qc-rule, var(--line));
  overflow: hidden;
}
.qm-bar > i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 600ms var(--qm-ease) 150ms;
}
.qm-bar.is-in > i {
  transform: scaleX(var(--qm-share, 0));
}

/* ---- 1. scripted run in the product window ------------------------------ */
.qm-off {
  opacity: 0;
}
.qm-dim {
  opacity: 0.3;
}
.qm-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 22px;
  height: 22px;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 3px rgba(8, 8, 8, 0.28));
}
.qm-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* on a phone there is no cursor: a ring shows where the tap lands */
.qm-tap {
  position: absolute;
  left: -19px;
  top: -19px;
  z-index: 6;
  width: 38px;
  height: 38px;
  border: 2px solid var(--signal);
  border-radius: 50%;
  background: rgba(8, 8, 8, 0.14);
  opacity: 0;
  pointer-events: none;
}
.qm-js [data-qm-script] .qc-crm-table td,
.qm-js [data-qm-script] .qc-crm-list li {
  transition: background-color 220ms var(--qm-ease);
}
.qm-js [data-qm-script].qm-held .qc-mc-tabs__btn[aria-selected="true"]::after {
  animation-play-state: paused;
}
@media (max-width: 720px) {
  .qm-cursor {
    display: none;
  }
}
@media (min-width: 721px) {
  .qm-tap {
    display: none;
  }
}

/* Belt and braces: .qm-js is never set for these visitors, and if it ever were,
   nothing moves. */
@media (prefers-reduced-motion: reduce) {
  .qm-split .qm-wi {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
  .qm-js main h1:not(.qm-split) {
    visibility: visible;
    animation: none;
  }
  .qm-cursor,
  .qm-tap {
    display: none;
  }
  .qm-off,
  .qm-dim {
    opacity: 1;
  }
  .qm-bar > i {
    transition: none;
  }
}
