/* Header-specific styling for HAL-WEK - builds on base.css */

.halwek-header {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
}

.halwek-header__inner {
  min-height: 64px;
}

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

.halwek-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  color: #f9fafb;
}

.halwek-header__logo-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.9), rgba(15, 23, 42, 0.95));
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.5), var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.halwek-header__logo-bolt {
  width: 14px;
  height: 18px;
  position: relative;
  transform: skewX(-8deg);
}

.halwek-header__logo-bolt::before,
.halwek-header__logo-bolt::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-style: solid;
}

.halwek-header__logo-bolt::before {
  top: -2px;
  border-width: 0 6px 14px 6px;
  border-color: transparent transparent #e5f9ff transparent;
}

.halwek-header__logo-bolt::after {
  bottom: -2px;
  border-width: 14px 6px 0 6px;
  border-color: #facc15 transparent transparent transparent;
}

.halwek-header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.halwek-header__brand-name {
  font-weight: 600;
  font-size: var(--font-size-lg);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.halwek-header__brand-tagline {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Navigation layout */

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

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

.halwek-header__nav-link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.halwek-header__nav-link:hover,
.halwek-header__nav-link:focus-visible {
  color: #f9fafb;
  border-color: var(--color-primary);
}

.halwek-header__nav-item--cta {
  margin-left: var(--space-4);
}

.halwek-header__cta-link {
  font-size: var(--font-size-sm);
}

/* Active link helper class (optional, set server-side) */

.halwek-header__nav-link.is-active {
  color: #f9fafb;
  border-color: var(--color-primary);
}

/* Mobile toggle */

.halwek-header__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background-color: rgba(15, 23, 42, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  color: #e5e7eb;
}

.halwek-header__toggle-line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #e5e7eb;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.halwek-header__toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Toggle animation */

.halwek-header__toggle[aria-expanded="true"] .halwek-header__toggle-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.halwek-header__toggle[aria-expanded="true"] .halwek-header__toggle-line:nth-child(2) {
  opacity: 0;
}

.halwek-header__toggle[aria-expanded="true"] .halwek-header__toggle-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Responsive behavior */

@media (max-width: 900px) {
  .halwek-header__toggle {
    display: inline-flex;
  }

  .halwek-header__nav {
    position: fixed;
    inset: 64px 0 auto 0;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.97));
    border-bottom: 1px solid rgba(15, 23, 42, 0.95);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
  }

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

  .halwek-header__nav-item--cta {
    width: 100%;
    margin-left: 0;
    margin-top: var(--space-4);
  }

  .halwek-header__nav-item--cta .halwek-header__cta-link {
    width: 100%;
    justify-content: center;
  }

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

  .halwek-header__nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 540px) {
  .halwek-header__brand-name {
    font-size: var(--font-size-base);
  }

  .halwek-header__brand-tagline {
    display: none;
  }
}
