/* ==========================================================================
   Design Tokens — CyraWork
   Anthropic-inspired: warm, minimal, premium
   ========================================================================== */

:root {
  /* ---- Color Palette (warm, refined) ---- */
  --color-bg-primary: #faf8f3;
  --color-bg-secondary: #f0ede6;
  --color-bg-card: #ffffff;
  --color-bg-dark: #191917;
  --color-bg-elevated: #ffffff;

  --color-text-heading: #1a1816;
  --color-text-body: #4a4640;
  --color-text-muted: #8a857d;
  --color-text-inverse: #faf8f3;

  --color-accent-green: #2D6A4F;
  --color-accent-green-light: #3a7d5f;
  --color-accent-green-pale: #e0ece4;
  --color-accent-terracotta: #c4704b;
  --color-accent-terracotta-light: #d4825e;

  --color-border: #e8e4dc;
  --color-border-light: #f0ede6;

  /* ---- Typography ---- */
  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Fluid type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.28vw, 0.9375rem);
  --text-base: clamp(1rem, 0.94rem + 0.3vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.04rem + 0.44vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.12rem + 0.65vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.24rem + 1.3vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.45rem + 2.1vw, 2.75rem);
  --text-4xl: clamp(2.25rem, 1.6rem + 3.2vw, 3.25rem);
  --text-5xl: clamp(2.75rem, 1.9rem + 4.2vw, 4.25rem);

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;

  /* ---- Spacing Scale ---- */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* ---- Layout ---- */
  --max-width: 1140px;
  --max-width-narrow: 780px;
  --max-width-wide: 1320px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* ---- Shadows (warm tint) ---- */
  --shadow-xs: 0 1px 2px rgba(26, 24, 22, 0.04);
  --shadow-sm: 0 1px 3px rgba(26, 24, 22, 0.05), 0 1px 2px rgba(26, 24, 22, 0.03);
  --shadow-md: 0 4px 16px rgba(26, 24, 22, 0.06), 0 2px 4px rgba(26, 24, 22, 0.03);
  --shadow-lg: 0 12px 40px rgba(26, 24, 22, 0.08), 0 4px 12px rgba(26, 24, 22, 0.03);
  --shadow-xl: 0 24px 64px rgba(26, 24, 22, 0.1), 0 8px 20px rgba(26, 24, 22, 0.04);

  /* ---- Transitions ---- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Z-Index Scale ---- */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 100;
  --z-overlay: 1000;
  --z-modal: 10000;
}

/* Dark mode overrides */
[data-theme="dark"] {
  --color-bg-primary: #111110;
  --color-bg-secondary: #1a1918;
  --color-bg-card: #1e1d1b;
  --color-bg-dark: #0a0a09;
  --color-bg-elevated: #242320;

  --color-text-heading: #f2efe8;
  --color-text-body: #b5b0a6;
  --color-text-muted: #7a756c;
  --color-text-inverse: #1a1816;

  --color-accent-green: #5cb88a;
  --color-accent-green-light: #6ec89a;
  --color-accent-green-pale: #1e2e24;

  --color-border: #2a2926;
  --color-border-light: #1f1e1c;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.35);
}
