/* Mountainview Mortgage — Navigation */

/* Skip link — visually hidden until focused, then pinned top-left so keyboard
   users can jump past the fixed nav straight to main content. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: var(--space-3) var(--space-5);
  background: var(--color-navy-900);
  color: var(--color-white);
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid var(--color-mountain-blue);
}

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition-slow), backdrop-filter var(--transition-slow);
}

/* Transparent state (on hero) */
.site-nav:not(.is-locked) {
  background: transparent;
}

/* Locked state (scrolled past hero) */
.site-nav.is-locked {
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--nav-height);
}

/* Logo: the HORIZONTAL lockup (icon + "MOUNTAINVIEW MORTGAGE") at EVERY
   width — brand authority in the hamburger bar too (client decision
   2026-07; it previously swapped to the bare mountain icon on mobile).
   Fluid max-width lets it shrink proportionally on the narrowest phones
   (object-fit keeps the ratio) instead of colliding with the hamburger. */
.nav__logo { display: flex; align-items: center; flex-shrink: 0; min-width: 0; }
.nav__logo-full {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(296px, calc(100vw - 128px));
  object-fit: contain;
  object-position: left center;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0 auto;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  white-space: nowrap;   /* a squeezed bar must never stack a label */
  transition: opacity var(--transition-base);
}
.nav__links a:hover { opacity: 0.75; }

.nav__ctas {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.btn--sm { padding: var(--space-2) var(--space-4); font-size: 0.875rem; white-space: nowrap; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-left: auto;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition-base);
}

.nav__mobile { display: none; }

/* Hamburger cuts in wherever the full bar stops fitting (lockup + links +
   CTA measure ~1092px incl. padding) — NOT at a "tablet" width; 769–1295px
   used to clip the CTAs clean off the screen. Must match the logo-swap
   breakpoint above. */
@media (max-width: 1139px) {
  .nav__links,
  .nav__ctas { display: none; }

  .nav__hamburger { display: flex; }

  .nav__mobile {
    display: block;
    background: var(--color-navy-900);  /* solid — page text ghosts through at 0.98 */
    padding: var(--space-6);
  }
  .nav__mobile[hidden] { display: none !important; }

  .nav__mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .nav__mobile a {
    color: var(--color-white);
    font-size: 1.125rem;
  }
}
