/* Header styles for NUPARADIGM LTD */

.np-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.np-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.np-header__brand {
  display: flex;
  align-items: center;
}

.np-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  color: var(--color-text);
}

.np-header__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.np-header__logo-initial {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.np-header__brand-text {
  display: flex;
  flex-direction: column;
}

.np-header__brand-name {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.np-header__brand-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Navigation */

.np-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.np-header__nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin: 0;
}

.np-header__nav-item {}

.np-header__nav-link {
  position: relative;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
}

.np-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

.np-header__nav-link:hover,
.np-header__nav-link:focus-visible {
  color: var(--color-text);
}

.np-header__nav-link:hover::after,
.np-header__nav-link:focus-visible::after {
  width: 100%;
}

.np-header__cta-wrapper {
  margin-left: var(--space-12);
}

.np-header__cta {
  font-size: 0.8rem;
}

/* Mobile toggle */

.np-header__nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background-color: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.np-header__nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--gray-700);
  transition: transform var(--transition-normal), opacity var(--transition-fast);
}

/* Transform bars when nav is open */

.np-header__nav-toggle.is-active .np-header__nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.np-header__nav-toggle.is-active .np-header__nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.np-header__nav-toggle.is-active .np-header__nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Responsive behaviours */

@media (max-width: 880px) {
  .np-header__nav-toggle {
    display: inline-flex;
  }

  .np-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--gray-200);
    display: none;
    flex-direction: column;
    padding: var(--space-12) var(--space-16) var(--space-12);
  }

  .np-header__nav.is-open {
    display: flex;
  }

  .np-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .np-header__cta-wrapper {
    margin-left: 0;
    margin-top: var(--space-8);
  }

  .np-header__cta {
    width: 100%;
    justify-content: center;
  }
}

/* Ensure navigation is always visible if JS is disabled */

.no-js .np-header__nav {
  display: flex !important;
  position: static;
  box-shadow: none;
  border-top: none;
  padding: 0;
}

.no-js .np-header__nav-toggle {
  display: none;
}
