/* Gem Inspector — header & mobile navigation */

.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(244, 242, 234, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 18, 22, 0.08);
  transition: background 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  transition: padding 0.18s ease;
}

.brand--logoOnly {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.brand__logo {
  display: block;
  height: 58px;
  width: auto;
  max-width: min(220px, 52vw);
  max-height: 64px;
  filter: drop-shadow(0 10px 20px rgba(12, 18, 28, 0.22));
  transform: translateZ(0);
  transition: transform 0.18s ease, filter 0.18s ease, height 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .brand--logoOnly:hover .brand__logo {
    transform: translateY(-1px);
    filter: drop-shadow(0 14px 28px rgba(12, 18, 28, 0.32));
  }
}

.topbar.topbar--scrolled {
  background: rgba(244, 242, 234, 0.92);
  box-shadow: 0 16px 40px rgba(12, 18, 28, 0.14);
  border-color: rgba(15, 18, 22, 0.1);
}

.topbar.topbar--scrolled .topbar__inner {
  padding: 10px 0;
}

.topbar.topbar--scrolled .brand__logo {
  height: 46px;
  filter: drop-shadow(0 8px 16px rgba(12, 18, 28, 0.18));
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__link {
  position: relative;
  text-decoration: none;
  color: rgba(15, 18, 22, 0.82);
  font-weight: 850;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px 8px;
  border-radius: 12px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav__link:hover {
  color: rgba(15, 18, 22, 1);
  background: rgba(215, 181, 111, 0.16);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
  opacity: 0.9;
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.navToggle {
  display: none;
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(15, 18, 22, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(12, 18, 28, 0.08);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.navToggle:hover {
  transform: translateY(-1px);
}

.navToggle__bar {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  margin-left: -10px;
  background: rgba(15, 18, 22, 0.86);
  border-radius: 999px;
  transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.navToggle__bar:nth-child(1) {
  top: 16px;
}

.navToggle__bar:nth-child(2) {
  top: 22px;
}

.navToggle__bar:nth-child(3) {
  top: 28px;
}

.navToggle--open .navToggle__bar:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}

.navToggle--open .navToggle__bar:nth-child(2) {
  opacity: 0;
}

.navToggle--open .navToggle__bar:nth-child(3) {
  top: 22px;
  transform: rotate(-45deg);
}

.mobileMenu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 997;
  background: rgba(7, 16, 28, 0.42);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.mobileMenu__backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobileMenu {
  position: relative;
  z-index: 998;
  max-height: 0;
  overflow: hidden;
  border-top: 0 solid rgba(15, 18, 22, 0.08);
  background: rgba(244, 242, 234, 0.97);
  backdrop-filter: blur(16px);
  transition: max-height 0.28s ease, border-top-width 0.2s ease;
}

.mobileMenu.is-open {
  max-height: 520px;
  border-top-width: 1px;
}

.mobileMenu[hidden] {
  display: block !important;
  max-height: 0;
  border-top-width: 0;
}

.mobileMenu__inner {
  padding: 14px 0 18px;
  display: grid;
  gap: 8px;
}

.mobileMenu__label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(15, 18, 22, 0.45);
}

.mobileMenu__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
  color: rgba(15, 18, 22, 0.9);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 18, 22, 0.08);
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobileMenu__link:active {
  background: rgba(215, 181, 111, 0.2);
}

.mobileMenu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 6px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(215, 181, 111, 0.45);
  background: linear-gradient(
    180deg,
    rgba(215, 181, 111, 0.28),
    rgba(215, 181, 111, 0.12)
  );
  color: rgba(15, 18, 22, 0.92);
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(12, 18, 28, 0.1);
  -webkit-tap-highlight-color: transparent;
}

.mobileMenu__cta:active {
  transform: scale(0.98);
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .navToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .brand__logo {
    height: 48px;
  }

  .topbar__inner {
    padding: 14px 0;
  }

  .topbar.topbar--scrolled .brand__logo {
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .topbar__inner,
  .brand__logo,
  .nav__link::after,
  .navToggle__bar,
  .mobileMenu,
  .mobileMenu__backdrop {
    transition: none !important;
  }
}
