/**
 * MASTROMEC - DESIGN TOKENS Y VARIABLES CSS
 * Sistema de tokens centralizado
 */

:root {
    /* ===== COLOR PSYCHOLOGY FRAMEWORK - B2B TRUST COLORS ===== */

    /* Colores principales de marca */
    --mastromec-blue: #1E40AF;
    --mastromec-blue-light: #3B82F6;
    --mastromec-blue-dark: #1E3A8A;
    --mastromec-blue-primary: #0D7DC5; /* Color del logotipo optimizado */

    /* Colores de confianza profesional */
    --trust-gray: #64748B;
    --professional-gray: #475569;
    --warm-accent: #D4AF37;

    /* ===== CONVERSION COLORS ===== */
    --whatsapp-green: #25D366;
    --success-green: #10B981;
    --urgency-orange: #EA580C;
    --error-red: #DC2626;

    /* ===== NEUTRAL FOUNDATION ===== */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* ===== TYPOGRAPHY AUTHORITY SYSTEM ===== */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

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

    /* ===== SPACING SYSTEM ===== */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    --spacing-3xl: 4rem;      /* 64px */
    --spacing-4xl: 5rem;      /* 80px */
    --spacing-5xl: 6rem;      /* 96px */

    /* ===== BORDER RADIUS ===== */
    --radius-sm: 0.25rem;     /* 4px */
    --radius-md: 0.5rem;      /* 8px */
    --radius-lg: 0.75rem;     /* 12px */
    --radius-xl: 1rem;        /* 16px */
    --radius-2xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;    /* Circular */

    /* ===== 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);

    /* ===== Z-INDEX SYSTEM ===== */
    --z-negative: -1;
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1001;
    --z-overlay: 1002;
    --z-modal: 1003;
    --z-header: 1004;
    --z-tooltip: 1005;

    /* ===== BREAKPOINTS (para uso en JavaScript) ===== */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;

    /* ===== TRANSITIONS ===== */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    --transition-bounce: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* ===== LÍNEA DE BASE VERTICAL ===== */
    --line-height-none: 1;
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;

    /* ===== TAMAÑOS DE TIPOGRAFÍA ===== */
    --text-xs: 0.75rem;       /* 12px */
    --text-sm: 0.875rem;      /* 14px */
    --text-base: 1rem;        /* 16px */
    --text-lg: 1.125rem;      /* 18px */
    --text-xl: 1.25rem;       /* 20px */
    --text-2xl: 1.5rem;       /* 24px */
    --text-3xl: 1.875rem;     /* 30px */
    --text-4xl: 2.25rem;      /* 36px */
    --text-5xl: 3rem;         /* 48px */
    --text-6xl: 3.75rem;      /* 60px */

    /* ===== COMPONENTES ESPECÍFICOS ===== */

    /* Botones */
    --btn-height-sm: 2rem;    /* 32px */
    --btn-height-md: 2.5rem;  /* 40px */
    --btn-height-lg: 3rem;    /* 48px */
    --btn-padding-x: 1rem;
    --btn-padding-y: 0.5rem;

    /* Inputs */
    --input-height: 2.5rem;   /* 40px */
    --input-padding-x: 0.75rem;
    --input-border-width: 1px;

    /* Cards */
    --card-padding: var(--spacing-xl);
    --card-radius: var(--radius-lg);

    /* Header */
    --header-height: 70px;
    --header-bg: rgba(255, 255, 255, 0.95);

    /* ===== ESTADOS Y VARIACIONES ===== */

    /* Estados interactivos */
    --opacity-hover: 0.8;
    --opacity-disabled: 0.5;
    --scale-hover: 1.02;
    --scale-active: 0.98;

    /* Focus */
    --focus-ring-width: 2px;
    --focus-ring-offset: 2px;
    --focus-ring-color: var(--mastromec-blue-light);

    /* ===== MODO OSCURO ===== */
    --dark-bg-primary: #0F172A;
    --dark-bg-secondary: #1E293B;
    --dark-text-primary: #F8FAFC;
    --dark-text-secondary: #CBD5E1;

    /* ===== GRADIENTES ===== */
    --gradient-hero: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 64, 175, 0.75) 100%);
    --gradient-button: linear-gradient(135deg, var(--mastromec-blue), var(--mastromec-blue-light));
    --gradient-card: linear-gradient(145deg, var(--white) 0%, var(--gray-50) 100%);

    /* ===== MEDIDAS ESPECÍFICAS DEL PROYECTO ===== */
    --hero-min-height: 100vh;
    --section-padding: var(--spacing-3xl);
    --container-max-width: 1200px;
    --mobile-menu-width: 320px;

    /* ===== PERFORMANCE OPTIMIZATIONS ===== */
    --will-change-transform: transform;
    --will-change-opacity: opacity;
    --will-change-auto: auto;
}

/* ===== TOKENS CONTEXTUALES ===== */

/* Para componentes específicos */
:root {
    /* Stats */
    --stat-number-size: 2.5rem;
    --stat-label-size: 0.875rem;

    /* Testimonios */
    --testimonial-padding: var(--spacing-2xl);
    --testimonial-border-width: 4px;
    --testimonial-border-color: var(--mastromec-blue);

    /* Servicios */
    --service-icon-size: 60px;
    --service-card-hover-translate: -4px;

    /* Navegación */
    --nav-link-padding: var(--spacing-md) var(--spacing-xl);
    --mobile-menu-overlay-bg: rgba(0, 0, 0, 0.5);
}

/* ===== MEDIA QUERIES PARA TOKENS RESPONSIVOS ===== */

@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
        --section-padding: var(--spacing-2xl);
        --hero-min-height: 80vh;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 1rem;
        --spacing-xl: 1.25rem;
        --spacing-2xl: 1.5rem;
        --text-4xl: 1.875rem;
        --text-5xl: 2.25rem;
    }
}

/* ===== TOKENS PARA ANIMACIONES ===== */

:root {
    --animation-duration-fast: 200ms;
    --animation-duration-normal: 300ms;
    --animation-duration-slow: 500ms;

    --animation-ease-in: cubic-bezier(0.4, 0, 1, 1);
    --animation-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --animation-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --animation-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== UTILIDADES DE ACCESIBILIDAD ===== */

:root {
    --sr-only: absolute;
    --sr-only-focusable: static;

    /* Contraste mínimo WCAG */
    --contrast-aa: 4.5;
    --contrast-aaa: 7;
}

/* ===== TOKENS PARA ESTADOS DE LOADING ===== */

:root {
    --skeleton-bg: var(--gray-200);
    --skeleton-shine: var(--gray-300);
    --loading-spinner-size: 24px;
    --loading-overlay-bg: rgba(255, 255, 255, 0.8);
}