@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-400.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/newsreader-500.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/atkinson-400.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/atkinson-700.woff2") format("woff2");
}

:root {
  --paper: #f3efe6;
  --ink: #1c1915;
  --muted: #433e36;
  --line: #d4cbbd;
  --accent: #7a2f26;
  --panel: #fffaf3;
  --serif: "Newsreader", "Iowan Old Style", Palatino, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
}

[data-site="ai"] {
  --paper: #e7eee9;
  --ink: #14201b;
  --muted: #31443b;
  --line: #c5d2cb;
  --accent: #0c5a48;
  --panel: #f4faf6;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a, button { touch-action: manipulation; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
}

.skip:focus,
.skip:focus-visible { top: 1rem; }

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

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.site-header,
main,
.site-footer {
  width: min(68rem, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "mark other"
    "nav nav";
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  padding: 0.85rem 0 0;
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--line);
}

.wordmark { grid-area: mark; }

.site-header nav { grid-area: nav; }

.wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 5.4vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a,
.other,
.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.site-header nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--accent); }

.other {
  grid-area: other;
  justify-self: end;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

main { padding: 2.5rem 0 4rem; }

.kicker {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  scroll-margin-top: 1.25rem;
}

h1 {
  margin: 0;
  max-width: min(14ch, 100%);
  font-size: clamp(2.35rem, 11vw, 5.4rem);
  text-wrap: balance;
}

h2, h3, .lede { text-wrap: pretty; }

h2 { margin: 2.5rem 0 0.8rem; font-size: clamp(1.7rem, 3vw, 2.2rem); }

h3 { margin: 0; font-size: 1.25rem; }

.lede, .note { color: var(--muted); }

.lede { max-width: 38rem; font-size: 1.2rem; }

.hero-cta, .band p:last-child { margin-top: 1.4rem; }

.button {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.button:hover,
.button:active { background: var(--accent); color: var(--paper); }

.stack, .steps, .facts { margin: 0; padding: 0; }

.stack { list-style: none; }

.stack li, .service h2 { border-top: 1px solid var(--line); }

.stack li { padding: 1rem 0; }

.stack p, .steps p, .facts + .note { margin: 0.35rem 0 0; }

.index { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }

.index a {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.index a:hover,
.index a:active { color: var(--accent); }

.index span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.index em { color: var(--muted); font-style: normal; overflow-wrap: anywhere; }

.steps { list-style: none; display: grid; gap: 1rem; }

.steps li { padding-top: 0.8rem; border-top: 1px solid var(--line); }

.facts { padding-left: 1.15rem; }

.facts li + li { margin-top: 0.35rem; }

.service ul, .service ol { margin-top: 0.4rem; }

.band { margin-top: 2.5rem; padding-top: 0.2rem; }

.lead { max-width: 38rem; }

.lead label { display: block; margin-top: 1rem; font-weight: 700; }

.lead label span { color: var(--muted); font-weight: 400; }

.lead input, .lead textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.lead button {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}

.lead button:hover,
.lead button:active { background: var(--accent); border-color: var(--accent); }

.lead input[aria-invalid="true"],
.lead textarea[aria-invalid="true"] { border-color: var(--accent); }

.field-error { min-height: 1.2em; margin: 0.2rem 0 0; color: var(--accent); }

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.site-footer {
  padding: 1.5rem 0 calc(2.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p { margin: 0 0 0.6rem; }

@media (min-width: 48rem) {
  .site-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.8rem 1.5rem;
    padding: 1.1rem 0 0.35rem;
  }

  .wordmark,
  .site-header nav,
  .other { grid-area: auto; }

  .site-header nav { margin-left: 0.25rem; }

  .site-header nav a { min-height: 0; padding-bottom: 0.7rem; }

  .other { margin-left: auto; }

  .index a {
    grid-template-columns: 3rem minmax(12rem, 18rem) 1fr;
    align-items: baseline;
    column-gap: 1rem;
  }
}

@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
