/* PROTO WIZARD — Design Tokens
   Scandinavian wellness · Apple Health · North Loop luxury
   Custom palette: botanical sage, warm linen, deep moss, sky teal accent
*/

:root {
  /* ---- 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, 7.5rem);

  /* ---- Spacing (4px) ---- */
  --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.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-2xl: 2.5rem;
  --radius-full: 9999px;

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

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 1080px;
  --content-wide: 1280px;

  /* ---- Fonts ---- */
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

/* ===== LIGHT (linen + sage) ===== */
:root,
[data-theme='light'] {
  --color-bg: #f5f1ea;            /* warm linen */
  --color-surface: #faf7f1;       /* paper */
  --color-surface-2: #ffffff;
  --color-surface-offset: #ece6dc;
  --color-surface-offset-2: #e2dccf;
  --color-surface-dynamic: #d8d1c1;
  --color-divider: #d9d2c4;
  --color-border: #c8c0ae;

  --color-text: #1c2520;          /* deep moss ink */
  --color-text-muted: #5d6661;
  --color-text-faint: #98a09a;
  --color-text-inverse: #f5f1ea;

  /* Primary: a soft moss/forest, calm and botanical */
  --color-primary: #2f5a4a;
  --color-primary-hover: #244638;
  --color-primary-active: #19332a;
  --color-primary-highlight: #d6e2db;

  /* Accent: pale terra (warm sand-clay) for terpene moments */
  --color-accent: #c97d52;
  --color-accent-hover: #b56a40;
  --color-accent-highlight: #f0dfd0;

  /* Sky: airy data accent */
  --color-sky: #6b96b3;
  --color-sky-highlight: #d6e3eb;

  --color-success: #4a7a2e;
  --color-warning: #b56a40;
  --color-error: #a64646;

  --shadow-sm: 0 1px 2px rgba(40, 40, 30, 0.05);
  --shadow-md: 0 6px 24px rgba(40, 40, 30, 0.07);
  --shadow-lg: 0 24px 60px rgba(40, 40, 30, 0.10);
  --shadow-glow: 0 0 0 1px rgba(47, 90, 74, 0.08), 0 12px 40px rgba(47, 90, 74, 0.10);
}

/* ===== DARK (deep moss night) ===== */
[data-theme='dark'] {
  --color-bg: #0e1411;            /* near-black moss */
  --color-surface: #141b17;
  --color-surface-2: #1a2320;
  --color-surface-offset: #1f2925;
  --color-surface-offset-2: #25302b;
  --color-surface-dynamic: #2c3833;
  --color-divider: #232d28;
  --color-border: #344039;

  --color-text: #e6e7e1;
  --color-text-muted: #97a09a;
  --color-text-faint: #5e6862;
  --color-text-inverse: #0e1411;

  --color-primary: #7fb59c;
  --color-primary-hover: #98c8b1;
  --color-primary-active: #b1dac6;
  --color-primary-highlight: #1c2e26;

  --color-accent: #e6a37d;
  --color-accent-hover: #f0b790;
  --color-accent-highlight: #2e231c;

  --color-sky: #92b6cd;
  --color-sky-highlight: #1d2a32;

  --color-success: #8bbb6a;
  --color-warning: #d49b76;
  --color-error: #d27a7a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(127, 181, 156, 0.12), 0 12px 40px rgba(127, 181, 156, 0.08);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0e1411;
    --color-surface: #141b17;
    --color-surface-2: #1a2320;
    --color-surface-offset: #1f2925;
    --color-surface-offset-2: #25302b;
    --color-surface-dynamic: #2c3833;
    --color-divider: #232d28;
    --color-border: #344039;
    --color-text: #e6e7e1;
    --color-text-muted: #97a09a;
    --color-text-faint: #5e6862;
    --color-text-inverse: #0e1411;
    --color-primary: #7fb59c;
    --color-primary-hover: #98c8b1;
    --color-primary-active: #b1dac6;
    --color-primary-highlight: #1c2e26;
    --color-accent: #e6a37d;
    --color-accent-hover: #f0b790;
    --color-accent-highlight: #2e231c;
    --color-sky: #92b6cd;
    --color-sky-highlight: #1d2a32;
  }
}
