/* Header styles for Smart Hub PL */

.sh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.94), rgba(5, 6, 10, 0.82));
  border-bottom: 1px solid var(--color-border-subtle);
}

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

/* Brand */
.sh-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

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

.sh-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 30% 70% 70% 30% / 40% 30% 70% 60%;
  background: radial-gradient(circle at 30% 0%, #4c8dff 0, #2e6fe0 40%, #05060a 80%);
  box-shadow: 0 0 18px rgba(76, 141, 255, 0.6);
}

.sh-header__logo-text {
  font-family: "Space Grotesk", var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: var(--font-size-sm);
}

.sh-header__logo-text-accent {
  color: var(--color-primary);
}

/* Navigation */
.sh-header__nav {
  flex: 1;
}

.sh-header__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
}

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

.sh-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), #8ab4ff);
  transition: width var(--transition-normal);
}

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

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

/* CTA */
.sh-header__cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sh-header__cta-link {
  white-space: nowrap;
}

/* Mobile toggle */
.sh-header__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  align-items: center;
  justify-content: center;
}

.sh-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: var(--radius-full);
  background-color: var(--color-gray-200);
  transition: transform var(--transition-normal), opacity var(--transition-normal), top var(--transition-normal), bottom var(--transition-normal);
}

.sh-header__toggle-bar:first-child {
  position: relative;
  top: -3px;
}

.sh-header__toggle-bar:last-child {
  position: relative;
  bottom: -3px;
}

.sh-header__toggle.is-open .sh-header__toggle-bar:first-child {
  top: 0;
  transform: rotate(45deg);
}

.sh-header__toggle.is-open .sh-header__toggle-bar:last-child {
  bottom: 0;
  transform: rotate(-45deg);
}

/* Responsive */
@media (max-width: 864px) {
  .sh-header__inner {
    gap: var(--space-2);
  }

  .sh-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(5, 6, 10, 0.98);
    border-bottom: 1px solid var(--color-border-subtle);
    transform-origin: top;
    transform: scaleY(1);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
  }

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

  .sh-header__nav-link {
    width: 100%;
  }

  .sh-header__nav--open {
    max-height: 320px;
  }

  .sh-header__toggle {
    display: inline-flex;
  }

  .sh-header__cta {
    display: none;
  }
}

@media (max-width: 520px) {
  .sh-header__logo-text {
    display: none;
  }
}
