/* Wild Rift Boost — extra background motion layers.
   LOADING: link this AFTER style.css on every page:
     <link rel="stylesheet" href="style.css">
     <link rel="stylesheet" href="bg-motion.css">
   Since the 2026-11-30 restyle, style.css owns the background:
   body::before = the TierRush poster on the HOME PAGE ONLY,
   heavily subdued under a ~90% dark fade; html::before = soft
   cyan + magenta glow blobs drifting slowly on every page;
   body::after = bg-embers.svg dust. This file adds one layer:
     html::after  — a second ember drift, the same bg-embers.svg
       at a smaller tile (520x390 vs style.css's 820x620) and a
       much slower drift (160s vs 90s), so the two dust fields
       move at different speeds and read as near/far depth.
   The layer is position:fixed, z-index:-1, pointer-events:none —
   it sits behind all content, never causes layout shift, and
   only animates background-position (build-c12.css redefines
   the drift keyframes as transforms). Opacity is per-page via
   the --embers2-op variable, mirroring style.css's intensity
   scale (home = most, order/account/owner = calm, guides/
   reviews/refund = quietest) — all far lower than before the
   restyle: dust is a whisper now, the glow blobs do the
   ambience. Cards stay near-solid, so readability is
   unaffected. No new images, no hotlinks. */

/* --- intensity variables (defaults = calm pages) --- */
html{--ray-op:.55;--embers2-op:.1}

/* --- per-page intensity, from the body classes already in use --- */
html:has(body.page-home){--ray-op:.9;--embers2-op:.2}
html:has(body.page-order),html:has(body.page-account),html:has(body.page-owner){--ray-op:.55;--embers2-op:.09}
html:has(body.page-guides),html:has(body.page-reviews),html:has(body.page-refund){--ray-op:.35;--embers2-op:.06}

/* --- html::before: the ambient neon glow blobs live in
   style.css since the 2026-11-30 restyle (so track.html, which
   does not load this file, gets them too). Nothing needed here. --- */

/* --- second ember drift: smaller tile, slower, fainter --- */
@keyframes bg-ember-drift-slow{from{background-position:0 0}to{background-position:-90px -560px}}
html::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:url("bg-embers.svg") 0 0 / 520px 390px repeat;
  opacity:var(--embers2-op);
  animation:bg-ember-drift-slow 160s linear infinite}

/* --- mobile: calmer background, same world --- */
@media(max-width:700px){
  html::after{background-size:420px 315px}
  html:has(body.page-home){--ray-op:.7;--embers2-op:.16}
  html:has(body.page-order),html:has(body.page-account),html:has(body.page-owner){--ray-op:.45;--embers2-op:.07}
  html:has(body.page-guides),html:has(body.page-reviews),html:has(body.page-refund){--ray-op:.3;--embers2-op:.05}
}

/* --- reduced motion: freeze ALL background motion ---
   style.css already freezes some layers; this also freezes the
   glow-blob drift (html::before) and both ember layers here.
   The world stays visible, just still. */
@media (prefers-reduced-motion: reduce){
  html::before,html::after{animation:none!important}
  body::before,body::after{animation:none!important}
  .hero-rift::before,.hero-rift::after,.hero-rift .hero-emblem,
  .hero-rift .hero-emblem::before,.rank-picker .rank-arrow,
  .ladder-step,.rift-art img{animation:none!important}
}
