/* ============================================================
   site-nav.css — GS Take Home Pay Calculator
   Site-wide header, footer, breadcrumbs, and navigation
   Design tokens match Session 3 calculator page exactly.
   ============================================================ */

/* --- Design Tokens (mirrored from calculator) --- */
:root {
  --nav-bg: #0a0f1a;
  --nav-surface: #111827;
  --nav-border: #1e2a3a;
  --nav-text: #e2e8f0;
  --nav-text-muted: #94a3b8;
  --nav-accent: #3b82f6;
  --nav-accent-hover: #60a5fa;
  --nav-green: #22c55e;
  --nav-green-hover: #4ade80;
  --nav-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nav-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-max-width: 1200px;
  --nav-radius: 8px;
}

/* --- Site Header --- */
.site-header {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: var(--nav-font);
}

.site-header-inner {
  max-width: var(--nav-max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--nav-text);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-logo .logo-year {
  color: var(--nav-green);
  font-family: var(--nav-mono);
  font-size: 13px;
  font-weight: 500;
}

/* --- Primary Nav --- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--nav-radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--nav-text);
  background: rgba(59, 130, 246, 0.1);
}

.site-nav a.active {
  color: var(--nav-accent);
  background: rgba(59, 130, 246, 0.12);
}

/* Dropdown containers */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-trigger::after {
  content: '';
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.5;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--nav-surface);
  border: 1px solid var(--nav-border);
  border-radius: var(--nav-radius);
  padding: 8px 0;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  max-height: 400px;
  overflow-y: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 0;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: rgba(59, 130, 246, 0.1);
}

.nav-dropdown-section {
  padding: 6px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nav-text-muted);
  opacity: 0.6;
}

/* --- Mobile Menu Toggle --- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--nav-text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--nav-radius);
  line-height: 0;
}

.mobile-menu-btn:hover {
  background: rgba(59, 130, 246, 0.1);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* --- Grade Bar (compact horizontal grade links) --- */
.grade-bar {
  background: var(--nav-surface);
  border-bottom: 1px solid var(--nav-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  font-family: var(--nav-font);
}

.grade-bar::-webkit-scrollbar {
  display: none;
}

.grade-bar-inner {
  max-width: var(--nav-max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
}

.grade-bar a {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  font-family: var(--nav-mono);
}

.grade-bar a:hover,
.grade-bar a:focus-visible {
  color: var(--nav-text);
  background: rgba(59, 130, 246, 0.1);
}

.grade-bar a.active {
  color: #fff;
  background: var(--nav-accent);
}

.grade-bar .grade-bar-label {
  color: var(--nav-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 8px;
  white-space: nowrap;
  font-family: var(--nav-font);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-family: var(--nav-font);
  font-size: 13px;
  color: var(--nav-text-muted);
  max-width: var(--nav-max-width);
  margin: 0 auto;
  padding: 12px 16px 0;
}

.breadcrumbs a {
  color: var(--nav-accent);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--nav-accent-hover);
  text-decoration: underline;
}

.breadcrumbs .sep {
  margin: 0 6px;
  opacity: 0.4;
}

.breadcrumbs .current {
  color: var(--nav-text);
}

/* --- Site Footer --- */
.site-footer {
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  font-family: var(--nav-font);
  margin-top: 64px;
  padding: 48px 16px 24px;
}

.site-footer-inner {
  max-width: var(--nav-max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand .footer-tagline {
  color: var(--nav-text-muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--nav-text);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.footer-col a {
  display: block;
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--nav-accent-hover);
}

.footer-bottom {
  border-top: 1px solid var(--nav-border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  color: var(--nav-text-muted);
  font-size: 12px;
}

.footer-legal {
  display: flex;
  gap: 16px;
}

.footer-legal a {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 12px;
}

.footer-legal a:hover {
  color: var(--nav-accent-hover);
}

.footer-disclaimer {
  color: var(--nav-text-muted);
  font-size: 11px;
  line-height: 1.6;
  max-width: 800px;
  margin-top: 16px;
  opacity: 0.7;
}

/* --- Skip Link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--nav-accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--nav-radius);
  font-family: var(--nav-font);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .site-header-inner {
    height: 48px;
  }

  .site-logo {
    font-size: 14px;
  }

  .site-logo svg {
    width: 24px;
    height: 24px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--nav-surface);
    border-bottom: 1px solid var(--nav-border);
    flex-direction: column;
    padding: 8px;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

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

  .site-nav a {
    padding: 10px 12px;
    font-size: 15px;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    min-width: 0;
    max-height: none;
    background: transparent;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-trigger::after {
    transition: transform 0.2s;
  }

  .nav-dropdown.open .nav-dropdown-trigger::after {
    transform: rotate(180deg);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .grade-bar-inner {
    padding: 0 8px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grade-bar a {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .site-header,
  .grade-bar,
  .mobile-menu-btn,
  .site-footer {
    display: none !important;
  }

  .breadcrumbs {
    color: #333;
    font-size: 10pt;
  }

  .breadcrumbs a {
    color: #333;
    text-decoration: none;
  }
}
