/* ==========================================================================
   base.css — reset, document defaults, shared primitives.
   No component styling lives here.
   ========================================================================== */

/* Brand webfonts go here when supplied:
@font-face {
  font-family: "Brand Sans";
  src: url("../assets/fonts/brand-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
*/

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

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

  -webkit-text-size-adjust: 100%;
  /* Smooth scrolling for anchor jumps (the skip link, any in-page link) and for
     scripted scrolls. Wheel and trackpad gestures are still the OS's own
     inertia — browsers do not hand that over, and hijacking it in script would
     put a second easing curve in front of the globe's scatter and the copy's
     ink, both of which read scroll position directly. Reduced-motion turns it
     back to instant via the block at the foot of this file. */
  scroll-behavior: smooth;
  /* The clip lives here, not on body: overflow propagates from body to the
     viewport only when html is itself `visible`, and once html has a value of
     its own that propagation stops — so a body-only rule leaves the document
     scroller untouched. `clip` rather than `hidden` because hidden would make
     this a scroll container and reparent the sticky header. */
  overflow-x: clip;
}

body,
h1, h2, h3, p, figure, blockquote, ul, ol {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  /* No overflow of its own. An overflow value here — even `clip` — makes BODY
     the scroll container for every sticky descendant, and a body that is as tall
     as its content never scrolls: the pinned scene simply travelled with the
     page and never stuck. Horizontal overflow is contained by the field, which
     is fixed and clips itself. */
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink-muted); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Primitives ---------------------------------------------------------- */

/* The container the header rail uses. --wrap-max is the CONTENT width (1440px,
   matching .site-header__inner), so the gutters are added outside it rather
   than eaten from it — otherwise every section sits one gutter inboard of the
   nav links it is supposed to align with. */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap-max) + var(--wrap-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--wrap-gutter);
}

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

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  z-index: 10;
  padding: var(--space-xs) var(--space-sm);
  background: var(--ink);
  color: var(--surface);
  font-size: var(--step--1);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--surface); }

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


/* --- Cursor ---------------------------------------------------------------
   No I-beam. The page is a single composed image — a field of characters with a
   form cut out of it — and an insertion caret over that invites a selection the
   design has no use for. The arrow everywhere, the hand on anything that acts:
   set on the elements themselves rather than a blanket rule with exceptions, so a
   nested span inside a link cannot inherit the arrow back. */

body { cursor: default; }

a,
button,
[role="button"],
label,
summary {
  cursor: pointer;
}

/* Fields still take a caret — an input without one looks broken. */
input,
textarea,
select { cursor: auto; }
