/* FROM — the header and menus. On wide screens the logo sits on the left and the menu on the right, beside the
   waitlist button, with an orange line that follows the pointer and rests under the current page; a frosted bar
   appears once you scroll. On phones and tablets the bar floats as a glass capsule and the menu opens as a
   full-screen sheet (menu.css). ts/site.ts runs it. */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}

.site-header__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.logo {
  display: block;
  flex: none;
}

.logo img {
  width: 96px;
  height: auto;
}

.logo__dark {
  display: none;
}

.site-header.is-dark:not(.is-menu) .logo__light {
  display: block;
}

.site-header:not(.is-dark) .logo__light,
.site-header.is-menu .logo__light {
  display: none;
}

.site-header:not(.is-dark) .logo__dark,
.site-header.is-menu .logo__dark {
  display: block;
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ---------- Wide screens: logo on the left, menu and waitlist button on the right, a line under the current page ---------- */

@media (min-width: 1081px) {
  .site-header {
    transition: background-color 0.35s, box-shadow 0.35s;
  }

  /* Clear at the top of the page; a full-width frosted bar once you scroll. */
  .site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.84);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
    box-shadow: 0 1px 0 rgba(7, 13, 23, 0.07);
  }

  .site-header.is-dark.is-scrolled {
    background: rgba(9, 14, 22, 0.7);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .site-header__bar {
    height: 80px;
  }

  .site-header__end {
    margin-left: 0;
  }

  .nav {
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 36px;
    margin-left: auto;
    margin-right: 32px;
    padding-right: 32px;
    font-size: 15px;
    font-weight: 560;
    letter-spacing: -0.01em;
  }

  /* A short hairline between the menu and the waitlist button. */
  .nav::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 1px;
    height: 20px;
    margin-top: -10px;
    background: var(--line);
  }

  .nav a {
    position: relative;
    z-index: 1;
    padding: 6px 0;
    color: var(--ink-3);
    transition: color 0.3s var(--ease-out);
  }

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

  /* The line: it follows the pointer, then settles back under the current page. */
  .nav__pill {
    position: absolute;
    left: 0;
    bottom: 21px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--orange);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out), opacity 0.25s;
  }

  .nav__pill.is-ready {
    opacity: 1;
  }

  .nav__pill.is-ready.is-idle {
    opacity: 0;
  }

  .site-header.is-dark .nav::before {
    background: rgba(255, 255, 255, 0.22);
  }

  .site-header.is-dark .nav a {
    color: rgba(255, 255, 255, 0.64);
  }

  .site-header.is-dark .nav a:is(:hover, .is-lit, [aria-current="page"]) {
    color: #fff;
  }
}

/* ---------- Menu button: two lines that turn into a cross ---------- */

.menu-btn {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transition: background-color 0.3s, color 0.3s;
}

.menu-btn::before,
.menu-btn::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.4s var(--ease-out);
}

.menu-btn::before {
  top: 18px;
}

.menu-btn::after {
  top: 24px;
}

.menu-btn[aria-expanded="true"]::before {
  transform: translateY(3px) rotate(45deg);
}

.menu-btn[aria-expanded="true"]::after {
  transform: translateY(-3px) rotate(-45deg);
}

.site-header.is-dark:not(.is-menu) .menu-btn {
  background: #fff;
  color: var(--ink);
}

.mobile-nav {
  display: none;
}
