/* ============================================================
   text-sizes.css — v3.1 (Ajustado)
   Sistema tipográfico universal para toda la web
   Tipografía fluida + escala modular + accesibilidad global
   ============================================================ */

/* ------------------------------------------------------------
   1) Base: tamaño raíz fluido (este controla TODO el sitio)
   ------------------------------------------------------------ */
html {
  font-size: clamp(15px, 1vw + 12px, 16px);
  line-height: 1.5;
}

/* ------------------------------------------------------------
   2) Variables de escala tipográfica fluida (reducidas)
   ------------------------------------------------------------ */
:root {
  --step--2: clamp(0.7rem, 0.25vw + 0.55rem, 0.8rem);
  --step--1: clamp(0.82rem, 0.25vw + 0.7rem, 0.9rem);
  --step-0:  clamp(0.95rem, 0.35vw + 0.8rem, 1rem);

  /* reducidas */
  --step-1:  clamp(1.05rem, 0.7vw + 0.9rem, 1.15rem);
  --step-2:  clamp(1.25rem, 0.9vw + 0.95rem, 1.35rem);
  --step-3:  clamp(1.45rem, 1.2vw + 1rem, 1.7rem);
  --step-4:  clamp(1.7rem, 1.8vw + 1.05rem, 2.1rem);
  --step-5:  clamp(1.9rem, 2vw + 1.1rem, 2.5rem);
}

/* ------------------------------------------------------------
   3) Encabezados (jerarquía reducida)
   ------------------------------------------------------------ */
h1 { font-size: var(--step-4); line-height: 1.2; }
h2 { font-size: var(--step-3); line-height: 1.25; }
h3 { font-size: var(--step-2); line-height: 1.3; }
h4 { font-size: var(--step-1); line-height: 1.35; }
h5 { font-size: var(--step-0); line-height: 1.4; }
h6 { font-size: var(--step--1); line-height: 1.4; }

/* ------------------------------------------------------------
   4) Texto base global
   ------------------------------------------------------------ */
body,
p,
li,
dt,
dd,
td,
th,
address,
button,
input,
textarea,
select {
  font-size: var(--step-0);
}

/* ------------------------------------------------------------
   5) Variantes comunes
   ------------------------------------------------------------ */
small      { font-size: var(--step--1); }
blockquote { font-size: var(--step-1); }

/* Código */
code,
kbd,
samp,
pre {
  font-size: var(--step--1);
  font-family: monospace;
}

/* Abreviaturas */
abbr,
acronym {
  font-size: var(--step--1);
}

/* Superíndices y subíndices */
sup,
sub {
  font-size: var(--step--2);
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

/* Fechas */
time { font-size: var(--step--1); }

/* Listas generales */
ul,
ol {
  font-size: var(--step-0);
}
