/* ============================================================================
   NURV shared top-nav styling — SINGLE SOURCE OF TRUTH.
   Loaded via <link rel="stylesheet" href=".../nav.css"> on every page (home +
   inner). The nav MARKUP + behaviour is injected by site-nav.js; this is its
   look. Brand colours are hard-coded (hex) so it renders identically on the
   home page and the inner pages (which use different CSS-variable names for the
   same palette). Mirrors the original main-page nav exactly.
   NOTE: the `.nav-cta` button itself is NOT here — it's a shared button used
   outside the nav too, and stays in blended.html / services.css.
   ============================================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 230, 0.88);
  border-bottom: 1px solid var(--c-rule);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  /* Pin font metrics so nav text + the .nav-cta button render identically
     regardless of each page's differing body typography
     (home: 17px/1.4, inner: 16px/1.5). Every nav element sets its own
     font-size, so this only affects bare containers like <li>. */
  font-size: 15px;
  line-height: 1.4;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--c-ink);
}
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
.brand-glyph { display: none; }
.brand-glyph svg { display: block; }
.nav ul {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}
@media (min-width: 880px) { .nav ul { display: flex; } }
.nav ul a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.23px;
  color: rgba(20, 17, 15, 0.62);
  text-decoration: none;
  transition: color 160ms ease;
}
.nav ul a:hover { color: var(--c-ink); }
.nav ul a.is-current { color: var(--c-accent); }

/* Services dropdown */
.nav-dd { position: relative; }
/* Invisible bridge — keeps :hover alive when moving from trigger into the menu. */
.nav-dd::after {
  content: "";
  position: absolute;
  top: 100%; left: -8px; right: -8px;
  height: 16px;
  pointer-events: none;
}
.nav-dd:hover::after,
.nav-dd:focus-within::after { pointer-events: auto; }
.nav-dd-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: rgba(20, 17, 15, 0.62); cursor: pointer;
  font-size: 15px; font-weight: 500; letter-spacing: -0.23px;
  transition: color 160ms ease;
}
.nav-dd-trigger:hover { color: var(--c-ink); }
.nav-dd-trigger::after {
  content: "▾"; font-size: 9px; color: var(--c-ink4); margin-left: 2px;
}
.nav-dd-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  background: var(--c-bg);
  border: 1px solid var(--c-rule);
  border-radius: 12px;
  padding: 8px; min-width: 280px;
  box-shadow: 0 12px 32px -8px rgba(20, 17, 15, 0.18);
  display: none; flex-direction: column; gap: 2px;
  z-index: 60;
}
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu,
.nav-dd[data-open="true"] .nav-dd-menu { display: flex; }
.nav-dd-menu a {
  display: flex; flex-direction: column;
  padding: 10px 12px; border-radius: 8px;
  color: var(--c-ink); text-decoration: none;
  font-size: 14px; font-weight: 500; letter-spacing: -0.16px;
}
.nav-dd-menu a small {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--c-ink3); margin-top: 2px;
  font-weight: 400;
}
.nav-dd-menu a:hover { background: var(--c-surface); color: var(--c-accent); }
.nav-dd-menu a:hover small { color: var(--c-ink2); }
.nav-dd-menu .nav-dd-pricing {
  border-top: 1px solid var(--c-rule);
  margin-top: 4px; padding-top: 12px;
  color: var(--c-accent2);
}

/* --- Mobile nav (hamburger) — below 880px --- */
.nav-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; flex: 0 0 auto;
  background: none; border: 1px solid var(--c-rule); border-radius: 10px;
  color: var(--c-ink); cursor: pointer;
}
.nav-burger svg { display: block; width: 22px; height: 22px; }
.nav-burger .icon-close { display: none; }
.nav[data-mobile-open="true"] .nav-burger .icon-open { display: none; }
.nav[data-mobile-open="true"] .nav-burger .icon-close { display: block; }
@media (min-width: 880px) { .nav-burger { display: none; } }
@media (max-width: 879px) {
  .nav-inner { justify-content: flex-start; }
  .nav-cta { margin-left: auto; }
  .nav > .nav-inner > nav {
    display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    background: var(--c-bg);
    border-top: 1px solid var(--c-rule);
    border-bottom: 1px solid var(--c-rule);
    box-shadow: 0 16px 32px -12px rgba(20, 17, 15, 0.18);
    max-height: calc(100vh - 60px); overflow-y: auto; padding: 6px 0;
  }
  .nav[data-mobile-open="true"] > .nav-inner > nav { display: block; }
  .nav > .nav-inner > nav ul { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0 20px; }
  .nav > .nav-inner > nav > ul > li { border-bottom: 1px solid var(--c-rule); }
  .nav > .nav-inner > nav > ul > li:last-child { border-bottom: 0; }
  .nav > .nav-inner > nav ul a { display: block; padding: 13px 4px; font-size: 16px; color: var(--c-ink); }
  .nav-dd-trigger {
    width: 100%; justify-content: flex-start; cursor: default;
    padding: 13px 4px; font-size: 16px; color: var(--c-ink);
  }
  .nav-dd-trigger::after { display: none; }
  .nav-dd-menu {
    position: static; transform: none; display: flex;
    border: 0; box-shadow: none; background: none; min-width: 0; padding: 0 0 6px;
  }
  .nav-dd-menu a { padding: 9px 12px; font-size: 15px; }
  .nav-dd-menu a small { display: block; margin-top: 2px; }
  .nav-dd-menu .nav-dd-pricing { color: var(--c-accent2); }
}
