/* Header-specific styles for Soft Clean Living */

.shell-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

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

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

.shell-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.shell-header__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 30% 30%, #bbf7d0, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.shell-header__logo-icon {
  color: #ffffff;
  font-size: 1.1rem;
}

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

.shell-header__site-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--color-gray-900);
}

.shell-header__tagline {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Navigation */

.shell-header__nav {
  display: flex;
  align-items: center;
}

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

.shell-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-gray-700);
}

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

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

.shell-header__nav-link--cta {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

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

.shell-header__nav-link--cta:hover {
  background-color: var(--color-primary-dark);
}

.shell-header__nav-item--cta {
  margin-left: var(--space-2);
}

/* Mobile toggle */

.shell-header__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.shell-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--color-gray-800);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Toggle open state */

.shell-header__toggle--open .shell-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.shell-header__toggle--open .shell-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.shell-header__toggle--open .shell-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile layout */

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

  .shell-header__nav {
    position: fixed;
    inset: 64px 0 auto 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal), pointer-events var(--transition-normal);
  }

  .shell-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    background-color: var(--color-surface);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    margin: 0 var(--space-4);
  }

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

  .shell-header__nav--open {
    pointer-events: auto;
    opacity: 1;
  }

  .shell-header__nav-item--cta {
    width: 100%;
  }

  .shell-header__nav-link--cta {
    width: 100%;
    justify-content: center;
  }
}

/* Medium and up */

@media (min-width: 769px) {
  .shell-header__nav {
    position: static;
  }
}

/* Focus outline refinement */

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