/* ===== Design System Tokens ===== */
:root {
    /* --- Primary Color Scale (brand #161173 at 600) --- */
    --primary-50: #eeedfb;
    --primary-100: #d5d3f5;
    --primary-200: #b3afe9;
    --primary-300: #8a84dc;
    --primary-400: #6a5fd0;
    --primary-500: #4a3bc4;
    --primary-600: #161173;
    --primary-700: #120e5f;
    --primary-800: #0e0a4b;
    --primary-900: #0a0737;
    --primary-950: #060423;

    /* --- Neutral Scale (true neutral) --- */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --neutral-950: #0a0a0a;

    /* --- Accent (coral-orange for CTAs) --- */
    --accent-500: #ff6b3d;
    --accent-600: #e85a2d;
    --accent-700: #d14a1f;

    /* --- Semantic --- */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* --- Third-party brands --- */
    --telegram: #26A5E4;
    --telegram-hover: #1e96d1;

    /* --- Surfaces --- */
    --surface-primary: #ffffff;
    --surface-secondary: var(--neutral-50);
    --surface-tertiary: var(--neutral-100);
    --surface-inverse: var(--neutral-950);
    --surface-overlay: rgba(0, 0, 0, 0.5);
    --surface-glass: rgba(255, 255, 255, 0.85);
    --surface-glass-border: rgba(255, 255, 255, 0.18);

    /* --- Text --- */
    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-600);
    --text-tertiary: var(--neutral-400);
    --text-inverse: #ffffff;
    --text-on-primary: #ffffff;
    --text-link: var(--primary-500);
    --text-link-hover: var(--primary-600);

    /* --- Borders --- */
    --border-default: var(--neutral-200);
    --border-light: var(--neutral-100);
    --border-strong: var(--neutral-300);

    /* --- Font (Inter variable) --- */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* --- Type Scale (fluid clamp) --- */
    --text-xs: clamp(0.75rem, 0.7rem + 0.15vw, 0.8125rem);
    --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
    --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
    --text-md: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.75rem);
    --text-4xl: clamp(2.25rem, 1.7rem + 2.2vw, 3.75rem);

    /* --- Font Weights --- */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* --- Line Heights --- */
    --leading-tight: 1.2;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;

    /* --- Letter Spacing --- */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.01em;

    /* --- Spacing (8px base grid) --- */
    --space-0: 0;
    --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 */

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

    /* --- Shadows (neutral, low opacity) --- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.16);

    /* Focus rings */
    --ring-primary: 0 0 0 3px rgba(22, 17, 115, 0.2);
    --ring-accent: 0 0 0 3px rgba(255, 107, 61, 0.25);
    --ring-error: 0 0 0 3px rgba(239, 68, 68, 0.25);

    /* --- Border Radius --- */
    --radius-none: 0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Backward-compatible aliases */
    --border-radius: var(--radius-md);
    --border-radius-lg: var(--radius-lg);
    --border-radius-xl: var(--radius-xl);

    /* --- Transitions --- */
    --duration-fast: 120ms;
    --duration-normal: 200ms;
    --duration-slow: 350ms;
    --duration-slower: 500ms;

    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    --transition: all var(--duration-normal) var(--ease-default);
    --transition-fast: all var(--duration-fast) var(--ease-default);
    --transition-slow: all var(--duration-slow) var(--ease-default);

    /* --- Component Tokens --- */

    /* Buttons */
    --btn-padding-sm: var(--space-3) var(--space-5);
    --btn-padding-md: var(--space-3) var(--space-8);
    --btn-padding-lg: var(--space-5) var(--space-10);
    --btn-radius: var(--radius-md);
    --btn-font-size-sm: var(--text-sm);
    --btn-font-size-md: var(--text-base);
    --btn-font-size-lg: var(--text-md);
    --btn-min-height: 44px;

    /* Cards */
    --card-padding: var(--space-8);
    --card-padding-sm: var(--space-6);
    --card-radius: var(--radius-lg);
    --card-shadow: var(--shadow-sm);
    --card-shadow-hover: var(--shadow-lg);
    --card-border: 1px solid var(--border-light);

    /* Inputs */
    --input-padding: var(--space-3) var(--space-4);
    --input-radius: var(--radius-md);
    --input-border: 2px solid var(--border-default);
    --input-min-height: 48px;

    /* Header */
    --header-height: 72px;
    --header-height-mobile: 60px;
    --header-bg: var(--surface-glass);
    --header-blur: 16px;

    /* Section */
    --section-padding-y: var(--space-24);
    --section-padding-y-tablet: var(--space-16);
    --section-padding-y-mobile: var(--space-12);

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-header: 400;
    --z-backdrop: 500;
    --z-modal: 600;
    --z-popover: 700;
    --z-toast: 800;
    --z-float: 900;
    --z-tooltip: 1400;

    /* Hero */
    --hero-overlay: linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.3) 100%);
}
