/* Header-specific styles building on base.css */

.shell-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 246, 241, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.shell-header__container {
  position: relative;
}

.shell-header__navbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

/* Brand */

.shell-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  max-width: max-content;
  color: var(--gray-900);
  text-decoration: none;
}

.shell-header__brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--gray-900);
  background:
          linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 235, 221, 0.95)),
          radial-gradient(circle at 20% 0, rgba(201, 160, 107, 0.5), transparent 55%);
  border: 1px solid rgba(201, 160, 107, 0.55);
  box-shadow: 0 10px 24px rgba(122, 84, 38, 0.12);
}

.shell-header__brand-content {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.shell-header__brand-name {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 1.1;
  color: var(--gray-900);
  white-space: nowrap;
}

.shell-header__brand-subtitle {
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Navigation */

.shell-header__nav {
  justify-self: center;
}

.shell-header__nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.shell-header__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  color: var(--gray-700);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition:
          color var(--transition-base),
          background var(--transition-base),
          transform var(--transition-base);
}

.shell-header__link:hover {
  color: var(--gray-950);
  background: rgba(201, 160, 107, 0.12);
  transform: translateY(-1px);
}

/* Actions */

.shell-header__actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.shell-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff !important;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(122, 84, 38, 0.2);
  transition:
          transform var(--transition-base),
          box-shadow var(--transition-base),
          background var(--transition-base);
}

.shell-header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(122, 84, 38, 0.25);
}

/* Mobile toggle */

.shell-header__toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.88);
  color: var(--gray-800);
  font-size: var(--font-size-xs);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

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

.shell-header__toggle-box {
  position: relative;
  width: 18px;
  height: 14px;
}

.shell-header__toggle-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-800);
  transition:
          transform var(--transition-base),
          top var(--transition-base),
          bottom var(--transition-base);
}

.shell-header__toggle-line:first-child {
  top: 2px;
}

.shell-header__toggle-line:last-child {
  bottom: 2px;
}

.shell-header--menu-open .shell-header__toggle-line:first-child {
  top: 6px;
  transform: rotate(45deg);
}

.shell-header--menu-open .shell-header__toggle-line:last-child {
  bottom: 6px;
  transform: rotate(-45deg);
}

.shell-header__toggle-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Responsive */

@media (max-width: 850px) {
  .shell-header__navbar {
    grid-template-columns: 1fr auto;
  }

  .shell-header__nav {
    position: fixed;
    inset-block-start: 76px;
    inset-inline: 0;
    z-index: 90;
    padding: 0 var(--space-4) var(--space-4);
    background: linear-gradient(
            to bottom,
            rgba(249, 246, 241, 0.98),
            rgba(249, 246, 241, 0.94)
    );
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.08);
    transform: translateY(-115%);
    opacity: 0;
    visibility: hidden;
    transition:
            transform var(--transition-base),
            opacity var(--transition-base),
            visibility var(--transition-base);
  }

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

  .shell-header__nav-list {
    width: min(100%, 620px);
    margin: 0 auto;
    padding: var(--space-3);
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    border-radius: 24px;
  }

  .shell-header__link {
    width: 100%;
    justify-content: space-between;
    min-height: 46px;
    padding: 0.8rem 1rem;
    font-size: var(--font-size-base);
  }

  .shell-header__link::after {
    content: "→";
    opacity: 0.45;
  }

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

  .shell-header__cta {
    display: none;
  }
}

@media (max-width: 560px) {
  .shell-header__navbar {
    min-height: 68px;
  }

  .shell-header__brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 14px;
  }

  .shell-header__brand-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .shell-header__brand-subtitle {
    display: none;
  }

  .shell-header__nav {
    inset-block-start: 68px;
    padding-inline: var(--space-3);
  }

  .shell-header__toggle-label {
    display: none;
  }
}

/* Ensure nav visible without JS */

.no-js .shell-header {
  position: relative;
}

.no-js .shell-header__navbar {
  grid-template-columns: 1fr;
}

.no-js .shell-header__nav {
  position: static;
  transform: none;
  opacity: 1;
  visibility: visible;
  padding: var(--space-3) 0;
  background: transparent;
  box-shadow: none;
}

.no-js .shell-header__toggle {
  display: none;
}