.sp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-cinema-black);
  color: var(--color-gallery-white);
  border-bottom: 1px solid rgba(247, 245, 241, 0.15);
}

.sp-header__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--page-pad-mobile);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 64px;
}

.sp-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-gallery-white);
  flex-shrink: 1;
  min-width: 0;
}

.sp-header__brand:hover {
  color: var(--color-gallery-white);
  text-decoration: none;
}

.sp-header__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.sp-header__brand-text {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gallery-white);
  flex-shrink: 0;
}

.sp-header__toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

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

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

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

.sp-header__nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-cinema-black);
  border-bottom: 1px solid rgba(247, 245, 241, 0.15);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: var(--space-md) var(--page-pad-mobile);
}

.sp-header__nav.is-open {
  display: block;
}

.sp-header__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sp-header__item {
  margin: 0;
  padding: 0;
}

.sp-header__link {
  display: flex;
  justify-content: center;
  padding: var(--space-xs) 0;
  color: var(--color-gallery-white);
  text-decoration: none;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  transition: color var(--transition-fast);
}

.sp-header__link:hover {
  color: var(--color-deep-burgundy);
  text-decoration: underline;
  text-decoration-color: var(--color-deep-burgundy);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.sp-header__link:focus-visible {
  outline: 2px solid var(--color-deep-burgundy);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .sp-header__inner {
    padding-inline: var(--page-pad-tablet);
  }

  .sp-header__nav {
    padding-inline: var(--page-pad-tablet);
  }
}

@media (min-width: 1024px) {
  .sp-header__inner {
    padding-inline: var(--page-pad-desktop);
    min-height: 72px;
  }

  .sp-header__toggle {
    display: none;
  }

  .sp-header__nav {
    display: block;
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 0;
    border-bottom: none;
    background-color: transparent;
  }

  .sp-header__list {
    flex-direction: row;
    gap: var(--space-lg);
    align-items: center;
  }

  .sp-header__link {
    padding: var(--space-xs) 0;
    font-size: var(--text-small);
    line-height: var(--leading-small);
    white-space: nowrap;
  }
}

@media (min-width: 1280px) {
  .sp-header__inner {
    padding-inline: var(--page-pad-desktop);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-header__toggle-line {
    transition: none;
  }
}
