/* Base reset + typography. Token-driven so dark mode auto-applies. */

*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-app);
  line-height: var(--leading-normal);
  min-height: 100vh;
  transition: background var(--duration-base) var(--ease-standard),
              color    var(--duration-base) var(--ease-standard);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

a { color: var(--accent); text-decoration: none; transition: opacity var(--duration-fast); }
a:hover { opacity: 0.8; }

img, svg { display: block; max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; }

button { background: none; border: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--accent-soft); color: var(--text-primary); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Subtle entry animation applied to .page-content on every route change.
   Adds 6px lift + fade — fast (220ms) so it's felt, not seen. The
   prefers-reduced-motion override in variables.css zeros all durations. */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-content > * {
  animation: page-enter var(--duration-base) var(--ease-emph) both;
}
@media (prefers-reduced-motion: reduce) {
  .page-content > * { animation: none; }
}
