/* ===========================================================================
   Atelier — Spacing, Radius, Elevation & Motion
   A 4px base grid. Small radii (shadcn's 10px lg). Shadows are restrained —
   depth comes from borders and surface shifts first, shadow second. Motion
   uses strong custom easing curves (Emil Kowalski's design-engineering rules):
   the built-in CSS easings are too weak to feel intentional.
   =========================================================================== */

:root {
  /* --- Spacing scale (4px base grid) ---------------------------------- */
  --space-0:   0;
  --space-px:  1px;
  --space-0-5: 0.125rem;  /* 2  */
  --space-1:   0.25rem;   /* 4  */
  --space-1-5: 0.375rem;  /* 6  */
  --space-2:   0.5rem;    /* 8  */
  --space-3:   0.75rem;   /* 12 */
  --space-4:   1rem;      /* 16 */
  --space-5:   1.25rem;   /* 20 */
  --space-6:   1.5rem;    /* 24 */
  --space-8:   2rem;      /* 32 */
  --space-10:  2.5rem;    /* 40 */
  --space-12:  3rem;      /* 48 */
  --space-16:  4rem;      /* 64 */
  --space-20:  5rem;      /* 80 */
  --space-24:  6rem;      /* 96 */
  --space-32:  8rem;      /* 128 */

  /* --- Radius (base 0.625rem = 10px) ---------------------------------- */
  --radius:     0.625rem;
  --radius-sm:  calc(var(--radius) * 0.6);   /* 6px  */
  --radius-md:  calc(var(--radius) * 0.8);   /* 8px  */
  --radius-lg:  var(--radius);               /* 10px */
  --radius-xl:  calc(var(--radius) * 1.4);   /* 14px */
  --radius-2xl: calc(var(--radius) * 1.8);   /* 18px */
  --radius-full: 9999px;

  /* --- Elevation — restrained; borders first, shadow second ----------- */
  --shadow-xs:  0 1px 2px 0 oklch(0% 0 0 / 0.05);
  --shadow-sm:  0 1px 3px 0 oklch(0% 0 0 / 0.08), 0 1px 2px -1px oklch(0% 0 0 / 0.08);
  --shadow-md:  0 4px 8px -2px oklch(0% 0 0 / 0.10), 0 2px 4px -2px oklch(0% 0 0 / 0.06);
  --shadow-lg:  0 12px 24px -6px oklch(0% 0 0 / 0.12), 0 4px 8px -4px oklch(0% 0 0 / 0.08);
  --shadow-xl:  0 24px 48px -12px oklch(0% 0 0 / 0.18);
  --shadow-overlay: 0 16px 36px -12px oklch(0% 0 0 / 0.45);

  /* --- Motion: durations ---------------------------------------------- */
  --duration-press: 120ms;    /* @kind other */
  --duration-fast: 160ms;    /* @kind other */
  --duration-pop: 200ms;    /* @kind other */
  --duration-menu: 240ms;    /* @kind other */
  --duration-overlay: 320ms;    /* @kind other */

  /* --- Motion: easing (strong custom curves, not CSS defaults) -------- */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);     /* @kind other */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);    /* @kind other */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);     /* @kind other */
  --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);       /* @kind other */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-press: 0ms;    /* @kind other */
    --duration-fast: 0ms;    /* @kind other */
    --duration-pop: 0ms;    /* @kind other */
    --duration-menu: 0ms;    /* @kind other */
    --duration-overlay: 0ms;    /* @kind other */
  }
}
