/* ============================================================
 * base.css — Reset, font import, and default element styles
 * ============================================================
 * Loads Inter Variable from Google Fonts.
 * Applies modern minimal reset (box-sizing, margin/padding).
 * Sets default typography from tokens.css.
 *
 * Depends on: tokens.css (must be loaded first in <link> order)
 * ============================================================ */

/* Inter font is loaded via <link> in index.html for parallel fetch (no @import). */

/* ----- 1. Universal box-sizing ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ----- 2. Document root ----- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -moz-tab-size: 4;
  tab-size: 4;
}

/* ----- 3. Body defaults ----- */
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ----- 4. Heading defaults ----- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

/* ----- 5. Paragraph + text element resets ----- */
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ----- 6. Media defaults ----- */
img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ----- 7. Form element defaults ----- */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; background: none; border: none; padding: 0; }

/* ----- 8. Link defaults ----- */
a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover { color: var(--text-link-hover); }

/* ----- 9. Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
