/* Reset, page container, and the element defaults every section inherits. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Wide mockups must never widen the page on a phone. */
  overflow-x: hidden;
}

/* 16px side gutter at phone width. */
.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 5.5rem 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 36rem;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 3rem;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

kbd {
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 0 0.35em;
  background: var(--surface);
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  /* Long commands scroll rather than widening the page on a phone. */
  overflow-x: auto;
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
}

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

:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.2;
}

.btn:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-fg);
}
