/* ============================================================
   HAKI TECH CONSULTING — NAVIGATION
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-dark);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}
@media (min-width: 768px) { .nav-inner { padding-inline: 40px; } }
@media (min-width: 1200px) { .nav-inner { padding-inline: 48px; } }

.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

/* --- Desktop links ---------------------------------------- */
.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.nav-links a,
.nav-dropdown > .nav-drop-trigger {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  padding: 6px 14px;
  position: relative;
  border-radius: var(--radius-sm);
  transition: color var(--transition-base);
  background: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

/* animated underline */
.nav-links a::after,
.nav-dropdown > .nav-drop-trigger::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover,
.nav-dropdown > .nav-drop-trigger:hover { color: var(--color-white); }
.nav-links a:hover::after,
.nav-dropdown > .nav-drop-trigger:hover::after { transform: scaleX(1); }

.nav-links a.active { color: var(--color-white); }
.nav-links a.active::after { transform: scaleX(1); }

/* Quote CTA pill */
.nav-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-black) !important;
  background: var(--color-accent);
  padding: 8px 18px !important;
  border-radius: 2px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background var(--transition-base), box-shadow var(--transition-base) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: var(--color-accent-dim) !important;
  color: var(--color-black) !important;
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

/* --- Dropdown --------------------------------------------- */
.nav-dropdown { position: relative; }

.nav-drop-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.nav-drop-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-base);
}
.nav-dropdown.open .nav-drop-trigger svg {
  transform: rotate(180deg);
}

.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-near-black);
  border: var(--border-dark);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.nav-dropdown.open .nav-drop-menu { display: block; }

.nav-drop-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  border-radius: 2px;
  transition: background var(--transition-base), color var(--transition-base);
}
.nav-drop-menu a::after { display: none; }
.nav-drop-menu a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--color-white);
}
.nav-drop-menu a .drop-icon {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  background: rgba(201,168,76,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
}
.nav-drop-menu a .drop-icon svg { width: 16px; height: 16px; }
.drop-label { font-weight: 500; }
.nav-drop-menu a:not(:last-child) { border-bottom: var(--border-dark); }

/* --- Hamburger -------------------------------------------- */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
@media (min-width: 900px) { .nav-hamburger { display: none; } }

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Mobile overlay --------------------------------------- */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-black);
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 40px 40px;
}
.nav-mobile-overlay.open { display: flex; }

.nav-mobile-overlay .mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.nav-mobile-overlay .mobile-links a,
.nav-mobile-overlay .mobile-links button.mobile-drop-trigger {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  padding: 12px 0;
  border-bottom: var(--border-dark);
  transition: color var(--transition-base);
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.nav-mobile-overlay .mobile-links a:hover,
.nav-mobile-overlay .mobile-links a.active { color: var(--color-white); }

.nav-mobile-overlay .mobile-sub {
  display: none;
  flex-direction: column;
  padding-left: 20px;
  gap: 0;
  border-left: 2px solid rgba(201,168,76,0.3);
  margin-top: 4px;
  margin-bottom: 8px;
}
.nav-mobile-overlay .mobile-sub.open { display: flex; }
.nav-mobile-overlay .mobile-sub a {
  font-size: 1.1rem;
  padding: 8px 0;
  border-bottom: none;
  color: var(--color-grey-mid);
}
.nav-mobile-overlay .mobile-sub a:hover { color: var(--color-accent); }

.nav-mobile-overlay .mobile-cta {
  margin-top: 32px;
}
.nav-mobile-overlay .mobile-contact {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-grey-mid);
  letter-spacing: 0.08em;
}

/* Staggered entrance animation for mobile links */
.nav-mobile-overlay.open .mobile-links a,
.nav-mobile-overlay.open .mobile-links button {
  animation: slideInLeft 0.4s ease forwards;
  opacity: 0;
}
.nav-mobile-overlay.open .mobile-links > *:nth-child(1) { animation-delay: 0.05s; }
.nav-mobile-overlay.open .mobile-links > *:nth-child(2) { animation-delay: 0.10s; }
.nav-mobile-overlay.open .mobile-links > *:nth-child(3) { animation-delay: 0.15s; }
.nav-mobile-overlay.open .mobile-links > *:nth-child(4) { animation-delay: 0.20s; }
.nav-mobile-overlay.open .mobile-links > *:nth-child(5) { animation-delay: 0.25s; }
.nav-mobile-overlay.open .mobile-links > *:nth-child(6) { animation-delay: 0.30s; }
.nav-mobile-overlay.open .mobile-links > *:nth-child(7) { animation-delay: 0.35s; }

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
