*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background-color: var(--bg);
  /* Grano de papel kraft: ruido SVG muy sutil */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.17 0 0 0 0 0.18 0 0 0 0 0.2 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  color: var(--texto);
  font-family: var(--font-texto);
  font-size: var(--fs-base);
  line-height: var(--lh-texto);
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-titulo);
  font-weight: 500;
  line-height: var(--lh-titulo);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-xl);
  font-variation-settings: "opsz" 144;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
}

h3 {
  font-size: var(--fs-md);
  font-weight: 600;
}

p {
  margin: 0;
  max-width: var(--medida);
  text-wrap: pretty;
}

p + p {
  margin-top: var(--s-2);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  filter: sepia(0.08) saturate(0.95);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 3px;
}

.inverso :focus-visible {
  outline-color: var(--texto-inverso);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.saltar {
  position: absolute;
  left: var(--s-2);
  top: -4rem;
  z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--bg-inverso);
  color: var(--texto-inverso);
  border-radius: var(--radio-sm);
}

.saltar:focus {
  top: var(--s-2);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
