/* ══════════════════════════════════════════════════════════════════
   BackupLens — shared motion layer
   Loaded by every public page. Pairs with /motion.js.

   WHY THIS EXISTS

   The landing page had a full animation system and every other public
   page had none, so a visitor moving from an alive homepage to a static
   pricing page felt the site get worse as they got closer to buying.

   This is deliberately a LAYER rather than a rewrite: pages keep their
   own markup and their own styles, and this adds movement on top. If it
   fails to load, every page still renders exactly as it did before —
   nothing here is required for anything to be readable.

   ON REDUCED MOTION

   Respected, but not obeyed to the point of deadness. The setting asks
   for less MOVEMENT, not for a still image: under it, content still
   fades in, but nothing slides, drifts, pulses or loops. A visitor who
   asked for calm gets calm, not a page that looks broken.

   The preference can be overridden per-visitor — see motion.js.
   ══════════════════════════════════════════════════════════════════ */

/* ── reveal on scroll ─────────────────────────────────────────────
   Applied by JS only. Without JS nothing gets .m-rv, so nothing is
   ever left invisible — the failure mode of every scroll-reveal
   library that hides content in CSS first. */
.m-rv{
  opacity:0;
  transform:translateY(22px);
  transition:opacity .75s cubic-bezier(.22,1,.36,1),
             transform .75s cubic-bezier(.22,1,.36,1);
  will-change:opacity,transform;
}
.m-rv.m-in{opacity:1;transform:none;will-change:auto}

/* Stagger: children of a revealed group arrive in sequence rather than
   all at once. 60ms is enough to read as a cascade and short enough
   that the last one is not still waiting when the eye reaches it. */
.m-rv[data-md="1"]{transition-delay:.06s}
.m-rv[data-md="2"]{transition-delay:.12s}
.m-rv[data-md="3"]{transition-delay:.18s}
.m-rv[data-md="4"]{transition-delay:.24s}
.m-rv[data-md="5"]{transition-delay:.30s}
.m-rv[data-md="6"]{transition-delay:.36s}
.m-rv[data-md="7"]{transition-delay:.42s}

/* ── cards lift under the cursor ──────────────────────────────────
   Every public page uses one of these class names for its panels. */
.m-lift{transition:transform .28s cubic-bezier(.22,1,.36,1),
                   border-color .28s, box-shadow .28s}
.m-lift:hover{
  transform:translateY(-4px);
  border-color:rgba(16,185,129,.35);
  box-shadow:0 18px 40px -24px rgba(0,0,0,.9),
             0 0 0 1px rgba(16,185,129,.12);
}

/* ── links and buttons ────────────────────────────────────────────── */
.m-on a:not(.btn):not(.nbtn){transition:color .18s}
.m-on .btn,.m-on .nbtn,.m-on .bigbtn{
  transition:transform .18s cubic-bezier(.22,1,.36,1),
             background .18s,border-color .18s,box-shadow .18s;
}
.m-on .btn:hover,.m-on .nbtn:hover,.m-on .bigbtn:hover{transform:translateY(-2px)}
.m-on .btn:active,.m-on .nbtn:active,.m-on .bigbtn:active{transform:translateY(0)}

/* ── the sticky nav condenses once you scroll ─────────────────────── */
.m-on .nav{transition:padding .3s,background .3s,box-shadow .3s,border-color .3s}
.m-on .nav.m-stuck{
  box-shadow:0 10px 30px -20px rgba(0,0,0,.95);
  border-bottom-color:rgba(16,185,129,.22);
}
.m-on .nav.m-stuck .nav-inner{padding-top:9px;padding-bottom:9px}

/* NO AURORA HERE, DELIBERATELY.
   A drifting background glow was written for this layer and removed
   before it shipped. To sit behind the content it needed every direct
   child of <body> to be positioned — and `position:relative` on a
   direct child overrides `position:sticky`, which would have silently
   unstuck the navigation bar on every page that has one. The landing
   page draws its own aurora inside its own markup, where it can be
   done safely; a generic layer applied to thirty pages that cannot all
   be checked by eye has no business touching layout at all.

   Everything in this file now changes only opacity, transform on
   hover, and colour. None of it can move an element that was not
   already where it is. */

/* ── numbers that count ───────────────────────────────────────────── */
.m-count{font-variant-numeric:tabular-nums}

/* ── the motion toggle in the footer ──────────────────────────────── */
.m-toggle{
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  font-size:12px;color:#64748b;background:none;border:0;
  font-family:inherit;padding:4px 2px;transition:color .18s;
}
.m-toggle:hover{color:#34d399}
.m-toggle .m-sw{
  width:26px;height:15px;border-radius:99px;background:#1c2530;
  position:relative;transition:background .2s;flex:none;
}
.m-toggle .m-sw::after{
  content:'';position:absolute;top:2px;left:2px;width:11px;height:11px;
  border-radius:50%;background:#64748b;transition:transform .22s,background .22s;
}
.m-toggle.on .m-sw{background:rgba(16,185,129,.35)}
.m-toggle.on .m-sw::after{transform:translateX(11px);background:#34d399}

/* ══ REDUCED MOTION ═════════════════════════════════════════════════
   Fades stay. Movement, drift and loops go. */
.m-calm .m-rv{transform:none;transition:opacity .5s ease}
.m-calm .m-lift:hover{transform:none}
.m-calm .btn:hover,.m-calm .nbtn:hover,.m-calm .bigbtn:hover{transform:none}
