/**
 * ============================================================================
 * FONTS.CSS - Fuentes locales del sistema
 * Sistema Académico MINERD
 * ============================================================================
 *
 * Fuentes servidas localmente para garantizar:
 * - Funcionamiento offline/intranet
 * - Consistencia entre navegadores
 * - Sin dependencias de CDN
 * - Cumplimiento GDPR/privacidad
 * - Rendimiento predecible
 *
 * @version 1.0.0
 * @date 7 de febrero de 2026
 * ============================================================================
 */

/* ============================================================================
   INTER - Fuente principal del sistema
   ============================================================================ */

/**
 * Inter - Regular (400)
 * Uso: Texto normal, párrafos, contenido general
 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap; /* Previene FOUT (Flash of Unstyled Text) */
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/**
 * Inter - Medium (500)
 * Uso: Subtítulos, énfasis moderado
 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/**
 * Inter - SemiBold (600)
 * Uso: Títulos de sección, botones, navegación activa
 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/**
 * Inter - Bold (700)
 * Uso: Títulos principales, énfasis fuerte
 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================================
   FALLBACK FONTS
   ============================================================================ */

/**
 * Stack de fuentes de sistema como fallback
 * Garantiza legibilidad incluso si Inter no carga
 */
:root {
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                         Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-monospace: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono',
                             Consolas, 'Courier New', monospace;
}

/* ============================================================================
   OPTIMIZACIONES
   ============================================================================ */

/**
 * Suavizado de fuentes para mejor legibilidad
 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/**
 * Prevención de cambios de layout durante carga de fuentes
 */
.font-loading body {
    visibility: hidden;
}

/**
 * Feature queries para mejor compatibilidad
 */
@supports (font-variation-settings: normal) {
    /* Soporte para variable fonts (futuro) */
    :root {
        --font-supports-variable: true;
    }
}

/* ============================================================================
   NOTAS DE USO
   ============================================================================

   Pesos disponibles:
   - 400 (Regular): Texto normal
   - 500 (Medium): Subtítulos, énfasis leve
   - 600 (SemiBold): Títulos de sección, navegación
   - 700 (Bold): Títulos principales

   Tamaño total: ~90KB (4 archivos WOFF2)
   Caché: Permanente (1 año recomendado)

   Ejemplo de uso:
   ```css
   h1 { font-family: var(--font-family-base); font-weight: 700; }
   p  { font-family: var(--font-family-base); font-weight: 400; }
   ```

   ============================================================================ */
