/* Header and mobile drawer for the marketing pages (home, services, about, how we work).
   Case studies and legal pages keep their own lighter headers. */
header.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  background: rgba(245, 246, 250, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

header.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  font-family: "Brygada 1918", serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  height: 36px;
  width: auto;
  display: block;
}

.brand .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  margin-top: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-family:"Schibsted Grotesk",system-ui,sans-serif;
  font-size:15.5px;
  letter-spacing:0.005em;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--indigo);
}

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-btn {
  display: none;
  background: none;
  border: 0;
  font-size: 26px;
  cursor: pointer;
  color: var(--ink);
}

.nav-cta .btn {
  white-space: nowrap;
}

/* The logo, four links and button need ~900px; below 1024px the links move into the menu,
   and below 920px the button and language switch follow them */
@media (max-width: 1023px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: inline-grid;
  }
}

/* Below 920px the button stays as the one CTA on phones, compacted to fit beside the logo and menu */
@media (max-width: 920px) {
  .nav-cta .btn {
    position: relative;
    gap: 6px;
    padding: 8px 13px;
    font-size: 13px;
    line-height: 1.2;
    box-shadow: none;
  }

  /* Pill stays ~34px tall to sit with the logo; the overlay keeps a 44px tap target */
  .nav-cta .btn::after {
    content: "";
    position: absolute;
    inset: -5px 0;
  }
}

/* Narrow phones: smaller logo and tighter edges so logo, button and menu all fit */
@media (max-width: 440px) {
  header.nav .wrap {
    padding-left: 16px;
    padding-right: 12px;
  }

  .brand img {
    height: 28px;
  }

  .nav-cta {
    gap: 4px;
  }
}

@media (max-width: 359px) {
  .nav-cta .btn {
    display: none;
  }
}

#mobile {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(420px, 100%);
  background: var(--paper);
  color: var(--ink);
  transform: translateX(105%);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px rgba(21, 26, 34, 0.12);
  visibility: hidden;
  transition:
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.6s;
}

#mobile.open {
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

#mobile a {
  font-family: "Brygada 1918", serif;
  font-size: 32px;
  text-decoration: none;
  color: var(--ink);
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

#mobile .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

#mobile .brand {
  color: var(--ink);
  border-bottom: 0;
  padding: 0;
}

#mobile .brand img {
  height: 30px;
  width: auto;
  display: block;
}

#mobile .close {
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 30px;
  cursor: pointer;
}

.menu-btn,
#mobile .close {
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  font-size: 0;
}

#mobile .close {
  display: inline-grid;
}

.menu-btn:focus-visible,
#mobile .close:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}
