/* ═══════════════════════════════════════════════════════════════════════════
   Base: lo que se aplica a los elementos antes de que exista un componente.
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Que el ancla no quede pegada al borde de arriba, tapada por la cabecera. */
  scroll-padding-top: 6rem;
}

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

body {
  margin: 0;
  background: var(--rr-bg);
  color: var(--rr-texto);
  font-family: var(--rr-body);
  font-size: var(--rr-t-md);
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Titulares ─────────────────────────────────────────────────────────────
   Oswald con el interletrado un punto abierto. Condensada y apretada a la vez
   se lee como un cartel de rebajas; abriéndola respira y parece rótulo. */
h1, h2, h3, h4 {
  font-family: var(--rr-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: .012em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: var(--rr-t-h1); }
h2 { font-size: var(--rr-t-h2); }
h3 { font-size: var(--rr-t-h3); letter-spacing: .02em; }

p { margin: 0 0 var(--rr-e3); max-width: var(--rr-medida); }
p:last-child { margin-bottom: 0; }

/* ── Enlaces ───────────────────────────────────────────────────────────────
   Subrayado desplazado en vez de pegado: cruza menos las letras con descendente
   y se lee mejor en pantalla. */
a {
  color: var(--rr-rojo);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color var(--rr-rapido) var(--rr-ease);
}
a:hover { color: var(--rr-rojo-vivo); }

/* El foco se ve SIEMPRE. Quien navega con teclado necesita saber dónde está, y
   un `outline: none` por estética deja la web inutilizable para esa persona. */
:focus-visible {
  outline: 2px solid var(--rr-rojo-vivo);
  outline-offset: 3px;
  border-radius: var(--rr-r1);
}

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

ul, ol { margin: 0 0 var(--rr-e3); padding-left: 1.2em; }
li { margin-bottom: var(--rr-e2); }
li:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--rr-texto); }

hr {
  border: 0;
  height: 1px;
  background: var(--rr-line);
  margin: var(--rr-e5) 0;
}

/* ── Sólo para lectores de pantalla ────────────────────────────────────────
   No se usa `display:none`: eso lo esconde también del lector, que es justo lo
   contrario de lo que se busca. */
.rr-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Saltar al contenido: lo primero que encuentra el teclado, invisible hasta que
   recibe el foco. */
.rr-saltar {
  position: absolute;
  top: -100px; left: var(--rr-e3);
  z-index: 100;
  background: var(--rr-rojo);
  color: var(--rr-sobre-rojo);
  padding: var(--rr-e2) var(--rr-e3);
  border-radius: 0 0 var(--rr-r2) var(--rr-r2);
  font-family: var(--rr-rotulo);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top var(--rr-rapido) var(--rr-ease);
}
.rr-saltar:focus { top: 0; color: var(--rr-sobre-rojo); }

::selection {
  background: var(--rr-rojo);
  color: var(--rr-sobre-rojo);
}
