/* =========================================================================
   PROJECT U.P. — SITE NAVIGATION BAR
   One bar, every page. Self-contained: carries its own tokens and fonts so
   it renders identically on the interface pages (ui.css), the co-branded
   pages and the calculators. Markup lives in scripts/nav/nav.html and is
   stamped into each page; keep both in step.
   ========================================================================= */
.topbar {
  --tb-bg: rgba(7, 8, 11, 0.72);
  --tb-sheet: rgba(7, 8, 11, 0.96);
  --tb-ink: #f4f2ec;
  --tb-ink-2: rgba(240, 236, 226, 0.86);
  --tb-line: rgba(255, 255, 255, 0.08);
  --tb-grad: linear-gradient(135deg, #c6a67f 0%, #b99973 55%, #a98860 100%);
  --tb-glow: rgba(185, 153, 115, 0.55);
  --tb-h: 4.25rem;
  --tb-margin: clamp(1.25rem, 4vw, 3.5rem);
  --tb-maxw: 1200px;
  --tb-head: "League Gothic", "Bebas Neue", "Oswald", Impact, sans-serif;
  --tb-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  position: sticky; top: 0; z-index: 60;
  margin: 0; padding: 0; width: auto; max-width: none;
  background: var(--tb-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tb-line);
  font-family: var(--tb-body); font-weight: 400; font-size: 0.9375rem; line-height: 1.2;
  color: var(--tb-ink); text-align: left; letter-spacing: 0; text-transform: none;
  animation: topbar-in 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes topbar-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .topbar { animation: none; } }
.topbar * { box-sizing: border-box; }
.topbar__in { width: min(100% - var(--tb-margin) * 2, var(--tb-maxw)); margin-inline: auto; display: flex; align-items: center; gap: 1.5rem; min-height: var(--tb-h); }
.topbar__mark { display: inline-flex; align-items: center; gap: 0.6rem; margin-right: auto; font-family: var(--tb-head); font-weight: 400; font-size: 1.45rem; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; color: var(--tb-ink); white-space: nowrap; }
.topbar__mark img { width: 30px; height: 30px; display: block; }
.topbar__links { display: flex; gap: 1.6rem; color: var(--tb-ink-2); }
.topbar__links a { color: inherit; text-decoration: none; opacity: 1; border: 0; padding: 0; font: inherit; letter-spacing: 0; text-transform: none; transition: color 160ms ease; white-space: nowrap; }
.topbar__links a:hover, .topbar__links a[aria-current="page"] { color: var(--tb-ink); }
.topbar__cta, .topbar__sheet .topbar__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.4rem; padding: 0 1rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--tb-grad); color: #15120d; font: inherit; font-weight: 500; font-size: 0.875rem; letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 8px 24px -8px var(--tb-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 160ms ease, box-shadow 220ms ease;
}
.topbar__cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px var(--tb-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35); color: #15120d; }
.topbar__cta svg { width: 1em; height: 1em; transition: transform 200ms ease; }
.topbar__cta:hover svg { transform: translateX(3px); }
.topbar__extra { display: inline-flex; align-items: center; }
.topbar__menu { display: none; }
@media (max-width: 1000px) {
  .topbar__links { display: none; }
  .topbar__menu { display: block; position: static; }
  .topbar__menu summary { list-style: none; cursor: pointer; padding: 0.5rem 0; font-weight: 500; color: var(--tb-ink); }
  .topbar__menu summary::-webkit-details-marker { display: none; }
  .topbar__sheet { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--tb-h)); height: calc(100dvh - var(--tb-h)); overflow-y: auto; background: var(--tb-sheet); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 1.5rem var(--tb-margin) 2rem; display: grid; align-content: start; gap: 1.1rem; font-size: 1.25rem; z-index: 20; }
  .topbar__sheet a { color: var(--tb-ink); text-decoration: none; font: inherit; letter-spacing: 0; text-transform: none; }
  .topbar__sheet a[aria-current="page"] { color: #c2a47d; }
  .topbar__sheet .topbar__cta { justify-self: start; margin-top: 0.75rem; font-size: 1rem; min-height: 2.75rem; padding: 0 1.25rem; }
  .topbar__menu:not([open]) .topbar__sheet { display: none; }
}
@media (max-width: 700px) { .topbar__in > .topbar__cta { display: none; } }
