/* ==========================================================================
   Site Header, Navigation & Footer Layout
   ========================================================================== */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 10px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}

.nav-links a.is-active {
  color: var(--ink);
  font-weight: 600;
  background: var(--bg-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 7px 14px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  color: var(--ink-muted);
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 0.9rem;
  max-width: 36ch;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.83rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    padding: 14px 24px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 4px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-actions {
    display: none;
  }
}
