/* Shared floating navigation. The homepage starts transparent over the hero. */
.nav,.site-header {
  --nav-hover: #00152d0a;
  position: fixed;
  z-index: 20;
  top: 14px;
  inset-inline: clamp(12px,2vw,32px);
  width: auto;
  max-width: 1440px;
  height: 68px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  box-shadow: 0 6px 24px #00152d0d;
  transition: background-color 200ms ease,color 200ms ease,border-color 200ms ease,box-shadow 200ms ease;
}

.nav-brand,.brand-link {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 11px;
  min-height: 44px;
  border-radius: 999px;
}

.nav-emblem {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #00152d0d;
  background: var(--wash);
}

.nav-emblem img {
  display: block;
  width: 29px;
  height: 26px;
  object-fit: contain;
}

.nav-brand-text {
  font: 700 17px/1 var(--font);
  letter-spacing: -.025em;
  white-space: nowrap;
}

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

.nav-links > a:not(.nav-cta) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  transition: background-color 160ms ease;
}

.nav-links > a:not(.nav-cta):is(:focus-visible,.is-touch-pressed) { background: var(--nav-hover); }
.nav-links > a[aria-current="page"] { background: var(--nav-hover); font-weight: 700; }
.nav .nav-cta { --disc-h: 44px; margin-left: 12px; font-size: 14px; }
.nav .mobile-contact { display: none; }
.mobile-button { display: none; }

.home-nav.at-top:not(:has(.nav-links.open)) {
  --ink: var(--paper);
  --bg: var(--navy);
  --line: #f2f2f045;
  --nav-hover: #ffffff14;
  background: transparent;
  border-color: transparent;
  color: var(--paper);
  box-shadow: none;
}

.home-nav.at-top:not(:has(.nav-links.open)) .nav-emblem {
  background: #ffffff0d;
  border-color: #ffffff30;
}

.home-nav.at-top:not(:has(.nav-links.open)) .nav-emblem img { filter: brightness(0) invert(1); }
.privacy-header-actions { display: flex; align-items: center; }
.privacy-header-actions .disc-action { --disc-h: 44px; font-size: 14px; }

@media (hover:hover) and (pointer:fine) {
  .nav-links > a:not(.nav-cta):hover { background: var(--nav-hover); }
}

/* Keep five navigation links comfortable before switching to the mobile menu. */
@media (min-width:761px) and (max-width:1000px) {
  .nav { gap: 12px; }
  .nav-links > a:not(.nav-cta) { padding-inline: 10px; font-size: 13px; }
  .nav .nav-cta { margin-left: 6px; font-size: 13px; }
}

@media (min-width:761px) and (max-width:860px) {
  .nav-brand-text { display: none; }
}

@media (max-width:760px) {
  .nav,.site-header {
    top: 10px;
    inset-inline: 12px;
    height: 60px;
    padding: 7px 8px;
    gap: 8px;
  }
  .nav-brand,.brand-link { gap: 9px; }
  .nav-emblem { width: 40px; height: 40px; }
  .nav-emblem img { width: 27px; height: 24px; }
  .nav-brand-text { font-size: 16px; }
  .nav .mobile-contact.disc-action {
    display: inline-flex;
    flex: none;
    margin-left: auto;
    --disc-h: 44px;
    background: var(--accent);
    color: var(--navy);
    font-size: 13px;
  }
  .nav .mobile-contact .disc-label { padding-right: 14px; }
  .nav .mobile-contact .disc-layer { padding-right: 12px; }
  .mobile-button {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: inherit;
  }
  .mobile-button:active { background: var(--nav-hover); }
  .menu-icon { display: block; width: 18px; height: 16px; position: relative; }
  .menu-icon::before,.menu-icon::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    width: 18px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms cubic-bezier(.22,1,.36,1);
  }
  .menu-icon::before { transform: translateY(-3px); }
  .menu-icon::after { transform: translateY(3px); }
  .mobile-button[aria-expanded="true"] .menu-icon::before { transform: rotate(45deg); }
  .mobile-button[aria-expanded="true"] .menu-icon::after { transform: rotate(-45deg); }
  .nav-links {
    display: none;
    position: absolute;
    inset: calc(100% + 10px) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--navy);
    background: var(--paper);
    box-shadow: 0 10px 28px #00152d14;
  }
  .nav-links.open { display: flex; }
  .nav-links.open .nav-cta { display: none; }
  .nav-links > a:not(.nav-cta) { min-height: 48px; padding: 14px 18px; font-size: 16px; }
  .privacy-header-actions .disc-action { --disc-h: 44px; font-size: 13px; }
}

@media (max-width:420px) {
  .nav-brand-text { display: none; }
}

@media (max-width:760px) and (prefers-reduced-motion:no-preference) {
  .nav-links.open { animation: nav-menu-enter 180ms cubic-bezier(.22,1,.36,1); }
  @keyframes nav-menu-enter {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion:reduce) {
  .nav,.site-header,.nav-links > a,.menu-icon::before,.menu-icon::after { transition: none; }
}
