/* RankVII — NOVA motion states (paired with assets/js/nova-motion.js).
   Only `translate` / `transform` / `opacity` are animated. Everything is scoped to html.nova-motion
   (set by the script) so a missing/failed script leaves the page fully visible; and all motion is
   switched off under prefers-reduced-motion (html.nova-reduce or the media query). */

/* ── Reveal on scroll ─────────────────────────────────────────────────────
   Uses the individual `translate` property (not `transform`) so hover lifts / tilt in other
   stylesheets and inline styles keep working untouched. */
html.nova-motion .card,
html.nova-motion .how-card,
html.nova-motion .lk,
html.nova-motion .factor,
html.nova-motion .moves-list li,
html.nova-motion .ladder li,
html.nova-motion .wall-head,
html.nova-motion .judge-card{
  opacity:0;
  translate:0 14px;
  transition:opacity .7s cubic-bezier(.2,.8,.2,1),translate .7s cubic-bezier(.2,.8,.2,1);
}
html.nova-motion .card.in,
html.nova-motion .how-card.in,
html.nova-motion .lk.in,
html.nova-motion .factor.in,
html.nova-motion .moves-list li.in,
html.nova-motion .ladder li.in,
html.nova-motion .wall-head.in,
html.nova-motion .judge-card.in{
  opacity:1;
  translate:none;
}
/* Nested reveal targets (factors inside a card, cards inside the judge card): the parent already
   fades the whole block in, so children start closer to rest and only add a soft cascade. */
html.nova-motion .card .factor,
html.nova-motion .card .moves-list li{translate:0 8px}

/* Ladder rows and wall cards cascade a touch slower for the "list arriving" feel */
html.nova-motion .ladder li,
html.nova-motion .lk{transition-duration:.8s}

/* ── Score number pop (#finalNum) ─────────────────────────────────────── */
@keyframes nova-pop{
  0%{transform:scale(1)}
  38%{transform:scale(1.10)}
  100%{transform:scale(1)}
}
html.nova-motion #finalNum{transform-origin:50% 60%}
html.nova-motion #finalNum.pop{animation:nova-pop .5s cubic-bezier(.2,.8,.2,1)}

/* ── Tilt bases (.lk / .how-card) — the transform itself is inline from JS ─
   will-change only while the pointer is over the card (limits compositor memory). */
html.nova-motion .lk,
html.nova-motion .how-card{transform-style:preserve-3d}
html.nova-motion .lk.is-tilting,
html.nova-motion .how-card.is-tilting{will-change:transform;position:relative;z-index:2}

/* ── Magnetic primary buttons — `translate` inline from JS ─────────────── */
html.nova-motion .btn-primary.is-magnet{will-change:translate}

/* ── Aurora canvas (inserted into div.bg by the script) ────────────────── */
.nova-aurora{position:absolute;top:0;left:0;width:100%;pointer-events:none;display:block;mix-blend-mode:screen}
.nova-scores{position:absolute;top:0;left:0;width:100%;pointer-events:none;display:block;mix-blend-mode:screen}
[data-theme="light"] .nova-scores{mix-blend-mode:normal}
[data-theme="light"] .nova-aurora{mix-blend-mode:normal;opacity:.9}

/* ── Reduced motion / print: everything visible, nothing moves ─────────── */
@media (prefers-reduced-motion: reduce){
  html.nova-motion .card,html.nova-motion .how-card,html.nova-motion .lk,html.nova-motion .factor,
  html.nova-motion .moves-list li,html.nova-motion .ladder li,html.nova-motion .wall-head,html.nova-motion .judge-card{
    opacity:1;translate:none;transition:none;
  }
  html.nova-motion #finalNum.pop{animation:none}
  html.nova-motion .lk,html.nova-motion .how-card{transform-style:flat}
}
html.nova-reduce .card,html.nova-reduce .how-card,html.nova-reduce .lk,html.nova-reduce .factor,
html.nova-reduce .moves-list li,html.nova-reduce .ladder li,html.nova-reduce .wall-head,html.nova-reduce .judge-card{
  opacity:1;translate:none;transition:none;
}
html.nova-reduce #finalNum.pop{animation:none}
@media print{
  html.nova-motion .card,html.nova-motion .how-card,html.nova-motion .lk,html.nova-motion .factor,
  html.nova-motion .moves-list li,html.nova-motion .ladder li,html.nova-motion .wall-head,html.nova-motion .judge-card{opacity:1;translate:none}
  .nova-aurora,.nova-scores{display:none}
}
