/* ===================================================
   HEALING UNDER PRESSURE — Design Tokens
   Palette: Warm ivory + deep forest green + gold
   === */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f8f5ef;
  --color-surface: #faf8f3;
  --color-surface-2: #fdfcf9;
  --color-surface-offset: #f1ede4;
  --color-surface-offset-2: #e9e3d8;
  --color-surface-dynamic: #dfd8cc;
  --color-divider: #d8d1c4;
  --color-border: #ccc4b4;

  /* Text */
  --color-text: #1e1c17;
  --color-text-muted: #6b665a;
  --color-text-faint: #b0a99a;
  --color-text-inverse: #faf8f3;

  /* Primary: Deep Forest Green */
  --color-primary: #2d6a4f;
  --color-primary-hover: #1e4d38;
  --color-primary-active: #143526;
  --color-primary-highlight: #c8ddd3;

  /* Gold accent */
  --color-gold: #b5850a;
  --color-gold-hover: #8f6807;
  --color-gold-light: #f5e6c0;

  /* Semantic */
  --color-success: #437a22;
  --color-error: #a12c2c;
  --color-warning: #964219;

  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(30, 24, 10, 0.07);
  --shadow-md: 0 4px 14px rgba(30, 24, 10, 0.10);
  --shadow-lg: 0 12px 36px rgba(30, 24, 10, 0.13);

  /* Type scale (fluid) */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    7rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Content widths */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

[data-theme='dark'] {
  --color-bg: #141310;
  --color-surface: #1a1915;
  --color-surface-2: #1f1e1a;
  --color-surface-offset: #1c1b17;
  --color-surface-offset-2: #211f1b;
  --color-surface-dynamic: #2b2922;
  --color-divider: #2e2c25;
  --color-border: #3a3830;
  --color-text: #e8e3d8;
  --color-text-muted: #8a8578;
  --color-text-faint: #5e5a52;
  --color-text-inverse: #1a1915;
  --color-primary: #52a882;
  --color-primary-hover: #3d8a68;
  --color-primary-active: #2e6b50;
  --color-primary-highlight: #253629;
  --color-gold: #d4a335;
  --color-gold-hover: #c18f1c;
  --color-gold-light: #3d2f10;
  --color-success: #6daa45;
  --color-error: #d16363;
  --color-warning: #bb653b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #141310;
    --color-surface: #1a1915;
    --color-surface-2: #1f1e1a;
    --color-surface-offset: #1c1b17;
    --color-surface-offset-2: #211f1b;
    --color-surface-dynamic: #2b2922;
    --color-divider: #2e2c25;
    --color-border: #3a3830;
    --color-text: #e8e3d8;
    --color-text-muted: #8a8578;
    --color-text-faint: #5e5a52;
    --color-text-inverse: #1a1915;
    --color-primary: #52a882;
    --color-primary-hover: #3d8a68;
    --color-primary-active: #2e6b50;
    --color-primary-highlight: #253629;
    --color-gold: #d4a335;
    --color-gold-hover: #c18f1c;
    --color-gold-light: #3d2f10;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.25);
    --shadow-md: 0 4px 14px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 36px rgba(0,0,0,.45);
  }
}
