:root {
  --paper: #f7f5f0;
  --ink: #16181d;
  --muted: #5b5f66;
  --rule: #dcd8ce;
  --accent: #b4441f;
  --on-accent: #ffffff;
  --band: #16181d;
  --band-ink: #f7f5f0;
  --band-muted: #b4b7bd;
  --band-rule: #2f3238;

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121316;
    --ink: #ecebe6;
    --muted: #a3a6ad;
    --rule: #2a2c31;
    --accent: #e8825c;
    --on-accent: #121316;
    --band: #1b1d21;
    --band-ink: #ecebe6;
    --band-muted: #a3a6ad;
    --band-rule: #2f3238;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1, h2, h3, p, ol {
  margin: 0;
}

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.mark-accent {
  fill: var(--accent);
}

.header-link {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.header-link:hover {
  color: var(--ink);
}

/* Hero */

.hero {
  padding-block: clamp(4rem, 12vw, 9rem) clamp(3.5rem, 9vw, 7rem);
}

.eyebrow {
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  max-width: 17ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.375rem, 6.5vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  max-width: 36rem;
  margin-top: 1.75rem;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
}

/* Sections */

.section-grid {
  display: grid;
  gap: 1.5rem;
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .section-grid {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 2rem;
  }
}

.section-label {
  padding-top: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.services {
  padding: 0;
  list-style: none;
}

.service {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
}

.service:first-child {
  padding-top: 0;
  border-top: 0;
}

.service:last-child {
  padding-bottom: 0;
}

.num {
  grid-row: span 2;
  padding-top: 0.4rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.service h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
}

.service p {
  color: var(--muted);
}

@media (min-width: 60rem) {
  .service {
    grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 2rem;
  }

  .num {
    grid-row: auto;
  }

  .service p {
    padding-top: 0.2rem;
  }
}

.about {
  max-width: 40rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.5;
}

/* Contact band and footer */

.band {
  background: var(--band);
  color: var(--band-ink);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.contact p {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: var(--band-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.button:hover {
  background: transparent;
  color: var(--band-ink);
}

.button span {
  transition: transform 0.15s;
}

.button:hover span {
  transform: translateX(3px);
}

.site-footer {
  display: grid;
  gap: 0.25rem;
  padding-block: 1.5rem 2rem;
  font-size: 0.875rem;
  color: var(--band-muted);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--band-rule);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
