/* ================================================================
   LAYOUT — Navigation, Footer, Section Wrappers, Responsive Grid
   Mobile-first (375px base). Uses var(--vc-*) tokens exclusively.
   ================================================================ */

/* ----------------------------------------------------------------
   1. NAVIGATION (.site-nav)
   ---------------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--t-fast), box-shadow var(--t-fast),
              border-color var(--t-fast);
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--vc-border-subtle);
  box-shadow: var(--vc-shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 clamp(24px, 3vw, 48px);
}

/* Logo area — pinned far left */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--vc-text-primary);
  line-height: 1;
}

.nav-logo-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

.nav-logo-tagline {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  background: linear-gradient(135deg, #818CF8 0%, #a78bfa 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(129, 140, 248, 0.15);
}

/* Navigation links — dead center */
.nav-links {
  display: none;
  justify-content: center;
  gap: var(--sp-8);
  list-style: none;
  flex: 0 0 auto;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--vc-text-tertiary);
  text-decoration: none;
  transition: color var(--t-fast);
  position: relative;
  padding: var(--sp-2) 0;
}

.nav-link:hover {
  color: var(--vc-text-primary);
  text-decoration: none;
}

.nav-link.active {
  color: var(--vc-text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--vc-accent);
  border-radius: 1px;
}

/* Navigation actions — pinned far right */
.nav-actions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--vc-border-default);
  background: var(--vc-bg-glass);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--vc-text-tertiary);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--vc-border-emphasis);
  background: var(--vc-bg-glass-hover);
  color: var(--vc-text-primary);
}

/* Show sun in dark mode, moon in light mode */
.theme-icon-moon { display: none; }
.theme-icon-sun  { display: block; }
[data-theme="light"] .theme-icon-moon { display: block; }
[data-theme="light"] .theme-icon-sun  { display: none; }

/* Hamburger — mobile only */
.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--vc-text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--t-fast);
}

.nav-hamburger:hover {
  color: var(--vc-text-primary);
}

.nav-hamburger svg {
  width: 24px;
  height: 24px;
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--vc-bg-base);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: var(--sp-24) var(--sp-6) var(--sp-6);
  overflow-y: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--vc-text-secondary);
  cursor: pointer;
  transition: color var(--t-fast);
}

.mobile-menu-close:hover {
  color: var(--vc-text-primary);
}

.mobile-menu-close svg {
  width: 24px;
  height: 24px;
}

.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.mobile-menu-link {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: var(--vc-text-secondary);
  text-decoration: none;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--vc-border-subtle);
  transition: color var(--t-fast);
}

.mobile-menu-link:hover {
  color: var(--vc-text-primary);
  text-decoration: none;
}

.mobile-menu-actions {
  margin-top: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* Body lock when menu is open */
body.menu-open {
  overflow: hidden;
}

/* ----------------------------------------------------------------
   2. DESKTOP BREAKPOINT (>768px)
   ---------------------------------------------------------------- */

@media (min-width: 769px) {
  .nav-links {
    display: flex;
  }

  .nav-hamburger {
    display: none;
  }

  .mobile-menu {
    display: none;
  }
}

/* ----------------------------------------------------------------
   3. MOBILE OVERRIDES (<=768px)
   ---------------------------------------------------------------- */

@media (max-width: 768px) {
  .nav-actions .btn-ghost {
    display: none;
  }
}

/* ----------------------------------------------------------------
   4. FOOTER (.site-footer)
   ---------------------------------------------------------------- */

.site-footer {
  background: var(--vc-bg-base);
  border-top: 1px solid var(--vc-border-subtle);
  padding: var(--sp-16) 0 var(--sp-10);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
}

/* Footer brand */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer-logo img {
  border-radius: 6px;
}

.footer-brand .nav-logo-text {
  font-size: 20px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--vc-text-tertiary);
  font-style: italic;
  line-height: 1.5;
}

/* Footer links */
.footer-links {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.footer-link {
  font-size: 14px;
  color: var(--vc-text-tertiary);
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer-link:hover {
  color: var(--vc-accent);
  text-decoration: none;
}

/* Footer badges (compliance, certifications, etc.) */
.footer-badges {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  flex-wrap: wrap;
}

.footer-badge {
  font-size: 12px;
  color: var(--vc-text-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  white-space: nowrap;
}

.footer-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Footer bottom */
.footer-bottom {
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--vc-border-subtle);
  text-align: center;
  font-size: 13px;
  color: var(--vc-text-muted);
  line-height: 1.6;
}

.footer-bottom a {
  color: var(--vc-text-tertiary);
}

.footer-bottom a:hover {
  color: var(--vc-accent);
}

/* Desktop footer — three columns */
@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: start;
  }
}

/* Mobile footer — center aligned */
@media (max-width: 768px) {
  .footer-grid {
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-badges {
    justify-content: center;
  }
}

/* ----------------------------------------------------------------
   5. SECTION WRAPPERS
   ---------------------------------------------------------------- */

.section {
  padding: var(--sp-16) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-16);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  margin-top: var(--sp-3);
}

.section-header .section-desc {
  margin-top: var(--sp-4);
}

/* Section divider — gradient line */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--vc-border-emphasis), transparent);
  max-width: 600px;
  margin: 0 auto;
  border: none;
}

/* Desktop sections get more vertical padding */
@media (min-width: 769px) {
  .section {
    padding: var(--sp-24) 0;
  }
}
