/* ============================================================
   DEFUSION — Base Reset & Typography
   base.css
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--text-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-hero);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-lg); font-weight: var(--weight-medium); letter-spacing: 0; }
h4 { font-size: var(--text-base); font-weight: var(--weight-medium); letter-spacing: 0; }

/* Display headings use the serif display font */
.headline--display {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
}

p {
  max-width: 60ch;
  color: var(--text-body);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover { color: var(--text-primary); }

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { list-style: none; }

/* ── LAYOUT HELPERS ─────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--sm {
  max-width: var(--container-sm);
}

.section {
  padding-block: var(--space-12);
}

.section--tinted {
  background-color: var(--bg-tinted);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--c-offwhite);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--c-offwhite);
}

/* ── ACCESSIBILITY ──────────────────────────────────────── */

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

.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;
}

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