/* home_motion.css: motion layer for the homepage only (2.46.0).
 *
 * Loaded after home.css by index.php. Every rule is gated on html.hxm, which
 * home_motion.js sets only when the visitor has not asked for reduced motion.
 * Without the class (no JavaScript, reduced motion, print) the page is exactly
 * the static page from home.css. Entrances are CSS animations that end in the
 * normal state, so nothing can stay hidden if a script stops half way.
 * No new copy, no new claims: this file only moves what is already there.
 */
@media screen and (prefers-reduced-motion: no-preference) {

  /* 1 · reading progress ------------------------------------------------ */
  .hxm-progress {
    position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 70; pointer-events: none;
    transform-origin: 0 50%; transform: scaleX(var(--hxm-p, 0));
    background: linear-gradient(90deg, var(--accent-strong, #2E6FE0), var(--accent, #5AA9FF));
    will-change: transform;
  }

  /* 2 · hero: grid that lights up around the pointer, slow drifting glow -- */
  .hxm .hx .hx-hero { position: relative; isolation: isolate; }
  .hxm .hx .hx-hero::before {
    content: ""; position: absolute; inset: -28px 0 0 0; z-index: -1; pointer-events: none;
    background: radial-gradient(circle, rgba(90,169,255,.34) 1px, transparent 1.6px) 0 0 / 26px 26px;
    -webkit-mask-image: radial-gradient(420px circle at var(--hxm-mx, 72%) var(--hxm-my, 28%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
            mask-image: radial-gradient(420px circle at var(--hxm-mx, 72%) var(--hxm-my, 28%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
    animation: hxm-fade 1.2s ease both;
  }
  .hxm .hx .hx-hero::after {
    content: ""; position: absolute; z-index: -2; pointer-events: none;
    width: min(560px, 70%); aspect-ratio: 1; right: 4%; top: -6%;
    background: radial-gradient(closest-side, rgba(46,111,224,.22), transparent 70%);
    filter: blur(8px);
    animation: hxm-drift 16s ease-in-out infinite alternate, hxm-fade 1.6s ease both;
  }
  @keyframes hxm-drift { from { transform: translate3d(-6%, 4%, 0) scale(1); } to { transform: translate3d(5%, -5%, 0) scale(1.12); } }
  @keyframes hxm-fade { from { opacity: 0; } to { opacity: 1; } }

  /* headline: words rise one after another */
  .hxm .hx .hxm-w {
    display: inline-block; white-space: pre;
    animation: hxm-rise .62s cubic-bezier(.2,.7,.2,1) both;
    animation-delay: calc(60ms + var(--i, 0) * 42ms);
  }
  @keyframes hxm-rise { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
  .hxm .hx .hx-hero__copy > :not(h1) { animation: hxm-rise .6s cubic-bezier(.2,.7,.2,1) both; }
  .hxm .hx .hx-hero__copy > .hx-eyebrow { animation-delay: 0ms; }
  .hxm .hx .hx-hero__copy > .hx-lede { animation-delay: 420ms; }
  .hxm .hx .hx-hero__copy > .hx-ctas { animation-delay: 520ms; }
  .hxm .hx .hx-hero__copy > .hx-micro { animation-delay: 600ms; }
  .hxm .hx .hx-hero__copy > .hx-tour-link { animation-delay: 680ms; }

  /* 3 · report sheet: arrives, is "read" once by a scan line, rows fill in -- */
  .hxm .hx .hx-sheet {
    animation: hxm-sheet .8s cubic-bezier(.2,.7,.2,1) 120ms backwards;
    transform: perspective(1200px) rotateX(var(--hxm-rx, 0deg)) rotateY(var(--hxm-ry, 0deg));
    transition: transform .25s ease-out, box-shadow .25s ease-out;
  }
  @keyframes hxm-sheet { from { opacity: 0; transform: perspective(1200px) translateY(22px) rotateX(5deg); } to { opacity: 1; transform: perspective(1200px); } }
  .hxm .hx .hx-sheet::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
    background: linear-gradient(180deg, transparent 0, rgba(46,111,224,.10) 46%, rgba(46,111,224,.55) 50%, transparent 52%) 0 0 / 100% 220% no-repeat;
    animation: hxm-scan 1.7s cubic-bezier(.4,0,.2,1) .55s both;
  }
  @keyframes hxm-scan { 0% { background-position: 0 115%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { background-position: 0 -15%; opacity: 0; } }
  .hxm .hx .hx-sheet .hx-row { animation: hxm-row .5s cubic-bezier(.2,.7,.2,1) backwards; }
  .hxm .hx .hx-sheet .hx-row:nth-child(1) { animation-delay: .80s; }
  .hxm .hx .hx-sheet .hx-row:nth-child(2) { animation-delay: .95s; }
  .hxm .hx .hx-sheet .hx-row:nth-child(3) { animation-delay: 1.10s; }
  .hxm .hx .hx-sheet .hx-row:nth-child(4) { animation-delay: 1.25s; }
  .hxm .hx .hx-sheet .hx-row:nth-child(5) { animation-delay: 1.40s; }
  @keyframes hxm-row { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
  .hxm .hx .hx-score__num, .hxm .hx .hx-score__of { display: inline-block; animation: hxm-pop .55s cubic-bezier(.3,1.4,.5,1) 1.0s backwards; }
  .hxm .hx .hx-score__grade { animation: hxm-pop .5s cubic-bezier(.3,1.5,.5,1) 1.35s backwards; }
  @keyframes hxm-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
  .hxm .hx .hx-sheet .hx-row { transition: background-color .15s ease; }
  .hxm .hx .hx-sheet .hx-row:hover { background-color: rgba(29,78,216,.06); }

  /* 4 · buttons ---------------------------------------------------------- */
  .hxm .hx .hx-btn { transition: transform .15s ease, box-shadow .2s ease, background-color .15s ease, border-color .15s ease; }
  .hxm .hx .hx-btn:hover { transform: translateY(-1px); }
  .hxm .hx .hx-btn:active { transform: translateY(0) scale(.98); }
  .hxm .hx .hx-btn--primary { position: relative; overflow: hidden; }
  .hxm .hx .hx-btn--primary:hover { box-shadow: 0 8px 24px -10px rgba(46,111,224,.9); }
  .hxm .hx .hx-btn--primary::after {
    content: ""; position: absolute; inset: 0 auto 0 -60%; width: 45%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
    transform: skewX(-18deg);
  }
  .hxm .hx .hx-btn--primary:hover::after { animation: hxm-sheen .7s ease; }
  .hxm .hx .hx-hero .hx-btn--primary::after { animation: hxm-sheen .9s ease 2.2s 1; }
  @keyframes hxm-sheen { from { left: -60%; } to { left: 130%; } }

  /* 5 · cards: a soft light follows the pointer --------------------------- */
  .hxm .hx .hxm-spot {
    background-image: radial-gradient(260px circle at var(--hxm-px, -400px) var(--hxm-py, -400px), rgba(90,169,255,.12), transparent 70%);
    background-repeat: no-repeat;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, opacity var(--hx-med, .3s) var(--hx-ease, ease);
  }
  .hxm .hx .hxm-spot:hover { border-color: rgba(90,169,255,.45); box-shadow: 0 14px 34px -22px rgba(0,0,0,.9); }
  .hxm.hx-js .hx .hxm-spot[data-reveal].is-in:hover, .hxm .hx .hxm-spot:not([data-reveal]):hover { transform: translateY(-2px); }

  /* 6 · section headings: an accent tick draws in ------------------------- */
  .hxm .hx .hx-section > .hx-head .hx-h2 { position: relative; }
  .hxm .hx .hx-section > .hx-head .hx-h2::before {
    content: ""; position: absolute; left: 0; top: -14px; width: 40px; height: 2px;
    background: var(--accent, #5AA9FF); transform-origin: 0 50%; transform: scaleX(0);
    transition: transform .6s cubic-bezier(.2,.7,.2,1) .1s;
  }
  .hxm .hx .hx-section > .hx-head.hxm-in .hx-h2::before { transform: scaleX(1); }

  /* 7 · outcomes and workflow -------------------------------------------- */
  .hxm .hx .hx-outcomes .hx-index { transition: color .6s ease .2s, letter-spacing .6s ease .2s; }
  .hxm .hx .hx-outcomes li.is-in .hx-index { color: var(--accent, #5AA9FF); letter-spacing: .08em; }

  .hxm.hx-js .hx .hx-timeline li .hx-node { transition: border-color .4s ease, color .4s ease, box-shadow .4s ease, transform .4s cubic-bezier(.3,1.5,.5,1); transform: scale(.7); }
  .hxm.hx-js .hx .hx-timeline li.hxm-lit .hx-node { transform: none; border-color: var(--accent, #5AA9FF); box-shadow: 0 0 0 4px rgba(90,169,255,.12); }
  .hxm.hx-js .hx .hx-timeline li.hxm-lit:last-child .hx-node { border-color: var(--ok, #3FB950); box-shadow: 0 0 0 4px rgba(63,185,80,.14); }
  .hxm.hx-js .hx .hx-timeline li:not(:last-child)::after { transform-origin: 0 0; transform: scale(0); transition: transform .45s ease .15s; background: var(--accent, #5AA9FF); opacity: .55; }
  .hxm.hx-js .hx .hx-timeline li.hxm-lit:not(:last-child)::after { transform: scale(1); }

  /* 8 · verified state: the dot breathes ---------------------------------- */
  .hxm .hx .hx-verify .hx-dot { animation: hxm-pulse 2.4s ease-out infinite; }
  @keyframes hxm-pulse { 0% { box-shadow: 0 0 0 0 rgba(63,185,80,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(63,185,80,0); } }
  .hxm .hx .hx-num.hxm-counting { font-variant-numeric: tabular-nums; }

  /* 9 · comparison table and tabs ----------------------------------------- */
  .hxm .hx .hx-cmp tbody tr { transition: background-color .15s ease; }
  .hxm .hx .hx-cmp tbody tr:hover { background-color: rgba(255,255,255,.03); }
  .hxm .hx .hx-panel:not([data-inactive]) { animation: hxm-rise .3s ease both; }
  .hxm .hx .hx-tab { transition: color .15s ease, border-color .15s ease, background-color .15s ease; }

  /* 10 · FAQ opens smoothly where the browser can animate to auto ---------- */
  @supports (interpolate-size: allow-keywords) {
    .hxm .hx .hx-qa { interpolate-size: allow-keywords; }
    .hxm .hx .hx-qa::details-content { block-size: 0; overflow: clip; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
    .hxm .hx .hx-qa[open]::details-content { block-size: auto; }
  }

  /* 11 · closing call to action: the rule above it keeps moving ------------- */
  .hxm .hx .hx-close { border-top-color: transparent; position: relative; }
  .hxm .hx .hx-close::before {
    content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px;
    background: linear-gradient(90deg, var(--accent-strong, #2E6FE0), var(--accent, #5AA9FF), var(--accent-strong, #2E6FE0)) 0 0 / 200% 100%;
    animation: hxm-flow 6s linear infinite;
  }
  @keyframes hxm-flow { to { background-position: -200% 0; } }
}

/* touch devices: no pointer light, no tilt (the script also skips them) */
@media (hover: none) {
  .hxm .hx .hx-hero::before { -webkit-mask-image: radial-gradient(420px circle at 72% 28%, #000 0%, rgba(0,0,0,.35) 45%, transparent 75%); mask-image: radial-gradient(420px circle at 72% 28%, #000 0%, rgba(0,0,0,.35) 45%, transparent 75%); }
}
