/* ==========================================================================
   base.css — reinicio corto y valores por defecto del documento.
   Todo sale de tokens.css. Aquí no se declara ni un color literal.

   Cuidado con la especificidad: este archivo solo usa selectores de elemento y
   una sola clase de utilidad. Los estilos de sección viven en sus propios
   archivos y no deben pelearse con estos por márgenes ni rellenos.
   ========================================================================== */

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

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

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

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--weight-display);
  line-height: var(--leading-tight);
  text-wrap: balance;
}

p, ul, ol, dl, figure, picture { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* La medida se pone por componente, no de forma global. Un `p { max-width }`
   global choca con cualquier contenedor que traiga la suya y produce justo la
   pelea de anchos que hay que evitar. */
.measure        { max-width: var(--measure); }
.measure-narrow { max-width: var(--measure-narrow); }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: var(--rule-weight) solid var(--focus);
  outline-offset: 2px;
}

/* Cifras del oficio — calibres, pendientes, mils, licencia — alineadas. */
.tabular { font-variant-numeric: tabular-nums; }

/* Contenedor de página. Única clase de layout en este archivo. */
.wrap {
  width: 100%;
  max-width: var(--measure-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
