/* Full original CYBERVIS navigation, matching index.html. */
.nav-links,.nav-sub { margin: 0; padding: 0; }
.site-nav {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: calc(100% - 40px);
  max-width: 1240px;
  transition: top 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 100px;
  padding: 10px 12px 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.25);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-logo img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-links > li > a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 100px;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.nav-links > li > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Services & products dropdown */
.nav-drop { position: relative; }
.nav-drop > a::after { content: ' \25BE'; font-size: 9px; opacity: 0.55; }
.nav-sub {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px; white-space: nowrap;
  background: #1A1A2E; border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px; padding: 8px; list-style: none; z-index: 200;
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all 0.18s ease;
}
.nav-sub::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-drop:hover .nav-sub, .nav-drop:focus-within .nav-sub {
  opacity: 1; visibility: visible; transform: none;
}
.nav-sub .sub-label {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35); padding: 9px 14px 3px; font-weight: 600;
}
.nav-sub li a {
  display: block; padding: 8px 14px; border-radius: 10px;
  color: rgba(255, 255, 255, 0.75); font-size: 13px; font-weight: 500;
  transition: all 0.15s ease;
}
.nav-sub li a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-sub li a span { color: rgba(255, 255, 255, 0.4); font-size: 11px; margin-left: 6px; }

.nav-cta-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  /* Keep every label on a single line — the two-line wrap was the ugly part. */
  white-space: nowrap;
  flex-shrink: 0;
  padding: 8px 15px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
}

/* Ghost buttons read as a quiet, cohesive set: outline only, fill on hover. */
.nav-cta.ghost {
  color: rgba(255, 255, 255, 0.78) !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.nav-cta.ghost:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

/* Client portal is the one clear call-to-action: solid, subtly lifted. */
.nav-cta.primary {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.nav-cta.primary:hover {
  background: #f4f4f6 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
}

.nav-cta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  display: inline-block;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
  pointer-events: none;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile nav drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #1A1A2E 0%, #2D1F4A 100%);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  overflow-y: auto;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
}
body.menu-open { overflow: hidden; }
body.menu-open .site-nav { visibility: hidden; }

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 28px;
}
.mobile-menu-head img {
  height: 36px;
  filter: brightness(0) invert(1);
}
.mobile-menu-close {
  width: 40px;
  height: 40px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding-top: 8px;
}
.mobile-menu-links a {
  color: rgba(255,255,255,0.92);
  font-size: 26px;
  font-weight: 500;
  padding: 14px 4px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.15s ease, padding-left 0.2s ease;
}
.mobile-menu-links a::after {
  content: "\2192";
  font-size: 18px;
  opacity: 0;
  color: #FF6B2B;
  transition: opacity 0.15s ease, transform 0.2s ease;
}
.mobile-menu-links a:active,
.mobile-menu-links a:focus {
  color: #fff;
  padding-left: 8px;
}
.mobile-menu-links a:active::after { opacity: 1; transform: translateX(2px); }

.mobile-menu-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 0 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 20px;
}
.mobile-menu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 52px;
  transition: transform 0.12s ease, background 0.15s ease;
}
.mobile-menu-ctas .nav-cta {
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 16px 22px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}
.mobile-menu-cta.primary {
  background: #fff;
  color: #1A1A2E;
}
.mobile-menu-cta.primary .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF6B2B;
  box-shadow: 0 0 10px rgba(255,107,43,0.6);
}
.mobile-menu-cta.ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
}
.mobile-menu-cta:active { transform: scale(0.98); }

.mobile-menu-footer {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  padding-top: 16px;
  letter-spacing: 0.02em;
}

/* Stagger-in animation for links when menu opens */
.mobile-menu.open .mobile-menu-links a {
  animation: menuLinkIn 0.35s cubic-bezier(0.2,0.8,0.2,1) both;
}
.mobile-menu.open .mobile-menu-links a:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.open .mobile-menu-links a:nth-child(2) { animation-delay: 0.09s; }
.mobile-menu.open .mobile-menu-links a:nth-child(3) { animation-delay: 0.13s; }
.mobile-menu.open .mobile-menu-links a:nth-child(4) { animation-delay: 0.17s; }
.mobile-menu.open .mobile-menu-links a:nth-child(5) { animation-delay: 0.21s; }
.mobile-menu.open .mobile-menu-links a:nth-child(6) { animation-delay: 0.25s; }
@keyframes menuLinkIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu-links a { transition: none !important; animation: none !important; }
}

/* Nav: compact, denser state once the page is scrolled; active section */
.site-nav.scrolled { top: calc(10px + env(safe-area-inset-top, 0px)); }
.site-nav.scrolled .nav-inner {
  background: rgba(26, 26, 46, 0.97);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.5);
}
.nav-links > li > a { position: relative; }
.nav-links > li > a.active { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-links > li > a.active::before {
  content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent); transform: translateX(-50%);
}


/* Offscreen navigation must not extend the page or receive keyboard focus. */
.mobile-menu { visibility: hidden; }
.mobile-menu.open { visibility: visible; }
.mobile-menu-head,.mobile-menu-ctas,.mobile-menu-footer { flex-shrink: 0; }
.nav-sub a[aria-current="page"] { color: #ffffff; background: rgba(255,255,255,.08); }
.mobile-menu-links a[aria-current="page"] { color: #ffffff; }
.skip-link { z-index: 10003; }
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 768px) {
  .nav-inner { padding: 6px 6px 6px 18px; border-radius: 100px; }
  .site-nav { top: calc(10px + env(safe-area-inset-top, 0px)); width: calc(100% - 24px); }
  .nav-logo img { height: 32px; }
}
