/*
 * 🔐 SECURITY (DAST-L03): Fuentes servidas localmente — elimina dependencias externas a Google Fonts.
 *
 * Reemplaza los cuatro <link> que index.html tenía hacia Google:
 *   https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap
 *   https://fonts.googleapis.com/icon?family=Material+Icons+Round
 *   más los dos <link rel="preconnect"> a fonts.googleapis.com y fonts.gstatic.com
 *
 * Mismo criterio que el frontend de SISPRO (ver su css/fonts-local.css): ninguna dependencia de CDN.
 * Un <link> a Google Fonts además nunca podría cumplir la regla de SRI (SAST-B01), porque Google
 * sirve CSS distinto según el user-agent y no existe un hash estable que fijar.
 *
 * Actualización de fuentes (volver a bajar los .woff2 y actualizar las rutas si cambia la versión):
 *   Raleway v37              — https://fonts.gstatic.com/s/raleway/v37/
 *   Inter v20                — https://fonts.gstatic.com/s/inter/v20/
 *   Material Icons Round v109 — https://fonts.gstatic.com/s/materialiconsround/v109/
 *   Pedir el CSS con user-agent de navegador moderno, o Google devuelve .ttf en vez de .woff2.
 *
 * Este archivo debe cargarse ANTES de app.css: app.css solo re-tinta .material-icons-round
 * (color de marca) y depende de que la clase ya esté definida acá.
 */

/* ============================================================
   RALEWAY v37 — la fuente de cuerpo que manda el manual de marca.

   Igual que Inter: variable, un archivo por subconjunto, font-weight 300 700.

   Raleway NO trae subconjunto griego (Google sirve cinco: latin, latin-ext,
   cyrillic, cyrillic-ext, vietnamese). Por eso Inter se queda en la pila de
   respaldo en vez de borrarse: el navegador resuelve el respaldo POR GLIFO,
   así que un nombre en griego de una lista de sanciones sigue cayendo en Inter
   —que sí trae greek y greek-ext— y no en la fuente del sistema.
   ============================================================ */

/* latin — español completo (á é í ó ú ñ ü ¿ ¡) y ASCII */
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/raleway/raleway-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/raleway/raleway-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* cyrillic */
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/raleway/raleway-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* cyrillic-ext */
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/raleway/raleway-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* vietnamese */
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/raleway/raleway-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
                   U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
                   U+1EA0-1EF9, U+20AB;
}

/* ============================================================
   INTER — fuente variable, un solo archivo por subconjunto.
   font-weight: 300 700 cubre los cinco pesos que usaba el <link> anterior
   (300, 400, 500, 600, 700) sin necesidad de un archivo por peso.

   Se conservan los siete subconjuntos que sirve Google, no solo latin.
   Motivo: unicode-range hace que el navegador descargue ÚNICAMENTE el
   subconjunto que necesita, así que los subconjuntos extra no cuestan
   nada en runtime — solo espacio en el repo. Y esta es una aplicación de
   cumplimiento que muestra resultados de listas de sanciones, donde
   aparecen nombres en cirílico y griego; sin estos archivos se
   renderizarían con la fuente de respaldo del sistema.
   ============================================================ */

/* latin — español completo (á é í ó ú ñ ü ¿ ¡) y ASCII */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext — caracteres extendidos (Ä, Ö, Ø, Ū, etc.) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* cyrillic */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* cyrillic-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* greek */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-greek.woff2') format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* greek-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-greek-ext.woff2') format('woff2');
    unicode-range: U+1F00-1FFF;
}

/* vietnamese */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
                   U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
                   U+1EA0-1EF9, U+20AB;
}

/* ============================================================
   MATERIAL ICONS ROUND v109

   font-display: block y no swap, a propósito: los iconos se escriben como
   ligaduras (<span class="material-icons-round">business</span>). Con swap,
   mientras la fuente carga el navegador dibuja el texto crudo — se vería
   "business", "notification_important" — en vez de nada. block muestra un
   hueco y luego el icono.
   ============================================================ */
@font-face {
    font-family: 'Material Icons Round';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../lib/fonts/material-icons-round/material-icons-round.woff2') format('woff2');
}

/* Definición que antes venía dentro del CSS de Google. app.css la re-tinta
   con el color de marca; por eso este archivo va primero en index.html. */
.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
