@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ============================================
     DESIGN TOKEN SYSTEM - v2.2 World Class UX
     ============================================ */

  /* ------------------------------------------
     COLORS - Apple-inspired minimal palette
     ------------------------------------------ */

  /* Primary palette */
  --color-primary: #0066cc;
  --color-primary-dark: #004499;
  --color-primary-light: #e5f0ff;

  /* Text hierarchy (Apple-style) */
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-text-tertiary: #86868b;

  /* Backgrounds */
  --color-bg: #ffffff;
  --color-bg-secondary: #f5f5f7;
  --color-bg-tertiary: #fbfbfd;

  /* Borders */
  --color-border: #d2d2d7;
  --color-border-light: #e8e8ed;

  /* Semantic colors */
  --color-success: #34c759;
  --color-warning: #ff9500;
  --color-error: #ff3b30;

  /* ------------------------------------------
     TYPOGRAPHY - Fluid clamp() sizing
     ------------------------------------------ */

  /* Font family - Inter for premium feel */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid type scale - min/preferred/max */
  --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.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-4xl: clamp(2.5rem, 1.75rem + 3.75vw, 4rem);

  /* Letter spacing for headlines (Apple-style tight) */
  --tracking-tight: -0.03em;
  --tracking-snug: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.01em;
  --tracking-wider: 0.02em;

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* ------------------------------------------
     SPACING - 4px base, extended scale
     ------------------------------------------ */

  --space-0: 0;
  --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;

  /* ------------------------------------------
     ANIMATION - Premium timing
     ------------------------------------------ */

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* ------------------------------------------
     SHADOWS - Premium layered
     ------------------------------------------ */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

  /* ------------------------------------------
     LAYOUT
     ------------------------------------------ */

  --container-max: 1200px;
  --container-padding: var(--space-4);
  --touch-target-min: 44px;

  /* Content widths */
  --prose-max: 65ch;

  /* ------------------------------------------
     BACKWARDS COMPATIBILITY ALIASES
     ------------------------------------------ */

  --color-text-muted: var(--color-text-secondary);
  --color-secondary: var(--color-text-secondary);
  --font-size-xs: var(--text-xs);
  --font-size-sm: var(--text-sm);
  --font-size-base: var(--text-base);
  --font-size-lg: var(--text-lg);
  --font-size-xl: var(--text-xl);
  --font-size-2xl: var(--text-2xl);
  --font-size-3xl: var(--text-3xl);
  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-base: var(--duration-normal) var(--ease-out);
}

/* ------------------------------------------
   REDUCED MOTION SUPPORT
   ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
