.fd-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(5, 8, 20, 0.96), rgba(5, 8, 20, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
}

.fd-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.fd-header__logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 0, #f5b417, transparent 60%),
              radial-gradient(circle at 80% 120%, #ff5c7a, transparent 55%),
              #0e1222;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.fd-header__logo-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid rgba(5, 8, 20, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.fd-header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.fd-header__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--font-size-lg);
  letter-spacing: 0.03em;
}

.fd-header__subtitle {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.fd-header__nav {
  margin-left: auto;
}

.fd-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.fd-header__nav-link {
  position: relative;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding-block: 0.2rem;
}

.fd-header__nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.3rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5b417, #ff5c7a);
  transform-origin: center;
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

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

.fd-header__nav-link:hover::after,
.fd-header__nav-link:focus-visible::after {
  transform: scaleX(1);
}

.fd-header__nav-item--cta .fd-header__nav-link {
  padding-inline: 1.1rem;
  padding-block: 0.5rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
  color: #111;
  box-shadow: var(--shadow-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fd-header__nav-item--cta .fd-header__nav-link::after {
  display: none;
}

.fd-header__nav-link--cta:hover,
.fd-header__nav-link--cta:focus-visible {
  background-color: #ffd666;
  color: #111;
}

.fd-header__toggle {
  position: relative;
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background-color: rgba(6, 10, 25, 0.96);
  align-items: center;
  justify-content: center;
}

.fd-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--color-text);
  transition: transform var(--transition-normal), opacity var(--transition-normal), translate var(--transition-normal);
}

.fd-header__toggle-bar + .fd-header__toggle-bar {
  margin-top: 4px;
}

.fd-header__toggle[aria-expanded="true"] .fd-header__toggle-bar:first-child {
  transform: rotate(45deg) translateY(3px);
}

.fd-header__toggle[aria-expanded="true"] .fd-header__toggle-bar:last-child {
  transform: rotate(-45deg) translateY(-3px);
}

@media (max-width: 768px) {
  .fd-header__inner {
    padding-block: var(--space-3);
  }

  .fd-header__toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .fd-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 60px;
    background: linear-gradient(to bottom, rgba(5, 8, 20, 0.98), rgba(5, 8, 20, 0.98));
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-normal), opacity var(--transition-normal), visibility var(--transition-normal);
  }

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

  .fd-header__nav-link {
    font-size: var(--font-size-base);
  }

  .fd-header__nav-item--cta .fd-header__nav-link {
    width: 100%;
    text-align: center;
  }

  .fd-header__nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fd-header__nav,
  .fd-header__toggle-bar {
    transition: none;
  }
}
