/* ==========================================================================
   motion-v33.css (v35) — the cheap version.
   No mix-blend-mode, no backdrop-filter, no filter on scrolling surfaces: the
   light is a 340px element moved with transform, and the sticky header gets a
   solid colour plus a shadow.
   ========================================================================== */

/* ---------- 1. scroll progress ------------------------------------------- */
.motion-progress{
  position:fixed;inset-inline:0;top:0;height:2px;z-index:90;
  pointer-events:none;background:transparent;
}
.motion-progress>i{
  display:block;height:100%;width:100%;transform:scaleX(0);transform-origin:0 50%;
  background:linear-gradient(90deg,#2158d6,#7aa2ff);
  will-change:transform;
}
html[dir="rtl"] .motion-progress>i{transform-origin:100% 50%}

/* ---------- 2. the light: a small element on the compositor --------------- */
.motion-cursor-light{
  position:fixed;inset-inline-start:0;top:0;width:340px;height:340px;z-index:1;
  pointer-events:none;opacity:0;transition:opacity .45s ease;
  border-radius:50%;
  background:radial-gradient(circle,#8fb0ff1f, #8fb0ff10 45%, transparent 70%);
  will-change:transform;
}
.motion-cursor-light.is-on{opacity:1}

/* ---------- 3/4. magnetic + tilt ----------------------------------------- */
.js-magnetic{will-change:transform;transition:transform .22s cubic-bezier(.2,.8,.2,1)}
.js-tilt{
  transform-style:preserve-3d;will-change:transform;
  transition:transform .3s cubic-bezier(.2,.8,.2,1);
}

/* ---------- 5. numbers ---------------------------------------------------- */
[data-roll],.js-count{font-variant-numeric:tabular-nums}

/* ---------- 6. rows settle in -------------------------------------------- */
@keyframes motion-settle{from{transform:translateY(6px)}to{transform:none}}
.motion-settle{animation:motion-settle .48s cubic-bezier(.2,.8,.2,1) var(--settle-delay,0ms) 1 both}

/* ---------- 7. border trail ---------------------------------------------- */
.js-trail{position:relative;overflow:hidden}
.js-trail::after{
  content:"";position:absolute;inset-inline:-40% 0;top:0;height:2px;pointer-events:none;
  background:linear-gradient(90deg,transparent,#ffffff00 12%,#ffffffb0 50%,#ffffff00 88%,transparent);
  transform:translateX(-120%);opacity:0;
}
.js-trail:hover::after,.js-trail:focus-visible::after{animation:motion-trail .9s cubic-bezier(.4,0,.2,1) 1}
@keyframes motion-trail{
  0%{transform:translateX(-120%);opacity:0}
  12%{opacity:1}
  88%{opacity:1}
  100%{transform:translateX(120%);opacity:0}
}

/* ---------- the flag explains itself ------------------------------------- */
.plan-flag{position:relative;cursor:help}
.plan-flag::after{
  content:attr(data-tip);
  position:absolute;inset-inline-start:50%;bottom:calc(100% + 8px);
  transform:translateX(-50%) translateY(4px);
  max-width:220px;width:max-content;padding:7px 9px;border-radius:3px;
  background:#0b1524;color:#f4f0e6;font-size:.75rem;font-weight:600;line-height:1.35;
  text-transform:none;text-align:start;white-space:normal;
  opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;z-index:5;
}
.plan-flag:hover::after,.plan-flag:focus-visible::after{opacity:1;transform:translateX(-50%) translateY(0)}

/* ---------- the sticky header: solid, no backdrop-filter ----------------- */
html[data-scrolled="true"] .site-header,
html[data-scrolled="true"] .account-links-header{
  box-shadow:0 1px 0 #1e3048, 0 10px 24px -20px #000000aa;
}
header.site-header{transition:box-shadow .2s ease,background-color .2s ease}

/* ---------- the badge bumps --------------------------------------------- */
@keyframes motion-bump{0%{transform:scale(1)}38%{transform:scale(1.28)}100%{transform:scale(1)}}
.basket-badge:not([hidden]){animation:motion-bump .42s cubic-bezier(.2,.8,.2,1)}

/* ---------- self-defence: a page that misses frames drops the decoration -- */
html.perf-lite .motion-cursor-light,
html.perf-lite .js-trail::after{display:none !important}
html.perf-lite .js-magnetic,
html.perf-lite .js-tilt{transform:none !important;transition:none !important}
html.perf-lite .motion-settle{animation:none !important}

@media (prefers-reduced-motion:reduce){
  .js-magnetic,.js-tilt{transition:none}
  .motion-cursor-light{display:none}
  .motion-settle{animation:none}
  .js-trail::after{display:none}
  .basket-badge:not([hidden]){animation:none}
  .plan-flag::after{transition:none}
}
@media (hover:none){
  .motion-cursor-light{display:none}
  .js-trail::after{display:none}
}
