/* Floating persistent header — mirrors Earthwave bar at top */
.site-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem clamp(1rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(4, 4, 14, 0.98) 0%, rgba(8, 8, 22, 0.97) 100%);
  border-bottom: 1px solid rgba(0, 245, 212, 0.2);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.site-topbar-brand {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 0;
}

.site-topbar-brand .logo {
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  line-height: 1.2;
}

.site-topbar-brand .logo-sub {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.48rem, 1.4vw, 0.58rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-topbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem clamp(0.5rem, 2vw, 1.25rem);
}

.site-topbar nav a {
  margin-left: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.52rem, 1.5vw, 0.68rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, text-shadow 0.2s;
}

.site-topbar nav a:hover,
.site-topbar nav a.is-active {
  color: var(--teal);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.45);
}

.site-topbar nav a[href*="pono"] {
  font-family: "Caveat", cursive;
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(157, 255, 208, 0.75);
}

.site-topbar nav a[href*="pono"].is-active,
.site-topbar nav a[href*="pono"]:hover {
  color: #9dffd0;
  text-shadow: 0 0 14px rgba(29, 233, 182, 0.55);
}

/* Foundation dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.52rem, 1.5vw, 0.68rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, text-shadow 0.2s;
  user-select: none;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: " ▾";
  font-size: 0.85em;
  opacity: 0.7;
}

.nav-dropdown[open] summary,
.nav-dropdown summary:hover,
.nav-dropdown summary.is-active {
  color: var(--teal);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.45);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 10.5rem;
  padding: 0.35rem 0;
  background: linear-gradient(180deg, rgba(8, 8, 22, 0.98) 0%, rgba(4, 4, 14, 0.99) 100%);
  border: 1px solid rgba(0, 245, 212, 0.25);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 245, 212, 0.08);
  backdrop-filter: blur(14px);
  z-index: 130;
}

.nav-dropdown-panel a {
  display: block;
  padding: 0.5rem 1rem;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.5rem, 1.4vw, 0.62rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown-panel a:hover,
.nav-dropdown-panel a.is-active {
  color: var(--teal);
  background: rgba(0, 245, 212, 0.06);
  text-shadow: 0 0 10px rgba(0, 245, 212, 0.35);
}

.index-foundation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.index-foundation-links a {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.index-foundation-links a:hover {
  border-color: var(--teal);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.25);
}

@media (max-width: 720px) {
  .site-topbar {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 0.45rem 0.75rem;
    row-gap: 0.35rem;
  }

  .site-topbar-brand {
    align-items: center;
    flex: 1 1 100%;
  }

  .site-topbar nav {
    justify-content: center;
    flex: 1 1 100%;
  }

  .nav-dropdown-panel {
    right: 50%;
    transform: translateX(50%);
  }
}
