/* ===== NAVIGATION — Linear system ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

/* Scrolled state — Linear #0f1011 panel with hairline border */
.site-header.scrolled {
  background: rgba(15, 16, 17, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.07);
  padding: var(--space-3) 0;
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(245, 245, 247, 0.96);
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 590;
  font-feature-settings: "cv01", "ss03";
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.01em;
  transition: color var(--transition-fast);
}

[data-theme="light"] .nav-logo-text { color: var(--color-text); }

.nav-logo-text span {
  color: var(--color-primary);
}

/* ── Nav links — weight 510, 13px cap ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.nav-links a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  font-weight: 510;
  font-feature-settings: "cv01", "ss03";
  color: rgba(255,255,255,0.65);
  border-radius: var(--radius-sm);
  text-decoration: none;
  letter-spacing: 0.005em;
  transition: color var(--transition-fast), background var(--transition-fast);
}

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

.nav-links a.active {
  color: var(--color-primary-hover);
  background: rgba(94,106,210,0.12);
  border: 1px solid rgba(94,106,210,0.2);
}

[data-theme="light"] .nav-links a          { color: var(--color-text-muted); }
[data-theme="light"] .nav-links a:hover    { color: var(--color-text); background: var(--color-surface-offset); }
[data-theme="light"] .nav-links a.active   { color: var(--color-text); background: var(--color-surface-offset); }

/* ── Nav actions ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.theme-toggle:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="light"] .theme-toggle {
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border-color: var(--color-border);
}

[data-theme="light"] .theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-divider);
}

/* ── Mobile hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
}

.nav-hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Mobile nav — full-screen overlay ── */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 9, 10, 0.99);
  backdrop-filter: blur(24px);
  z-index: 200;
  padding: var(--space-24) var(--space-8);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 510;
  font-feature-settings: "cv01", "ss03";
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  text-align: center;
  letter-spacing: var(--ls-heading);
  transition: color var(--transition-fast);
}

.nav-mobile a:hover { color: var(--color-primary); }

.nav-mobile-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.45);
  font-size: 24px;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.nav-mobile-close:hover { color: rgba(255,255,255,0.85); }

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-hamburger { display: flex; }
}

/* ═══════════════════════════════════════
   SERVICES DROPDOWN
   ═══════════════════════════════════════ */

/* Wrapper li — position context for dropdown */
.nav-has-dropdown {
  position: relative;
}

/* Toggle link — !important required to beat .nav-links a { display: block } */
.nav-links .nav-dropdown-toggle {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

/* Chevron — vertically centered with text */
.nav-dropdown-arrow {
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  transition: transform 150ms ease;
}
.nav-has-dropdown:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown panel — hidden by default */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 520px;
  max-width: calc(100vw - 2rem);
  background: #0a0a0f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px;
  z-index: 200;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
}

/* Show on hover — grid layout for two columns */
.nav-has-dropdown:hover .nav-dropdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.nav-dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown-heading {
  font-size: 10px;
  font-weight: 590;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 150ms ease;
}

.nav-dropdown-item:hover {
  background: rgba(255,255,255,0.06);
}

.nav-dropdown-item-name {
  font-size: 13px;
  font-weight: 510;
  color: rgba(255,255,255,0.85);
  font-feature-settings: "cv01","ss03";
  line-height: 1.3;
}

.nav-dropdown-item-desc {
  font-size: 11px;
  color: var(--color-text-faint);
  line-height: 1.4;
}

/* ═══════════════════════════════════════
   MOBILE ACCORDION (Services sub-menu)
   ═══════════════════════════════════════ */

.nav-mobile-accordion {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.nav-mobile-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 510;
  font-feature-settings: "cv01","ss03";
  color: rgba(255,255,255,0.75);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: var(--ls-heading);
  transition: color 150ms ease;
}

.nav-mobile-accordion-toggle:hover {
  color: var(--color-primary);
}

.nav-mobile-accordion-toggle svg {
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}

.nav-mobile-accordion.open .nav-mobile-accordion-toggle svg {
  transform: rotate(180deg);
}

.nav-mobile-accordion-content {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0 4px;
  width: 100%;
}

.nav-mobile-accordion.open .nav-mobile-accordion-content {
  display: flex;
}

.nav-mobile-accordion-content a {
  font-size: var(--text-base) !important;
  color: rgba(255,255,255,0.55) !important;
  letter-spacing: 0 !important;
}

.nav-mobile-accordion-content a:hover {
  color: var(--color-primary) !important;
}
