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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--action-hover);
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(3rem, 7.4vw, 7rem);
}

h2 {
  font-size: clamp(2.2rem, 4.3vw, 4.5rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

h4 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

ul,
ol {
  padding-left: 1.2em;
}

::selection {
  background: var(--brick-500);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--brick-500);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 3rem);
}

.reading-width {
  max-width: var(--reading-max);
}

.section {
  border-bottom: 1px solid var(--border);
  padding-block: clamp(4rem, 8vw, 8rem);
}

.section--dark {
  background: var(--surface-dark);
  border-color: var(--border-dark);
  color: var(--text-inverse);
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.eyebrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section--dark .eyebrow {
  color: var(--text-inverse-muted);
}

.eyebrow::before {
  color: var(--action);
  content: "// ";
}

.lead {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.45;
}

.section--dark .lead {
  color: var(--text-inverse-muted);
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.875rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  transform: translateY(-180%);
  background: var(--paper-50);
  border: 2px solid var(--brick-500);
  color: var(--ink-900);
  padding: 0.7rem 1rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.no-js {
  background: var(--amber-50);
  border-bottom: 1px solid #d9bd76;
  color: var(--amber-700);
  padding: 0.75rem 1rem;
  text-align: center;
}
