/* ============================================================
   OarClub Data Local Fonts - Zero External Dependencies
   All fonts served from assets/fonts/ directory
   ============================================================ */

/* ── Outfit (Body Font) ── */

/* latin-ext */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../assets/fonts/outfit-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;
}

/* latin */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../assets/fonts/outfit-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;
}

/* ── Space Grotesk (Heading Font) ── */

/* vietnamese */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../assets/fonts/space-grotesk-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;
}

/* latin-ext */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../assets/fonts/space-grotesk-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;
}

/* latin */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../assets/fonts/space-grotesk-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;
}

/* ── Material Symbols Outlined (Icon Font) ── */

/*
 * Fuente de ICONOS subseteada: el archivo servido es un subset a ~260 KB
 * (sólo los ~360 iconos que usa la app), generado por tools/subset-icons.py
 * desde material-symbols-outlined-full.woff2 (3.9 MB, fuente de verdad, no
 * se sirve). Ese peso era la RAÍZ de que los iconos tardaran/aparecieran
 * como texto en conexiones lentas. Re-correr el script si se agregan iconos.
 *
 * `font-display: block` (NO swap): Material Symbols mapea nombre→icono con
 * LIGADURAS ("person" → 🧑). Con `swap`, sin la font cargada, el navegador
 * pinta "person" como texto literal. `block` oculta el glyph esperando la
 * font — sin flash de texto. Refuerzo: theme.js pone `visibility:hidden` en
 * los iconos hasta `html.fonts-ready` (carga explícita de la font).
 *
 * Las otras fuentes (Outfit, Space Grotesk) siguen con `swap` porque son de
 * TEXTO real — leer con fallback es mejor que texto invisible.
 */
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('../assets/fonts/material-symbols-outlined.woff2') format('woff2');
}

/* Envuelto en @layer base para que utilities de tamaño de Tailwind
   (text-[20px], text-lg, etc.) puedan sobreescribir font-size sin
   necesidad de helpers propios como `.mso-20`. Ver [[project-oarclubdata-tailwind-layer-gotcha]]. */
@layer base {
    .material-symbols-outlined {
        font-family: 'Material Symbols Outlined';
        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;
        /* Ligaduras ON en todos los navegadores (no sólo webkit): el nombre
           del icono es una ligadura del tipo font. */
        font-feature-settings: 'liga';
        -webkit-font-feature-settings: 'liga';
        -webkit-font-smoothing: antialiased;
    }
}
