/* ============================================================
   base.css — Reset, escala tipográfica y utilidades
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-texto);
  color: var(--c-navy);
  background: var(--c-n300);
  line-height: 1.5;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ------------------------------------------------------------
   Escala tipográfica (sección 4.1)
   ------------------------------------------------------------ */
.t-display-xl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.04;
  letter-spacing: -1.2px;
}
.t-display-l {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.06;
  letter-spacing: -1px;
}
.t-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.6px;
}
.t-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.3px;
}
.t-h3 {
  font-family: var(--font-texto);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
}
.t-base {
  font-size: 16px;
  line-height: 1.5;
}
.t-base-fuerte {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
.t-chico {
  font-size: 14px;
  line-height: 1.45;
}
.t-etiqueta {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.t-caption {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.2px;
}

/* ------------------------------------------------------------
   Utilidades
   ------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stack-4  { display: flex; flex-direction: column; gap: 4px; }
.stack-8  { display: flex; flex-direction: column; gap: 8px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.muted { color: var(--c-n500); }
.center { text-align: center; }

/* Foco visible en todo lo interactivo (accesibilidad) */
:focus-visible {
  outline: 3px solid var(--c-azul);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Respetar la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
