:root {
  --shell-display: "Space Grotesk", "Manrope", Arial, sans-serif;
  --shell-pale-cyan: #a8efff;
}

.page-shell {
  width: min(1180px, calc(100vw - 3rem));
  margin: 0 auto;
}

/* Homepage navigation */
.site-topbar.home-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  color: #ffffff;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.66), rgba(5, 10, 18, 0));
  transition: background 320ms ease, backdrop-filter 320ms ease;
}

.home-topbar.is-scrolled,
body.site-menu-is-open .home-topbar {
  background: rgba(5, 10, 18, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.home-topbar .site-topbar-inner {
  width: min(1180px, calc(100vw - 3rem));
  padding: 1rem 0;
  gap: 0.65rem;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  color: #ffffff;
  font-family: var(--shell-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  text-decoration: none;
}

.site-brand.home-brand img,
.home-brand img {
  width: 34px;
  height: 34px;
  max-width: none;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-left: auto;
}

.desktop-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.82rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.home-topbar .site-nav-actions {
  margin-left: 1rem;
}

.home-topbar .site-menu-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
}

.home-topbar .site-menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.home-topbar .site-menu-toggle span {
  transition: transform 180ms ease, opacity 180ms ease;
}

.home-topbar .site-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.home-topbar .site-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.home-topbar .site-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.home-topbar .site-mobile-menu.is-open {
  padding: 0.85rem 0 0.35rem;
}

.home-topbar .site-mobile-menu .site-menu-link {
  min-height: 46px;
  padding: 0.72rem 0.9rem;
  font-size: 0.7rem;
}

/* Homepage footer */
.home-footer {
  padding: 2.6rem 0 1.1rem;
  color: rgba(255, 255, 255, 0.68);
  background: #03070d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  width: min(860px, calc(100% - 3rem));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(2rem, 7vw, 5rem);
  row-gap: 1.65rem;
  margin: 0 auto;
  padding-bottom: 1.9rem;
}

.footer-brand {
  grid-column: 1 / -1;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
}

.footer-brand p {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
  line-height: 1.5;
}

.footer-nav {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.32rem;
  text-align: center;
}

.footer-nav p {
  margin: 0 0 0.18rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-nav a {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.77rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-nav a:hover,
.footer-bottom a:hover {
  color: var(--shell-pale-cyan);
}

.footer-bottom {
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
}

.footer-bottom a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

@media (min-width: 901px) {
  .home-topbar .site-menu-toggle,
  .home-topbar .site-mobile-menu {
    display: none !important;
  }
}

@media (max-width: 1020px) {
  .page-shell,
  .home-topbar .site-topbar-inner {
    width: min(100% - 2rem, 1180px);
  }

  .desktop-nav a {
    padding-inline: 0.62rem;
  }
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .home-topbar .site-nav-actions {
    margin-left: auto;
  }

  .home-topbar .site-menu-toggle {
    display: inline-flex;
  }

  .home-topbar .site-mobile-menu.is-open {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .home-topbar .site-mobile-menu-head {
    flex: 1 0 100%;
  }

  .home-topbar .site-mobile-menu .site-menu-link {
    flex: 0 1 calc((100% - 1rem) / 3);
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding-bottom: 1.5rem;
  }

  .home-footer {
    padding: 3rem 0 1.25rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    gap: 0.8rem;
    padding-bottom: 1.75rem;
  }

  .footer-brand p {
    max-width: 280px;
    line-height: 1.65;
  }

  .footer-nav {
    gap: 0.2rem;
  }

  .footer-nav p {
    margin-bottom: 0.45rem;
    font-size: 0.58rem;
    letter-spacing: 0.13em;
  }

  .footer-nav a {
    min-height: 34px;
    justify-content: center;
    font-size: 0.72rem;
  }

  .footer-bottom {
    align-items: center;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 1.15rem;
    border-top: 0;
    text-align: center;
  }
}

@media (max-width: 700px) {
  .page-shell,
  .home-topbar .site-topbar-inner {
    width: min(100% - 1.35rem, 1180px);
  }

  .home-topbar .site-topbar-inner {
    padding: 0.8rem 0;
  }

  .site-brand.home-brand img,
  .home-brand img {
    width: 31px;
    height: 31px;
  }

  .home-brand {
    gap: 0.55rem;
    font-size: 0.88rem;
    letter-spacing: 0.18em;
  }

  .home-topbar .site-auth-link {
    min-height: 42px;
    padding-inline: 0.7rem;
  }

  .home-topbar .site-menu-toggle {
    width: 42px;
    height: 42px;
  }

  .home-topbar .site-mobile-menu.is-open {
    max-height: calc(100svh - 70px);
    overflow-y: auto;
    padding-bottom: 0.5rem;
  }

  .footer-grid {
    gap: 0.3rem;
  }

  .footer-nav p {
    font-size: 0.54rem;
    letter-spacing: 0.1em;
  }

  .footer-nav a {
    font-size: 0.68rem;
  }
}
