/* ═══════════════════════════════════════════
   Helvetica Now Display — self-hosted
   Licencia web Monotype activa.
   Cuatro pesos: 300 / 400 / 500 / 800.
   ═══════════════════════════════════════════ */

@font-face {
  font-family: "Helvetica Now Display";
  src: url("../fonts/HelveticaNowDisplay-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Now Display";
  src: url("../fonts/HelveticaNowDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Now Display";
  src: url("../fonts/HelveticaNowDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Now Display";
  src: url("../fonts/HelveticaNowDisplay-XBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════════════
   Ajustes globales de renderizado
   ═══════════════════════════════════════════ */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-ink-soft);
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════
   Tipografía base
   ═══════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  color: var(--color-ink);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p {
  text-wrap: pretty;
  max-width: 65ch;
}

a {
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-deep);
}

strong, b {
  font-weight: var(--fw-bold);
}

small {
  font-size: var(--fs-small);
}

/* Marcador amarillo tipo highlight (tabla transparencia) */
mark {
  background-color: var(--color-highlight);
  color: var(--color-ink);
  padding: 0 var(--sp-1);
}

/* ═══════════════════════════════════════════
   Utilidades para uppercase con tracking correcto
   (nav, pegatinas, botones secundarios)
   ═══════════════════════════════════════════ */

.u-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════
   Accesibilidad: focus visible + sr-only
   ═══════════════════════════════════════════ */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ═══════════════════════════════════════════
   Contenedores
   ═══════════════════════════════════════════ */

.u-container {
  width: var(--container);
  margin-inline: auto;
}

.u-container-sm {
  width: var(--container-sm);
  margin-inline: auto;
}

/* ═══════════════════════════════════════════
   Selección de texto
   ═══════════════════════════════════════════ */

::selection {
  background-color: var(--color-accent);
  color: var(--color-ink);
}

/* ═══════════════════════════════════════════
   Reduce motion
   ═══════════════════════════════════════════ */

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