/*
 * DOM structure (what gets which class):
 *
 * nav.nm-navbar                      root: width cap, font
 * └─ .nm-navbar__bar                 the glass pill
 *    ├─ a.nm-navbar__brand           logo link: img.nm-navbar__logo
 *    └─ .nm-navbar__menu             right side (no styles on desktop)
 *       ├─ button.nm-navbar__toggle  burger, hidden on desktop
 *       └─ .nm-navbar__panel         row of links; floating panel on tablet/mobile
 *          ├─ ul.nm-navbar__links
 *          │  └─ li.nm-navbar__item
 *          │     ├─ a/button.nm-navbar__link
 *          │     └─ .nm-navbar__dropdown        only for items with children
 *          │        └─ ul.nm-navbar__submenu    nestable
 *          └─ a.nm-navbar__language
 */

/* Item/subitem variants cover Navigation Items rendered in their own shadow
   tree in Webflow, where there is no .nm-navbar ancestor — without them the
   mobile width:100% links go content-box and overflow the panel sideways */
.nm-navbar,
.nm-navbar *,
.nm-navbar__item,
.nm-navbar__item *,
.nm-navbar__subitem,
.nm-navbar__subitem * {
  box-sizing: border-box;
}

/* ---------- Root ---------- */

/* Overlays the top of the page (over the hero); lives outside the Hero
   component as a sibling. The 23px offset comes from the design. */
.nm-navbar {
  position: absolute;
  top: 23px;
  right: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  max-width: 1440px; /* 1380 content + the 30px side insets */
  padding-inline: 30px;
  margin-inline: auto;
  color: #000;
  font-family: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

/* .nm-navbar__item / .nm-navbar__subitem cover Navigation Items rendered in
   their own shadow tree in Webflow, where there is no .nm-navbar ancestor */
.nm-navbar a,
.nm-navbar__item a,
.nm-navbar__subitem a {
  color: #18141e;
  text-decoration: none;
}

/* ---------- Bar (glass pill): logo left, menu right ---------- */

.nm-navbar__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 54px;
  padding: 8px 35px 8px 28px;
  border-radius: 100px;
}

/* Keep the bar's backdrop filter off the dropdown's ancestor. A
   backdrop-filter establishes a new backdrop root, which prevents a nested
   filtered element from sampling the page behind it. Painting the glass on
   this sibling layer preserves the bar while letting the dropdown blur the
   hero independently. */
.nm-navbar__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(
    155.46deg,
    rgba(252, 252, 252, 0.55) -50.09%,
    rgba(230, 236, 233, 0.5) 106.94%
  );
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  pointer-events: none;
}

.nm-navbar__bar > * {
  position: relative;
  z-index: 1;
}


/* ---------- Brand ---------- */

.nm-navbar__brand {
  display: flex;
  flex: none;
  align-items: center;
  color: #18141e;
  margin-top: 4px;
}

.nm-navbar__logo {
  width: 148px;
  height: 25px;
  object-fit: contain;
}

/* ---------- Toggle (burger) — hidden on desktop ---------- */

.nm-navbar__toggle {
  display: none;
  border: 0;
  color: inherit;
  font: inherit;
}

/* ---------- Panel: links row + language ---------- */

.nm-navbar__panel {
  display: flex;
  align-items: center;
  gap: 17px;
}

.nm-navbar__links {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
 * Webflow renders slot children through a native <slot>: the slotted
 * Navigation Items live in the light DOM and are projected in, so ordinary
 * descendant selectors can't reach them — only ::slotted() can. Their
 * host/wrapper elements are block-level, which is what stacked the menu
 * vertically. Making the slot itself the flex row and collapsing every
 * slotted element with display: contents lets the items' own <li>s
 * participate in the layout directly. Inert in the plain React preview
 * (no <slot> elements exist there).
 */
.nm-navbar__links slot {
  display: flex;
  align-items: center;
  gap: 17px;
}

.nm-navbar__links slot::slotted(*),
.nm-navbar__submenu slot::slotted(*),
.nm-navbar__dropdown slot::slotted(*) {
  display: contents;
}

/* Tablet/mobile: the links list is vertical, so the slot stacks too */
@media (max-width: 1280px) {
  .nm-navbar__links slot {
    display: block;
  }
}

/* Items render in their own shadow roots in Webflow with no .nm-navbar
   ancestor, so the font must be self-contained */
.nm-navbar__item,
.nm-navbar__subitem {
  font-family: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.nm-navbar__item {
  position: relative; /* anchors the dropdown */
}

/* Link and language selector share the pill look */

.nm-navbar__link,
.nm-navbar__language {
  display: flex;
  align-items: center;
  padding: 0 10px;
  min-height: 36px;
  border-radius: 100px;
  white-space: nowrap;
  cursor: pointer;
}

button.nm-navbar__link {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.nm-navbar__language {
  flex: none;
  padding-right: 0;
}

.nm-navbar__link:hover,
.nm-navbar__link:focus-visible,
.nm-navbar__language:hover,
.nm-navbar__language:focus-visible,
.nm-navbar .is-active {
  background: rgba(24, 20, 30, 0.09);
  outline: none;
}

/* ---------- Dropdown (items with children) ---------- */

/* The panel sits flush against the navbar pill's bottom edge (link bottom +
   the bar's 8px padding) with square top corners and the bar's own surface
   recipe at a higher opacity, so opening reads as the bar extending downward
   rather than a detached floating card. */
/* The panel starts EXACTLY at the bar's bottom edge (the link sits 8px above
   it), square top corners, same surface recipe and density as the bar — the
   two surfaces meet flush and read as one shape, with none of the machinery
   a literally-shared surface would need. Aligned to the trigger's left edge. */
.nm-navbar__dropdown {
  position: absolute;
  top: calc(100% + 9px);
  left: -14px;
  width: max-content;
  min-width: 230px;
  max-width: 320px;
  padding: 12px 10px 14px;
  border: 0;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(
    155.46deg,
    rgba(252, 252, 252, 0.55) -50.09%,
    rgba(230, 236, 233, 0.5) 106.94%
  );
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 170ms ease,
    transform 170ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Painted before the bar background cannot be done from inside it, so the
   tucked strip simply reads as the two glass layers merging. */


/* Open on click (.is-open), hover, or keyboard focus */
.nm-navbar__item > div.is-open > .nm-navbar__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Nested flyouts render inside the panel, away from the bar surface, so they
   keep their own solid card. */
.nm-navbar__submenu .nm-navbar__dropdown {
  border-radius: 12px;
  background: rgba(252, 252, 252, 0.94);
  box-shadow: 0 14px 34px rgba(24, 20, 30, 0.16);
}

.nm-navbar__submenu a,
.nm-navbar__subitem a {
  position: relative;
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  line-height: 1.2;
  transition: padding-left 160ms ease, background 160ms ease;
}

/* G hover: green accent bar slides in, link indents */
.nm-navbar__subitem a::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: #3dbf7b;
  transform: translateY(-50%);
  transition: height 160ms ease;
}

.nm-navbar__subitem a:hover,
.nm-navbar__subitem a.is-active {
  padding-left: 20px;
}

.nm-navbar__subitem a:hover::before,
.nm-navbar__subitem a.is-active::before {
  height: 16px;
}

.nm-navbar__submenu a:hover,
.nm-navbar__subitem a:hover,
.nm-navbar__submenu a:focus-visible,
.nm-navbar__subitem a:focus-visible {
  background: rgba(24, 20, 30, 0.07);
  outline: none;
}

/* Self-contained active state (the .nm-navbar ancestor doesn't exist in
   the items' shadow roots in Webflow) */
.nm-navbar__subitem a.is-active {
  background: rgba(24, 20, 30, 0.09);
}

.nm-navbar__submenu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Nested submenu: indented with a left rule */
.nm-navbar__submenu .nm-navbar__submenu {
  margin-left: 10px;
  padding-left: 8px;
  border-left: 1px solid rgba(24, 20, 30, 0.12);
  font-size: 14px;
}

/* ---------- Tablet & mobile: burger + expanding pill ---------- */

/* The glass pill itself grows downward to reveal the menu — no floating
   panel, so nothing can overflow the viewport or sit on a see-through
   surface. Same treatment on tablet and mobile. */
@media (max-width: 1280px) {
  .nm-navbar__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 40px;
    padding: 4px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .nm-navbar__toggle-icon {
    display: block;
    width: 32px;
    height: 32px;
  }

  /* 27px = half the closed bar height, so the closed pill is unchanged
     while the open bar reads as a rounded card */
  .nm-navbar__bar {
    flex-wrap: wrap;
    height: auto;
    min-height: 54px;
    border-radius: 27px;
  }

  /* The menu occupies a zero-height second row while closed, then its panel
     expands across the full bar width. Keeping the toggle as a direct child
     avoids display:contents issues in Webflow's shadow DOM. */
  .nm-navbar__menu {
    width: 100%;
  }

  .nm-navbar__panel {
    display: none;
    width: 100%;
    max-height: calc(100vh - 130px);
    margin-top: 8px;
    padding: 10px 0 6px;
    overflow-y: auto;
    border-top: 1px solid rgba(24, 20, 30, 0.1);
  }

  .nm-navbar__menu.is-open > .nm-navbar__panel {
    display: block;
  }

  /* Stronger fill while open so page content doesn't read through */
  .nm-navbar__bar:has(.nm-navbar__menu.is-open)::before {
    background:
      linear-gradient(
        155.46deg,
        rgba(252, 252, 252, 0.3) -50.09%,
        rgba(230, 236, 233, 0.3) 106.94%
      ),
      rgba(240, 244, 242, 0.82);
  }

  /* Links stack vertically, full width, taller touch targets */
  .nm-navbar__links {
    display: block;
  }

  .nm-navbar__item,
  .nm-navbar__link,
  .nm-navbar__language {
    width: 100%;
  }

  .nm-navbar__link,
  .nm-navbar__language {
    min-height: 44px;
    padding: 0 12px;
  }

  .nm-navbar__language {
    border-top: 1px solid rgba(24, 20, 30, 0.1);
    border-radius: 0;
  }

  /* Dropdown becomes an inline indented list */
  .nm-navbar__dropdown {
    position: static;
    display: none;
    width: auto;
    max-width: none;
    margin: 0 0 8px 12px;
    padding: 2px 0 2px 10px;
    border: 0;
    border-left: 1px solid rgba(24, 20, 30, 0.12);
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nm-navbar__item > div.is-open > .nm-navbar__dropdown {
    display: block;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  .nm-navbar {
    padding-inline: 15px;
  }

  .nm-navbar__bar {
    padding: 8px 16px;
  }

  .nm-navbar__logo {
    width: 131px;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm-navbar__dropdown {
    transition: none;
  }
}

/* Authored \n breaks are desktop-only; below the site's mobile breakpoint
   (navbar switch, 1280px) the text reflows naturally. */
@media (max-width: 1280px) {
  br.multiline-br {
    display: none;
  }
}

