/* ==========================================================================
   Black Versions: base (fuentes, reset, tipografía, utilidades)
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 62% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Respaldos calibrados: ocupan casi el mismo ancho que la fuente real,
   así los titulares no cambian de líneas cuando termina de cargar. */
@font-face {
  font-family: "Archivo Titular";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Helvetica Bold");
  font-weight: 500 900;
  size-adjust: 72%;
}

@font-face {
  font-family: "Archivo Texto";
  src: local("Arial"), local("ArialMT"), local("Roboto"), local("Helvetica");
  font-weight: 500 900;
  size-adjust: 88%;
}

@font-face {
  font-family: "Literata Respaldo";
  src: local("Georgia"), local("Noto Serif"), local("Times New Roman");
  font-weight: 400 700;
  size-adjust: 103.8%;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 7rem;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.toc, .sign-nav) { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-ui);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.wrap--article {
  width: min(100% - 2 * var(--gutter), var(--wrap-article));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--orange);
  color: var(--black);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
