/* ==========================================================================
   base.css — fuentes, reset y estilos globales
   ========================================================================== */

/* ---- Fuentes (WOFF2, subconjunto latino: cubre todo el español) ---- */
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 100; font-display: swap; src: url("/fonts/FiraSans-100-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("/fonts/FiraSans-300-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/FiraSans-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/FiraSans-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/FiraSans-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/FiraSans-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/FiraSans-800-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 300; font-display: swap; src: url("/fonts/FiraSansCondensed-300-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/FiraSansCondensed-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/FiraSansCondensed-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/FiraSansCondensed-800-latin.woff2") format("woff2"); }

/* ---- Reset mínimo ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body {
  min-height: 100vh;
  background: var(--fondo);
  color: var(--gris-texto);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
h1, h2, h3, h4, p { overflow-wrap: break-word; }

/* ---- Accesibilidad ---- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar {
  position: fixed; top: 12px; left: 12px; z-index: 2000;
  padding: 12px 20px; border-radius: var(--r-pastilla);
  background: var(--verde); color: var(--blanco); font-weight: 500;
  transform: translateY(-200%);
  transition: transform .2s;
}
.saltar:focus { transform: none; }
:focus-visible {
  outline: 2px solid var(--verde);
  outline-offset: 3px;
  border-radius: 4px;
}
.sobre-oscuro :focus-visible, .sobre-oscuro:focus-visible,
.nav-d :focus-visible, .pastilla :focus-visible, .hero :focus-visible, .p-hero :focus-visible { outline-color: var(--blanco); }

/* ---- Imágenes con marcador (recurso pendiente) ---- */
.marcador {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, #d6d6d6 0 10px, #cfcfcf 10px 20px);
  color: var(--gris-texto); font-size: 12px; font-weight: 500;
  border: 2px dashed var(--gris-texto);
}

/* ---- Grano (textura de ruido propia) ---- */
.grano {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("/img/grano.png");
  background-image: image-set(url("/img/grano.webp") type("image/webp"), url("/img/grano.png") type("image/png"));
  background-size: 256px auto;
  background-repeat: repeat;
}

/* ---- Movimiento reducido: las entradas se resuelven sin animación ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}
