/* DefMetrix top navigation, extracted from /css/style.css for use on Materials
   Atlas pages, which are a real multi-page site (not the SPA shell) and so
   need their own copy of the nav rather than the shell's global stylesheet
   (which sets html,body{overflow:hidden} for the single-page app — fine
   there, fatal here, since these are normal scrolling pages).
   Only variables NOT already defined by atlas.css are declared below;
   --bg/--border/--accent/--accent-soft/--text already match. */
:root {
  --navy:      #16283c;
  --navy-text: #c8d4e0;
  --surface:   #ffffff;
  --muted:     #64748b;
  --mono:      'IBM Plex Mono', monospace;
  --sans:      'Inter', -apple-system, 'Segoe UI', sans-serif;
  --display:   'Inter', -apple-system, 'Segoe UI', sans-serif;
  --nav-h:     60px;
}

.top-nav {
  height: var(--nav-h);
  flex-shrink: 0;
  background: var(--navy);
  border-bottom: 1px solid var(--navy);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
  z-index: 100;
  position: relative;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-name {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.nav-logo-sub {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--navy-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-spacer { flex: 1; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1.25rem;
}

.nav-item { position: relative; }

.nav-link {
  background: none;
  border: none;
  color: var(--navy-text);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active { color: #fff; background: rgba(255,255,255,0.14); }

.nav-caret {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
  transition: transform 0.15s;
}

.nav-item.open .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(22,40,60,0.16);
  padding: 0.5rem;
  min-width: 330px;
  display: none;
  z-index: 300;
}

.nav-item.open .nav-dropdown { display: block; }

.nav-dropdown-wide {
  min-width: 340px;
  max-height: calc(100vh - var(--nav-h) - 24px);
  overflow-y: auto;
}

.drop-group-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.6rem 0.75rem 0.3rem;
}

.drop-group-label:first-child { padding-top: 0.35rem; }

.nav-drop-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.12s;
}

.nav-drop-item:hover { background: var(--accent-soft); }
.nav-drop-item.active { background: var(--accent-soft); }
.nav-drop-item.active .drop-name { color: var(--accent); }

.drop-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-icon svg { width: 15px; height: 15px; stroke-width: 1.75; }

.drop-name {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.drop-desc {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--navy-text);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
}

.nav-hamburger:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-hamburger svg { width: 22px; height: 22px; stroke-width: 2; }

@media (max-width: 860px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    margin: 0;
    gap: 0.15rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    z-index: 250;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .nav-link { width: 100%; justify-content: flex-start; }
  .nav-dropdown {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0.25rem 0.75rem;
    min-width: 0;
  }
  .nav-drop-item:hover { background: rgba(255,255,255,0.08); }
  .nav-drop-item.active { background: rgba(255,255,255,0.12); }
  .drop-name { color: #e6edf5; }
  .nav-drop-item.active .drop-name { color: #fff; }
  .drop-desc { color: #93a5b8; }
  .drop-group-label { color: #7d90a6; }
  .nav-dropdown-wide { max-height: none; overflow: visible; }
  .nav-hamburger { display: flex; }
}

/* DefMetrix site footer (About/Contact/Privacy/LinkedIn), matching the rest
   of the site — sits below the atlas's own local footer. */
.site-footer {
  height: 38px;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  z-index: 100;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover { color: var(--accent); }

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-divider {
  color: var(--border);
}
