/* Styles for the shared navbar rendered by js/nav.js */

/* Reserves the navbar's height so the page doesn't jump while the script runs. */
site-nav {
  display: block;
  min-height: var(--nav-height);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-height);
  padding: 0 var(--gutter);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav__logo img {
  width: var(--header-logo-width);
  height: auto;
}

.nav__menu ul {
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.8vw, 40px);
  font-size: 15px;
  font-weight: 500;
}

.nav__menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  color: var(--text);
  transition: color 0.2s ease;
}

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

.nav__menu svg {
  width: 12px;
  height: 12px;
}

.nav__cta {
  justify-self: end;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  align-content: center;
  justify-self: end;
  gap: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.nav__toggle:focus-visible,
.nav-overlay__close:focus-visible {
  outline: 2px solid #75e4ce;
  outline-offset: 4px;
}

.nav__toggle span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.nav-overlay[hidden] {
  display: none !important;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at 88% 16%, rgba(35, 88, 240, .22), transparent 35%),
    linear-gradient(135deg, #0f172a, #111d35 65%, #102642);
  color: #fff;
  animation: nav-overlay-in .24s ease both;
}

@keyframes nav-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nav-overlay__inner {
  display: flex;
  width: min(100%, 1000px);
  min-height: min(100%, 720px);
  flex-direction: column;
  justify-self: center;
}

.nav-overlay__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-overlay__brand img {
  width: clamp(148px, 22vw, 205px);
}

.nav-overlay__close {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .32);
  background: transparent;
  cursor: pointer;
}

.nav-overlay__close span {
  position: absolute;
  width: 19px;
  height: 1px;
  background: #fff;
}

.nav-overlay__close span:first-child {
  transform: rotate(45deg);
}

.nav-overlay__close span:nth-child(2) {
  transform: rotate(-45deg);
}

.nav-overlay__close span:last-child {
  display: none;
}

.nav-overlay__menu {
  display: flex;
  flex: 1;
  align-items: center;
  padding-block: clamp(40px, 9vh, 96px);
}

.nav-overlay__menu ul {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.nav-overlay__menu li {
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.nav-overlay__menu a {
  display: grid;
  grid-template-columns: 58px 1fr 32px;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  min-height: clamp(76px, 12vh, 112px);
  padding: 8px 0;
}

.nav-overlay__number {
  width: fit-content;
  color: transparent;
  background: linear-gradient(110deg, #71a0ff 0%, #75e4ce 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
}

.nav-overlay__label {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 300;
  letter-spacing: -.045em;
  line-height: 1.1;
  transition: color .2s ease, transform .2s ease;
}

.nav-overlay__arrow {
  color: rgba(255, 255, 255, .45);
  font-size: 22px;
  transition: color .2s ease, transform .2s ease;
}

.nav-overlay__menu a:hover .nav-overlay__label,
.nav-overlay__menu a[aria-current="page"] .nav-overlay__label {
  color: #fff;
  transform: translateX(5px);
}

.nav-overlay__menu a:hover .nav-overlay__arrow {
  color: #75e4ce;
  transform: translate(3px, -3px);
}

.nav-overlay__note {
  color: rgba(255, 255, 255, .52);
  font-size: 13px;
  letter-spacing: .02em;
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto;
    padding-inline: 16px;
  }

  .nav__menu {
    display: none;
  }

  .nav__cta {
    display: none;
  }

  .nav__toggle {
    display: grid;
  }
}

@media (max-width: 480px) {
  .nav-overlay {
    padding-inline: 20px;
  }

  .nav-overlay__menu a {
    grid-template-columns: 38px 1fr 24px;
    gap: 10px;
  }

  .nav-overlay__number {
    font-size: 12px;
  }

  .nav-overlay__label {
    font-size: clamp(34px, 10vw, 48px);
  }
}
