/* ============================================
   CareMakers Collective — Design Tokens
   ============================================
   Palette: Sage Green / Light Beige (primary)
            Warm Terracotta / Deep Indigo (CTA)
            Saffron / Marigold (accent)
   
   All units: rem/em/% (no px except borders)
   Contrast: 4.5:1 minimum for normal text
   ============================================ */

:root {
  /* ── Primary: Sage Green & Light Beige ── */
  /* Environment colors — backgrounds, large sections, calm surfaces */
  --color-sage: #6B8F71;
  --color-sage-light: #8DB393;
  --color-sage-lighter: #B5D1B8;
  --color-sage-dark: #4F7054;
  --color-sage-darker: #3A5A3F;

  --color-beige: #F5F0E8;
  --color-beige-light: #FAF7F2;
  --color-beige-dark: #E8DFD2;
  --color-beige-darker: #D4C9B8;

  --color-turquoise: #45B6B0;
  --color-turquoise-light: #E0F2F1;
  --color-turquoise-dark: #2A9D8F;

  /* ── Secondary / CTA: Warm Terracotta & Deep Indigo ── */
  /* Action colors — buttons, links, critical navigation */
  --color-terracotta: #E56B70;
  --color-terracotta-light: #F19C9E;
  --color-terracotta-dark: #C24A50;
  --color-terracotta-darker: #9F3338;

  --color-indigo: #2C3E6B;
  --color-indigo-light: #3D5490;
  --color-indigo-dark: #1E2D50;
  --color-indigo-darker: #162140;

  /* ── Accent: Saffron / Marigold ── */
  /* Highlights — hover states, data viz, graphic accents */
  --color-saffron: #F4D03F;
  --color-saffron-light: #F9E79F;
  --color-saffron-dark: #D4AC0D;

  /* ── Neutrals ── */
  --color-white: #FFFFFF;
  --color-off-white: #FEFCF9;
  --color-gray-100: #EDE9E3;
  --color-gray-200: #DDD7CE;
  --color-gray-300: #C4BBB0;
  --color-gray-400: #A69D91;
  --color-gray-500: #877D72;
  --color-gray-600: #6B6259;
  --color-gray-700: #4F4840;
  --color-gray-800: #3A342E;
  --color-gray-900: #262220;

  /* ── Semantic Text Colors ── */
  /* All verified at 4.5:1+ contrast on beige/white backgrounds */
  --color-text: #2C2520;
  /* 14.5:1 on beige */
  --color-text-secondary: #4F4840;
  /* 8.2:1 on beige */
  --color-text-muted: #6B6259;
  /* 5.1:1 on beige — meets 4.5:1 */
  --color-text-inverse: #FAF7F2;
  /* For dark backgrounds */

  /* ── Semantic Status Colors ── */
  --color-success: #3A7A4C;
  --color-warning: #C48A20;
  --color-error: #B5432E;
  --color-info: #2C3E6B;

  /* ── Typography ── */
  --font-heading: 'Hassah Friedlaender', 'Poppins', 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Hassah Friedlaender', 'Open Sans', 'Lora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type Scale (modular 1.25 ratio, all rem) */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-md: 1.125rem;
  /* 18px — used as base on caregiving pages */
  --text-lg: 1.25rem;
  /* 20px */
  --text-xl: 1.5rem;
  /* 24px */
  --text-2xl: 1.875rem;
  /* 30px */
  --text-3xl: 2.25rem;
  /* 36px */
  --text-4xl: 3rem;
  /* 48px */
  --text-5xl: 3.75rem;
  /* 60px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.4;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* ── Spacing Scale (all rem) ── */
  --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;

  /* ── Layout (rem-based) ── */
  --container-sm: 40rem;
  /* 640px */
  --container-md: 48rem;
  /* 768px */
  --container-lg: 64rem;
  /* 1024px */
  --container-xl: 75rem;
  /* 1200px */
  --container-2xl: 87.5rem;
  /* 1400px */

  --nav-height: 5rem;
  /* 80px */

  /* ── Borders & Radius (rem) ── */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999rem;

  /* ── Shadows ── */
  --shadow-sm: 0 0.0625rem 0.125rem rgba(44, 37, 32, 0.06);
  --shadow-md: 0 0.25rem 0.375rem rgba(44, 37, 32, 0.08),
    0 0.125rem 0.25rem rgba(44, 37, 32, 0.04);
  --shadow-lg: 0 0.625rem 0.9375rem rgba(44, 37, 32, 0.1),
    0 0.25rem 0.375rem rgba(44, 37, 32, 0.05);
  --shadow-xl: 0 1.25rem 1.5625rem rgba(44, 37, 32, 0.12),
    0 0.5rem 0.625rem rgba(44, 37, 32, 0.06);

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-slower: 600ms ease;

  /* ── Z-Index Scale ── */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-a11y: 700;
  /* Accessibility widget */
}

/* ── High Contrast Mode Override ── */
[data-theme="high-contrast"] {
  --color-text: #000000;
  --color-text-secondary: #1A1A1A;
  --color-text-muted: #333333;
  --color-beige: #FFFFFF;
  --color-beige-light: #FFFFFF;
  --color-off-white: #FFFFFF;
  --color-terracotta: #9F3338;
  --color-indigo: #1A2850;
  --color-sage: #2E6633;
  --color-turquoise: #2A9D8F;
}

/* ── Dark Mode Override ── */
[data-theme="dark"] {
  --color-beige: #1E1E1E;
  --color-beige-light: #262626;
  --color-beige-dark: #161616;
  --color-off-white: #1A1A1A;
  --color-text: #E8E2DA;
  --color-text-secondary: #C4BBB0;
  --color-text-muted: #A69D91;
  --color-text-inverse: #2C2520;
  --color-gray-100: #333333;
  --color-gray-200: #444444;
  --color-sage: #8DB393;
  --color-sage-dark: #6B8F71;
  --color-terracotta: #F19C9E;
  --color-indigo: #5B7ABF;
  --color-saffron: #F4D03F;
  --color-turquoise: #2A9D8F;
  --color-turquoise-light: #16302E;
}

/* ── Reduced Animations ── */
[data-reduced-motion="true"] *,
[data-reduced-motion="true"] *::before,
[data-reduced-motion="true"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}