:root {
  --header-h: 64px;
}

html {
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body.nv-menu-open {
  overflow: hidden;
}

.nv-site-header {
  position: sticky;
  z-index: 900;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(254, 251, 229, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 180ms ease, background-color 180ms ease;
}

.nv-site-header.is-scrolled {
  background: rgba(254, 251, 229, 0.98);
  box-shadow: 0 8px 28px -22px rgba(0, 72, 92, 0.55);
}

.nv-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.nv-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  text-decoration: none;
}

.nv-brand img {
  width: auto;
  height: 24px;
}

.nv-desktop-nav,
.nv-header-action {
  display: none;
}

.nv-menu-toggle,
.nv-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nv-menu-toggle {
  flex-direction: column;
  gap: 5px;
}

.nv-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nv-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  visibility: hidden;
  padding: 0;
  border: 0;
  background: rgba(15, 52, 64, 0.48);
  opacity: 0;
  cursor: default;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.nv-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.nv-drawer {
  position: fixed;
  z-index: 1010;
  inset: 0 0 0 auto;
  display: flex;
  visibility: hidden;
  flex-direction: column;
  width: min(88vw, 380px);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(12px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left));
  border-left: 1px solid var(--line);
  background: var(--cream);
  box-shadow: -24px 0 50px rgba(15, 52, 64, 0.2);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1), visibility 280ms ease;
}

.nv-drawer.is-open {
  visibility: visible;
  transform: translateX(0);
}

.nv-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px 8px 24px;
  border-bottom: 1px solid var(--line);
}

.nv-drawer-title {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nv-drawer-close {
  position: relative;
}

.nv-drawer-close::before,
.nv-drawer-close::after {
  position: absolute;
  width: 23px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.nv-drawer-close::before {
  transform: rotate(45deg);
}

.nv-drawer-close::after {
  transform: rotate(-45deg);
}

.nv-drawer-nav {
  display: flex;
  flex-direction: column;
}

.nv-drawer-link,
.nv-mobile-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.nv-drawer-link:hover,
.nv-mobile-group summary:hover,
.nv-mobile-group[open] summary {
  background: var(--cream-deep);
  color: var(--petrol-deep);
}

.nv-row-arrow {
  flex: 0 0 auto;
  margin-left: 16px;
  color: var(--petrol);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.nv-mobile-group {
  margin: 0;
}

.nv-mobile-group summary {
  cursor: pointer;
  list-style: none;
}

.nv-mobile-group summary::-webkit-details-marker {
  display: none;
}

.nv-mobile-group summary::after {
  flex: 0 0 auto;
  margin-left: 16px;
  color: var(--petrol);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  content: "+";
}

.nv-mobile-group[open] summary::after {
  content: "\2212";
}

.nv-mobile-subnav {
  background: rgba(217, 236, 239, 0.42);
}

.nv-mobile-subnav .nv-drawer-link {
  min-height: 46px;
  padding: 10px 24px 10px 38px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nv-drawer-link[aria-current="page"],
.nv-mobile-group:has(.nv-drawer-link[aria-current="page"]) > summary {
  color: var(--petrol-deep);
  font-weight: 700;
}

.nv-drawer-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 24px 24px 0;
}

.nv-drawer-cta {
  width: 100%;
}

.nv-drawer-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--petrol-deep);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

@media (max-height: 600px) {
  .nv-drawer {
    padding-top: max(6px, env(safe-area-inset-top));
  }

  .nv-drawer-head {
    min-height: 46px;
    padding-bottom: 2px;
  }

  .nv-drawer-link,
  .nv-mobile-group summary {
    min-height: 46px;
    padding-block: 8px;
  }

  .nv-mobile-subnav .nv-drawer-link {
    min-height: 44px;
    padding-block: 7px;
  }

  .nv-drawer-footer {
    gap: 4px;
    padding-top: 12px;
  }
}

@media (min-width: 1240px) {
  :root {
    --header-h: 76px;
  }

  .nv-brand img {
    height: 30px;
  }

  .nv-menu-toggle,
  .nv-backdrop,
  .nv-drawer {
    display: none;
  }

  .nv-desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 1.45vw, 22px);
    margin-inline: auto;
    padding-inline: clamp(18px, 2vw, 28px);
  }

  .nv-nav-link,
  .nv-dropdown-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 7px 2px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.89rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 160ms ease;
  }

  .nv-nav-link:hover,
  .nv-dropdown-button:hover,
  .nv-nav-link[aria-current="page"],
  .nv-dropdown-button.is-current,
  .nv-dropdown-button[aria-expanded="true"] {
    color: var(--petrol-deep);
  }

  .nv-nav-link[aria-current="page"]::after,
  .nv-dropdown-button.is-current::after {
    position: absolute;
    right: 2px;
    bottom: 3px;
    left: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--petrol);
    content: "";
  }

  .nv-nav-link,
  .nv-dropdown-button {
    position: relative;
  }

  .nv-caret {
    width: 10px;
    height: 10px;
    margin-left: 7px;
    transition: transform 160ms ease;
  }

  .nv-dropdown-button[aria-expanded="true"] .nv-caret {
    transform: rotate(180deg);
  }

  .nv-dropdown {
    position: relative;
  }

  .nv-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    width: min(410px, calc(100vw - (2 * var(--gutter))));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--foam);
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%);
  }

  .nv-dropdown-panel[hidden] {
    display: none;
  }

  .nv-dropdown-panel a {
    display: grid;
    gap: 2px;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    line-height: 1.35;
    text-decoration: none;
  }

  .nv-dropdown-panel a:hover,
  .nv-dropdown-panel a:focus-visible,
  .nv-dropdown-panel a[aria-current="page"] {
    background: var(--petrol-soft);
    color: var(--petrol-deep);
  }

  .nv-dropdown-panel strong {
    font-size: 0.94rem;
  }

  .nv-dropdown-panel small {
    color: var(--ink-soft);
    font-size: 0.78rem;
  }

  .nv-header-action {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 148px;
    min-height: 46px;
    padding-inline: 18px;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .nv-site-header,
  .nv-backdrop,
  .nv-drawer,
  .nv-caret {
    transition: none;
  }
}
