/* ===== Reset + Base Typography =====
 * Minimal modern reset (inspired by Andy Bell + Tailwind preflight),
 * plus global type defaults using tokens.
 */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--bg-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button { background: none; border: 0; cursor: pointer; }

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--brand-primary-d); }

ul, ol { padding: 0; list-style: none; }

p { line-height: var(--lh-normal); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -.01em;
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

::selection { background: var(--brand-primary); color: #fff; }

/* Focus ring */
:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-ring);
  border-radius: var(--radius-sm);
}

/* Utility text colors */
.text-dark  { color: var(--text-dark); }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--brand-primary); }
.text-accent{ color: var(--accent); }

/* Headings on dark sections */
.on-dark, .on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark h5, .on-dark h6 {
  color: #fff;
}
.on-dark p { color: rgba(255,255,255,.78); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-primary); color: #fff;
  padding: .75rem 1rem; z-index: 999;
}
.skip-link:focus { left: 0; }

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