/* tokens.css — ChronicGuard design system
   Warm off-white surfaces + deep teal/green healthcare accent */

:root {
  /* Type scale */
  --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.6vw, 1.4rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem);
  --text-2xl: clamp(2.1rem, 1.4rem + 2.4vw, 3.4rem);

  /* 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;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1180px;

  /* Fonts */
  --font-display: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

/* ---------- LIGHT MODE ---------- */
:root,
[data-theme='light'] {
  --color-bg: #f6f4ed;
  --color-surface: #fbfaf5;
  --color-surface-2: #ffffff;
  --color-surface-offset: #eeece3;
  --color-divider: #e0ddd2;
  --color-border: #d6d2c6;

  --color-text: #1f2b29;
  --color-text-muted: #5f6b67;
  --color-text-faint: #9aa39f;
  --color-text-inverse: #f7f9f7;

  /* Deep teal/green primary */
  --color-primary: #0d6e63;
  --color-primary-hover: #0a564e;
  --color-primary-active: #073f39;
  --color-primary-soft: #d9ebe6;
  --color-primary-tint: #e9f2ee;

  --color-accent-leaf: #2f8f6b;

  --color-warning: #9a5a1e;
  --color-warning-soft: #f3e6d4;
  --color-success: #3f7a2f;
  --color-success-soft: #dde9d4;

  --shadow-sm: 0 1px 2px rgba(31, 43, 41, 0.06);
  --shadow-md: 0 6px 20px rgba(31, 43, 41, 0.08);
  --shadow-lg: 0 18px 48px rgba(13, 110, 99, 0.14);
  --shadow-glow: 0 10px 40px rgba(13, 110, 99, 0.18);

  --hero-grid: rgba(13, 110, 99, 0.07);
}

/* ---------- DARK MODE ---------- */
[data-theme='dark'] {
  --color-bg: #12181a;
  --color-surface: #182022;
  --color-surface-2: #1e2729;
  --color-surface-offset: #1a2325;
  --color-divider: #283335;
  --color-border: #314042;

  --color-text: #dde6e4;
  --color-text-muted: #93a09d;
  --color-text-faint: #6a7674;
  --color-text-inverse: #0c1213;

  --color-primary: #4fb3a4;
  --color-primary-hover: #6ac4b5;
  --color-primary-active: #8ad3c6;
  --color-primary-soft: #1d3733;
  --color-primary-tint: #18302c;

  --color-accent-leaf: #5cc08e;

  --color-warning: #d2924f;
  --color-warning-soft: #33271a;
  --color-success: #79b85f;
  --color-success-soft: #21301c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 10px 40px rgba(79, 179, 164, 0.15);

  --hero-grid: rgba(79, 179, 164, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #12181a;
    --color-surface: #182022;
    --color-surface-2: #1e2729;
    --color-surface-offset: #1a2325;
    --color-divider: #283335;
    --color-border: #314042;
    --color-text: #dde6e4;
    --color-text-muted: #93a09d;
    --color-text-faint: #6a7674;
    --color-text-inverse: #0c1213;
    --color-primary: #4fb3a4;
    --color-primary-hover: #6ac4b5;
    --color-primary-active: #8ad3c6;
    --color-primary-soft: #1d3733;
    --color-primary-tint: #18302c;
    --color-accent-leaf: #5cc08e;
    --color-warning: #d2924f;
    --color-warning-soft: #33271a;
    --color-success: #79b85f;
    --color-success-soft: #21301c;
    --hero-grid: rgba(79, 179, 164, 0.08);
  }
}
