/* Shared navigation. Existing brand assets and public routes are preserved. */
header.nav {
  z-index: 50;
  background: rgba(251, 252, 248, .98);
}

header.nav .container {
  position: relative;
  min-height: 84px;
  gap: 24px;
}

header.nav .brand { flex-shrink: 0; }
header.nav .nav-links { position: static; gap: 9px; }
header.nav .nav-item { position: relative; }
header.nav .nav-item-catalog { position: static; }
header.nav .nav-item-heading { display: flex; align-items: center; border-radius: 6px; transition: background 160ms ease; }
header.nav .nav-item-heading:hover,
header.nav .nav-item.is-open .nav-item-heading { background: #edf3ee; }

header.nav .nav-links a { transform: none; }
header.nav .nav-parent {
  position: relative;
  display: block;
  padding: 14px 2px 14px 9px;
  color: #2d4037;
  border-radius: 0;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
  background: transparent;
}
header.nav .nav-parent:hover,
header.nav .nav-parent.active { color: var(--green); background: transparent; }
header.nav .is-active .nav-parent::after {
  position: absolute;
  left: 9px;
  right: 2px;
  bottom: 8px;
  height: 2px;
  background: var(--green);
  content: "";
}

header.nav .nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #66746e;
  cursor: pointer;
}
header.nav .nav-toggle svg { width: 13px; height: 13px; transition: transform 180ms ease; }
header.nav .nav-toggle[aria-expanded="true"] { color: var(--green); }
header.nav .nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
header.nav :is(a, button):focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
header.nav .nav-actions .btn { min-height: 44px; padding-inline: 18px; gap: 13px; font-size: 13px; font-weight: 600; border-radius: 5px; }
header.nav .nav-actions .btn svg { width: 16px; height: 16px; }
header.nav .menu-button [data-menu-icon] { display: inline-flex; }
header.nav .menu-button [data-menu-icon="close"],
header.nav .menu-button[aria-expanded="true"] [data-menu-icon="open"] { display: none; }
header.nav .menu-button[aria-expanded="true"] [data-menu-icon="close"] { display: inline-flex; }

header.nav .nav-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 20px);
  left: 0;
  padding: 22px;
  background: #fffefa;
  border: 1px solid #dce6de;
  border-top: 2px solid #b6d3c0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 26px 48px -12px rgba(13, 44, 32, .18), 0 8px 16px -10px rgba(13, 44, 32, .12);
  animation: nav-reveal 180ms ease-out both;
}
header.nav .nav-panel[hidden] { display: none !important; }
header.nav .nav-panel::before { content: ""; position: absolute; inset: -23px 0 auto; height: 23px; }
header.nav.nav-scrolled .nav-panel-compact { top: calc(100% + 10px); }
header.nav .nav-panel-compact { width: 390px; }
header.nav :is([data-nav-item="about"], [data-nav-item="insights"]) .nav-panel { left: auto; right: 0; }
header.nav .nav-panel-eyebrow {
  display: block;
  margin: 0 0 14px;
  color: #597064;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.5;
}
header.nav .nav-compact-links { display: grid; gap: 3px; }
header.nav .nav-panel-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 10px;
  border-radius: 6px;
  color: #243d31;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.4;
  transition: background 160ms ease, color 160ms ease;
}
header.nav .nav-panel-link:hover,
header.nav .nav-panel-link:focus-visible,
header.nav .nav-panel-link.is-current { background: #edf5ee; color: var(--green); }
header.nav .nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: #356b50;
  background: #f0f4ec;
}
header.nav .nav-link-icon svg { width: 17px; height: 17px; stroke-width: 1.5; }
header.nav .nav-link-copy { display: grid; gap: 4px; min-width: 0; }
header.nav .nav-link-title { display: block; font-size: 13px; font-weight: 550; }
header.nav .nav-link-description { display: block; color: #657469; font-size: 11px; line-height: 1.55; font-weight: 400; }
header.nav .nav-panel-link > svg { flex: 0 0 13px; width: 13px; height: 13px; margin-left: auto; color: #8c9e91; opacity: .4; transition: opacity 160ms ease, transform 160ms ease; }
header.nav .nav-panel-link:hover > svg,
header.nav .nav-panel-link:focus-visible > svg { opacity: 1; transform: translate(2px, -2px); color: var(--green); }

header.nav .nav-panel-catalog {
  width: min(1080px, calc(100vw - 48px));
  left: 50%;
  top: 100%;
  padding: 0;
  transform: translateX(-50%);
  animation-name: nav-catalog-reveal;
}
header.nav .nav-catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 32px 23px; border-bottom: 1px solid #e4eade; }
header.nav .nav-catalog-heading .nav-panel-eyebrow { margin-bottom: 7px; }
header.nav .nav-catalog-heading p { margin: 0; color: #263f32; font-family: var(--font-display); font-size: 25px; font-weight: 450; line-height: 1.2; letter-spacing: -.015em; }
header.nav .nav-view-all { display: inline-flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 17px; padding: 11px 14px; color: var(--green); background: #edf4e9; border: 1px solid #dbe7d5; border-radius: 5px; font-size: 12px; font-weight: 550; }
header.nav .nav-view-all:hover { background: #e0eddf; }
header.nav .nav-view-all svg { width: 15px; height: 15px; }
header.nav .nav-catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 27px 23px 25px; }
header.nav .nav-catalog-group { min-width: 0; padding: 0 18px; }
header.nav .nav-catalog-group + .nav-catalog-group { border-left: 1px solid #e4eade; }
header.nav .nav-group-heading { display: flex; align-items: flex-start; gap: 11px; margin: 0 9px 16px; }
header.nav .nav-group-heading > svg { width: 18px; height: 18px; flex: 0 0 18px; color: #396d50; margin-top: 1px; stroke-width: 1.5; }
header.nav .nav-group-heading span { display: block; color: #244b37; font-size: 12px; font-weight: 650; }
header.nav .nav-group-heading small { display: block; color: #7b877d; font-size: 10px; line-height: 1.5; margin-top: 3px; }
header.nav .nav-catalog-links { display: grid; gap: 1px; }
header.nav .nav-catalog-links .nav-panel-link { min-height: 32px; padding: 6px 9px; }
header.nav .nav-catalog-links .nav-link-title { font-weight: 450; font-size: 12px; }
header.nav .nav-catalog-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 14px 32px; border-top: 1px solid #e4eade; background: #f5f7ef; border-radius: 0 0 9px 9px; }
header.nav .nav-catalog-footer > span { color: #6d7d70; font-size: 11px; line-height: 1.5; }
header.nav .nav-catalog-footer a { display: inline-flex; align-items: center; gap: 9px; padding: 0; color: var(--green); font-size: 11px; font-weight: 550; white-space: nowrap; }
header.nav .nav-catalog-footer a:hover { background: transparent; }
header.nav .nav-catalog-footer svg { width: 13px; height: 13px; }
header.nav .nav-mobile-heading,
header.nav .nav-links > .nav-mobile-quote { display: none; }

@keyframes nav-reveal { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes nav-catalog-reveal { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

@media (min-width: 981px) and (max-width: 1280px) {
  header.nav .container { gap: 16px; }
  header.nav .brand { min-width: 118px; }
  header.nav .brand-mark { display: none; }
  header.nav .nav-links { gap: 4px; }
  header.nav .nav-parent { font-size: 12px; padding-left: 7px; }
  header.nav .nav-actions .btn { padding-inline: 14px; }
}

@media (min-width: 981px) {
  header.nav .nav-panel { max-height: var(--nav-available-height, calc(100dvh - 164px)); overflow-y: auto; overscroll-behavior: contain; }
  header.nav.nav-scrolled .nav-panel { max-height: var(--nav-available-height, calc(100dvh - 90px)); }
}

@media (max-width: 980px) {
  header.nav .container { min-height: 74px; gap: 12px; }
  header.nav .brand { min-width: 0; }
  header.nav .brand-mark { display: none; }
  header.nav .brand img { width: 112px; }
  header.nav .nav-actions .btn { display: inline-flex; min-height: 42px; }
  header.nav .menu-button { display: inline-flex; width: 44px; height: 44px; border-color: #d7e3d9; }
  header.nav .menu-button svg { width: 19px; height: 19px; }
  header.nav .nav-links {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    right: 0;
    gap: 0;
    padding: 8px 20px 20px;
    background: #fffefa;
    border: 1px solid #dce6de;
    border-top: 2px solid #b6d3c0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 22px 36px -16px rgba(13, 44, 32, .2);
    max-height: var(--nav-available-height, calc(100dvh - 140px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  header.nav.nav-scrolled .nav-links { max-height: var(--nav-available-height, calc(100dvh - 80px)); }
  header.nav .nav-links.open { display: flex; }
  header.nav .nav-mobile-heading { display: flex; flex-direction: column; gap: 2px; padding: 14px 2px 16px; border-bottom: 1px solid #dce6de; }
  header.nav .nav-mobile-heading span:first-child { font-family: var(--font-display); font-size: 22px; color: #284a35; }
  header.nav .nav-mobile-heading span:last-child { font-size: 11px; color: #788378; }
  header.nav .nav-item { position: static; flex: 0 0 auto; border-bottom: 1px solid #e4eade; }
  header.nav .nav-item-heading { min-height: 58px; justify-content: space-between; border-radius: 0; }
  header.nav .nav-item-heading:hover,
  header.nav .nav-item.is-open .nav-item-heading { background: transparent; }
  header.nav .nav-parent { flex: 1; white-space: normal; padding: 16px 12px 16px 2px; font-size: 14px; font-weight: 550; }
  header.nav .is-active .nav-parent::after { display: none; }
  header.nav .nav-toggle { flex-basis: 44px; width: 44px; min-height: 44px; background: #f2f5ed; }
  header.nav .nav-toggle[aria-expanded="true"] { background: #e6f0e2; }
  header.nav .nav-toggle svg { width: 15px; height: 15px; }
  header.nav .nav-panel,
  header.nav.nav-scrolled .nav-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin: 0 0 16px;
    padding: 16px 10px;
    transform: none;
    background: #f6f8f1;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    overflow: visible;
    animation: none;
  }
  header.nav .nav-panel::before { display: none; }
  header.nav .nav-panel-eyebrow { padding: 0 8px; margin-bottom: 8px; }
  header.nav .nav-panel-link { min-height: 46px; padding: 11px 8px; gap: 10px; }
  header.nav .nav-link-title { font-size: 13px; }
  header.nav .nav-link-description { font-size: 11px; }
  header.nav .nav-link-icon { flex-basis: 30px; width: 30px; height: 30px; background: #eaf0e4; }
  header.nav .nav-catalog-heading { gap: 12px; padding: 0 8px 15px; }
  header.nav .nav-catalog-heading > div { display: none; }
  header.nav .nav-view-all { flex: 1; min-height: 44px; padding: 10px 12px; }
  header.nav .nav-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; padding: 18px 0; }
  header.nav .nav-catalog-group { padding: 0 8px; }
  header.nav .nav-catalog-group + .nav-catalog-group { border: 0; }
  header.nav .nav-catalog-group:last-child { grid-column: 1 / -1; border-top: 1px solid #dce6de; padding-top: 20px; }
  header.nav .nav-catalog-group:last-child .nav-catalog-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  header.nav .nav-group-heading { margin: 0 8px 10px; gap: 8px; }
  header.nav .nav-group-heading small { display: none; }
  header.nav .nav-group-heading span { font-size: 12px; }
  header.nav .nav-catalog-links .nav-panel-link { min-height: 44px; padding: 8px; }
  header.nav .nav-catalog-links .nav-link-title { font-size: 12px; }
  header.nav .nav-catalog-links .nav-panel-link > svg { display: none; }
  header.nav .nav-catalog-footer { display: grid; gap: 12px; padding: 14px 8px 0; background: transparent; }
  header.nav .nav-catalog-footer a { min-height: 44px; font-size: 12px; }
  header.nav .nav-links > .nav-mobile-quote { display: flex; flex: 0 0 auto; margin-top: 18px; min-height: 46px; font-size: 13px; color: #fff; background: var(--green); }
  header.nav .nav-links > .nav-mobile-quote:hover { color: #fff; background: var(--green-dark); }
  header.nav:not(.navigation-ready) .container { flex-wrap: wrap; }
  header.nav:not(.navigation-ready) .nav-links { position: static; display: flex; order: 3; width: 100%; max-height: none; box-shadow: none; }
  header.nav:not(.navigation-ready) .nav-actions { margin-left: auto; }
  header.nav:not(.navigation-ready) :is(.nav-toggle, .menu-button) { display: none; }
}

@media (max-width: 480px) {
  header.nav .container { min-height: 68px; }
  header.nav .brand img { width: 96px; }
  header.nav .nav-actions { gap: 8px; }
  header.nav .nav-actions .btn { gap: 6px; padding-inline: 11px; font-size: 11px; }
  header.nav .nav-actions .btn svg { width: 13px; height: 13px; }
  header.nav .nav-links { padding-inline: 14px; max-height: var(--nav-available-height, calc(100dvh - 84px)); }
  header.nav .nav-catalog-grid { grid-template-columns: 1fr; gap: 22px; }
  header.nav .nav-catalog-group + .nav-catalog-group { border-top: 1px solid #dce6de; padding-top: 20px; }
  header.nav .nav-catalog-group:last-child .nav-catalog-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  header.nav, header.nav *, header.nav *::after { animation: none !important; transition: none !important; }
}
