/* ==========================================================================
   base.css — Reset, Variables CSS (Design Tokens), Tipografía
   ========================================================================== */

/* --- CSS Variables (Design Tokens) --- */
:root {
    /* === PALETA DE COLORES === */
    
    /* Colores primarios */
    --color-primary: #003049;
    --color-primary-dark: #780000;
    --color-primary-light: #0d5a82;
    --color-primary-lighter: #2a7aaa;
    
    /* Colores secundarios */
    --color-secondary: #C1121F;
    --color-secondary-dark: #780000;
    --color-secondary-light: #d93a45;
    
    /* Colores de acento */
    --color-accent: #669BBC;
    --color-accent-light: #8bb5cf;
    --color-accent-dark: #4a7d9a;
    
    /* Colores de estado */
    --color-success: #27ae60;
    --color-warning: #f39c12;
    --color-error: #C1121F;
    --color-info: #669BBC;
    
    /* Colores de texto */
    --color-text-primary: #333;
    --color-text-secondary: #666;
    --color-text-tertiary: #999;
    --color-text-light: #fff;
    --color-text-muted: rgba(0, 0, 0, 0.6);
    
    /* Colores de fondo */
    --color-bg-white: #fff;
    --color-bg-light: #FDF0D5;
    --color-bg-dark: #222;
    --color-bg-nav: rgba(255, 255, 255, 0.95);
    --color-bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Colores de borde */
    --color-border-light: #e0e0e0;
    --color-border-medium: #ccc;
    --color-border-dark: #999;

    /* === GRADIENTES === */
    --gradient-hero: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-contact: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    --gradient-overlay: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);

    /* === TIPOGRAFÍA === */
    
    /* Familias de fuentes */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-family-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-mono: 'Courier New', monospace;
    
    /* Tamaños de fuente (escala modular 1.25) */
    --font-size-xs: 0.8rem;      /* 12.8px */
    --font-size-sm: 0.9rem;      /* 14.4px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-md: 1.125rem;    /* 18px */
    --font-size-lg: 1.5rem;      /* 24px */
    --font-size-xl: 2rem;        /* 32px */
    --font-size-2xl: 3rem;       /* 48px */
    --font-size-3xl: 4rem;       /* 64px */
    
    /* Pesos de fuente */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Line heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    --line-height-loose: 2;
    
    /* Letter spacing */
    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.05em;

    /* === ESPACIADO (Escala 8px) === */
    --spacing-0: 0;
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 1rem;      /* 16px */
    --spacing-md: 1.5rem;    /* 24px */
    --spacing-lg: 2rem;      /* 32px */
    --spacing-xl: 3rem;      /* 48px */
    --spacing-2xl: 4rem;     /* 64px */
    --spacing-3xl: 6rem;     /* 96px */

    /* === SOMBRAS (Elevaciones) === */
    --shadow-none: none;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-nav: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-transition: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);

    /* === BORDER RADIUS === */
    --radius-none: 0;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;
    --radius-round: 50%;

    /* === TRANSICIONES === */
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.7s ease;
    
    /* Timing functions */
    --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-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

    /* === Z-INDEX === */
    --z-base: 0;
    --z-dropdown: 100;
    --z-transition: 5;
    --z-sticky: 200;
    --z-fixed: 500;
    --z-carousel-center: 10;
    --z-nav: 1000;
    --z-modal: 2000;
    --z-popover: 3000;
    --z-tooltip: 4000;

    /* === BREAKPOINTS (para referencia en JS) === */
    --breakpoint-xs: 320px;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;

    /* === COMPONENTES ESPECÍFICOS === */
    --nav-height: 60px;
    --nav-height-mobile: 56px;
    --footer-height: 80px;
    --carousel-item-width: 280px;
    --carousel-item-height: 350px;
    --carousel-gap: 30px;
    
    /* Opacidades */
    --opacity-disabled: 0.5;
    --opacity-hover: 0.8;
    --opacity-overlay: 0.7;
}

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Base Styles --- */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

/* --- Focus Styles (Accesibilidad) --- */
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

a:focus-visible {
    outline-color: var(--color-primary);
    outline-width: 2px;
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

/* --- Tipografía base --- */
h1 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
}

p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}
