/* ========================================
   Base Styles — Reset, typography
   System fonts, clean, readable
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Safety net: stop any errant wide element from causing page-level
     horizontal scroll. `clip` (unlike `hidden`) doesn't create a scroll
     container, so position: sticky on the nav keeps working. */
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 700; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--color-primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.125rem; }
}
