:root {
  --nibiru-header-height: 72px;
}

.nibiru-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 20px rgba(17, 24, 39, 0.06);
}

.nibiru-header__inner {
  height: var(--nibiru-header-height);
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nibiru-header__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nibiru-header__logo {
  --logo-h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--logo-h);
  max-width: var(--logo-max-w);
  overflow: hidden;
}

.nibiru-header__logo img {
  display: block;
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.nibiru-header__logo .title {
  margin-left: 10px;
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: #0f3460;
  font-weight: 700;
}

.nibiru-header__nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.nibiru-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nibiru-header__mobile-only {
  display: none;
}

.nibiru-header__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
}

.nibiru-header__link {
  color: #374151;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.nibiru-header__link:hover,
.nibiru-header__link.is-active {
  color: #2563eb;
}

.nibiru-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #22d3ee);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nibiru-header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.nibiru-header__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  padding: 10px 9px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  -webkit-tap-highlight-color: transparent;
}

.nibiru-header__toggle:focus,
.nibiru-header__toggle:focus-visible,
.nibiru-header__toggle:active {
  outline: none;
  box-shadow: none;
  background: #fff;
  border-color: #d1d5db;
}

.nibiru-header__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: #1f2937;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nibiru-header__overlay {
  display: none;
}

body.nibiru-menu-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .nibiru-header__inner {
    padding: 0 24px;
    gap: 16px;
  }

  .nibiru-header__links {
    gap: 18px;
  }

  .nibiru-header__link {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --nibiru-header-height: 64px;
  }

  .nibiru-header__logo {
    --logo-h: 32px;
    --logo-max-w: 150px;
  }

  .nibiru-header__logo .title {
    font-size: 1em;
  }

  .nibiru-header__toggle {
    display: inline-flex;
    order: 3;
  }

  .nibiru-header__cta {
    display: none;
  }

  .nibiru-header__mobile-only {
    display: list-item;
  }

  .nibiru-header__nav {
    position: fixed;
    top: var(--nibiru-header-height);
    right: 0;
    width: min(78vw, 320px);
    height: calc(100vh - var(--nibiru-header-height));
    background: #fff;
    border-left: 1px solid #e5e7eb;
    padding: 18px 18px 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    justify-content: flex-start;
    overflow-y: auto;
    z-index: 310;
  }

  .nibiru-header__links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nibiru-header__links li {
    width: 100%;
  }

  .nibiru-header__link,
  .nibiru-header__cta-mobile {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 15px;
    color: #111827;
    text-decoration: none;
    background: #f8fafc;
  }

  .nibiru-header__link:hover,
  .nibiru-header__link.is-active,
  .nibiru-header__cta-mobile:hover {
    background: #eaf2ff;
    color: #1d4ed8;
  }

  .nibiru-header.is-open .nibiru-header__nav {
    transform: translateX(0);
  }

  .nibiru-header__overlay {
    position: fixed;
    inset: var(--nibiru-header-height) 0 0 0;
    background: rgba(17, 24, 39, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    display: block;
    z-index: 305;
  }

  .nibiru-header.is-open .nibiru-header__overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .nibiru-header.is-open .nibiru-header__toggle span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  .nibiru-header.is-open .nibiru-header__toggle span:nth-child(2) {
    opacity: 0;
  }

  .nibiru-header.is-open .nibiru-header__toggle span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }
}
