/* ============================================================================
   NAV — "Programs" dropdown
   ----------------------------------------------------------------------------
   Why this is its own file: the nav appears on every page, but only the home
   and program pages load site.css — the rest carry their own inline CSS. One
   small file linked from every page keeps the nav in exactly one place.

   It is CSS-only (:hover + :focus-within), so there is no JS to keep in sync
   and it works with a keyboard. Values use var(--token, fallback) so it renders
   correctly on pages that don't define the design tokens.

   The desktop nav is hidden below 900px (site.css line ~331); the mobile menu
   lists the program links inline instead, styled by .nm-subs below.
   ============================================================================ */

/* ---- desktop dropdown ---- */
.nav-dd { position: relative; }
.nav-dd > a { display: inline-flex; align-items: center; gap: 6px; }
.nav-dd-caret {
  flex: none;
  opacity: 0.55;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}
.nav-dd:hover > a .nav-dd-caret,
.nav-dd:focus-within > a .nav-dd-caret { transform: rotate(180deg); opacity: 1; }

/* Invisible bridge: keeps the menu open while the cursor travels down to it. */
.nav-dd::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 24px;
}

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 216px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: rgba(14, 14, 14, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  z-index: 210;
}
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dd-menu li { display: block; }
.nav-dd-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}
/* the nav's underline sweep would look wrong inside a panel */
.nav-dd-menu a::after { display: none; }
.nav-dd-menu a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

/* ---- mobile: flat, indented list under "Programs" ---- */
/* Tuned for the compact drop-down menu (13px items, 8px gap). Sub-items are a
   step smaller and dimmer than their parent so the nesting reads without needing
   any extra chrome. */
.nav-mobile .nm-subs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: -2px 0 2px;
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
}
.nav-mobile .nm-subs a {
  font-family: var(--font-b, 'Inter', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  padding: 6px 0;
}
.nav-mobile .nm-subs a:hover { color: #fff; }

@media (max-width: 900px) {
  .nav-dd-menu { display: none; }   /* desktop nav is hidden here anyway */
}
