/* ==========================================================================
   OUTDONE DESIGN SYSTEM — LAYOUT & CONNECTORS
   Top Connectors Bar, Primary Navigation, Responsive Header, Architectural Footer
   ========================================================================== */

/* Top bar above nav has been removed per specification */
.top-telemetry-bar {
  display: none !important;
}

/* --------------------------------------------------------------------------
   2. PRIMARY NAVIGATION BAR
   -------------------------------------------------------------------------- */
.primary-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-base), border-color var(--transition-base);
}

/* Conditional visibility: Hidden on homepage for new or non-signed in users */
html.hide-nav-unsigned .primary-header,
html.hide-nav-unsigned .mobile-nav-drawer {
  display: none !important;
}

html.hide-nav-unsigned .hero-section {
  padding-top: clamp(80px, 14vh, 140px);
}

.primary-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Brand Identity */
.brand-identity-anchor {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
}

.brand-monogram {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1D4ED8 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.04em;
  box-shadow: 0 2px 8px var(--brand-blue-glow);
  position: relative;
  overflow: hidden;
}

.brand-monogram::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.brand-name-group {
  display: flex;
  flex-direction: column;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Navigation Links */
.header-nav-links {
  display: none;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

@media (min-width: 992px) {
  .header-nav-links {
    display: flex;
  }
}

.nav-item-link {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-item-link:hover,
.nav-item-link.active {
  color: var(--text-primary);
}

.nav-item-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-blue);
  border-radius: var(--radius-full);
}

/* Subdomain Quick Switcher Trigger */
.subdomain-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 12px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.subdomain-dropdown-trigger:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

/* Header Action Controls */
.header-actions-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Theme Toggle Component */
.theme-switcher-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  color: var(--text-primary);
}

.theme-btn.active {
  background: var(--bg-canvas);
  color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

@media (min-width: 992px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   3. MOBILE NAVIGATION DRAWER
   -------------------------------------------------------------------------- */
.mobile-nav-drawer {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-canvas);
  z-index: 99;
  padding: var(--space-lg);
  display: none;
  flex-direction: column;
  gap: var(--space-lg);
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle);
}

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

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mobile-nav-item a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   4. ARCHITECTURAL FOOTER
   -------------------------------------------------------------------------- */
.master-footer {
  background: var(--bg-surface-0);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  font-size: 0.88rem;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
  .footer-top-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
  }
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-brand-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-security-seal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  width: fit-content;
}

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--space-base);
  text-transform: uppercase;
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-link-list a:hover {
  color: var(--brand-blue);
}

.subdomain-badge,
.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 4px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

/* Brands Full Directory Grid in Footer */
.footer-categories-drawer {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.categories-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.categories-grid-condensed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .categories-grid-condensed {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .categories-grid-condensed {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-mini-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.78rem;
  transition: all var(--transition-fast);
}

.category-mini-link:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue-subtle);
  color: var(--brand-blue);
  transform: translateX(2px);
}

/* Footer Bottom Bar */
.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-bottom-bar {
    flex-direction: row;
  }
}

.footer-bottom-meta {
  display: flex;
  align-items: center;
  gap: var(--space-base);
  flex-wrap: wrap;
}
