/* ==========================================================================
   base.css — Reset ligero, fuentes y estilos globales (sin componentes).
   ========================================================================== */

/* ---- Fuente local Figtree (servida desde assets/fonts, sin CDN) ---- */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/figtree-latin-400.woff2') format('woff2'),
       url('../assets/fonts/figtree-latin-ext-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/figtree-latin-500.woff2') format('woff2'),
       url('../assets/fonts/figtree-latin-ext-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/figtree-latin-600.woff2') format('woff2'),
       url('../assets/fonts/figtree-latin-ext-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/figtree-latin-700.woff2') format('woff2'),
       url('../assets/fonts/figtree-latin-ext-700.woff2') format('woff2');
}

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

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

ul[role="list"] { list-style: none; padding: 0; }

/* ---- Accesibilidad: foco de teclado siempre visible ---- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Respeto a usuarios que reducen el movimiento ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Utilidad: 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;
}

/* ---- Saltar al contenido ---- */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -3rem;
  z-index: 1000;
  background: var(--color-primary);
  color: var(--color-text-invert);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-2); color: var(--color-text-invert); }
