:root {
  --paper: #f5f0e6;
  --ink: #171714;
  --muted: #625f57;
  --orange: #ff6846;
  --orange-dark: #b63a20;
  --yellow: #f2ce59;
  --white: #fffdf8;
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino,
    Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgb(23 23 20 / 2.4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 23 20 / 2.4%) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid #4967c9;
  outline-offset: 3px;
}

header,
main,
footer {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
}

header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}

main {
  padding: 85px 0 110px;
}

.kicker {
  margin: 0 0 16px;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: clamp(58px, 9vw, 94px);
  line-height: 0.94;
}

.lead {
  max-width: 670px;
  margin-bottom: 70px;
  color: #45433d;
  font-size: 20px;
}

section {
  padding: 30px 0;
  border-top: 1px solid rgb(23 23 20 / 18%);
}

section:last-child {
  border-bottom: 1px solid rgb(23 23 20 / 18%);
}

h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.05;
}

section p {
  max-width: 700px;
  margin: 0 0 12px;
  color: var(--muted);
}

section p:last-child {
  margin-bottom: 0;
}

footer {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgb(23 23 20 / 18%);
  color: var(--muted);
  font-size: 12px;
}

footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.errorPage {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.errorPage main {
  align-self: center;
  padding-top: 70px;
}

.errorPage .lead {
  margin-bottom: 35px;
}

.homeButton {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 17px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--orange);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.homeButton:hover {
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-2px, -2px);
}

::selection {
  color: var(--ink);
  background: var(--yellow);
}

@media (max-width: 600px) {
  header,
  main,
  footer {
    width: min(100% - 28px, 820px);
  }

  header {
    min-height: 76px;
  }

  .back {
    font-size: 12px;
  }

  main {
    padding: 62px 0 82px;
  }

  .lead {
    margin-bottom: 52px;
    font-size: 18px;
  }
}
