/* Header styles for Style Guide Today Lounge */

.sgtl-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(24px);
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.94), rgba(5, 6, 10, 0.85) 60%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

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

.sgtl-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--color-text);
}

.sgtl-header__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 30% 0, #ffe29f, #d49b3f 52%, #8b5a1f 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: #130c02;
  box-shadow: var(--shadow-soft-gold);
}

.sgtl-header__logo-text {
  display: flex;
  flex-direction: column;
}

.sgtl-header__logo-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sgtl-header__logo-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

/* Navigation */
.sgtl-header__nav {
  display: flex;
}

.sgtl-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  list-style: none;
}

.sgtl-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.sgtl-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f1c774, #d49b3f);
  transition: width var(--transition-normal);
}

.sgtl-header__nav-link:hover,
.sgtl-header__nav-link:focus-visible {
  color: var(--color-text);
}

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

.sgtl-header__nav-item--highlight .sgtl-header__nav-link--cta {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(212, 155, 63, 0.8);
  background: rgba(9, 7, 1, 0.85);
  color: #fceac1;
  box-shadow: var(--shadow-sm);
}

.sgtl-header__nav-item--highlight .sgtl-header__nav-link--cta::after {
  display: none;
}

.sgtl-header__nav-item--highlight .sgtl-header__nav-link--cta:hover,
.sgtl-header__nav-item--highlight .sgtl-header__nav-link--cta:focus-visible {
  background: linear-gradient(135deg, #f1c774, #d49b3f);
  color: #1a1205;
}

/* Mobile toggle */
.sgtl-header__toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 8, 18, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.sgtl-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--color-text);
  transition: transform var(--transition-normal), opacity var(--transition-normal), width var(--transition-normal);
}

/* Mobile layout */
@media (max-width: 900px) {
  .sgtl-header__inner {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }

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

  .sgtl-header__nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 64px;
    background: radial-gradient(circle at top, rgba(14, 16, 30, 0.98), rgba(5, 6, 10, 0.98));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-normal), opacity var(--transition-normal), visibility var(--transition-normal);
  }

  .sgtl-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-16);
    gap: var(--space-8);
  }

  .sgtl-header__nav-item--highlight {
    width: 100%;
  }

  .sgtl-header__nav-item--highlight .sgtl-header__nav-link--cta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

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

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

  .sgtl-header--menu-open .sgtl-header__toggle-bar:nth-child(2) {
    opacity: 0;
    width: 10px;
  }

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

@media (max-width: 520px) {
  .sgtl-header__logo-title {
    font-size: 0.95rem;
  }

  .sgtl-header__logo-subtitle {
    display: none;
  }
}
