/* ===========================================================================
   Reset, typography, layout primitives
   =========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

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

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;              /* Instrument Serif ships one weight by design */
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  color: var(--ink-strong);
  text-wrap: balance;
}

/* --- Uppercase chrome label -------------------------------------------------
   Robin's "INTERACTIVE DESIGNER" / "OPEN CASE STUDY" move: tiny, wide-tracked
   sans against an enormous serif. The contrast is the whole point. */
.label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink-muted);
}

/* --- Focus ------------------------------------------------------------------ */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Screen-reader-only ----------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 1000;
  padding: var(--sp-2) var(--sp-4);
  /* Fixed pair, not --ink/--bg: see the comment on --skip-link-bg in
     tokens.css for why reusing --ink here went nearly unreadable on some home
     carousel slides. */
  background: var(--skip-link-bg);
  color: var(--skip-link-ink);
  border-radius: var(--r-btn);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* --- Layout primitives ------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Body copy with the orange rule carried over from the Figma prototype. */
.quote-rule {
  border-left: 2px solid var(--accent);
  padding-left: var(--sp-5);
  max-width: var(--measure);
}
.quote-rule p { color: var(--ink-muted); }
.quote-rule strong { color: var(--ink-strong); font-weight: 600; }

.quote-rule--ink { border-left-color: var(--hairline); }

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
  color: var(--ink-muted);
}

/* Selection picks up the accent rather than the browser default blue. */
::selection { background: var(--accent); color: #100E0C; }
