/* ============================================================
   kinship mfg — Spacing, grid, radii, shadows, motion
   ------------------------------------------------------------
   The system runs on an 8-POINT GRID. Every margin, padding, gap
   and size lands on an 8px step. The 4px half-step (--space-1) is
   reserved for line-height / optical text rhythm — never for
   layout spacing. Spacing is ALWAYS grid, never fluid; only
   heading font sizes scale (clamp, see typography.css).
   Layouts use a 12-column grid with a 24px gutter.

   Corners are crisp and architectural (spec-sheet, not bubbly);
   shadows are ink-tinted, low, and matte — a paper-grounded system.
   ============================================================ */

:root {
  /* ============ BASE UNIT ============ */
  --grid-unit: 8px;

  /* ============ SPACING SCALE (multiples of 8) ============ */
  --space-0:  0;
  --space-1:  0.25rem;  /* 4px  — line-height half-step, NOT layout */
  --space-2:  0.5rem;   /* 8px   · 1×  */
  --space-3:  0.75rem;  /* 12px  · 1½× */
  --space-4:  1rem;     /* 16px  · 2×  */
  --space-5:  1.5rem;   /* 24px  · 3×  */
  --space-6:  2rem;     /* 32px  · 4×  */
  --space-7:  2.5rem;   /* 40px  · 5×  */
  --space-8:  3rem;     /* 48px  · 6×  */
  --space-9:  4rem;     /* 64px  · 8×  */
  --space-10: 5rem;     /* 80px  · 10× */
  --space-11: 6rem;     /* 96px  · 12× */
  --space-12: 8rem;     /* 128px · 16× */
  --space-13: 10rem;    /* 160px · 20× */

  /* ============ LAYOUT GRID ============ */
  --grid-columns: 12;            /* @kind other */
  --grid-gutter: 24px;           /* 3× — column gutter */
  --grid-margin: 32px;           /* 4× — page outer margin (desktop) */
  --grid-margin-mobile: 24px;    /* 3× — page outer margin (mobile) */
  --gutter: var(--grid-gutter);  /* back-compat alias */

  /* ============ CONTENT WIDTHS ============ */
  --container-sm: 640px;
  --container-md: 860px;
  --container-lg: 1120px;
  --container-xl: 1320px;
  --measure-prose: 68ch;         /* ideal long-form line length */

  /* ============ COMPONENT SIZING (all on-grid) ============ */
  --control-h-sm: 32px;   /* 4× */
  --control-h-md: 40px;   /* 5× — default control height */
  --control-h-lg: 48px;   /* 6× */
  --control-h-xl: 56px;   /* 7× */
  --tap-target-min: 44px; /* never below this for touch */

  /* ============ SEMANTIC SPACING ALIASES ============ */
  --gap-inline:  var(--space-2);   /* icon ↔ label, inline runs */
  --gap-stack:   var(--space-4);   /* stacked elements */
  --pad-card:    var(--space-5);   /* card interior padding */
  --pad-section: var(--space-11);  /* vertical section rhythm — 96px */

  /* ============ RADII ============
     Crisp, architectural corners — minimal easing. Reads precise
     and spec-sheet, in keeping with a manufacturing brand.
     --radius-pill is reserved for genuinely circular controls
     only (toggle knobs, avatars, status dots) — NOT chips. */
  --radius-none: 0;
  --radius-xs:  1px;
  --radius-sm:  2px;
  --radius-md:  4px;    /* default: cards / buttons / inputs / chips */
  --radius-lg:  6px;    /* larger containers */
  --radius-xl:  8px;
  --radius-pill: 999px; /* circular controls only */
  --radius-card: var(--radius-lg);

  /* ============ BORDERS ============ */
  --border-width: 1px;
  --border-width-thick: 1.5px;

  /* ============ SHADOWS (ink-tinted, low + matte) ============ */
  --shadow-xs: 0 1px 2px rgba(27, 29, 33, 0.06);
  --shadow-sm: 0 1px 3px rgba(27, 29, 33, 0.08), 0 1px 2px rgba(27, 29, 33, 0.04);
  --shadow-md: 0 4px 12px rgba(27, 29, 33, 0.08), 0 1px 3px rgba(27, 29, 33, 0.05);
  --shadow-lg: 0 12px 28px rgba(27, 29, 33, 0.12), 0 2px 6px rgba(27, 29, 33, 0.06);
  --shadow-xl: 0 24px 56px rgba(27, 29, 33, 0.16);
  /* Inset hairline used to crisp up cards on paper */
  --shadow-line: inset 0 0 0 1px rgba(27, 29, 33, 0.06);
  --shadow-focus: 0 0 0 3px var(--accent-ring);

  /* ============ MOTION (restrained, physical, no bounce) ============ */
  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1); /* @kind other */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);    /* @kind other */
  --dur-fast:   120ms; /* @kind other */
  --dur-base:   200ms; /* @kind other */
  --dur-slow:   360ms; /* @kind other */
}
