/* === TIPOGRAFÍA Y PALETA COMUNES ===
 * Una sola letra para toda la web: Atkinson Hyperlegible Next, diseñada por el
 * Braille Institute para distinguir bien I/l/1, 0/O y rn/m. Se sirve desde el
 * propio servidor: con Google Fonts la web se quedaba cargando en redes sin IPv6.
 * La importan todas las hojas de css/, así que basta con enlazar cualquiera.
 */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2') format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next-latin-wght-normal.woff2') format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next-latin-ext-wght-italic.woff2') format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next-latin-wght-italic.woff2') format('woff2-variations');
  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;
}

/* Anton: solo para titulares grandes de la portada, al estilo de los carteles */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/anton/anton-latin-ext-400-normal.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;
}
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/anton/anton-latin-400-normal.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;
}

/* html:root pesa más que el :root de Bootstrap, así que sus variables no pisan estas */
html:root {
  /* Letras */
  --fuente-texto: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fuente-marca: 'American Typewriter', 'Courier New', Courier, monospace; /* solo el logotipo */
  --fuente-codigo: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fuente-titular: 'Anton', Impact, 'Arial Narrow', sans-serif; /* titulares de cartel */

  /* Tamaños: 17 px en la parte pública, 15 px como mínimo en tablas del panel */
  --texto-publico: 17px;
  --texto-panel: 15px;
  --texto-pequeno: 14px;

  /* Colores */
  --rojo: #c00000;          /* rojo de marca; con texto blanco cumple WCAG AA */
  --rojo-oscuro: #9a0000;   /* al pasar el ratón */
  --rojo-suave: #fbeaea;
  --negro: #111;
  --texto: #1f1f1f;
  --texto-secundario: #595959; /* el gris más claro que cumple contraste sobre blanco */
  --borde: #e2dcdc;
  --fondo: #fff;
  --fondo-suave: #faf7f7;

  --bs-body-font-family: var(--fuente-texto);
  --bs-font-sans-serif: var(--fuente-texto);
}

body {
  font-family: var(--fuente-texto);
}

/* Los controles de formulario no heredan la letra por defecto */
button, input, select, textarea, optgroup {
  font-family: inherit;
}

/* Números de ancho fijo en tablas: los importes quedan alineados */
table {
  font-variant-numeric: tabular-nums;
}

/* Foco visible al navegar con el teclado */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--rojo);
  outline-offset: 2px;
}
