/* ==========================================================================
   Cellery Design System - CSS Custom Properties
   Version: 2.0
   ========================================================================== */

:root {
  /* ========================================================================
     COLOR SYSTEM (OKLCH for perceptual consistency)
     ======================================================================== */

  /* Primary Brand Colors */
  --color-teal-cellery: oklch(73% 0.08 180);     /* #75BFB8 - Primary brand */
  --color-blue-cellery: oklch(21% 0.04 252);     /* #202140 - Dark text/contrast */
  --color-bluish-cellery: oklch(24% 0.09 220);   /* #023E60 - Deep accent */
  --color-green-cellery: oklch(44% 0.08 120);    /* #596C33 - Success/Sage */
  --color-red-cellery: oklch(48% 0.15 25);       /* #B84239 - Error/Alert */
  --color-tan-cellery: oklch(93% 0.02 90);       /* #F2EFDF - Light background */
  --color-butter-cellery: oklch(88% 0.09 85);    /* #F6DFA4 - Highlight */

  /* Hex fallbacks for older browsers */
  --color-teal-hex: #75BFB8;
  --color-blue-hex: #202140;
  --color-bluish-hex: #023E60;
  --color-green-hex: #596C33;
  --color-red-hex: #B84239;
  --color-tan-hex: #F2EFDF;
  --color-butter-hex: #F6DFA4;

  /* Neutral Scale */
  --neutral-0: #ffffff;
  --neutral-10: #f7f7f7;
  --neutral-20: #eeeeee;
  --neutral-30: #d9d9d9;
  --neutral-40: #bfbfbf;
  --neutral-50: #999999;
  --neutral-60: #737373;
  --neutral-70: #595959;
  --neutral-80: #404040;
  --neutral-90: #262626;
  --neutral-100: #141414;

  /* Semantic Colors */
  --color-success: var(--color-green-cellery);
  --color-warning: oklch(72% 0.14 75);
  --color-error: var(--color-red-cellery);
  --color-info: var(--color-teal-cellery);

  /* Interactive States */
  --color-focus: oklch(60% 0.12 220);
  --color-disabled: var(--neutral-40);

  /* Background & Surface */
  --color-background: var(--neutral-0);
  --color-surface: var(--neutral-0);
  --color-surface-elevated: var(--neutral-0);

  /* Text Colors */
  --color-text-primary: var(--color-blue-cellery);
  --color-text-secondary: var(--neutral-60);
  --color-text-muted: var(--neutral-50);
  --color-text-inverse: var(--neutral-0);

  /* ========================================================================
     TYPOGRAPHY
     ======================================================================== */

  /* Font Families */
  --font-heading: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-caption: 'Rubik', system-ui, sans-serif;
  --font-data: 'Montserrat', system-ui, sans-serif;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Fluid Type Scale (Mobile → Desktop) */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);       /* 12-14px */
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);          /* 14-16px */
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);         /* 16-18px */
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);        /* 18-20px */
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);         /* 20-24px */
  --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);          /* 24-30px */
  --font-size-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);      /* 30-40px */
  --font-size-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3.5rem);        /* 36-56px */
  --font-size-5xl: clamp(3rem, 2.4rem + 3vw, 4.5rem);              /* 48-72px */

  /* Line Heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 1.75;

  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;

  /* ========================================================================
     SPACING (8-Point Grid)
     ======================================================================== */

  --space-unit: 0.5rem;  /* 8px base */
  --space-px: 1px;
  --space-0: 0;
  --space-1: calc(var(--space-unit) * 0.5);   /* 4px */
  --space-2: var(--space-unit);                /* 8px */
  --space-3: calc(var(--space-unit) * 1.5);   /* 12px */
  --space-4: calc(var(--space-unit) * 2);     /* 16px */
  --space-5: calc(var(--space-unit) * 2.5);   /* 20px */
  --space-6: calc(var(--space-unit) * 3);     /* 24px */
  --space-8: calc(var(--space-unit) * 4);     /* 32px */
  --space-10: calc(var(--space-unit) * 5);    /* 40px */
  --space-12: calc(var(--space-unit) * 6);    /* 48px */
  --space-16: calc(var(--space-unit) * 8);    /* 64px */
  --space-20: calc(var(--space-unit) * 10);   /* 80px */
  --space-24: calc(var(--space-unit) * 12);   /* 96px */
  --space-32: calc(var(--space-unit) * 16);   /* 128px */

  /* ========================================================================
     LAYOUT & BREAKPOINTS
     ======================================================================== */

  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* Container */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;

  /* ========================================================================
     BORDERS & RADIUS
     ======================================================================== */

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --border-width: 1px;
  --border-width-2: 2px;
  --border-color: var(--neutral-20);

  /* ========================================================================
     SHADOWS & ELEVATION
     ======================================================================== */

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Brand Shadow (teal glow) */
  --shadow-glow: 0 0 20px rgb(117 191 184 / 0.3);
  --shadow-glow-strong: 0 0 30px rgb(117 191 184 / 0.5);

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;
  --z-toast: 700;

  /* ========================================================================
     ANIMATION & MOTION
     ======================================================================== */

  /* Durations */
  --duration-instant: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  /* Easing Functions */
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* ========================================================================
     COMPONENT TOKENS
     ======================================================================== */

  /* Buttons */
  --btn-padding-x: var(--space-6);
  --btn-padding-y: var(--space-3);
  --btn-font-weight: var(--font-weight-semibold);
  --btn-radius: var(--radius-md);

  /* Inputs */
  --input-padding-x: var(--space-4);
  --input-padding-y: var(--space-3);
  --input-radius: var(--radius-md);
  --input-border-width: 1.5px;

  /* Cards */
  --card-padding: var(--space-6);
  --card-radius: var(--radius-lg);

  /* Header */
  --header-height: 130px;
  --header-height-scrolled: 100px;
}

/* ========================================================================
   DARK MODE (Future-ready)
   ======================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    /* Override for dark mode when implemented */
  }
}
