/* =============================================================================
   STYLES.CSS — Reset + base element styling
   Load order: tokens → styles → typography → layout → components → animations
   → responsive
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--weight-book);
  line-height: var(--lh-body);
  color: var(--text-strong);
  background: var(--surface-page);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Respect user motion preference everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

ul, ol { list-style: none; }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--brand-accent);
  color: var(--text-on-accent);
}

/* Thin, warm scrollbar to match the palette */
* { scrollbar-width: thin; scrollbar-color: var(--ink-a30) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--ink-a30); border-radius: var(--radius-pill); }
*::-webkit-scrollbar-track { background: transparent; }

/* Visually-hidden (a11y) */
.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;
}
