.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(7, 20, 22, 0.98), rgba(7, 20, 22, 0.9) 40%, rgba(7, 20, 22, 0.72));
  border-bottom: 1px solid rgba(26, 56, 58, 0.92);
}

.header__bar {
  border-top: 1px solid rgba(26, 56, 58, 0.9);
}

.header__inner {
  height: var(--header-height);
  max-width: 1440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(var(--space-4), 2vw, var(--space-10));
}

.nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
}

.nav__item a {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-text-muted);
}

.nav__item a[data-active="true"],
.nav__item a:hover,
.nav__item a:focus-visible {
  color: var(--color-text);
}

.nav__item--highlight a {
  padding: 0.3rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(214, 183, 117, 0.6);
  background: radial-gradient(circle at 0 0, rgba(214, 183, 117, 0.2), rgba(7, 20, 22, 0.96));
}

.nav__item--highlight a:hover,
.nav__item--highlight a:focus-visible {
  border-color: rgba(214, 183, 117, 0.9);
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(73, 110, 109, 0.8);
  background: radial-gradient(circle at 0 0, rgba(214, 183, 117, 0.18), rgba(7, 20, 22, 0.96));
  gap: 4px;
}

.nav-toggle span {
  position: absolute;
  width: 16px;
  height: 1.5px;
  border-radius: 999px;
  background-color: rgba(245, 241, 232, 0.92);
  transition: transform var(--transition-base), background-color var(--transition-base);
}

.nav-toggle span:first-child {
  transform: translateY(-4px);
}

.nav-toggle span:last-child {
  transform: translateY(4px);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

.nav-toggle:focus-visible {
  box-shadow: 0 0 0 var(--ring-width) var(--ring-color-focus);
}

.header__mobile-panel {
  max-height: calc(100dvh - 8rem);
  overflow-y: auto;
  border-top: 1px solid rgba(26, 56, 58, 0.7);
  background: linear-gradient(180deg, rgba(7, 18, 21, 0.98), rgba(3, 10, 12, 0.98));
}

.header__mobile-nav {
  padding-top: var(--space-3);
  padding-bottom: var(--space-4);
}

.header__mobile-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}

.header__mobile-list a {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(26, 56, 58, 0.75);
}

.header__mobile-list li:last-child a {
  border-bottom: none;
}

.header__mobile-list a:hover,
.header__mobile-list a:focus-visible {
  color: var(--color-text);
}

.header__mobile-panel.is-open {
  animation: headerMobileFadeIn var(--transition-base);
}

@keyframes headerMobileFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1240px) {
  .nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

@media (min-width: 1241px) {
  .header__mobile-panel {
    display: none;
  }
}

.rt-ribbon {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.4rem 1rem;
  background: linear-gradient(90deg, rgba(7, 20, 22, 0.96), rgba(8, 36, 35, 0.96));
  border-bottom: 1px solid rgba(214, 183, 117, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.85);
}

.rt-ribbon__inner {
  width: 100%;
  max-width: var(--container-max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.rt-ribbon__geo {
  flex: 1;
  text-align: center;
}

.rt-ribbon__geo-mobile {
  display: none;
}

.rt-ribbon__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(214, 183, 117, 0.6);
  background: radial-gradient(circle at 0 0, rgba(218, 179, 89, 0.25), rgba(7, 20, 22, 0.9));
  font-size: 0.65rem;
}

.rt-ribbon__cta {
  color: inherit;
  white-space: nowrap;
  transition: border-color var(--transition-base), background-color var(--transition-base), color var(--transition-base);
}

.rt-ribbon__cta:hover,
.rt-ribbon__cta:focus-visible {
  border-color: rgba(218, 179, 89, 0.95);
  background: rgba(218, 179, 89, 0.16);
  color: var(--color-text);
}

.rt-ribbon__text {
  font-size: 0.7rem;
}

.rt-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.rt-brand__crest {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 0, rgba(218, 179, 89, 0.5), rgba(8, 36, 35, 0.75));
  border: 1px solid rgba(214, 183, 117, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
}

.rt-brand__crest span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.11em;
  color: var(--color-bg);
}

.rt-brand__text {
  display: flex;
  flex-direction: column;
}

.rt-brand__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text);
}

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

@media (max-width: 600px) {
  .rt-ribbon {
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
  }
  .rt-ribbon__inner {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }
  .rt-ribbon__geo {
    text-align: center;
    line-height: 1.45;
  }
  .rt-ribbon__geo-desktop {
    display: none;
  }
  .rt-ribbon__geo-mobile {
    display: inline;
  }
  .rt-ribbon__pill {
    padding: 0.12rem 0.65rem;
    font-size: 0.6rem;
  }
  .header__inner {
    height: auto;
    min-height: 72px;
    gap: var(--space-3);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }
  .rt-brand {
    min-width: 0;
    flex: 1;
    gap: 0.65rem;
  }
  .rt-brand__text {
    min-width: 0;
  }
  .rt-brand__title {
    font-size: clamp(0.65rem, 4vw, 0.9rem);
    letter-spacing: 0.13em;
    white-space: nowrap;
  }
  .rt-brand__subtitle {
    display: none;
  }
  .nav-toggle {
    flex-shrink: 0;
  }
}
