/* ============================================================
   SPACING, RADIUS, SHADOW, MOTION, LAYOUT
   ============================================================ */

:root {
  /* --- Spacing scale (4px base, editorial rhythm) --- */
  --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.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */
  --space-10: 8rem;     /* 128 */
  --space-11: 12rem;    /* 192 — section breathing room */

  /* --- Layout --- */
  --content-max: 1240px;   /* @kind spacing */
  --reading-max: 680px;    /* @kind spacing */
  --gutter: clamp(1.25rem, 5vw, 4rem);  /* @kind spacing */

  /* --- Radius (restrained, mostly sharp) --- */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* --- Border widths --- */
  --hair: 1px;   /* @kind spacing */

  /* --- Shadows (soft, low, used sparingly in light mode) --- */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.18);
  --shadow-md: 0 8px 24px -12px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 60px -24px rgba(0,0,0,0.45);
  --shadow-focus: 0 0 0 3px var(--selection-bg);

  /* --- Motion --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);   /* @kind other */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* @kind other */
  --dur-fast: 120ms;    /* @kind other */
  --dur-base: 220ms;    /* @kind other */
  --dur-slow: 420ms;    /* @kind other */
  --dur-reveal: 700ms;  /* @kind other */

  /* --- Z --- */
  --z-nav: 100;      /* @kind other */
  --z-overlay: 500;  /* @kind other */
  --z-toast: 900;    /* @kind other */
}

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