/**
 * Design System Tokens (Theme-Agnostic)
 * 
 * Single source of truth for non-color design values.
 * Values here do NOT change between light/dark themes.
 * 
 * For color tokens, see theme.css
 */

:root {
  /* ========================================
     TYPOGRAPHY TOKENS
     ======================================== */

  /* Font families */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
    Consolas, "Courier New", monospace;

  /* Type scale (1.125 ratio - major second) */
  --text-xs: 0.75rem; /* 12px - fine print */
  --text-sm: 0.875rem; /* 14px - small UI */
  --text-md: 1rem; /* 16px - base */
  --text-lg: 1.125rem; /* 18px - subheadings */
  --text-xl: 1.25rem; /* 20px - section titles */
  --text-2xl: 1.5rem; /* 24px - page titles */
  --text-3xl: 2rem; /* 32px - hero text */
  --text-4xl: 2.5rem; /* 40px - display */
  --text-5xl: 3rem; /* 48px - hero display */

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-snug: 1.3;
  --leading-snug-alt: 1.25;
  --leading-normal: 1.4;
  --leading-relaxed: 1.6;
  --leading-relaxed-alt: 1.5;
  --leading-loose: 1.8;

  /* Font weights */
  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;

  /* Letter spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* Letter spacing aliases (for backward compatibility) */
  --letter-spacing-tighter: var(--tracking-tighter);
  --letter-spacing-tight: var(--tracking-tight);
  --letter-spacing-normal: var(--tracking-normal);
  --letter-spacing-wide: var(--tracking-wide);
  --letter-spacing-wider: var(--tracking-wider);
  --letter-spacing-widest: var(--tracking-widest);

  /* ========================================
     OPACITY TOKENS
     ======================================== */

  /* Opacity scale */
  --opacity-0: 0;
  --opacity-50: 0.5;
  --opacity-60: 0.6;
  --opacity-70: 0.7;
  --opacity-80: 0.8;
  --opacity-90: 0.9;
  --opacity-100: 1;

  /* ========================================
     SPACING TOKENS
     ======================================== */

  /* Spacing scale (4px base) */
  --space-0: 0;
  --space-0\.5: 0.125rem; /* 2px */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */
  --space-16: 4rem; /* 64px */
  --space-20: 5rem; /* 80px */
  --space-24: 6rem; /* 96px */
  --space-32: 8rem; /* 128px */

  /* Semantic spacing aliases */
  --space-xs: var(--space-2);
  --space-sm: var(--space-4);
  --space-md: var(--space-6);
  --space-lg: var(--space-8);
  --space-xl: var(--space-12);
  --space-2xl: var(--space-16);
  --space-3xl: var(--space-24);

  /* ========================================
     SIZING TOKENS
     ======================================== */

  /* Container max-widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* Content max-width (readable line length) */
  --content-width: 65ch;

  /* Icon sizes */
  --icon-xs: 1rem; /* 16px */
  --icon-sm: 1.25rem; /* 20px */
  --icon-md: 1.5rem; /* 24px */
  --icon-lg: 2rem; /* 32px */
  --icon-xl: 3rem; /* 48px */

  /* ========================================
     BORDER RADIUS TOKENS
     ======================================== */

  --radius-none: 0;
  --radius-sm: 0.25rem; /* 4px */
  --radius-md: 0.375rem; /* 6px */
  --radius-lg: 0.5rem; /* 8px */
  --radius-xl: 0.75rem; /* 12px */
  --radius-2xl: 1rem; /* 16px */
  --radius-3xl: 1.5rem; /* 24px */
  --radius-full: 9999px; /* pill shape */

  /* ========================================
     Z-INDEX TOKENS
     ======================================== */

  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;

  /* ========================================
     TRANSITION TOKENS
     ======================================== */

  /* Durations */
  --duration-instant: 50ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;

  /* Easing functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Common transitions */
  --transition-colors: color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
  --transition-transform: transform var(--duration-normal) var(--ease-out);
  --transition-all: all var(--duration-fast) var(--ease-out);

  /* ========================================
     BREAKPOINT TOKENS
     ======================================== */

  /* ========================================
     SHADOW TOKENS
     ======================================== */

  --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);
  --shadow-focus: 0 0 0 3px var(--color-focus);

  /* ========================================
     TRANSFORM TOKENS
     ======================================== */

  --transform-lift-xs: translateY(-1px);
  --transform-lift-sm: translateY(-2px);
  --transform-lift-md: translateY(-4px);
  --transform-lift-lg: translateY(-10px);

  /* ========================================
     BORDER TOKENS
     ======================================== */

  --border-width-thin: 1px;
  --border-width-medium: 2px;

  /* ========================================
     DIMENSION TOKENS
     ======================================== */

  --size-xs: 12px;
  --size-sm: 16px;
  --size-md: 20px;
  --size-lg: 24px;
  --size-xl: 32px;

  /* ========================================
     MIN-HEIGHT TOKENS
     ======================================== */

  --min-height-xs: 32px;
  --min-height-sm: 40px;
  --min-height-md: 48px;
  --min-height-lg: 56px;
  --min-height-xl: 80px;
  --min-height-2xl: 100px;

  /* ========================================
     MAX-HEIGHT TOKENS
     ======================================== */

  --max-height-xs: 100px;
  --max-height-sm: 200px;
  --max-height-md: 300px;
  --max-height-lg: 500px;
  --max-height-xl: 1000px;

  /* ========================================
     BACKGROUND SIZE TOKENS
     ======================================== */

  --bg-size-xs: 8px;
  --bg-size-sm: 12px;
  --bg-size-md: 16px;
  --bg-size-lg: 20px;

  /* ========================================
     GRADIENT TOKENS
     ======================================== */

  --gradient-primary: linear-gradient(
    135deg,
    var(--color-primary-main) 0%,
    var(--color-primary-dark) 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--color-secondary-main) 0%,
    var(--color-secondary-dark) 100%
  );
  --gradient-accent: linear-gradient(
    135deg,
    var(--color-accent-main) 0%,
    var(--color-accent-dark) 100%
  );
  --gradient-neutral: linear-gradient(
    135deg,
    var(--color-neutral-100) 0%,
    var(--color-neutral-200) 100%
  );
  --gradient-warm: linear-gradient(
    135deg,
    var(--color-warm-beige) 0%,
    var(--color-burnt-orange) 100%
  );
  --gradient-cool: linear-gradient(
    135deg,
    var(--color-dark-teal) 0%,
    var(--color-medium-teal) 100%
  );
  --gradient-surface: linear-gradient(
    135deg,
    var(--color-surface-primary) 0%,
    var(--color-surface-secondary) 100%
  );

  /* ========================================
     ANIMATION TOKENS
     ======================================== */

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-colors: color 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease;
  --transition-transform: transform 0.15s ease;
}
