/*
 * Shared site header.
 *
 * Every marketing page used to carry its own copy of the nav CSS, which is how
 * the header drifted (different CTA colors, missing "Already a customer?",
 * no mobile menu on the SEO landers). This file is the single source of truth
 * and is linked LAST in each page's <head> so it wins over any leftover
 * page-local .nav* rules without those rules having to be deleted first.
 */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border, #2a2a2a);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 0.3em;
  text-decoration: none;
}

.nav-brand .arp-brand { font-size: 0.95rem; }
.nav-brand .arp-brand-rp { font-size: 0.65rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}

.nav-utility {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  color: var(--text-secondary, #a0a0a0);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent, #4a9eff);
}

.nav-link.active {
  color: var(--text-primary, #ffffff);
}

.nav-login-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-login-link:hover {
  color: var(--accent, #4a9eff);
  border-color: rgba(74, 158, 255, 0.55);
}

.nav-cta {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.95), rgba(44, 107, 255, 0.92));
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(35, 84, 212, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(35, 84, 212, 0.4);
}

.nav-mobile-menu {
  display: none;
  position: relative;
}

.nav-mobile-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #ffffff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.nav-mobile-toggle:hover {
  border-color: rgba(74, 158, 255, 0.45);
  background: rgba(74, 158, 255, 0.08);
  transform: translateY(-1px);
}

.nav-mobile-toggle:focus-visible {
  outline: none;
  border-color: rgba(74, 158, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.16);
}

.nav-mobile-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.nav-mobile-toggle-bars span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-mobile-menu.is-open .nav-mobile-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-mobile-menu.is-open .nav-mobile-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-mobile-menu.is-open .nav-mobile-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.nav-mobile-menu.is-open .nav-mobile-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-mobile-link {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary, #ffffff);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.nav-mobile-link:hover,
.nav-mobile-link:focus-visible {
  outline: none;
  color: #fff;
  border-color: rgba(74, 158, 255, 0.42);
  background: rgba(74, 158, 255, 0.08);
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 18px;
  }
}

@media (max-width: 980px) {
  .nav {
    padding: 14px 16px;
  }
  .nav-utility {
    display: none;
  }
  .nav-links {
    gap: 14px;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .nav-mobile-menu {
    display: block;
  }
}
