/* ============================================================
   MiTax — Base reset + typography
   Modern reset (Comeau-inspired, not copied verbatim)
   ============================================================ */

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

* { margin: 0; padding: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100dvh;
  background: var(--snow);
  color: var(--ink);
  font-family: "Unitea Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: var(--tr-body);
  text-wrap: pretty;
  overflow-x: hidden;
}

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

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

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

p, li { max-width: var(--measure); }

ul, ol { list-style: none; }

a {
  color: var(--primary-500);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: oklch(0.535 0.245 261 / 0.35);
  transition: text-decoration-color var(--dur-fast) var(--ease-out-quart),
              color var(--dur-fast) var(--ease-out-quart);
}

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

a.unstyled, .unstyled a { text-decoration: none; color: inherit; }

:focus-visible {
  outline: 3px solid var(--primary-100);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--primary-100);
  color: var(--primary-700);
}

/* ============================================================
   Headings — fluid clamp() per DESIGN.md
   ============================================================ */

.h-display, .h-1, .h-2, .h-3, .h-4 {
  font-family: inherit;
  font-weight: 700;
  text-wrap: balance;
  color: var(--ink);
}

.h-display {
  font-size: clamp(2.5rem, 1.2rem + 5.5vw, 4.5rem);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-display);
}

.h-1 {
  font-size: clamp(2.125rem, 1.1rem + 4.2vw, 3.375rem);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-display);
}

.h-2 {
  font-size: clamp(1.75rem, 1rem + 3vw, 2.5rem);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-head);
}

.h-3 {
  font-size: clamp(1.375rem, 0.95rem + 1.8vw, 1.875rem);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-head);
}

.h-4 {
  font-size: clamp(1.125rem, 0.95rem + 0.7vw, 1.375rem);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-head);
}

.lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.7vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-700);
  max-width: 60ch;
}

.eyebrow {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: var(--tr-caption);
  text-transform: none;
  color: var(--ink-500);
}

.muted { color: var(--ink-500); }

.center { text-align: center; }

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

/* Respect reduced motion globally */
@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;
  }
}
