/* The page shell: fonts, base, skip link, header, sections and footer. */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding-inline: var(--gutter);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}
.wrap { max-inline-size: var(--page-max); margin-inline: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-block-size: var(--tap);
  padding-inline: var(--space-4);
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Header: the logo to the top, and the sections. Too narrow for one row (a zoomed-in phone), the nav goes under the logo */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  padding-block: var(--space-3);
  border-block-end: 1px solid var(--line);
}
.brand { display: flex; align-items: center; min-block-size: var(--tap); color: var(--text); }
.brand svg { display: block; block-size: var(--logo-h); inline-size: auto; fill: currentColor; }
.brand .acc { fill: var(--accent); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-fluid-s); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--tap);
  min-inline-size: var(--tap);
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav a:hover { color: var(--text); }
.site-nav .nav-hello { color: var(--text); font-weight: var(--weight-semibold); }
/* Phones keep the nav on one row: short names, and Story is left to scrolling */
.nav-s { display: none; }
@media (width < 640px) {
  .nav-l, .site-nav .nav-story { display: none; }
  .nav-s { display: inline; }
}

/* Sections: each task fills its own */
main > section:not(.hero) { padding-block-start: var(--space-fluid-xl); }
h1 {
  margin: 0;
  font-size: var(--text-display);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-semibold);
  text-wrap: balance;
}
.hero { padding-block: var(--space-fluid-xl); }
/* A section's top line and intro: the headline on the start side, the words and what it covers on the end side */
.sec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-block-size: var(--tap);
  border-block-end: 1px solid var(--line);
}
.sec-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--space-7) var(--space-18);
  align-items: start;
  padding-block: var(--space-fluid-l) var(--space-fluid-m);
}
.sec-intro h3 {
  margin: 0;
  max-inline-size: 16ch;
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
.sec-intro p { margin: 0; max-inline-size: 52ch; color: var(--muted); font-size: var(--text-lead); }
.sec-caps { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block: var(--space-4) 0; padding: 0; list-style: none; }
.sec-caps li {
  padding-block: var(--space-1);
  padding-inline: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: var(--text-sm);
}
@media (width < 760px) {
  .sec-intro { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
}
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--accent-text);
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  margin-block-start: var(--space-fluid-xl);
  padding-block: var(--space-3);
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-md);
}
.site-footer p { margin: 0; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--tap);
  min-inline-size: var(--tap);
  color: var(--text);
  font-weight: var(--weight-medium);
  text-decoration-color: var(--line);
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
.site-footer a:hover { text-decoration-color: currentColor; }
