/* MiTax - base.css
   Reset + globals. Keep small. */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

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

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

p { margin: 0 0 var(--sp-4); }

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tr-h1);
  font-weight: 700;
}
h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--tr-h2);
  font-weight: 700;
}
h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}

ul, ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); }
li { margin: 0 0 var(--sp-2); }

button { font-family: inherit; cursor: pointer; }

hr {
  border: 0;
  border-top: 1px solid var(--ink-100);
  margin: 0;
}

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

/* Layout helpers */
.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-500);
}

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

/* Narrow, centred content measure (CTA copy, prose intros) */
.wrap-narrow {
  max-width: var(--wrap-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Type utilities (shared, reusable on any page) ── */

/* Big fluid display heading for hero + statement sections */
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: 700;
  text-wrap: balance;
  margin: 0 0 var(--sp-5);
}
.h-xl {
  font-size: var(--fs-h1-xl);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 700;
  text-wrap: balance;
}

/* Lead paragraph - the one-sentence subtext under a heading */
.lede {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-700);
  text-wrap: pretty;
}

/* Gradient highlight (brand blue → teal). Apply to a <span> inside a
   heading for one emphasised word. Falls back to solid primary. */
.text-gradient {
  color: var(--primary);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .text-gradient { -webkit-text-fill-color: transparent; color: transparent; }
}

/* ── Scroll-reveal (progressive enhancement) ──
   Elements marked .reveal stay fully visible with no JS and when the
   user prefers reduced motion. The inline script in index.html adds
   `reveal-ready` to <html> only when motion is allowed, which arms the
   hidden→visible transition; the IntersectionObserver then adds
   .is-visible as each element scrolls into view. Animates opacity +
   transform only (compositor-friendly). */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger helpers for grids / lists */
.reveal-d1 { --reveal-delay: 60ms; }
.reveal-d2 { --reveal-delay: 120ms; }
.reveal-d3 { --reveal-delay: 180ms; }
.reveal-d4 { --reveal-delay: 240ms; }
.reveal-d5 { --reveal-delay: 300ms; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: var(--gutter);
  top: var(--sp-3);
  width: auto;
  height: auto;
  background: var(--ink);
  color: var(--snow);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  z-index: 1000;
}

:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--primary) 40%, transparent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

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