/* Navigation: a menu button on phones, a row of links from 48em. */

.site-header {
  padding: 1.1rem 0;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  column-gap: 0.6rem;
}

.wordmark {
  display: inline-block;
  line-height: 0;
}

.wordmark-logo {
  display: block;
  width: 6.875rem;
  height: 1.375rem;
}

.nav-toggle {
  font: inherit;
  font-weight: 500;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.nav-links {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0 0.25rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
  list-style: none;
}

.nav.is-open .nav-links,
html:not(.js) .nav-links {
  display: flex;
}

.nav-links a {
  display: inline-block;
  padding: 0.35rem 0;
  text-decoration: none;
  color: var(--slate);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

@media (min-width: 48em) {
  .site-header {
    padding: 1.75rem 0;
  }

  .nav {
    display: flex;
    gap: 1.5rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-links,
  html:not(.js) .nav-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin: 0 0.5rem 0 auto;
    padding: 0;
    border: 0;
    order: 1;
  }

  .nav .button-small {
    order: 2;
  }
}

/* Very narrow phones: the hero repeats the call to action, so the header keeps the logo and name */

@media (max-width: 22em) {
  .nav .button-small {
    display: none;
  }

  .nav {
    grid-template-columns: 1fr auto;
  }
}
