/* Cutline motion tokens (DFEEL lane, 27 Sep 2026). The one place every duration, easing and distance lives.
   Spec: c1b-lane-notes/DESIGN-FEEL.md. Data copy for tools: shared/motion.json (same values; check-feel.mjs asserts parity).
   Load after tokens.css. Parts read only var(--mo-*) for motion; no literal ms or scale outside this file.
   --cl-ease and --cl-spring in tokens.css keep their values; --mo-ease-out and --mo-spring are the same curves, so nothing drifts.
   Reduced motion: the OS setting (prefers-reduced-motion) and the in-app Settings switch (data-motion=reduced on the root and on the
   overlay layer) both collapse every value here to instant or static. The app never checks the media query anywhere else. */
:root{
  /* durations */
  --mo-instant:0ms;
  --mo-press:80ms;        /* pointer down: the press is felt before the finger lifts */
  --mo-quick:140ms;       /* hover tint, colour, chevron */
  --mo-base:200ms;        /* fades, tab switch, toast */
  --mo-release:220ms;     /* pointer up: spring back from the pressed scale */
  --mo-move:260ms;        /* push and pop, shared element, row removal (FLIP) */
  --mo-sheet:320ms;       /* sheet rises */
  --mo-sheet-out:240ms;   /* sheet leaves */
  --mo-reveal:360ms;      /* screen content fades and rises on arrival */
  --mo-stagger:40ms;      /* per row on arrival, at most 6 rows staggered */
  --mo-slow:700ms;        /* progress bars filling */
  --mo-ring:900ms;        /* the score ring drawing */
  --mo-toast-in:200ms;
  --mo-toast-out:160ms;
  --mo-undo:6000ms;       /* the Undo toast lives this long, then the action commits */
  --mo-long-press:500ms;  /* long press opens the row menu */
  --mo-breath:3800ms;     /* the breathing pacer, one phase */
  /* easings */
  --mo-ease-out:cubic-bezier(.2,0,0,1);      /* things arriving */
  --mo-ease-in:cubic-bezier(.4,0,1,1);       /* things leaving */
  --mo-ease-in-out:cubic-bezier(.4,0,.2,1);  /* things moving in place */
  --mo-spring:cubic-bezier(.2,.9,.3,1.18);   /* release, sheet, small overshoot */
  --mo-spring-2:cubic-bezier(.2,.9,.3,1.4);  /* the one celebratory pop (correct answer key, score ring) */
  --mo-linear:linear;
  /* distances and scales */
  --mo-press-scale:.96;        /* buttons, chips, tiles under 200px */
  --mo-press-scale-row:.985;   /* rows, cards, options: big surfaces move less */
  --mo-press-scale-tile:.97;   /* paper tiles */
  --mo-hover-lift:-1px;        /* desktop hover on a primary button */
  --mo-rise:6px;               /* content rises this much while fading in */
  --mo-sheet-rise:100%;        /* a sheet starts fully below the screen edge */
  --mo-toast-rise:20px;
  --mo-push-in:100%;           /* the incoming screen starts one width to the right */
  --mo-pop-under:-24%;         /* the outgoing screen slides under by a quarter */
  --mo-pop-scale:.98;          /* the screen under a sheet settles back to this */
  --mo-ring-pop:1.15;          /* the correct option key pops to this and back */
  --mo-tab-pop:.88;            /* a bottom tab icon dips to this and springs back */
  --mo-menu-lift:1.02;         /* a row lifts to this while its long press menu is open */
  /* gesture thresholds (numbers, read by JavaScript through getComputedStyle) */
  --mo-sheet-dismiss:120;      /* px dragged down commits a dismiss */
  --mo-sheet-dismiss-v:.5;     /* px per ms; a flick faster than this commits at any distance */
  --mo-swipe-action:88px;      /* width of one revealed row action */
  --mo-swipe-commit:.5;        /* fraction of the row width; past it the top action fires */
  --mo-rubber:.55;             /* resistance past a limit: movement is multiplied by this */
  --mo-edge-zone:20px;         /* the left edge strip that starts a back drag */
  --mo-pull-refresh:64;        /* px pulled at the top triggers a refresh */
}

/* Reduced motion, from the OS: everything instant, nothing moves. data-motion=full on the root is the in-app override. */
@media (prefers-reduced-motion:reduce){
  :root:not([data-motion=full]),:root:not([data-motion=full]) [data-motion]:not([data-motion=full]){
    --mo-press:1ms;--mo-quick:1ms;--mo-base:1ms;--mo-release:1ms;--mo-move:1ms;--mo-sheet:1ms;--mo-sheet-out:1ms;--mo-reveal:1ms;--mo-stagger:0ms;--mo-slow:1ms;--mo-ring:1ms;--mo-toast-in:1ms;--mo-toast-out:1ms;
    --mo-ease-out:linear;--mo-ease-in:linear;--mo-ease-in-out:linear;--mo-spring:linear;--mo-spring-2:linear;
    --mo-press-scale:1;--mo-press-scale-row:1;--mo-press-scale-tile:1;--mo-hover-lift:0px;--mo-rise:0px;--mo-sheet-rise:0%;--mo-toast-rise:0px;--mo-push-in:0%;--mo-pop-under:0%;--mo-pop-scale:1;--mo-ring-pop:1;--mo-tab-pop:1;--mo-menu-lift:1;
  }
}
/* Reduced motion, from the in-app switch (Settings, stored as cutline-reduce-motion): same collapse, no media query. Applies to the app root and to the body overlay layer. */
[data-motion=reduced]{
  --mo-press:1ms;--mo-quick:1ms;--mo-base:1ms;--mo-release:1ms;--mo-move:1ms;--mo-sheet:1ms;--mo-sheet-out:1ms;--mo-reveal:1ms;--mo-stagger:0ms;--mo-slow:1ms;--mo-ring:1ms;--mo-toast-in:1ms;--mo-toast-out:1ms;
  --mo-ease-out:linear;--mo-ease-in:linear;--mo-ease-in-out:linear;--mo-spring:linear;--mo-spring-2:linear;
  --mo-press-scale:1;--mo-press-scale-row:1;--mo-press-scale-tile:1;--mo-hover-lift:0px;--mo-rise:0px;--mo-sheet-rise:0%;--mo-toast-rise:0px;--mo-push-in:0%;--mo-pop-under:0%;--mo-pop-scale:1;--mo-ring-pop:1;--mo-tab-pop:1;--mo-menu-lift:1;
}
