header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--outline-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 48px);
  max-width: 1360px;
  margin: 0 auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 17px;
  margin-left: 32px;
  transition: color 0.15s ease;
}
nav a:hover {
  color: var(--text);
}
nav a.current {
  color: var(--text);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
}

/* hamburger button*/
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 40;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 12px 22px;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: #8f8bff;
  box-shadow: 0 8px 24px -8px rgba(124, 120, 255, 0.55);
}
.btn-ghost {
  border-color: var(--outline);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--text-muted);
}
.btn-primary svg {
  width: 26px;
  height: 26px;
}
nav .btn-primary {
  padding: 11px 22px;
  font-size: 15px;
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .brand-mark {
    width: 44px;
    height: 44px;
  }
  .brand-lockup {
    font-size: 20px;
    gap: 10px;
  }

  .header-right {
    gap: 10px;
  }

  .nav-toggle {
    display: flex;
  }

  /* hide "Get the app" in the header row on mobile — it still
     appears wherever else it's used on the page (e.g. hero CTA) */
  nav .btn-primary {
    display: none;
  }

  /* the plain links collapse into a dropdown panel below the header;
     "Get the app" stays visible in the header row at all times */
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--outline-soft);
    padding: 0 clamp(20px, 5vw, 48px);
    max-height: 0;
    overflow: hidden;
    gap: 4px;
    transition:
      max-height 0.25s ease,
      padding 0.25s ease;
  }
  .nav-menu a {
    margin-left: 0;
    padding: 12px 0;
    font-size: 16px;
    border-top: 1px solid var(--outline-soft);
  }
  .nav-menu a:first-child {
    border-top: none;
  }
  .nav-menu.open {
    max-height: 320px;
    padding: 6px clamp(20px, 5vw, 48px) 18px;
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.55);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
  }
}

@media (max-width: 480px) {
  header {
    padding: 14px 16px;
  }
}
