/* Admin bar (when logged in) — matches backstage sidebar (var(--blue-ink)) */
body.has-admin-bar { --admin-bar-height: 36px; }
.admin-bar {
  background: var(--blue-ink);
  color: rgba(255,255,255,0.75);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  height: var(--admin-bar-height);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.admin-bar-inner {
  width: 1240px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-bar a,
.admin-bar-add-btn {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  font-size: inherit;
  font-family: inherit;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
}
.admin-bar a:hover,
.admin-bar-add-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.admin-bar-add { position: relative; }
.admin-bar-add-btn::after {
  content: "";
  display: inline-block;
  margin-left: 0.35rem;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  opacity: 0.7;
}
.admin-bar-add-dropdown {
  position: absolute; top: 100%; left: 0;
  margin-top: 2px; min-width: 180px;
  background: var(--blue-ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem 0;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
  z-index: 300;
  border: 1px solid rgba(255,255,255,0.1);
}
.admin-bar-add:hover .admin-bar-add-dropdown,
.admin-bar-add:focus-within .admin-bar-add-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.admin-bar-add-dropdown a {
  display: block;
  padding: 0.45rem 0.9rem;
  color: rgba(255,255,255,0.75);
  border-radius: 0;
  font-weight: 500;
}
.admin-bar-add-dropdown a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-bar-spacer { margin-left: auto; }
.admin-bar-user {
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem;
  padding: 0 0.4rem;
}

/* Site header */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
body.has-admin-bar header.site { top: var(--admin-bar-height); }

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px 0;
}

.logo {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.logo-mark {
  width: 44px; height: 44px;
  position: relative; display: block;
  filter: drop-shadow(0 4px 8px rgba(11,18,32,.12));
  flex-shrink: 0;
}
.logo-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.logo .brand { display: flex; flex-direction: column; line-height: 1.15; }
.logo .brand small {
  display: block;
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 1px;
  text-transform: none;
}

nav.menu {
  display: flex; gap: 28px; justify-content: center;
  font-size: 14px; font-weight: 500;
  list-style: none; padding: 0; margin: 0;
}
nav.menu a {
  color: var(--ink-soft);
  padding: 6px 2px;
  position: relative;
  transition: color .2s;
}
nav.menu a:hover { color: var(--ink); }
nav.menu a.active { color: var(--ink); }
nav.menu a.active::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--orange); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 16px; }

.login-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.login-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }

.cta-top {
  background: var(--orange); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: background .2s, transform .15s;
  display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer;
}
.cta-top:hover { background: var(--orange-dark); transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed; inset: 0; top: 62px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  z-index: 99;
  flex-direction: column;
  padding: 24px 32px 32px;
  gap: 4px;
  border-top: 1px solid var(--border);
}
body.has-admin-bar .mobile-nav { top: calc(62px + var(--admin-bar-height)); }
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 20px; font-weight: 600; color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: block;
  transition: color .15s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav .login-link {
  font-size: 15px; font-weight: 500; color: var(--ink-muted);
  margin-top: 4px; display: flex; align-items: center; gap: 8px;
}

@media (max-width: 980px) {
  .nav { grid-template-columns: auto auto; gap: 12px; }
  nav.menu { display: none; }
  .hamburger { display: flex; }
  .cta-top { display: none; }
  .login-btn { display: none; }
}
