/* tokens.css — EVERY PAGE IMPORTS THIS */
:root {
  --color-primary: rgb(var(--color-deep-ellum));
  --space-4: clamp(1rem, 2vw, 2rem);
  --radius-lg: 12px;
  --duration-fast: 150ms;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== CRATOORA DESIGN TOKENS ===== */
/* tokens.css — Single source of truth */

:root {
  /* 🎵 Brand Colors — Dallas-Fort Worth DNA */
  --color-deep-ellum: 139, 92, 246;    /* #8B5CF6 — Purple, creativity */
  --color-oak-cliff: 217, 119, 6;      /* #D97706 — Orange, soul */
  --color-fort-worth: 5, 150, 105;     /* #059669 — Green, roots */
  --color-uptown: 59, 130, 246;        /* #3B82F6 — Blue, sophistication */
  --color-downtown: 107, 114, 128;     /* #6B7280 — Gray, urban */
  
  /* 🎨 Semantic Palette */
  --color-primary: rgb(var(--color-deep-ellum));
  --color-primary-dim: rgba(var(--color-deep-ellum), 0.8);
  --color-primary-glow: rgba(var(--color-deep-ellum), 0.2);
  --color-secondary: rgb(var(--color-oak-cliff));
  --color-accent: rgb(var(--color-fort-worth));
  
  /* ⚫️ Surface — Dark by default, light mode ready */
  --color-surface-0: #000000;
  --color-surface-1: #0a0a0a;
  --color-surface-2: #121212;
  --color-surface-3: #1a1a1a;
  --color-surface-4: #242424;
  --color-surface-5: #2e2e2e;
  
  /* ⚪️ Text — Light hierarchy */
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-tertiary: rgba(255, 255, 255, 0.5);
  --color-text-disabled: rgba(255, 255, 255, 0.3);
  --color-text-inverse: #0a0a0a;
  
  /* 🔴 Status */
  --color-success: #10b981;
  --color-success-dim: rgba(16, 185, 129, 0.1);
  --color-warning: #f59e0b;
  --color-warning-dim: rgba(245, 158, 11, 0.1);
  --color-error: #ef4444;
  --color-error-dim: rgba(239, 68, 68, 0.1);
  --color-info: #3b82f6;
  --color-info-dim: rgba(59, 130, 246, 0.1);
  
  /* 📏 Typography — Fluid scale */
  --text-3xs: clamp(0.625rem, 0.6vw, 0.75rem);    /* 10-12px */
  --text-2xs: clamp(0.6875rem, 0.7vw, 0.8125rem); /* 11-13px */
  --text-xs: clamp(0.75rem, 0.8vw, 0.875rem);     /* 12-14px */
  --text-sm: clamp(0.875rem, 1vw, 1rem);          /* 14-16px */
  --text-base: clamp(1rem, 1.2vw, 1.125rem);      /* 16-18px */
  --text-md: clamp(1.125rem, 1.4vw, 1.25rem);     /* 18-20px */
  --text-lg: clamp(1.25rem, 1.8vw, 1.5rem);       /* 20-24px */
  --text-xl: clamp(1.5rem, 2.5vw, 1.875rem);      /* 24-30px */
  --text-2xl: clamp(1.875rem, 3.5vw, 2.25rem);    /* 30-36px */
  --text-3xl: clamp(2.25rem, 5vw, 3rem);          /* 36-48px */
  --text-4xl: clamp(3rem, 7vw, 4rem);             /* 48-64px */
  --text-5xl: clamp(4rem, 9vw, 5rem);             /* 64-80px */
  
  /* 📐 Spacing — 8px base, geometric progression */
  --space-0: 0;
  --space-px: 1px;
  --space-0_5: clamp(0.125rem, 0.25vw, 0.25rem);  /* 2-4px */
  --space-1: clamp(0.25rem, 0.5vw, 0.5rem);       /* 4-8px */
  --space-1_5: clamp(0.375rem, 0.75vw, 0.75rem);  /* 6-12px */
  --space-2: clamp(0.5rem, 1vw, 1rem);            /* 8-16px */
  --space-3: clamp(0.75rem, 1.5vw, 1.5rem);       /* 12-24px */
  --space-4: clamp(1rem, 2vw, 2rem);              /* 16-32px */
  --space-5: clamp(1.25rem, 2.5vw, 2.5rem);       /* 20-40px */
  --space-6: clamp(1.5rem, 3vw, 3rem);            /* 24-48px */
  --space-8: clamp(2rem, 4vw, 4rem);              /* 32-64px */
  --space-10: clamp(2.5rem, 5vw, 5rem);           /* 40-80px */
  --space-12: clamp(3rem, 6vw, 6rem);             /* 48-96px */
  --space-16: clamp(4rem, 8vw, 8rem);             /* 64-128px */
  --space-20: clamp(5rem, 10vw, 10rem);           /* 80-160px */
  
  /* 🧱 Z-index — Layering architecture */
  --z-negative: -1;
  --z-base: 0;
  --z-card: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;
  --z-toast: 700;
  --z-max: 9999;
  
  /* 🎬 Animation — Cubic-bezier with soul */
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-sharp: cubic-bezier(0.4, 0, 0.6, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* ⚡ Animation durations */
  --duration-instant: 50ms;
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  --duration-slowest: 750ms;
  
  /* 🎛️ Border radius — Personality */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;
  
  /* 📦 Shadows — Depth */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  
  /* 🎯 Focus rings */
  --ring-primary: 0 0 0 2px var(--color-surface-1), 0 0 0 4px var(--color-primary);
  --ring-error: 0 0 0 2px var(--color-surface-1), 0 0 0 4px var(--color-error);
  
  /* 📱 Layout constraints */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  
  /* 🎛️ Header heights */
  --header-height: clamp(64px, 8vw, 80px);
  --header-height-scrolled: clamp(56px, 6vw, 64px);
}

/* 📱 Viewport stability — iOS safe areas */
@viewport {
  width: device-width;
  viewport-fit: cover;
}

/* 🧹 Reset — border-box everything */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
}

/* 🎯 Base styles */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-surface-1);
}

/* 🎯 Reduced motion — respect user preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}