/* =====================================================================
   AsegurApp · Base: reset, tipografía y accesibilidad
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--c-texto);
  background: var(--c-fondo);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01"; /* Inter: dígitos y letras más legibles */
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-titulo);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-lg); }
h3 { font-size: var(--t-md); }

p { margin: 0; text-wrap: pretty; }

a { color: var(--c-accion); text-decoration: none; }
a:hover { color: var(--c-texto); }

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

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

/* Números alineados en tablas y métricas */
.num, td, .metrica__valor { font-variant-numeric: tabular-nums; }

/* Foco visible solo con teclado */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--c-foco);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Texto solo para lectores de pantalla */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Saltar al contenido */
.saltar {
  position: absolute; left: var(--e-4); top: -100px; z-index: 100;
  padding: var(--e-3) var(--e-4);
  background: var(--c-primario); color: var(--c-sobre-primario);
  border-radius: var(--r-sm); font-weight: 600;
}
.saltar:focus { top: var(--e-4); color: var(--c-sobre-primario); }

/* Íconos del sprite */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2;
       stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 16px; height: 16px; }
.ico--lg { width: 24px; height: 24px; }

/* Lo oculto con el atributo hidden se oculta siempre, aunque el componente tenga display propio */
[hidden] { display: none !important; }
