/* ==========================================================================
   Apptonomia — Base styles
   Simple reset + accessible base styles. Requires tokens.css.
   ========================================================================== */

/* Self-hosted fonts (SIL OFL license, latin subset, woff2).
   They used to load from fonts.googleapis.com: it was the app's only
   external request and it didn't work offline (PWA). Now they live in
   assets/fonts/ and are cached by sw.js like the rest of the app shell. */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/atkinson-hyperlegible-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/atkinson-hyperlegible-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/nunito-variable.woff2') format('woff2-variations');
}

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

html {
  font-size: var(--texto-base);
}

body {
  font-family: var(--fuente);
  font-size: var(--texto-base);
  line-height: 1.5;
  color: var(--color-texto);
  background: var(--color-fondo);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: var(--texto-titulo); line-height: 1.2; }
h2 { font-size: var(--texto-grande); line-height: 1.25; }
h3 { font-size: 24px; line-height: 1.3; }

p { max-width: 36em; }

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

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

a { color: var(--mod-coordinacion); }

/* Visible focus on every interactive element (CLAUDE.md rule 8) */
:focus-visible {
  outline: 3px solid var(--color-foco);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Screen readers only */
.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;
}

/* CLAUDE.md rule 7: respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
