/* ==========================================================================
   GODRANK — SiteNav. Fixed translucent bar, loaded on every page.
   Square corners, hairline gold border, sharp offset shadow. No gradient.
   ========================================================================== */

.gr-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, .72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(201, 168, 76, .32);
  box-shadow: 0 4px 0 rgba(10, 10, 15, .55);   /* sharp offset, not a blur */
  border-radius: 0;
}
/* Opaque fallback where backdrop-filter is unsupported, so text stays legible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gr-nav { background: rgba(10, 10, 15, .96); }
}

.gr-nav__inner {
  max-width: 1440px;
  margin-inline: auto;
  padding: 0 clamp(1.25rem, 4vw, 5rem);
  height: 72px;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
@media (max-width: 900px) { .gr-nav__inner { height: 64px; } }

/* ── Wordmark ───────────────────────────────────────────────────────────── */
.gr-nav__logo {
  font-family: "Barlow", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #F0EAD6;
  text-decoration: none;
  margin-right: auto;
  flex: none;
}
.gr-nav__logo img, .gr-nav__logo-img { display: block; max-height: 34px; width: auto; height: auto; }

/* ── Links ──────────────────────────────────────────────────────────────── */
.gr-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.gr-nav__link {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(240, 234, 214, .78);
  text-decoration: none;
  padding: .45rem 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease;
}
.gr-nav__link:hover { color: #F0EAD6; border-bottom-color: #C9A84C; }

/* Current chapter / page — exposed to assistive tech via aria-current */
.gr-nav__link[aria-current] { color: #E8C96A; border-bottom-color: #E8C96A; }

.gr-nav__cta {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #0A0A0F;
  background: #E8C96A;
  border: 1px solid #E8C96A;
  border-radius: 0;
  padding: .7rem 1.1rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 3px 3px 0 rgba(201, 168, 76, .3);
  transition: background-color .18s ease, box-shadow .18s ease;
}
.gr-nav__cta:hover { background: #F0EAD6; border-color: #F0EAD6; box-shadow: 5px 5px 0 rgba(201, 168, 76, .45); }

/* Focus — always visible, never suppressed */
.gr-nav :is(a, button):focus-visible {
  outline: 2px solid #E8C96A;
  outline-offset: 3px;
}

/* ── Mobile toggle ──────────────────────────────────────────────────────── */
.gr-nav__toggle {
  display: none;
  width: 44px; height: 44px;          /* minimum touch target */
  align-items: center; justify-content: center;
  background: none;
  border: 1px solid rgba(201, 168, 76, .4);
  border-radius: 0;
  cursor: pointer;
  flex: none;
}
.gr-nav__toggle span {
  display: block; width: 18px; height: 1px; background: #F0EAD6;
  position: relative;
  transition: background-color .2s ease;
}
.gr-nav__toggle span::before,
.gr-nav__toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1px; background: #F0EAD6;
  transition: transform .22s ease;
}
.gr-nav__toggle span::before { top: -6px; }
.gr-nav__toggle span::after  { top: 6px; }
.gr-nav__toggle[aria-expanded="true"] span { background: transparent; }
.gr-nav__toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.gr-nav__toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .gr-nav__toggle { display: inline-flex; }

  .gr-nav__menu {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    /* Fully opaque: at 97% the hero headline ghosted through the panel and
       made the menu labels hard to read. */
    background: #0A0A0F;
    border-bottom: 1px solid rgba(201, 168, 76, .32);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .5);
    padding: 1rem clamp(1.25rem, 4vw, 5rem) 1.5rem;
    display: none;
  }
  .gr-nav__menu[data-open="true"] { display: block; }

  .gr-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .gr-nav__link {
    padding: .95rem 0;
    border-bottom: 1px solid rgba(240, 234, 214, .1);
    font-size: .75rem;
  }
  .gr-nav__cta { display: block; text-align: center; margin-top: 1rem; }
}

/* Desktop: the menu is always present, never toggled */
@media (min-width: 901px) {
  .gr-nav__menu { display: flex !important; align-items: center; gap: clamp(.75rem, 2vw, 2rem); }
}

/* Offset the page so fixed nav never covers content or anchor targets */
body { padding-top: 72px; }
@media (max-width: 900px) { body { padding-top: 64px; } }
:target { scroll-margin-top: 88px; }
[id] { scroll-margin-top: 88px; }
