/* ===================================
   DESIGN TOKENS SYSTEM
   Variáveis CSS estruturadas para manutenibilidade
   =================================== */

:root {
    /* ===== COLOR SYSTEM ===== */
    /* Primary Scale */
    --color-primary-50: hsl(198, 86%, 95%);
    --color-primary-100: hsl(198, 86%, 90%);
    --color-primary-200: hsl(198, 86%, 80%);
    --color-primary-300: hsl(198, 86%, 70%);
    --color-primary-400: hsl(198, 86%, 60%);
    --color-primary-500: hsl(198, 86%, 45%);
    /* Base */
    --color-primary-600: hsl(198, 86%, 35%);
    --color-primary-700: hsl(198, 77%, 25%);
    --color-primary-800: hsl(198, 77%, 15%);
    --color-primary-900: hsl(198, 77%, 10%);

    /* Secondary Scale */
    --color-secondary-50: hsl(46, 76%, 95%);
    --color-secondary-100: hsl(46, 76%, 90%);
    --color-secondary-200: hsl(46, 76%, 80%);
    --color-secondary-300: hsl(46, 76%, 70%);
    --color-secondary-400: hsl(46, 76%, 60%);
    --color-secondary-500: hsl(46, 76%, 50%);
    /* Base */
    --color-secondary-600: hsl(46, 76%, 40%);
    --color-secondary-700: hsl(46, 76%, 30%);
    --color-secondary-800: hsl(46, 76%, 20%);
    --color-secondary-900: hsl(46, 76%, 10%);

    /* Neutral Scale */
    --color-neutral-50: hsl(210, 20%, 98%);
    --color-neutral-100: hsl(210, 20%, 95%);
    --color-neutral-200: hsl(210, 20%, 90%);
    --color-neutral-300: hsl(210, 20%, 80%);
    --color-neutral-400: hsl(210, 20%, 70%);
    --color-neutral-500: hsl(210, 20%, 50%);
    --color-neutral-600: hsl(210, 20%, 40%);
    --color-neutral-700: hsl(210, 20%, 30%);
    --color-neutral-800: hsl(210, 20%, 20%);
    --color-neutral-900: hsl(210, 20%, 10%);

    /* Semantic Colors */
    --color-success: hsl(142, 76%, 36%);
    --color-warning: hsl(38, 92%, 50%);
    --color-error: hsl(0, 84%, 60%);
    --color-info: hsl(199, 89%, 48%);

    /* ===== SPACING SYSTEM (4px base) ===== */
    --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 */

    /* ===== TYPOGRAPHY SYSTEM ===== */
    /* Font Families */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-serif: 'Cormorant Garamond', serif;

    /* Font Sizes (Fluid with clamp) */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
    --text-5xl: clamp(3rem, 2.25rem + 3.75vw, 4rem);
    --text-6xl: clamp(3.75rem, 2.75rem + 5vw, 5rem);

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 600;
    --font-bold: 700;
    --font-black: 800;

    /* Line Heights */
    --leading-tight: 1.2;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;

    /* ===== BORDER RADIUS ===== */
    --radius-sm: 0.375rem;
    /* 6px */
    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */
    --radius-2xl: 1.25rem;
    /* 20px */
    --radius-3xl: 1.5rem;
    /* 24px */
    --radius-full: 9999px;

    /* ===== SHADOWS ===== */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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-glow: 0 0 20px var(--color-primary-400);

    /* ===== TRANSITIONS ===== */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* ===== Z-INDEX SYSTEM ===== */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;

    /* ===== BREAKPOINTS (for reference) ===== */
    /* sm: 640px */
    /* md: 768px */
    /* lg: 1024px */
    /* xl: 1280px */
    /* 2xl: 1536px */
}

/* ===================================
   DARK MODE TOKENS
   =================================== */
[data-theme="dark"] {
    /* Invert primary/neutral for dark mode */
    --color-primary-50: hsl(198, 77%, 10%);
    --color-primary-900: hsl(198, 86%, 95%);

    --color-neutral-50: hsl(210, 20%, 10%);
    --color-neutral-900: hsl(210, 20%, 98%);

    /* Adjust shadows for dark mode */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

/* ===================================
   REDUCED MOTION
   =================================== */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0ms;
        --transition-base: 0ms;
        --transition-slow: 0ms;
        --transition-bounce: 0ms;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}