/* =============================================================================
   base.css — reset, document defaults, type scale
   ========================================================================== */

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

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { font-family: var(--font-ui); cursor: pointer; }

::selection { background: var(--ink); color: var(--white); }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

/* Keyboard users land here first; invisible until focused. */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 14px 20px;
  font-size: var(--size-xs);
  letter-spacing: var(--track-btn);
  text-transform: uppercase;
}
.skip-link:focus { inset-inline-start: 0; }

.wrap {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------- type scale */

h1 { font-size: var(--h1); font-weight: 400; line-height: 1.06; letter-spacing: var(--track-tight); }
h2 { font-size: var(--h2); font-weight: 400; line-height: 1.12; letter-spacing: -.015em; }
h3 { font-size: var(--h3); font-weight: var(--weight-med); line-height: 1.25; letter-spacing: -.01em; }

.small { font-size: var(--size-sm); }

.label {
  font-size: var(--size-2xs);
  font-weight: var(--weight-med);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Screen-reader-only, for labels that must exist but not be seen. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  h1 { font-weight: var(--weight-bold); letter-spacing: -.025em; }
  h2 { font-weight: var(--weight-bold); letter-spacing: var(--track-tight); }
  h3 { font-weight: var(--weight-bold); }
  .label { font-weight: var(--weight-bold); }
}

/* --------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
