/* 
  HEDRA TOPOGRAFÍA - SISTEMA DE DISEÑO V2.0
  Variables CSS y Fundamentos
  Colores originales mantenidos + mejoras estructurales
*/

:root {
    /* ===================================
     COLORES - IDENTIDAD CONSERVADA
     =================================== */

    /* Colores Corporativos (sin cambios) */
    --hedra-red: #ec414a;
    --hedra-red-dark: #d63640;
    --hedra-red-light: #f56870;

    --hedra-green: #86C124;
    --hedra-green-dark: #6fa51e;
    --hedra-green-light: #9dd13e;

    /* Enlaces (mejora mínima de contraste) */
    --hedra-link: #0066cc;
    --hedra-link-visited: #6281A3;
    --hedra-link-hover: #182E7A;

    /* Escala de Grises */
    --hedra-dark: #1A1A1A;
    --hedra-gray-900: #222222;
    --hedra-gray-800: #2D2D2D;
    --hedra-gray-700: #444444;
    --hedra-gray-600: #666666;
    --hedra-gray-500: #888888;
    --hedra-gray-400: #999999;
    --hedra-gray-300: #BBBBBB;
    --hedra-gray-200: #E0E0E0;
    --hedra-gray-100: #F5F5F5;
    --hedra-white: #FFFFFF;

    /* Fondos */
    --hedra-bg-body: #FFFFFF;
    --hedra-bg-light: #F8F9FA;
    --hedra-bg-teaser: #F1F2F2;
    --hedra-bg-section-alt: #FAFAFA;

    /* Colores Funcionales */
    --hedra-success: #28a745;
    --hedra-warning: #ffc107;
    --hedra-danger: #dc3545;
    --hedra-info: #17a2b8;

    /* ===================================
     TIPOGRAFÍA
     =================================== */

    /* Familias de Fuentes */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-headings: 'Outfit', 'Inter', var(--font-primary);
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Tamaños - Mobile First (16px base) */
    --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 */

    /* Pesos de Fuente */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-black: 900;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* ===================================
     ESPACIADO (Sistema 4px)
     =================================== */

    --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-7: 1.75rem;
    /* 28px */
    --space-8: 2rem;
    /* 32px */
    --space-9: 2.25rem;
    /* 36px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-14: 3.5rem;
    /* 56px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */
    --space-24: 6rem;
    /* 96px */
    --space-32: 8rem;
    /* 128px */

    /* ===================================
     BREAKPOINTS
     =================================== */

    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;

    /* ===================================
     CONTENEDORES
     =================================== */

    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1400px;
    --container-fluid: 100%;

    /* ===================================
     BORDES Y RADIOS
     =================================== */

    --radius-none: 0;
    --radius-sm: 0.25rem;
    /* 4px */
    --radius-base: 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: 1px;
    --border-width-2: 2px;
    --border-width-4: 4px;

    /* ===================================
     SOMBRAS
     =================================== */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    --shadow-none: none;

    /* ===================================
     TRANSICIONES
     =================================== */

    --transition-fast: 150ms;
    --transition-base: 200ms;
    --transition-slow: 300ms;
    --transition-slower: 500ms;

    --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);

    /* ===================================
     Z-INDEX (Sistema organizado)
     =================================== */

    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===================================
   RESET MEJORADO Y BOX SIZING
   =================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===================================
   BASE
   =================================== */

html {
    font-size: 100%;
    /* 16px */
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    background: var(--hedra-bg-body);
    color: var(--hedra-dark);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    text-align: left;
    min-height: 100vh;
}

/* ===================================
   TIPOGRAFÍA MEJORADA
   =================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--hedra-dark);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    color: var(--hedra-green);
    line-height: var(--leading-none);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    background-color: var(--hedra-red);
    color: var(--hedra-white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    display: block;
    margin-bottom: var(--space-6);
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h5 {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
}

h6 {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Párrafos */
p {
    margin-bottom: var(--space-4);
    color: var(--hedra-gray-700);
}

p:last-child {
    margin-bottom: 0;
}

/* Strong y énfasis */
strong,
b {
    font-weight: var(--font-semibold);
    color: var(--hedra-dark);
}

em,
i {
    font-style: italic;
}

/* Lead text (intro párrafos) */
.lead {
    font-size: var(--text-lg);
    color: var(--hedra-gray-600);
    line-height: var(--leading-relaxed);
}

/* Small text */
small,
.text-sm {
    font-size: var(--text-sm);
}

/* ===================================
   ENLACES MEJORADOS
   =================================== */

a {
    color: var(--hedra-link);
    text-decoration: none;
    transition: color var(--transition-base) var(--ease-out);
    cursor: pointer;
}

a:visited {
    color: var(--hedra-link-visited);
}

a:hover,
a:focus {
    color: var(--hedra-link-hover);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--hedra-link);
    outline-offset: 2px;
}

/* ===================================
   IMÁGENES RESPONSIVAS
   =================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[width] {
    width: auto;
}

img[width][height] {
    height: auto;
}

/* ===================================
   UTILIDADES DE ACCESIBILIDAD
   =================================== */

.sr-only,
.oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip links */
.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: var(--z-tooltip);
    padding: var(--space-3) var(--space-4);
    background: var(--hedra-dark);
    color: var(--hedra-white);
    text-decoration: none;
    border-radius: var(--radius-md);
}

.skip:focus {
    left: var(--space-4);
    top: var(--space-4);
    outline: 2px solid var(--hedra-link);
}

/* ===================================
   RESPONSIVE - DESKTOP ADJUSTMENTS
   =================================== */

@media (min-width: 768px) {
    h1 {
        font-size: var(--text-6xl);
    }

    h2 {
        font-size: var(--text-5xl);
    }

    h3 {
        font-size: var(--text-3xl);
    }

    .lead {
        font-size: var(--text-xl);
    }
}