/* Motion Studies design tokens.
   Single source of truth for color, type, radius and motion.
   Edit here (or in Claude Design) and every component follows. */
:root{
  /* ---------- color ---------- */
  --stage:#000;                         /* page background */
  --card:#171717;                       /* component stage card (= white 9% on black) */
  --surface:#262626;                    /* component body */
  --fill-1:rgba(255,255,255,.05);       /* tiles, fields */
  --fill-2:rgba(255,255,255,.09);       /* chips, badges */
  --fill-3:rgba(255,255,255,.14);       /* tracks, avatars, bars */
  --line:rgba(255,255,255,.12);
  --text:#fff;
  --text-2:rgba(255,255,255,.78);
  --muted:#9a9a9a;
  --muted-2:#828282;
  --chip-text:#b4b4b4;
  --white:#fff;
  --black:#000;
  --green:#34d17a;
  --green-text:#3ce085;
  --orange:#ff9f0a;
  --orange-text:#ff9f0a;                /* orange used as text: darker in light */
  --red:#ff5a5f;
  --yellow:#ffd23f;
  --blue:#3ec9ff;
  --purple:#c69bff;
  --pink:#ff6ad5;
  --heart:#ff4d6d;                      /* like, favourite */
  --green-soft:rgba(52,209,122,.14);    /* tinted chip behind green text */
  --on-green:#04140a;                   /* text and checks on --green, same in both themes */
  --object:#2c2c2c;                     /* a free-standing grey object with no card under it: island, goo bubbles */
  --inverse:#fff;                       /* primary pills, thumbs, drops */
  --on-inverse:#000;                    /* content on top of --inverse */
  --rim:transparent;          /* no strokes anywhere (Noah, 9 Nov 2026) */ /* 1px inner edge on surfaces */
  --focus-rim:transparent;
  --glow:rgba(255,255,255,.16);         /* cursor light on tiles */
  --sh:0;                               /* drop shadow strength multiplier; 0 = no shadows anywhere (Noah, 9 Nov 2026) */
  color-scheme:dark;

  /* ---------- type ---------- */
  --font:Inter,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --fs-2xs:11px;
  --fs-xs:12px;
  --fs-sm:13px;
  --fs-md:14px;
  --fs-base:15px;
  --fs-lg:16px;
  --fs-xl:17px;
  --fw-regular:400;
  --fw-medium:500;
  --fw-bold:600;

  /* ---------- radius ---------- */
  --r-card:28px;
  --r-tile:14px;
  --r-bar:5px;
  --r-pill:999px;
  /* inner radius = outer radius - the padding between them. Usual steps: */
  --r-xs:6px;                           /* keys, tiny chips */
  --r-row:12px;                         /* rows, icon buttons, highlights inside a panel */
  --r-panel:18px;                       /* bars, menus, small panels */
  --r-sheet:24px;                       /* large panels */

  /* ---------- motion: springs are "stiffness damping" ---------- */
  /* Shared presets. A new component starts from these and only adds its own token when it truly needs a different feel. */
  --spring-follow:900 50;      /* something held by the pointer: no overshoot, no lag */
  --spring-settle:280 22;      /* letting go, landing on a value: one small overshoot */
  --spring-soft:260 24;        /* large moves: panels, sheets, the whole component shifting */
  --spring-lead:620 36;        /* stretchy highlight: the edge facing the move */
  --spring-trail:190 19;       /* stretchy highlight: the edge that lags, this makes the stretch */
  --spring-pop:520 16;         /* icon or number pop on select */
  --spring-fade:420 32;        /* opacity and small slides */
  --stagger:45;                /* ms between items entering one after another */
  /* Rubber Dock */
  --dock-lead:640 38;          /* edge of the pill that leads the move */
  --dock-trail:150 16;         /* edge that lags behind: lower = more stretch */
  --dock-drag-lead:1100 56;
  --dock-drag-trail:320 26;
  --dock-open-w:340 21;        /* dock -> card, width */
  --dock-open-h:230 21;        /* dock -> card, height */
  --dock-close:420 30;
  --dock-pop:520 16;           /* icon pop on select */
  --dock-expanded-w:340;       /* px */

  /* Goo Menu */
  --goo-out:230 15;            /* bubbles flying out */
  --goo-in:520 34;             /* bubbles returning */
  --goo-release:300 12;        /* snap back after a drag */
  --goo-toast:260 17;          /* + morphing into the toast pill */
  --goo-radius:112;            /* px, distance of bubbles from + */
  --goo-stagger:45;            /* ms between bubbles */
  --goo-toast-ms:2600;         /* how long the toast stays */
  --goo-blur:10;               /* goo strength: higher = bubbles fuse from further away */

  /* Morph Island */
  --island-w:380 24;           /* width morph */
  --island-h:300 22;           /* height morph, a bit softer so it lands after the width */
  --island-radius:32;          /* px, max corner radius when tall */
  --island-cycle-ms:2800;      /* autoplay step until the viewer interacts */

  /* Hold Button */
  --hold-ms:1200;              /* how long to hold */
  --hold-release:260 14;       /* fill springing back when let go early */
  --hold-morph:320 20;         /* pill <-> circle */
  --hold-done-ms:1700;         /* how long the done state stays */

  /* Jelly Slider */
  --slider-follow:900 50;      /* thumb following the pointer */
  --slider-bubble:420 22;      /* value bubble rising out of the thumb */
  --slider-release:300 14;     /* snap back after over-drag */
  --slider-blur:8;             /* goo strength between thumb and bubble */

  /* Swipe Deck */
  --deck-drag:900 50;          /* top card following the pointer */
  --deck-return:280 16;        /* snapping back when not thrown far enough */
  --deck-threshold:110;        /* px of drag that counts as a decision */

  /* Springy Input */
  --input-caret:700 32;        /* caret travel; it stretches with speed */
  --input-morph:300 20;        /* field <-> success pill */

  /* Pull to Refresh */
  --pull-threshold:88;         /* px of pull that triggers a refresh */
  --pull-return:260 18;        /* list springing back */
  --pull-hold-ms:1300;         /* how long the spinner runs */

  /* Magnetic Tiles */
  --tile-pull:12;              /* px a tile moves toward the cursor */
  --tile-tilt:12;              /* deg of 3D tilt */
  --tile-open:300 24;          /* tile -> card morph */

  /* Glass Lens */
  --lens-follow:180 17;        /* lens chasing the cursor, a little lazy like a drop of water */
  --lens-zoom:1.7;             /* magnification at rest */
  --lens-zoom-press:2.4;       /* magnification while pressed */
  --lens-size:150;             /* px */

  /* Morph Select */
  --select-open:360 24;        /* trigger <-> menu */
  --select-hl:620 34;          /* highlight pill edges (leading edge) */
  --select-reorder:260 21;     /* rows sliding to their new place */

  /* Parallax Ticket */
  --ticket-tilt:14;            /* deg */
  --ticket-depth:12;           /* px of parallax for the front layer */
  --ticket-flip:170 15;        /* flip spring, a little overshoot */

  /* Wheel Picker */
  --wheel-snap:240 24;         /* settling on the nearest value */
  --wheel-decay:5;             /* momentum decay per second: lower = spins longer */

  /* Trends */
  --trend-menu:330 25;         /* "..." button growing into the menu */
  --trend-fly:260 20;          /* the three dots flying into the menu icons */
  --trend-row:300 28;          /* row height: dismiss, undo, show more */
  --trend-live-ms:2200;        /* how often a post count rolls */
  --trend-tick-ms:1100;        /* how often the charts get a new point */
  --trend-expand:280 24;       /* row opening into the big chart */
  --trend-rank:260 22;         /* rows swapping places when the ranking changes */

  /* Side Nav */
  --nav-lead:560 34;           /* hover pill: edge moving toward the new item */
  --nav-trail:220 21;          /* hover pill: edge catching up, this makes it stretch */

  /* Rolling Counter */
  --count-roll:320 24;         /* each digit column rolling to its value: lower damping = more bounce */
  --count-width:380 22;        /* columns growing in and folding away, this stretches the pill */
  --count-press:600 18;        /* button squash, number pop and lean */
  --count-stagger:45;          /* ms each higher column waits, so a carry ripples left */
  --count-blur:1;              /* motion blur strength, 0 = off */
  --count-decay:3.5;           /* fling decay per second: lower = coasts longer */
  --count-snap:260 24;         /* ruler settling on the nearest tick */
  --count-gap:14;              /* ruler: px between ticks */
  --count-fisheye:60;          /* ruler: how much ticks swell near the marker, 0..100 */
  --count-flip:140;            /* split flap: ms per fold */
}

/* ---------- light mode ---------- */
:root[data-theme="light"]{
  --stage:#fff;
  --card:#f7f7f6;
  --surface:#fff;
  --fill-1:rgba(23,24,26,.04);
  --fill-2:rgba(23,24,26,.07);
  --fill-3:rgba(23,24,26,.12);
  --line:rgba(23,24,26,.16);
  --text:#17181a;
  --text-2:#3c3b37;
  --muted:#6f6e68;
  --muted-2:#85847e;
  --chip-text:#5c5b56;
  --green-text:#15803d;
  --orange-text:#c2660a;
  --object:#e6e5e2;
  --inverse:#0e0f11;
  --on-inverse:#f4f3f1;
  --rim:transparent;
  --focus-rim:transparent;
  --glow:rgba(23,24,26,.06);
  --sh:0;
  color-scheme:light;
}

/* ---------- both themes at once ----------
   For a component that shows the dark and the light look side by side (Pull cord:
   the light floods out of the bulb). Same values as the two blocks above, colour only. */
.theme-dark{
  --card:#171717;--surface:#262626;--object:#2c2c2c;
  --fill-1:rgba(255,255,255,.05);--fill-2:rgba(255,255,255,.09);--fill-3:rgba(255,255,255,.14);
  --text:#fff;--text-2:rgba(255,255,255,.78);--muted:#9a9a9a;--muted-2:#828282;
  --inverse:#fff;--on-inverse:#000;color-scheme:dark;
}
.theme-light{
  --card:#f7f7f6;--surface:#fff;--object:#e6e5e2;
  --fill-1:rgba(23,24,26,.04);--fill-2:rgba(23,24,26,.07);--fill-3:rgba(23,24,26,.12);
  --text:#17181a;--text-2:#3c3b37;--muted:#6f6e68;--muted-2:#85847e;
  --inverse:#0e0f11;--on-inverse:#f4f3f1;color-scheme:light;
}
