/* Header styles scoped to .header-shell */

.header-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 15, 18, 0.98), rgba(15, 15, 18, 0.86));
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

/* Brand */
.header-shell__brand {
  display: flex;
  align-items: center;
}

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

.header-shell__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(212, 180, 106, 0.6);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  background: radial-gradient(circle at top left, rgba(212, 180, 106, 0.18), transparent 55%),
              rgba(17, 19, 25, 1);
  box-shadow: var(--shadow-subtle);
}

.header-shell__wordmark {
  display: flex;
  flex-direction: column;
}

.header-shell__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-heading);
}

.header-shell__subtitle {
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.6);
}

/* Navigation */
.header-shell__nav {
  display: flex;
  align-items: center;
}

.header-shell__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-shell__nav-link {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.78);
  padding-block: 0.35rem;
}

.header-shell__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent-gold), var(--color-accent-bronze));
  transition: width var(--transition-normal);
}

.header-shell__nav-link:focus-visible::after,
.header-shell__nav-link:hover::after {
  width: 100%;
}

.header-shell__nav-item--accent .header-shell__nav-link--cta {
  padding-inline: 1.35rem;
  padding-block: 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(212, 180, 106, 0.7);
  background: rgba(31, 90, 74, 0.15);
  color: var(--color-text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.header-shell__nav-item--accent .header-shell__nav-link--cta::after {
  display: none;
}

.header-shell__nav-item--accent .header-shell__nav-link--cta:hover {
  background: rgba(31, 90, 74, 0.32);
}

/* Mobile toggle */
.header-shell__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 19, 25, 0.9);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.header-shell__toggle-bar {
  position: absolute;
  width: 18px;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.9);
  transition: transform var(--transition-normal), opacity var(--transition-normal), top var(--transition-normal), bottom var(--transition-normal);
}

.header-shell__toggle-bar:first-child {
  top: 11px;
}

.header-shell__toggle-bar:last-child {
  bottom: 11px;
}

.header-shell__toggle.is-active .header-shell__toggle-bar:first-child {
  top: auto;
  transform: rotate(45deg);
}

.header-shell__toggle.is-active .header-shell__toggle-bar:last-child {
  bottom: auto;
  transform: rotate(-45deg);
}

/* Mobile layout */
@media (max-width: 900px) {
  .header-shell__toggle {
    display: inline-flex;
  }

  .header-shell__nav {
    position: fixed;
    inset-inline: 0;
    top: 64px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
    background: linear-gradient(to bottom, rgba(15, 15, 18, 0.99), rgba(15, 15, 18, 0.97));
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-block: var(--space-4);
  }

  .header-shell__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding-inline: var(--space-4);
    gap: var(--space-3);
  }

  .header-shell__nav-link {
    font-size: 0.8rem;
  }

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

@media (max-width: 520px) {
  .header-shell__subtitle {
    display: none;
  }
}

/* Optional helper if page wants to lock scroll when menu is open */
body.header-menu-open {
  overflow: hidden;
}