/* Reset + base typography. */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

p { margin: 0; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

ul, ol { margin: 0; }

/* Typographic helpers from the handoff scale. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--amber);
}

.mono { font-family: var(--font-mono); }

.meta {
  font-size: 13px;
  color: var(--faint);
}

.muted { color: var(--sub); }

.display-italic {
  font-family: var(--font-display);
  font-style: italic;
}

/* Page entrance: translateY only, never opacity (handoff bug note). Honors
   reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  main.page:not(.page-flat) {
    animation: page-enter 0.28s ease both;
  }
  @keyframes page-enter {
    from { transform: translateY(8px); }
    /* End at `none`, not translateY(0): a resolved transform left on main.page
       (forwards-fill) would make it the containing block for any position:fixed
       descendant — e.g. the Submit modal overlay — anchoring it to main instead
       of the viewport. `none` avoids establishing that containing block. */
    to { transform: none; }
  }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
