/* ===========================================================================
   Sugarcane — Spacing, radii, shadows, borders, motion, layout, z-index
   4px base grid. Dense UIs lean on the lower steps; marketing on the higher.
   =========================================================================== */

:root {
  /* ---- Spacing scale (4px base) ---------------------------------------- */
  --space-0:   0;
  --space-1:   0.25rem;  /* 4  */
  --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 */

  /* ---- Radii -----------------------------------------------------------
     Intentionally crisp & restrained: 2px is the default control / card
     radius, and the scale grows gently (max +2 per step) so large surfaces
     never read as overly rounded. */
  --radius-xs:   0;     /* square */
  --radius-sm:   1px;
  --radius-md:   2px;   /* default control / card radius */
  --radius-lg:   3px;
  --radius-xl:   4px;
  --radius-2xl:  6px;
  --radius-pill: 999px;

  /* ---- Border widths --------------------------------------------------- */
  --border-width:        1px;
  --border-width-strong: 1.5px;
  --border-width-focus:  2px;

  /* ---- Shadows (soft, low-spread; tuned for light surfaces) ------------ */
  --shadow-xs:  0 1px 2px rgba(15, 32, 24, 0.06);
  --shadow-sm:  0 1px 2px rgba(15, 32, 24, 0.06), 0 1px 3px rgba(15, 32, 24, 0.08);
  --shadow-md:  0 2px 4px rgba(15, 32, 24, 0.06), 0 4px 12px rgba(15, 32, 24, 0.10);
  --shadow-lg:  0 4px 8px rgba(15, 32, 24, 0.06), 0 12px 28px rgba(15, 32, 24, 0.14);
  --shadow-xl:  0 8px 16px rgba(15, 32, 24, 0.08), 0 24px 56px rgba(15, 32, 24, 0.18);
  --shadow-focus: 0 0 0 var(--border-width-focus) var(--surface), 0 0 0 4px var(--focus-ring);
  --shadow-inset: inset 0 1px 2px rgba(15, 32, 24, 0.07);

  /* ---- Motion ---------------------------------------------------------- */
  /* Sugarcane motion is calm and decisive: short, ease-out, no bounce on UI. */
  --ease-standard:  cubic-bezier(0.2, 0, 0, 1); /* @kind other */
  --ease-emphasis:  cubic-bezier(0.3, 0, 0, 1); /* @kind other */
  --ease-exit:      cubic-bezier(0.4, 0, 1, 1); /* @kind other */
  --ease-spring:    cubic-bezier(0.34, 1.4, 0.64, 1); /* @kind other */

  --dur-instant: 80ms; /* @kind other */
  --dur-fast:    140ms; /* @kind other */
  --dur-base:    200ms; /* @kind other */
  --dur-slow:    320ms; /* @kind other */
  --dur-slower:  480ms; /* @kind other */

  /* ---- Layout ---------------------------------------------------------- */
  --container-sm:  640px;
  --container-md:  860px;
  --container-lg:  1100px;
  --container-xl:  1320px;
  --sidebar-w:     264px;
  --sidebar-w-collapsed: 40px;
  --topbar-h:      40px;
  --siteheader-h:  68px;

  /* ---- Z-index ladder -------------------------------------------------- */
  --z-base:     0; /* @kind other */
  --z-sticky:   100; /* @kind other */
  --z-dropdown: 400; /* @kind other */
  --z-overlay:  800; /* @kind other */
  --z-modal:    900; /* @kind other */
  --z-toast:    1000; /* @kind other */
  --z-tooltip:  1100; /* @kind other */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant: 0ms; /* @kind other */
    --dur-fast: 0ms; /* @kind other */
    --dur-base: 0ms; /* @kind other */
    --dur-slow: 0ms; /* @kind other */
    --dur-slower: 0ms; /* @kind other */
  }
}
