/* ============================================================
   SILVA DESIGN TOKENS
   Source of truth for all colours, typography and spacing.
   A single token change propagates everywhere — never hardcode
   a colour or font-family outside :root or body.ai-arm.
   ============================================================ */

/* ── Legal arm (default) ── */
:root {
  /* Backgrounds */
  --bg:              #fdfcf8;
  --bg-alt:          #ffffff;
  --bg-panel:        #f0f7ed;
  --bg-panel-soft:   #e8f5e3;
  --bg-deeper:       #f5f2eb;
  --bg-dark:         #3C3E44;

  /* Text */
  --ink:             #1a1a1a;
  --ink-soft:        #4a4a4a;
  --ink-muted:       #777777;

  /* Brand */
  --accent:          #4A8B35;
  --accent-bright:   #5EA040;
  --accent-dim:      #3A7228;
  --charcoal:        #2C2E32;
  --orange:          #C8692A;
  --orange-bright:   #E07830;

  /* Text on dark */
  --parchment:       #F0EDE6;

  /* Rules */
  --rule:            #e5e0d3;
  --rule-soft:       #ede7d8;
  --rule-mid:        #dbd4c4;

  /* Glass — hamburger nav and AI agent button only */
  --glass-bg:        rgba(253, 252, 248, 0.72);
  --glass-border:    rgba(58, 124, 34, 0.18);

  /* Typography */
  --font-body:       'DM Sans', sans-serif;
  --font-display:    'Fraunces', serif;

  /* Spacing */
  --space-xs:        8px;
  --space-sm:        16px;
  --space-md:        32px;
  --space-lg:        64px;
  --space-xl:        100px;

  /* Motion */
  --ease-out:        cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out:     cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:   0.15s;
  --duration-mid:    0.3s;
  --duration-slow:   0.65s;

  /* Border radius */
  --radius-sm:       2px;
  --radius-md:       4px;
  --radius-lg:       8px;
}

/* ── AI arm override — applied via body.ai-arm ── */
body.ai-arm {
  --bg:              #1E2025;
  --bg-raised:       #252830;
  --bg-card:         #2A2D35;
  --bg-card-hover:   #2F3340;

  --ink:             #F0EDE6;
  --ink-soft:        rgba(240, 237, 230, 0.65);
  --ink-muted:       rgba(240, 237, 230, 0.38);

  --accent:          #4A8B35;
  --accent-bright:   #5EA040;

  --rule:            rgba(240, 237, 230, 0.08);
  --rule-mid:        rgba(240, 237, 230, 0.14);

  --glass-bg:        rgba(30, 32, 37, 0.80);
  --glass-border:    rgba(200, 105, 42, 0.22);
}
