/* Shared site header (same as site.css) for pages that keep their own stylesheet: downloads.html, Plato sign-up. */
:root { --nav-h: 68px; --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); }
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: var(--nav-h);
  background: rgba(12, 14, 18, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

nav.scrolled {
  background: rgba(12, 14, 18, 0.94);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 36px;
  width: auto;
  transition: transform 0.5s var(--ease-out);
}

.nav-logo:hover img { transform: rotate(-12deg) scale(1.08); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--amber);
  transition: width 0.25s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--amber);
  color: #0C0E12 !important;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 10px 20px !important;
  border-radius: 2px;
  text-decoration: none !important;
  transition: background 0.2s, box-shadow 0.2s !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { background: #FF9A20 !important; box-shadow: 0 0 20px rgba(255,128,0,0.4) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 6px;
  margin-right: -6px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 861px) and (max-width: 1180px) {
  nav { padding: 0 28px; }
  .nav-links { gap: 20px; }
  .nav-links a { letter-spacing: 0.08em; white-space: nowrap; }
  .nav-links li.nav-optional { display: none; }
  .nav-cta { padding: 10px 14px !important; }
}

/* Plato Forms joined the menu (2026-11-05): just above 1180px there is no room for the two optional links */
@media (min-width: 1181px) and (max-width: 1240px) {
  .nav-links li.nav-optional { display: none; }
}
@media (max-width: 860px) {
  :root { --nav-h: 60px; }
  nav { padding: 0 16px; }

  .nav-logo { font-size: 17px; gap: 8px; }
  .nav-logo img { height: 30px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(12, 14, 18, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out), padding 0.3s;
  }

  .nav-links.open {
    max-height: calc(100vh - var(--nav-h));
    padding: 8px 20px 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.3s, transform 0.3s var(--ease-out);
  }

  .nav-links.open li { opacity: 1; transform: none; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.04s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.08s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.12s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.16s; }
  .nav-links.open li:nth-child(6) { transition-delay: 0.2s; }
  .nav-links.open li:nth-child(7) { transition-delay: 0.24s; }

  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 13px;
  }

  .nav-links a::after { display: none; }

  .nav-links li:last-child {
    border-bottom: none;
    padding-top: 18px;
  }

  .nav-cta {
    display: block !important;
    text-align: center;
    padding: 16px 20px !important;
  }
}
