/* Header styles for Night Vibe Factory */

.nvf-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 7, 19, 0.92), rgba(5, 7, 19, 0.82));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nvf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

/* Brand */
.nvf-header__brand {
  display: flex;
  align-items: center;
}

.nvf-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.nvf-header__logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at 30% 0%, #ff9ac5 0%, #ff2b7a 35%, #5b2bff 80%);
  box-shadow: 0 0 18px rgba(255, 43, 122, 0.7);
}

.nvf-header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nvf-header__logo-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.nvf-header__logo-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Toggle */
.nvf-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 9, 30, 0.9);
  cursor: pointer;
  color: inherit;
}

.nvf-header__toggle-bar {
  width: 1.2rem;
  height: 2px;
  border-radius: 999px;
  background-color: #ffffff;
  transition: transform var(--transition-base), opacity var(--transition-base), width var(--transition-base);
}

/* Nav */
.nvf-header__nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  padding-inline: var(--space-4);
  transform-origin: top;
  transform: scaleY(1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.nvf-header__nav-list {
  list-style: none;
  margin: 0.35rem auto 0.9rem auto;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at top, rgba(19, 24, 72, 0.98), rgba(6, 8, 26, 0.98));
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nvf-header__nav-item {
  display: block;
}

.nvf-header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nvf-header__nav-link:hover,
.nvf-header__nav-link:focus-visible {
  color: #ffffff;
  background: rgba(33, 39, 94, 0.95);
}

.nvf-header__nav-item--cta .nvf-header__nav-link--cta {
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #050713;
  box-shadow: var(--shadow-sm), var(--shadow-primary-soft);
}

.nvf-header__nav-item--cta .nvf-header__nav-link--cta:hover,
.nvf-header__nav-item--cta .nvf-header__nav-link--cta:focus-visible {
  background: linear-gradient(135deg, #ff4f97, #ff9ac5);
  color: #050713;
}

/* Open state (controlled by JS with .is-open on header) */
.nvf-header.is-open .nvf-header__nav {
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
}

.nvf-header.is-open .nvf-header__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(42deg);
}

.nvf-header.is-open .nvf-header__toggle-bar:nth-child(2) {
  opacity: 0;
  width: 0.8rem;
}

.nvf-header.is-open .nvf-header__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-42deg);
}

/* Desktop layout */
@media (min-width: 960px) {
  .nvf-header__toggle {
    display: none;
  }

  .nvf-header__nav {
    position: static;
    padding-inline: 0;
    max-height: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nvf-header__nav-list {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .nvf-header__nav-link {
    width: auto;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
  }

  .nvf-header__nav-item--cta .nvf-header__nav-link--cta {
    margin-left: 0.35rem;
  }
}

@media (min-width: 1200px) {
  .nvf-header__nav-list {
    gap: 0.5rem;
  }

  .nvf-header__nav-link {
    padding-inline: 1rem;
    font-size: 0.82rem;
  }
}

/* Reduced motion: avoid jumpy transforms */
@media (prefers-reduced-motion: reduce) {
  .nvf-header__toggle-bar {
    transition: none;
  }
}
