/* ==========================================================================
   GUÍA FELINA — BASE
   Reset moderno + estilos base sobre HTML semántico.
   ========================================================================== */

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

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

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

/* Evita CLS: toda imagen sin dimensiones explícitas reserva espacio 16:9 por defecto */
img:not([width]) { aspect-ratio: 16 / 9; object-fit: cover; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-moss-dark);
  margin: 0 0 var(--space-4) 0;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-2xl); margin-top: var(--space-16); }
h3 { font-size: var(--fs-xl); margin-top: var(--space-8); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--space-4) 0; }

a {
  color: var(--color-stone-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-moss-dark); }

/* Foco visible obligatorio — WCAG 2.4.7 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-amber);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol { padding-left: var(--space-6); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
th, td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-width) solid var(--color-border);
}
th { font-family: var(--font-mono); text-transform: uppercase; font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--color-ash); }

button {
  font-family: inherit;
  cursor: pointer;
}

/* Skip to content — primer elemento tabulable de cada página */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-moss);
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  z-index: var(--z-modal);
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* Utilidad para texto solo-lector 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;
}
