/* Shared site navigation.
   Markup is injected by nav.js into <nav id="site-nav">; all styling lives here,
   so nav changes happen in one place. Two variants:
     • default        — solid sticky bar (service pages)
     • .nav--overlay  — transparent, fixed over a hero; solidifies on scroll
                        (via .scrolled, toggled in nav.js) and when the mobile
                        menu is open. */

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.6rem;               /* reserve height so injection causes no layout shift */
  padding: 1.2rem 3rem;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(34, 37, 42, 0.12);
}
nav.nav--overlay {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.3s, border-color 0.3s;
}
nav.nav--overlay.scrolled { background: var(--bg); border-bottom-color: rgba(34, 37, 42, 0.12); }

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  white-space: nowrap;
}
.nav-logo-main { transition: color 0.2s; }
.nav-logo .nav-logo-suffix { color: var(--charcoal-light); }
.nav-logo:hover .nav-logo-main { color: var(--orange); }   /* hover: "Occam's" turns orange */
.nav-mark { width: 36px; height: 36px; flex-shrink: 0; display: block; }
.nav-mark img { width: 100%; height: 100%; display: block; }

.nav-right { display: flex; align-items: center; gap: 1.75rem; }
.nav-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--charcoal); }
.nav-link.active { border-bottom: 2px solid var(--orange); padding-bottom: 2px; }
.nav-cta {
  background: var(--orange);
  color: #f7f4eb;
  padding: 0.55rem 1.4rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--orange-bright); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--charcoal);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

@media (max-width: 860px) {
  nav { padding: 1rem 1.5rem; min-height: 3.9rem; }
  .nav-toggle { display: flex; }

  /* Links + CTA drop out of the bar into a full-width panel below it. */
  .nav-right {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 1.5rem 1.3rem;
    background: var(--bg);
    border-bottom: 1px solid rgba(34, 37, 42, 0.12);
    box-shadow: 0 14px 26px rgba(34, 37, 42, 0.12);
  }
  nav.open .nav-right { display: flex; }
  nav.nav--overlay.open { background: var(--bg); border-bottom-color: rgba(34, 37, 42, 0.12); }

  nav.open .nav-right .nav-link {
    display: block;
    padding: 0.95rem 0.15rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--charcoal);
    border-bottom: 1px solid rgba(34, 37, 42, 0.08);
  }
  nav.open .nav-right .nav-link.active { color: var(--orange); }
  .nav-right .nav-cta { margin-top: 1.1rem; text-align: center; padding: 0.9rem 1.4rem; font-size: 1rem; }

  nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  nav { padding: 0.8rem 1.1rem; min-height: 3.4rem; }
  .nav-logo { font-size: 1.3rem; gap: 0.5rem; }
  .nav-mark { width: 30px; height: 30px; }
}
