:root {
  --ink: #111111;
  --muted: #6f665c;
  --line: #ded3c4;
  --white: #ffffff;
  --header-bg: #f7f1e8;
  --brand-bg: #f7f1e8;
  --brand-accent: #0b376d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--header-bg);
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: relative;
  z-index: 80;
  width: 100%;
  min-height: 78px;
  padding: 0 clamp(20px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 28px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  justify-self: start;
  font-size: clamp(0.98rem, 1.8vw, 1.18rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(28px, 5vw, 58px);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.main-nav a {
  position: relative;
  padding: 30px 0 28px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-button {
  width: 40px;
  height: 40px;
  display: none;
  place-items: center;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.menu-button .fa {
  display: block;
  font-size: 1.28rem;
  line-height: 1;
}

.menu-button .fa-bars::before {
  content: "\f0c9";
}

.menu-button .fa-times::before {
  content: "\f00d";
}

.nav-backdrop {
  display: none;
}

@media (max-width: 720px) {
  .site-header {
    min-height: auto;
    padding: 16px 16px 12px;
    grid-template-columns: 1fr 40px;
    gap: 8px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    font-size: 0.95rem;
    letter-spacing: 2px;
  }

  .header-actions {
    display: contents;
  }

  .menu-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    position: relative;
    z-index: 100;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: min(82vw, 320px);
    height: 100vh;
    padding: 96px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    background: var(--header-bg);
    border-right: 1px solid var(--line);
    font-size: 1rem;
    letter-spacing: 2px;
    transform: translateX(calc(-100% - 48px));
    transition: transform 260ms ease, box-shadow 260ms ease;
  }

  .main-nav.is-open {
    box-shadow: 18px 0 44px rgba(17, 17, 17, 0.1);
    transform: translateX(0);
  }

  .main-nav a {
    width: 100%;
    padding: 16px 0;
    border-bottom: 0;
    white-space: nowrap;
    letter-spacing: 2px;
  }

  .main-nav a::after {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: rgba(17, 17, 17, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
}
