/* Header layout */
.tig-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(to bottom, rgba(5, 6, 8, 0.96), rgba(5, 6, 8, 0.9));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.tig-header__offset {
  height: 72px;
}

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

/* Branding */
.tig-header__brand {
  display: flex;
  align-items: center;
}

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

.tig-header__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.25), transparent 55%),
    radial-gradient(circle at 70% 100%, rgba(163, 255, 18, 0.75), transparent 55%),
    #020617;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35), 0 0 16px rgba(163, 255, 18, 0.6);
  position: relative;
}

.tig-header__logo-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  border: 1px solid rgba(148, 163, 184, 0.65);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9) inset;
}

.tig-header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.tig-header__logo-title {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

/* Nav */
.tig-header__nav {
  display: flex;
  align-items: center;
}

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

.tig-header__nav-link {
  position: relative;
  font-size: var(--font-size-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: 0.15rem;
}

.tig-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

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

.tig-header__nav-link:hover::after,
.tig-header__nav-link:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.tig-header__nav-item--cta .tig-header__nav-link--cta {
  /*padding-inline: 1.2rem;*/
  padding: 10px 20px;
}

/* Mobile toggle */
.tig-header__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at top left, rgba(163, 255, 18, 0.2), transparent 60%), rgba(15, 23, 42, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

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

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

.tig-header__toggle[aria-expanded="true"] .tig-header__toggle-bar:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

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

  .tig-header__offset {
    height: 64px;
  }

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

  .tig-header__nav {
    position: fixed;
    inset-inline: 0;
    top: 64px;
    background: rgba(5, 6, 8, 0.98);
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-base), opacity var(--transition-base), visibility var(--transition-base);
  }

  .tig-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4) var(--container-padding-x) var(--space-5);
    gap: var(--space-3);
  }

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

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

@media (max-width: 520px) {
  .tig-header__logo-subtitle {
    display: none;
  }
}
