/**
 * Design Tokens — VisualAlchemy
 * Sistema di design centralizzato
 * 
 * Palette ispirata a mood tech/cinematografico scuro
 * con accenti viola/indaco per un feeling premium
 */

:root {
    /* ═══════════════════════════════════════════
       COLORS
    ═══════════════════════════════════════════ */
    
    /* Background layers (dal più scuro al più chiaro) */
    --color-bg-deep: #05050a;
    --color-bg-primary: #0a0a0f;
    --color-bg-secondary: #0f0f16;
    --color-bg-tertiary: #14141d;
    --color-bg-elevated: #1a1a24;
    --color-bg-surface: #1f1f2a;
    
    /* Accent colors */
    --color-accent-primary: #6366f1;
    --color-accent-primary-hover: #7c7ff7;
    --color-accent-primary-active: #5558e3;
    --color-accent-secondary: #8b5cf6;
    --color-accent-tertiary: #a78bfa;
    
    /* Gradient accents */
    --gradient-accent: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
    --gradient-accent-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    --gradient-radial-glow: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    
    /* Text colors */
    --color-text-primary: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-tertiary: #64748b;
    --color-text-muted: #475569;
    --color-text-inverted: #0a0a0f;
    
    /* Border colors */
    --color-border-subtle: rgba(255, 255, 255, 0.06);
    --color-border-default: rgba(255, 255, 255, 0.1);
    --color-border-strong: rgba(255, 255, 255, 0.15);
    --color-border-accent: rgba(99, 102, 241, 0.5);
    
    /* State colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* ═══════════════════════════════════════════
       TYPOGRAPHY
    ═══════════════════════════════════════════ */
    
    /* Font families */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    
    /* Font sizes — fluid scale */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);      /* 12-13px */
    --text-sm: clamp(0.8125rem, 0.775rem + 0.2vw, 0.875rem);    /* 13-14px */
    --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);        /* 15-16px */
    --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);        /* 17-18px */
    --text-xl: clamp(1.1875rem, 1.1rem + 0.45vw, 1.3125rem);    /* 19-21px */
    --text-2xl: clamp(1.375rem, 1.25rem + 0.6vw, 1.5rem);       /* 22-24px */
    --text-3xl: clamp(1.625rem, 1.45rem + 0.9vw, 1.875rem);     /* 26-30px */
    --text-4xl: clamp(2rem, 1.75rem + 1.25vw, 2.5rem);          /* 32-40px */
    --text-5xl: clamp(2.5rem, 2.1rem + 2vw, 3.25rem);           /* 40-52px */
    --text-6xl: clamp(3rem, 2.5rem + 2.5vw, 4rem);              /* 48-64px */
    
    /* Font weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Line heights */
    --leading-none: 1;
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;
    --leading-loose: 1.8;
    
    /* Letter spacing */
    --tracking-tighter: -0.03em;
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
    
    /* ═══════════════════════════════════════════
       SPACING
    ═══════════════════════════════════════════ */
    
    --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 */
    
    /* Section spacing (responsive) */
    --section-padding: clamp(4rem, 8vw, 8rem);
    --section-gap: clamp(3rem, 6vw, 6rem);
    
    /* ═══════════════════════════════════════════
       LAYOUT
    ═══════════════════════════════════════════ */
    
    --container-max: 1280px;
    --container-narrow: 960px;
    --container-text: 720px;
    --container-padding: clamp(1.25rem, 5vw, 2.5rem);
    
    /* ═══════════════════════════════════════════
       BORDERS & RADIUS
    ═══════════════════════════════════════════ */
    
    --radius-sm: 0.375rem;    /* 6px */
    --radius-md: 0.5rem;      /* 8px */
    --radius-lg: 0.75rem;     /* 12px */
    --radius-xl: 1rem;        /* 16px */
    --radius-2xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;
    
    --border-width-thin: 1px;
    --border-width-medium: 2px;
    
    /* ═══════════════════════════════════════════
       SHADOWS
    ═══════════════════════════════════════════ */
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    
    --shadow-glow-sm: 0 0 20px rgba(99, 102, 241, 0.15);
    --shadow-glow-md: 0 0 40px rgba(99, 102, 241, 0.2);
    --shadow-glow-lg: 0 0 60px rgba(99, 102, 241, 0.25);
    
    /* ═══════════════════════════════════════════
       TRANSITIONS
    ═══════════════════════════════════════════ */
    
    /* Durations */
    --duration-instant: 0ms;
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;
    --duration-slowest: 1000ms;
    
    /* Easings — custom cubic-bezier for cinematic feel */
    --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);
    
    /* Cinematic easings */
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-expo-in-out: cubic-bezier(0.87, 0, 0.13, 1);
    
    /* Common transitions */
    --transition-fast: var(--duration-fast) var(--ease-smooth);
    --transition-normal: var(--duration-normal) var(--ease-smooth);
    --transition-slow: var(--duration-slow) var(--ease-smooth);
    
    /* ═══════════════════════════════════════════
       Z-INDEX SCALE
    ═══════════════════════════════════════════ */
    
    --z-below: -1;
    --z-base: 0;
    --z-raised: 10;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-tooltip: 600;
    --z-max: 9999;
}

/* ═══════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    :root {
        --duration-fast: 0ms;
        --duration-normal: 0ms;
        --duration-slow: 0ms;
        --duration-slower: 0ms;
        --duration-slowest: 0ms;
    }
}
