/* SINFRA · tokens y tipografía.
   Los tokens son los de SINEC (public/estilos.css, rediseño «cuadrado y filoso»), más el acento propio de SINFRA.
   Los colores salen solo de aquí: no se dejan colores sueltos en los componentes. */

:root {
  /* Fondos */
  --papel: #ffffff;
  --papel-2: #f3f3f1;
  --linea: #d7d7d3;
  --luz: #fce6e3;            /* fondo de los avisos de error */

  /* Texto */
  --tinta: #141414;
  --grafito: #3a3a38;
  --gris: #6b6b67;

  /* Rojo: en SINFRA, solo para errores y el logo */
  --rojo: #e83a3a;
  --rojo-texto: #c42d2d;
  --rojo-profundo: #a82424;

  /* Acento de SINFRA: ítem activo del menú, botón principal, antetítulos y foco (blanco encima: contraste AA) */
  --acento: #1f5f8b;
  --acento-oscuro: #174a6d;  /* botón principal al pasar el mouse */
  --acento-claro: #e6eef4;   /* fondos suaves */

  --verde-texto: #1f7a3d;
  --verde-fondo: #e3f1e7;
  --ambar: #fdf1d6;
  --ambar-texto: #7a4f00;

  /* Barra superior */
  --barra: #141414;
  --barra-campo: #2a2a28;
  --barra-borde: #3a3a38;
  --barra-texto-2: #a3a39e;
  --barra-linea: #6b6b67;

  /* Velo detrás de ventanas y del menú del celular */
  --velo: rgba(20, 20, 20, .45);

  /* Tipografía */
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Esquinas */
  --radio: 0px;
  --radio-chip: 2px;

  /* Medidas del marco */
  --alto-barra: 60px;
  --ancho-menu: 232px;
  --ancho-menu-plegado: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  background: var(--papel);
  color: var(--tinta);
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { color: var(--grafito); }

a { color: var(--tinta); text-underline-offset: 3px; }
a:hover { color: var(--grafito); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img, svg { display: block; }

/* Foco siempre visible (teclado). */
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
h1:focus { outline: none; }
/* El título recibe el foco al cambiar de pantalla (para el lector de pantalla); no es un control, así que no lleva contorno. */

.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Solo para el lector de pantalla */
.oculto-visual {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* En el celular y en pantallas táctiles, los campos en 16 px (con menos, el iPhone agranda la pantalla al escribir). */
@media (max-width: 760px), (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

/* «Reducir movimiento»: sin animaciones ni transiciones. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
