/* ==========================================================================
   ITERA · DESIGN SYSTEM — BASE
   Capa 2 de 3. Reset, primitivas tipográficas y accesibilidad.
   Depende de tokens.css.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* cv11 = "l" con cola, ss01 = alternas de UI: legibilidad a tamaño chico */
  font-feature-settings: "cv11", "ss01";
  font-optical-sizing: auto;
}

h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a { color: var(--brand-600); text-decoration: none; }

svg { display: block; }

/* Cualquier ícono de trazo hereda el color del texto que lo acompaña.
   Las tres tallas comparten el trazo: `.i-sm` y `.i-xs` se usan solas. */
.i,
.i-sm,
.i-xs {
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i    { width: 18px; height: 18px; stroke-width: 1.8; }
.i-sm { width: 15px; height: 15px; stroke-width: 2.1; }
.i-xs { width: 12px; height: 12px; stroke-width: 2.2; }

/* --------------------------------------------------------------------------
   Primitivas tipográficas
   -------------------------------------------------------------------------- */

/* Todo lo que lleva corte display: cifras y titulares. */
.t-hero {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: .94;
  letter-spacing: var(--ls-hero);
  font-variant-numeric: proportional-nums;   /* cifra grande y suelta: nunca tabular */
}
.t-fig {
  font-size: var(--fs-fig);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: var(--ls-tight);
  font-variant-numeric: proportional-nums;
}
.t-h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-tight); letter-spacing: var(--ls-h1); }
.t-h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 700; line-height: var(--lh-snug); letter-spacing: var(--ls-h2); }
.t-h3 { font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-snug);  letter-spacing: -.008em; }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-sm   { font-size: var(--fs-sm);   line-height: 1.5; }
.t-xs   { font-size: var(--fs-xs);   line-height: 1.45; }

/* Voz de sistema: versalita muy espaciada. Nunca para leer, solo para
   orientar. Antes era una segunda familia mono; ahora es Inter con tracking
   — una sola fuente en todo el producto, que es lo que pide la marca. */
.t-label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.t-data { font-size: var(--fs-xs); letter-spacing: .005em; font-variant-numeric: tabular-nums; }

.c-1 { color: var(--text); }
.c-2 { color: var(--text-2); }
.c-3 { color: var(--text-3); }

/* --------------------------------------------------------------------------
   Accesibilidad
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2.5px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.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;
}

.skip {
  position: absolute;
  left: 50%; top: 8px;
  transform: translate(-50%, -300%);
  background: var(--brand-600);
  color: var(--text-on-brand);
  padding: 13px 20px;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  z-index: 100;
  transition: transform var(--dur-2) var(--ease);
}
.skip:focus { transform: translate(-50%, 0); }


/* --------------------------------------------------------------------------
   Movimiento de entrada

   El contenido es visible por defecto. La clase `motion` la pone el JS en
   <html>, y solo si el sistema no pidió movimiento reducido: sin JS, con JS
   caído o con la preferencia activada, la pantalla se pinta completa y sin
   una sola transición. La animación nunca es la condición de ver el dato.
   -------------------------------------------------------------------------- */

html.motion .reveal {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
}
html.motion .reveal.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity   var(--dur-4) var(--ease-expo),
    transform var(--dur-4) var(--ease-expo);
}

/* Cifras que cuentan: tabulares mientras corren, para que no bailen de ancho. */
.tick-num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Transición entre las tres vistas de rol (documentos distintos).
   Degrada sin ruido donde no está soportada. */
@view-transition { navigation: auto; }
