/* =========================================
   GLOBAL TOPBAR
   ========================================= */

.ct-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.96); /* dark navy */
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

/* Inner layout: logo left, nav/hamburger right */
.ct-topbar_inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* =========================================
   LOGO
   ========================================= */

.ct-topbar_logo,
.ct-topbar_logo:visited {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f9fafb;
  text-decoration: none;
}

.ct-topbar_logo span {
  color: #3b82f6; /* TRAIT blue */
}

/* Slightly smaller on very small screens */
@media (max-width: 480px) {
  .ct-topbar_logo {
    font-size: 16px;
    letter-spacing: 0.14em;
  }
}

/* =========================================
   DESKTOP NAV
   ========================================= */

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

.ct-topbar_link {
  font-size: 14px;
  color: #e5e7eb;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.ct-topbar_link:hover,
.ct-topbar_link:focus-visible {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 1px rgba(30, 64, 175, 0.4);
  outline: none;
}

.ct-topbar_link--primary {
  padding-inline: 16px;
  background: #f9fafb;
  color: #020617;
}

/* =========================================
   HAMBURGER BUTTON (MOBILE TRIGGER)
   ========================================= */

.ct-topbar_menuBtn {
  display: none;              /* shown only in mobile media query */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  padding: 0;

  /* Remove any text / default icon */
  font-size: 0;
  line-height: 0;
  color: transparent;
}

/* Three lines */
.ct-topbar_menuBtn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f9fafb;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ct-topbar_menuBtn span + span {
  margin-top: 4px;
}

/* "X" animation when menu is open */
.ct-topbar_menuBtn.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.ct-topbar_menuBtn.is-open span:nth-child(2) {
  opacity: 0;
}

.ct-topbar_menuBtn.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================================
   FULL-SCREEN MOBILE MENU
   ========================================= */

.ct-mobileMenu {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: radial-gradient(circle at top, #111827 0%, #020617 55%, #020617 100%);
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
}

/* Open state */
.ct-mobileMenu.is-open {
  transform: translateX(0);
}

/* Inner layout */
.ct-mobileMenu_inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 32px;
}

/* Close button (top-right of overlay) */
.ct-mobileMenu_close {
  align-self: flex-end;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
}

/* Vertical nav on the left */
.ct-mobileMenu_nav {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Links styled as left-aligned pill buttons */
.ct-mobileMenu_link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.ct-mobileMenu_link:hover {
  border-color: #3b82f6;
}

/* Primary / account link */
.ct-mobileMenu_link--primary {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-color: transparent;
  color: #f9fafb;
}

/* =========================================
   RESPONSIVE BEHAVIOUR
   ========================================= */

/* Mobile: hide desktop nav, show hamburger */
@media (max-width: 900px) {
  .ct-topbar_nav--desktop {
    display: none;
  }

  .ct-topbar_menuBtn {
    display: inline-flex;
  }
}

/* Desktop: overlay never used (safety) */
@media (min-width: 901px) {
  .ct-mobileMenu {
    display: none;
  }
}
