/* ════════════════════════════════════════════════════════════════
 * TwoNests — design tokens
 * ════════════════════════════════════════════════════════════════
 * Single source of truth for colours, typography, spacing, etc.
 * Every component pulls from these — never hard-code values in
 * components.css or inline styles.
 * ════════════════════════════════════════════════════════════════ */

:root {
  /* ─── Brand ──────────────────────────────────────────────── */
  --brand-50:  #ecfdf5;
  --brand-100: #d1fae5;
  --brand-200: #a7e8c8;
  --brand-300: #6dd1a4;
  --brand-400: #40916c;
  --brand-500: #2d6a4f;   /* PRIMARY brand colour */
  --brand-600: #235c43;
  --brand-700: #1b4332;
  --brand-800: #143a29;
  --brand-900: #0e2b1f;

  /* ─── Neutrals (cool, paper-clean) ──────────────────────── */
  --neutral-0:   #ffffff;
  --neutral-25:  #fcfcfb;
  --neutral-50:  #f7f8f7;
  --neutral-100: #eceeec;
  --neutral-200: #dbdedb;
  --neutral-300: #c0c4c0;
  --neutral-400: #8b908a;
  --neutral-500: #5d635d;
  --neutral-600: #404640;
  --neutral-700: #2a2e2a;
  --neutral-800: #181b18;
  --neutral-900: #0c0e0c;

  /* ─── Accent (sparingly) ─────────────────────────────────── */
  --amber-400: #f59e0b;
  --amber-500: #d97706;
  --rose-500:  #e11d48;
  --rose-600:  #be123c;
  --blue-400:  #3b82f6;
  --blue-500:  #2563eb;
  --violet-500:#7c3aed;
  --teal-500:  #0d9488;

  /* ─── Semantic colours ────────────────────────────────────── */
  --bg-page:        var(--neutral-50);
  --bg-surface:     var(--neutral-0);
  --bg-surface-2:   var(--neutral-25);
  --bg-muted:       var(--neutral-100);
  --bg-brand-soft:  var(--brand-50);

  --text-primary:   var(--neutral-800);
  --text-secondary: var(--neutral-600);
  --text-tertiary:  var(--neutral-500);
  --text-muted:     var(--neutral-400);
  --text-on-brand:  var(--neutral-0);
  --text-brand:     var(--brand-500);

  --border-subtle:  var(--neutral-200);
  --border-strong:  var(--neutral-300);
  --border-brand:   var(--brand-400);

  --ring-focus: 0 0 0 3px rgba(45, 106, 79, 0.18);

  --success: var(--brand-500);
  --warning: var(--amber-500);
  --danger:  var(--rose-500);

  /* ─── Typography ──────────────────────────────────────────── */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Text',
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display',
                  'Segoe UI', Roboto, sans-serif;

  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-4xl:  44px;

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.5;
  --leading-relaxed:1.65;

  --tracking-tight: -0.02em;
  --tracking-snug:  -0.01em;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extrabold:800;

  /* ─── Spacing (4px base) ──────────────────────────────────── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* ─── Radius ──────────────────────────────────────────────── */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-pill: 999px;

  /* ─── Shadows ─────────────────────────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(15, 23, 23, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 23, 0.06), 0 1px 2px rgba(15, 23, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 23, 0.06), 0 2px 4px rgba(15, 23, 23, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 23, 0.08), 0 4px 8px rgba(15, 23, 23, 0.04);
  --shadow-brand: 0 8px 24px rgba(45, 106, 79, 0.18);

  /* ─── Motion ──────────────────────────────────────────────── */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --motion-fast:   120ms;
  --motion-base:   200ms;
  --motion-slow:   320ms;

  /* ─── Layout ──────────────────────────────────────────────── */
  --content-narrow:   480px;
  --content-default:  720px;
  --content-wide:     1080px;

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --header-height: 60px;
  --nav-height:    64px;
}

/* Gentle dark mode (later — for now, light only) */
@media (prefers-color-scheme: dark) {
  /* TODO: dark theme tokens */
}
