/* Leave room for the label above a focused field below the fixed header,
   including enlarged text and 200% zoom. */
#enquiry-form-v8 :is(input, select, textarea) {
  scroll-margin-top: 112px;
}
/* Shared navigation refinement for the existing NP5 preview; source pages remain unchanged. */
html {
  scroll-padding-top: 82px;
}

body .topbar {
  color: #6e6e73;
  background: #f5f5f7;
  border-bottom: 1px solid #e8e8ed;
  font-size: 11px;
  letter-spacing: 0;
}

body .topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1200px, calc(100% - 48px));
  min-height: 26px;
  margin-inline: auto;
}

body .topbar .top-separator {
  padding-inline: 5px;
  color: #a1a1a6;
}

body.home-v4 .topbar {
  padding: 0;
  color: #6e6e73;
  background: #f5f5f7;
  border-bottom-color: #e8e8ed;
  font-size: 11px;
  letter-spacing: 0;
}

body.home-v4 .topbar .wrap {
  width: min(1200px, calc(100% - 48px));
  min-height: 26px;
  padding: 0;
}

body.home-v4 .topbar .top-separator {
  color: #a1a1a6;
}

body header.wrap.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 64px !important;
  margin: 0;
  padding-inline: max(24px, calc((100vw - 1200px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #d2d2d7;
  box-shadow: none;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

body header.wrap.nav .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
}

body header.wrap.nav .brand img {
  display: block;
  width: 112px;
  max-height: 34px;
  object-fit: contain;
}

body header.wrap.nav .navlinks {
  position: static;
  display: flex !important;
  align-items: center;
  gap: clamp(14px, 1.55vw, 23px);
  margin: 0 0 0 auto;
  font-size: 13.5px;
  transform: none;
}

body header.wrap.nav .navlinks > a:not(.btn) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  color: #1d1d1f;
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.35;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  transition: color 160ms ease;
}

body header.wrap.nav .navlinks > a:not(.btn)::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  content: "";
  background: #1d1d1f;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms ease;
}

body header.wrap.nav .navlinks > a:not(.btn):hover,
body header.wrap.nav .navlinks > a:not(.btn):focus-visible,
body header.wrap.nav .navlinks > a:not(.btn).current,
body header.wrap.nav .navlinks > a:not(.btn)[aria-current="page"] {
  color: #0a2449;
  background: transparent;
}

body header.wrap.nav .navlinks > a:not(.btn):hover::after,
body header.wrap.nav .navlinks > a:not(.btn):focus-visible::after,
body header.wrap.nav .navlinks > a:not(.btn).current::after,
body header.wrap.nav .navlinks > a:not(.btn)[aria-current="page"]::after {
  transform: scaleX(1);
}

body header.wrap.nav .navlinks > a.nav-cta,
body header.wrap.nav .navlinks > a.btn.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  margin-left: 3px;
  padding: 0 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  background: #0a2449;
  border: 1px solid #0a2449;
  border-radius: 5px;
  box-shadow: none;
  transition: color 160ms ease;
}

body header.wrap.nav .navlinks > a.nav-cta:hover,
body header.wrap.nav .navlinks > a.btn.nav-cta:hover {
  color: #fff;
  background: #143765;
}

body header.wrap.nav .nav-cta span[aria-hidden="true"] {
  font-size: 15px;
  line-height: 1;
}

body header.wrap.nav .navbutton {
  display: none !important;
}

body header.wrap.nav .navbutton:focus-visible,
body header.wrap.nav .navlinks a:focus-visible {
  outline: 3px solid #91b5e8;
  outline-offset: 4px;
}

/* CSS/text zoom can narrow the header's layout without changing media queries.
   Allow a desktop row to wrap instead of pushing the project link off-screen. */
@media (min-width: 1101px) {
  body header.wrap.nav .navlinks {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 1100px) {
  body header.wrap.nav {
    min-height: 56px;
    padding-inline: 20px;
  }

  body header.wrap.nav .brand img {
    width: 108px;
  }

  body header.wrap.nav .navbutton {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
    padding: 0;
    color: #0a2449;
    font: inherit;
    font-size: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    transition:
      background-color 160ms ease,
      color 160ms ease;
  }

  body header.wrap.nav .navbutton:hover {
    color: #071a3a;
    background: #f0f4f9;
  }

  body header.wrap.nav .np5-nav-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 18px;
    width: 18px;
    height: 8px;
    color: currentColor;
    background: transparent;
  }

  body header.wrap.nav .np5-nav-icon::before,
  body header.wrap.nav .np5-nav-icon::after {
    position: absolute;
    right: 0;
    left: 0;
    height: 1.5px;
    content: "";
    background: currentColor;
    transition:
      top 170ms ease,
      bottom 170ms ease,
      transform 170ms ease;
  }

  body header.wrap.nav .np5-nav-icon::before {
    top: 0;
  }

  body header.wrap.nav .np5-nav-icon::after {
    bottom: 0;
  }

  body header.wrap.nav .navbutton[aria-expanded="true"] .np5-nav-icon {
    background: transparent;
  }

  body header.wrap.nav .navbutton[aria-expanded="true"] .np5-nav-icon::before {
    top: 3.25px;
    transform: rotate(45deg);
  }

  body header.wrap.nav .navbutton[aria-expanded="true"] .np5-nav-icon::after {
    bottom: 3.25px;
    transform: rotate(-45deg);
  }

  body header.wrap.nav .navlinks {
    position: absolute;
    top: calc(100% + 1px) !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 99;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - 82px);
    margin: 0;
    padding: 12px max(24px, calc((100vw - 640px) / 2));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff !important;
    border: 0;
    border-top: 1px solid #e8e8ed;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-7px);
    visibility: hidden;
    transition:
      opacity 170ms ease,
      transform 170ms ease,
      visibility 170ms ease;
  }

  body header.wrap.nav .navlinks.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  body header.wrap.nav .navlinks > a:not(.btn) {
    min-height: 58px;
    padding: 16px 2px;
    color: #1d1d1f;
    font-size: 19px;
    font-weight: 500;
    border-bottom: 1px solid #e8e8ed;
    border-radius: 0;
  }

  body header.wrap.nav .navlinks > a:not(.btn)::after {
    display: none;
  }

  body header.wrap.nav .navlinks > a:not(.btn).current,
  body header.wrap.nav .navlinks > a:not(.btn)[aria-current="page"] {
    padding-left: 2px;
    color: #0a2449;
    background: transparent;
    border-left: 0;
  }

  body header.wrap.nav .navlinks > a.nav-cta,
  body header.wrap.nav .navlinks > a.btn.nav-cta {
    justify-content: center;
    min-height: 48px;
    margin: 14px 0 4px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 0;
    border-radius: 5px;
  }

  /* Outrank the legacy homepage's .navlinks.open rules in its own stylesheet. */
  #np5-site-header .navlinks {
    padding: 12px max(24px, calc((100vw - 640px) / 2));
    background: #fff;
    box-shadow: none;
    opacity: 1;
    transition: transform 170ms ease, visibility 170ms ease;
  }

  #np5-site-header .navlinks:not(.open) {
    visibility: hidden;
    transition: none;
  }

  #np5-site-header .navlinks > a[aria-current="page"] {
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 7px;
  }
}

@media (max-width: 420px) {
  body .topbar {
    font-size: 9px;
  }

  body .topbar .wrap {
    width: calc(100% - 32px);
    min-height: 24px;
    gap: 8px;
  }

  body header.wrap.nav {
    padding-inline: 16px;
  }

  body header.wrap.nav .brand img {
    width: 102px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body header.wrap.nav *,
  body header.wrap.nav *::before,
  body header.wrap.nav *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
