/* ════════════════════════════════════════════
   nav.css — Unified Enterprise Navigation
   9Bit Studios Brand Family — Hub-and-Spoke
   Apple HIG: 44px targets, SF Pro, WCAG AA
   Depends on tokens.css
   ════════════════════════════════════════════ */

/* ── Global Nav (top bar — logo + cross-site links) ── */
.global-nav, .enterprise-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 101;
  background: rgba(1,0,5,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(90,200,250,0.06);
  height: 44px;
}

.global-nav-inner, .enterprise-nav-inner {
  width: 100%;
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 0 var(--section-x, 24px);
  display: flex; align-items: center; justify-content: space-between;
  height: 44px;
  box-sizing: border-box;
}

.enterprise-nav-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
  flex-shrink: 0;
  margin: 0; padding: 0;
  line-height: 1;
}
.enterprise-nav-brand:hover { opacity: 1; color: inherit; }
.enterprise-nav-logo {
  width: 22px; height: 22px;
  max-width: 22px; max-height: 22px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.enterprise-nav-wordmark {
  font-size: 11px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--text-primary, rgba(255,255,255,0.96));
  white-space: nowrap;
  margin: 0; padding: 0;
  line-height: 1;
}

.enterprise-nav-links {
  display: flex; align-items: flex-end;
  gap: 0;
  flex-shrink: 0;
  margin: 0; padding: 0;
  line-height: 1;
}
.enterprise-nav-links a {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  text-decoration: none;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  line-height: 1;
  transition: color var(--transition-base, 0.25s);
}
.enterprise-nav-links a:hover { color: var(--text-primary, rgba(255,255,255,0.96)); }
.enterprise-nav-links a.active {
  color: var(--text-secondary, rgba(255,255,255,0.72));
  font-weight: 500;
}
.enterprise-nav-links .ent-sep {
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  font-size: 10px;
  opacity: 0.3;
  user-select: none;
  margin: 0 12px;
  line-height: 1;
}

/* ── Local Nav (brand channel — below global bar) ── */
nav.local-nav, nav.channel-nav, nav.top-nav {
  position: fixed; top: 44px; left: 0; right: 0; z-index: 100;
  background: rgba(10,6,33,0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border, rgba(90,200,250,0.12));
}
.nav-inner {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 0 var(--section-x, 24px);
  display: flex; align-items: stretch; justify-content: space-between;
  height: 52px;
}

/* ── Channel label (brand name in local nav) ── */
.channel-label {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary, rgba(255,255,255,0.96));
  letter-spacing: -0.2px;
  text-decoration: none;
  display: flex; align-items: center;
}
.channel-label:hover { color: var(--text-primary, rgba(255,255,255,0.96)); }

/* ── Legacy brand lockup (kept for backward compat on unapplied pages) ── */
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
}
.nav-brand:hover { opacity: 1; color: inherit; }
.nav-logo {
  width: 22px; height: 22px;
  border-radius: 4px;
  object-fit: contain;
}
.nav-wordmark {
  font-size: 12px; font-weight: 600; letter-spacing: -0.2px;
  color: var(--text-primary, rgba(255,255,255,0.96));
}
.nav-sep {
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  font-size: 12px; font-weight: 300;
  margin: 0 1px; opacity: 0.5;
}
.nav-badge {
  font-size: 9px; padding: 2px 7px;
  border-radius: var(--r-pill, 9999px);
  background: rgba(90,200,250,0.08);
  border: 1px solid var(--glass-border, rgba(90,200,250,0.12));
  color: var(--cyan, #5AC8FA);
  letter-spacing: 0.3px;
}

/* ── Nav links ─────────────────────────────── */
.nav-links {
  display: flex; gap: var(--sp-3, 24px); align-items: stretch;
  height: 100%;
}
.nav-links a {
  font-size: 12px;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  font-weight: 400;
  padding: 0;
  position: relative;
  transition: color var(--transition-base, 0.25s);
  text-decoration: none;
  display: flex; align-items: center;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; border-radius: 1px;
  background: var(--cyan, #5AC8FA);
  transform: scaleX(0);
  transition: transform var(--transition-base, 0.25s);
}
.nav-links a:hover { color: var(--text-primary, rgba(255,255,255,0.96)); opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--text-primary, rgba(255,255,255,0.96)); font-weight: 500; }
.nav-links a.active::after { transform: scaleX(1); }

/* ── Hamburger (mobile) ────────────────────── */
.nav-hamburger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  padding: 12px 10px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-hamburger span {
  display: block; height: 2px; width: 24px;
  background: var(--text-secondary, rgba(255,255,255,0.72));
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ─────────────────────────── */
.nav-mobile-drawer {
  display: none;
  position: fixed; top: 76px; left: 0; right: 0; bottom: 0;
  background: rgba(1,0,5,0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 99;
  padding: var(--sp-4, 32px) var(--section-x, 24px);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.nav-mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile-drawer .mobile-section {
  margin-bottom: var(--sp-4, 32px);
}
.nav-mobile-drawer .mobile-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan, #5AC8FA);
  margin-bottom: var(--sp-2, 16px);
}
.nav-mobile-drawer a {
  display: block;
  font-size: 17px; font-weight: 400;
  color: var(--text-secondary, rgba(255,255,255,0.72));
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  min-height: 44px;
  transition: color var(--transition-base, 0.25s);
}
.nav-mobile-drawer a:hover { color: var(--text-primary, rgba(255,255,255,0.96)); }
.nav-mobile-drawer a.active { color: var(--text-primary, rgba(255,255,255,0.96)); font-weight: 600; }

/* ── Section Nav (scope page siblings) ─────── */
.section-nav {
  position: fixed; top: 76px; left: 0; right: 0; z-index: 99;
  background: rgba(1,0,5,0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(90,200,250,0.06);
  height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.section-nav-inner {
  max-width: var(--container-max, 1280px);
  width: 100%;
  padding: 0 var(--section-x, 24px);
  display: flex; align-items: center;
  gap: var(--sp-3, 24px);
}
.section-nav a {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition-base, 0.25s);
  white-space: nowrap;
}
.section-nav a::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; border-radius: 1px;
  background: var(--dew-sage, #52B788);
  transform: scaleX(0);
  transition: transform var(--transition-base, 0.25s);
}
.section-nav a:hover { color: var(--text-primary, rgba(255,255,255,0.96)); }
.section-nav a:hover::after { transform: scaleX(1); }
.section-nav a.active {
  color: var(--text-primary, rgba(255,255,255,0.96));
  font-weight: 600;
}
.section-nav a.active::after { transform: scaleX(1); }

/* ── Content offset for fixed nav ──────────── */
.page { padding-top: 96px; }

/* ── Mobile drawer position ──────────────── */
.nav-mobile-drawer { top: 96px; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  .global-nav, .enterprise-nav { display: none; }
  nav.local-nav, nav.channel-nav, nav.top-nav { top: 0; }
  .section-nav { top: 44px; }
  .page { padding-top: 44px; }
  .page.has-section-nav { padding-top: 80px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-drawer { display: block; top: 44px; }
  .page.has-section-nav .nav-mobile-drawer { top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-mobile-drawer { transition: none; }
  .nav-hamburger span { transition: none; }
}

/* ════════════════════════════════════════════
   UNIFIED ENTERPRISE FOOTER
   Apple-inspired: breadcrumbs → columns → legal
   ════════════════════════════════════════════ */

/* ── Breadcrumbs (Apple ac-gf-breadcrumbs pattern) ── */
.ent-footer { border-top: 1px solid rgba(255,255,255,0.06); }

.ent-footer-breadcrumbs {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: var(--sp-2, 16px) var(--section-x, 24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.breadcrumb-trail {
  display: flex; align-items: center; gap: 0;
  list-style: none; margin: 0; padding: 0;
  font-size: 12px;
}
.breadcrumb-trail li { display: flex; align-items: center; }
.breadcrumb-trail a {
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  text-decoration: none;
  transition: color var(--transition-base, 0.25s);
}
.breadcrumb-trail a:hover { color: var(--text-primary, rgba(255,255,255,0.96)); }
.breadcrumb-sep {
  margin: 0 8px;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  font-size: 10px;
  opacity: 0.5;
  user-select: none;
}
.breadcrumb-current {
  color: var(--text-secondary, rgba(255,255,255,0.72));
  font-weight: 500;
}

/* ── Footer Brand (logo + tagline + socials) ── */
.ent-footer-brand {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: var(--sp-4, 32px) var(--section-x, 24px) var(--sp-3, 24px);
}
.footer-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.footer-logo-icon {
  width: 32px; height: 32px;
  border-radius: 6px;
}
.footer-logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary, rgba(255,255,255,0.96));
}
.footer-tagline {
  font-size: 12px;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  margin-top: 6px;
}
.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  transition: color var(--transition-base, 0.25s), background var(--transition-base, 0.25s);
}
.footer-social:hover {
  color: var(--text-primary, rgba(255,255,255,0.96));
  background: rgba(255,255,255,0.08);
}

/* ── Footer Columns ──────────────────────── */
.ent-footer-columns {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: var(--sp-8, 80px) var(--section-x, 24px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-4, 32px);
}
.ent-footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-primary, rgba(255,255,255,0.96));
  margin-bottom: var(--sp-2, 16px);
}
.ent-footer-links {
  display: flex; flex-direction: column; gap: 8px;
}
.ent-footer-links a {
  font-size: 12px;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  text-decoration: none;
  transition: color var(--transition-base, 0.25s);
  line-height: 1.4;
}
.ent-footer-links a:hover {
  color: var(--text-primary, rgba(255,255,255,0.96));
}

/* ── Footer Legal Bar ────────────────────── */
.ent-footer-legal {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: var(--sp-2, 16px) var(--section-x, 24px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2, 16px);
  font-size: 11px;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
}
.ent-footer-legal a {
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  text-decoration: none;
  transition: color var(--transition-base, 0.25s);
}
.ent-footer-legal a:hover {
  color: var(--text-primary, rgba(255,255,255,0.96));
}
.ent-footer-legal-links {
  display: flex; gap: var(--sp-2, 16px);
  flex-wrap: wrap;
}
.ent-footer-legal-sep {
  opacity: 0.3;
  user-select: none;
}

@media (max-width: 768px) {
  .ent-footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3, 24px);
  }
  .ent-footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }
}
