/*
 * Common header/footer styles for site HTML pages.
 * Imported by site/index.html and site/docs.html.
 */

/* ── Top Navigation / Header ── */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(10, 16, 19, 0.88);
  box-shadow: 0 12px 30px rgba(1, 8, 11, 0.26);
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 100;
}

body {
  padding-top: 5.35rem;
}

.top-nav nav {
  display: flex;
  gap: 1rem;
}

.top-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}

.top-nav nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.top-nav nav a:hover {
  background: rgba(108, 232, 213, 0.08);
}

.top-nav nav a.nav-active {
  background: rgba(108, 232, 213, 0.16);
  color: var(--accent-2);
}

.top-nav a:hover {
  color: var(--accent-2);
}

/* ── Brand Logo ── */
.brand {
  gap: 0.8rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand-copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  display: flex;
}

.brand-name {
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand-mark {
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(31, 201, 173, 0.2), rgba(108, 232, 213, 0.08));
  border: 1px solid rgba(108, 232, 213, 0.28);
  box-shadow: 0 10px 30px rgba(2, 12, 14, 0.22);
}

.brand-mark svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent-2);
}

/* ── Nav Icons ── */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: var(--accent-2);
  opacity: 0.92;
}

.nav-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Mesh Background ── */
.mesh {
  position: fixed;
  inset: -20% auto auto -10%;
  width: 60vw;
  aspect-ratio: 1;
  background: radial-gradient(circle at 30% 35%, rgba(108, 232, 213, 0.28), transparent 60%);
  pointer-events: none;
}

/* ── Footer ── */
footer {
  border-top: 1px solid rgba(108, 232, 213, 0.18);
  background: #020609;
  color: rgba(207, 220, 216, 0.8);
  padding: 0.9rem 1.5rem;
  margin-top: 2rem;
}

footer a {
  color: var(--accent-2);
  font-size: 0.82rem;
}

.footer-line {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  line-height: 1.5;
}

.footer-line span:not(.footer-brand)::before,
.footer-line a::before {
  /* content: "•"; */
  margin-right: 0.85rem;
  color: rgba(156, 212, 201, 0.36);
}

.footer-brand {
  color: #edf8f4;
  font-weight: 700;
}

/* ── Hamburger toggle ── */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-muted);
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.nav-toggle:hover {
  background: rgba(108, 232, 213, 0.08);
  color: var(--accent-2);
}

.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.icon-close {
  display: none;
}

.top-nav.nav-open .icon-open {
  display: none;
}

.top-nav.nav-open .icon-close {
  display: block;
}

@media (max-width: 1000px) {
  .nav-toggle {
    display: flex;
  }

  .top-nav {
    flex-wrap: wrap;
  }

  .top-nav nav {
    width: 100%;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0 0.25rem;
    border-top: 1px solid var(--line);
  }

  .top-nav:not(.nav-open) nav {
    display: none;
  }

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

  .top-nav nav a {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    width: 100%;
    justify-content: flex-start;
  }

  /* Ensure nav labels are always visible in expanded menu */
  .top-nav nav a span:not(.nav-icon) {
    display: inline !important;
  }

  .brand-tag {
    display: none;
  }
}
