/* Base — reset, type, links, forms, banner */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--duration-hover) var(--ease-hover);
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--e-focus);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--space-2);
  top: var(--space-2);
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: var(--space-2) var(--space-4);
  box-shadow: var(--e-focus);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-h1);
  margin: var(--space-2) 0 var(--space-4);
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  letter-spacing: var(--tracking-h2);
  margin: var(--space-7) 0 var(--space-3);
}

h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  letter-spacing: var(--tracking-h3);
  margin: var(--space-5) 0 var(--space-2);
}

p {
  margin: 0 0 var(--space-4);
  max-width: var(--measure);
  text-wrap: pretty;
}

.lede {
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
  letter-spacing: var(--tracking-lead);
  color: var(--text-secondary);
  max-width: var(--measure);
}

.eyebrow {
  font-size: var(--text-eyebrow);
  line-height: var(--leading-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: var(--weight-medium);
  margin: 0 0 var(--space-3);
}

.rule {
  margin: var(--space-7) 0;
  border: 0;
  box-shadow: var(--e-divider-top);
  height: 1px;
}

/* Letter banner */
.banner {
  display: block;
  background: var(--accent);
  color: var(--n-0);
  text-align: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-small);
  text-decoration: none;
  transition: background var(--duration-hover) var(--ease-hover);
}

.banner:hover,
.banner:focus {
  background: var(--accent-hover);
  color: var(--n-0);
}

.banner span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Forms */
form {
  margin: var(--space-5) 0 0;
  max-width: var(--prose);
}

.field {
  margin-bottom: var(--space-5);
}

label {
  display: block;
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
  font-size: var(--text-body);
}

.optional {
  font-weight: var(--weight-regular);
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  font: inherit;
  font-size: var(--text-body);
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--e-field);
  field-sizing: content;
}

input:focus,
textarea:focus {
  box-shadow: var(--e-focus);
  outline: none;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

button {
  font: inherit;
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  background: var(--accent);
  color: var(--n-0);
  border: 0;
  border-radius: var(--radius-control);
  padding: 0.8rem 1.75rem;
  cursor: pointer;
  transition: background var(--duration-hover) var(--ease-hover);
}

button:hover {
  background: var(--accent-hover);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pending {
  display: inline-block;
  background: var(--bg-subtle);
  box-shadow: var(--e-card);
  border-radius: var(--radius-input);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-small);
  color: var(--text-muted);
  font-weight: var(--weight-regular);
}

.build-note {
  background: var(--bg-subtle);
  box-shadow: var(--e-card);
  border-radius: var(--radius-input);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-small);
  color: var(--text-secondary);
  margin: var(--space-5) 0;
}

.build-note p:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 120ms !important;
    scroll-behavior: auto !important;
  }
}
