/* Material · base: reset, named text styles, utilities. Loaded on every page, before design.css. */

*, *::before, *::after { box-sizing: border-box; }
html { font-synthesis: none; scrollbar-color: var(--color-text-3) var(--color-bg); }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--color-accent);
}
::selection { background: rgb(60 165 213 / 0.3); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
img, video, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
p { text-wrap: pretty; }
:is(h1, h2, h3, h4) { text-wrap: balance; }

/* ── Named text styles ─────────────────────────────────────────────────────
   One step per job, every step distinct at every width. Nickel never under 36px. */

/* Display: Nickel Gothic. display-xl is the one off-scale size: the hero headline, fitted to the line by width. */
.display-xl, .display-1, .display-2, .heading-1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "wdth" var(--wdth, var(--wdth-condensed));
}
.display-xl { font-size: min(26svh, 24vw); line-height: 0.86; }
.display-1 { font-size: var(--text-9xl); line-height: 1; }
.display-2 { font-size: var(--text-8xl); line-height: 1; }
.heading-1 { font-size: var(--text-6xl); line-height: 1; }

/* Small headings in Adapter: a condensed gothic loses its voice under 36px */
.heading-2, .heading-3 { margin: 0; font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.02em; }
.heading-2 { font-size: var(--text-3xl); line-height: var(--leading-3xl); }
.heading-3 { font-size: var(--text-2xl); line-height: var(--leading-2xl); }

/* Text: what you read. 16px is the floor; bigger steps are ledes */
.body-1, .body-2, .body-3 { margin: 0; font-family: var(--font-sans); font-weight: 400; }
.body-1 { font-size: var(--text-base); line-height: var(--leading-base); }
.body-2 { font-size: var(--text-xl); line-height: var(--leading-xl); }
.body-3 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em; }

.button-sm { font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); line-height: var(--leading-sm); }

/* Captions are data: addresses, hours, code. Adapter Mono. */
.caption-1, .caption-2 { margin: 0; font-family: var(--font-mono); font-weight: 400; font-variant-numeric: tabular-nums; }
.caption-1 { font-size: var(--text-sm); line-height: var(--leading-sm); }
.caption-2 { font-size: var(--text-xs); line-height: var(--leading-xs); }

@media (max-width: 64rem) {
  .display-1 { font-size: var(--text-8xl); }
  .display-2 { font-size: var(--text-7xl); }
  .heading-1 { font-size: var(--text-5xl); }
}
@media (max-width: 40rem) {
  .display-1 { font-size: var(--text-6xl); }
  .display-2 { font-size: var(--text-5xl); }
  .heading-1 { font-size: var(--text-4xl); line-height: var(--leading-4xl); }
  .body-2 { font-size: var(--text-lg); line-height: var(--leading-lg); }
}

/* Hero headline color: paper to grey, left to right */
.text-gradient { background: var(--gradient-title); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* A fitted line: its width is set by the fit script through --wdth */
[data-fit] { display: block; width: max-content; white-space: nowrap; font-variation-settings: "wdth" var(--wdth, var(--wdth-condensed)); }

/* ── Utilities ─────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed; top: var(--space-200); left: var(--space-200); z-index: var(--z-skip);
  padding: var(--space-75) var(--space-100);
  background: var(--color-accent); color: var(--color-accent-ink); text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* Scroll reveal: rise 32px and fade, once */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Image slots: the photo when there is one, a print sheet when there is not */
[data-slot] { position: relative; overflow: hidden; background: var(--color-bg-2); }
[data-slot] > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { transform: none; transition: opacity var(--dur-fade) linear; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
