/* ==========================================================================
   Base: fuentes, reset mínimo, tipografía y utilidades de accesibilidad
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/assets/fonts/barlow-semi-condensed-semibold-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/assets/fonts/barlow-semi-condensed-bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--alto-cabecera) + var(--espacio-4));
}

body {
  margin: 0;
  font-family: var(--fuente-texto);
  font-size: var(--texto-base);
  line-height: 1.6;
  color: var(--color-tinta);
  background: var(--color-fondo);
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--espacio-4);
  font-family: var(--fuente-titulos);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.005em;
}

h1 { font-size: var(--titulo-h1); }
h2 { font-size: var(--titulo-h2); }
h3 { font-size: var(--titulo-h3); font-weight: 600; }

p,
ul,
ol,
figure {
  margin: 0 0 var(--espacio-4);
}

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

a {
  color: var(--color-bronce-oscuro);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button {
  font: inherit;
  color: inherit;
}

/* Foco visible para teclado en todo el sitio */
:focus-visible {
  outline: var(--foco);
  outline-offset: 3px;
  border-radius: 2px;
}

.seccion--oscura :focus-visible,
.pie :focus-visible {
  outline-color: var(--color-bronce-sobre-oscuro);
}

/* Solo para lectores de pantalla */
.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;
}

/* Enlace "Saltar al contenido" */
.saltar {
  position: absolute;
  top: var(--espacio-2);
  left: var(--espacio-2);
  z-index: 100;
  padding: var(--espacio-3) var(--espacio-4);
  background: var(--color-tinta);
  color: var(--color-texto-claro);
  border-radius: var(--radio);
  transform: translateY(-200%);
}

.saltar:focus {
  transform: none;
}

/* Íconos SVG del sprite /assets/img/iconos.svg (heredan el color del texto) */
.icono {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
