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

/* Self-hosted fonts (SIL OFL license, latin subset, woff2), cached by
   sw.js like the rest of the app shell — the only external request this
   app would otherwise make is to fonts.googleapis.com, which doesn't
   work offline. */
@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(--text-base);
  /* Smooth theme transitions (respects prefers-reduced-motion in
     base.css). Both color and background-color are needed because
     different elements use different variables. */
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

h1 { font-size: var(--text-title); line-height: 1.2; }
h2 { font-size: var(--text-large); 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(--accent); }

/* Visible focus on every interactive element */
:focus-visible {
  outline: 3px solid var(--color-focus);
  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;
}

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