/* ==========================================================================
   Base — reset, document, and the primitives every section is built from
   ========================================================================== */

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

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

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

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* The UA's [hidden] rule is a bare attribute selector and loses to any class
   that sets display. Without this, `.cv__working { display: grid }` renders a
   permanently-visible progress bar that is supposed to be hidden. */
[hidden] { display: none !important; }

img,
video { height: auto; }

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Visible, on-brand focus. Two rings so it reads on pink and on black alike. */
:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--charcoal);
}

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

.skip-link {
  position: absolute;
  top: 0; left: 0;
  z-index: 999;
  padding: var(--s-2) var(--s-3);
  background: var(--mint);
  color: var(--on-mint);
  font-weight: 700;
  transform: translateY(-120%);
  transition: transform var(--t-fast) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* --- Type primitives ---------------------------------------------------- */

/* The tiny stamp labels the campaign prints in every poster corner. */
.micro {
  font-family: var(--font-body);
  font-size: var(--micro-size);
  font-weight: 600;
  letter-spacing: var(--micro-track);
  text-transform: uppercase;
  line-height: 1.2;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: var(--measure);
  text-wrap: pretty;
}

.prose { max-width: var(--measure); text-wrap: pretty; }
.prose p + p { margin-top: 1em; }

/* --- Layout primitives -------------------------------------------------- */

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

.stack > * + * { margin-top: var(--flow, var(--s-3)); }

/* --- Surfaces -----------------------------------------------------------
   Each ground carries a fixed ink, taken from the measured contrast table in
   tokens.css. Mint, tan and bubblegum ALWAYS take charcoal: cream on any of
   the three lands between 1.31 and 1.93:1, i.e. invisible. */
.on-charcoal  { background: var(--charcoal);  color: var(--cream); }
.on-cream     { background: var(--cream);     color: var(--charcoal); }
.on-mint      { background: var(--mint);      color: var(--on-mint); }
.on-tan       { background: var(--tan);       color: var(--on-tan); }
.on-bubblegum { background: var(--bubblegum); color: var(--on-bubblegum); }

/* The masthead is fixed and opaque, so an in-page anchor would otherwise drop
   its target underneath it. Offset every jump target by the band's height. */
:where(section[id], [id="main"]) { scroll-margin-top: 76px; }
@media (min-width: 62rem) { :where(section[id], [id="main"]) { scroll-margin-top: 126px; } }
