/* ─── Fixed header stack height (promo + logo/nav row) ─── */
:root {
  --site-header-offset: calc(5.75rem + env(safe-area-inset-top, 0px));
}

@media (min-width: 768px) {
  :root {
    --site-header-offset: 10.75rem;
  }
}

@media (min-width: 1280px) {
  :root {
    --site-header-offset: 11.25rem;
  }
}

html {
  scroll-padding-top: calc(var(--site-header-offset) + 0.5rem);
}

@media (min-width: 768px) {
  .hero-mobile-main {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--site-header-offset) + 1.25rem) !important;
  }
}

/* ─── Promo strip + CTA (conversion) ─── */
.header-promo-bar {
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.18) 0%,
    rgba(139, 92, 246, 0.2) 42%,
    rgba(255, 79, 216, 0.16) 100%
  );
  background-color: rgba(5, 7, 18, 0.82);
  border-bottom: 1px solid rgba(128, 255, 255, 0.14);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.header-promo-bar__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.42rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  text-align: center;
  color: #94a3b8;
}

.header-promo-bar__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #041016;
  background: linear-gradient(135deg, #67e8f9, #c084fc);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
}

.header-promo-bar__text strong {
  color: #e2e8f0;
  font-weight: 700;
}

.header-promo-bar__link {
  color: #7ef9ff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.header-promo-bar__link:hover {
  color: #c4b5fd;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.55);
}

.header-connect-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.45rem !important;
  max-height: none !important;
  padding: 0.42rem 1rem 0.42rem 1.05rem !important;
  font-size: 0.875rem !important;
  border-radius: 999px !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 28px rgba(176, 38, 255, 0.45),
    0 0 32px rgba(34, 211, 238, 0.22) !important;
}

.header-connect-cta__main {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.header-connect-cta__price {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #041016;
  background: linear-gradient(135deg, #7ef9ff, #f0abfc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.header-connect-cta--mobile {
  width: 100%;
  justify-content: center;
  min-height: 3rem !important;
  font-size: 1rem !important;
}

.header-nav-link--key {
  font-weight: 650;
  color: #e2e8f0 !important;
}

#siteHeader .header-nav-link--legal {
  font-size: 0.78rem !important;
  padding: 0.38rem 0.5rem !important;
}

html.theme-v2 .header-wordmark-text.babkavps-wordmark--glitch {
  background-image: linear-gradient(
    105deg,
    #7ef9ff 0%,
    #e8fbff 28%,
    #ff9ae8 55%,
    #c4b5fd 72%,
    #7ef9ff 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(126, 249, 255, 0.45))
    drop-shadow(0 0 14px rgba(255, 154, 232, 0.22));
}

html.theme-v2 .header-wordmark-text.babkavps-wordmark--glitch::before,
html.theme-v2 .header-wordmark-text.babkavps-wordmark--glitch::after {
  display: none !important;
  content: none !important;
  animation: none !important;
}

html.theme-v2 .header-wordmark--split {
  display: inline-flex;
}

html.theme-v2 .header-wordmark--split .header-logo-icon-wrap {
  order: -1;
}

html.theme-v2 .header-wordmark--split::before {
  content: "";
  order: 0;
  flex: 0 0 3px;
  align-self: stretch;
  width: 3px;
  min-height: 1.5em;
  margin: 0 0.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #7ef9ff 0%, #ff9ae8 50%, #c084fc 100%);
  box-shadow:
    0 0 8px rgba(126, 249, 255, 0.75),
    0 0 14px rgba(255, 154, 232, 0.45);
}

html.theme-v2 .header-wordmark--split .header-wordmark-text {
  order: 1;
}

@media (min-width: 768px) {
  #siteHeader #headerConnectBtn.header-connect-cta {
    min-height: 2.5rem !important;
    padding: 0.44rem 1.15rem 0.44rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .header-promo-bar__text {
    font-size: 0.75rem;
  }

  .header-promo-bar__link {
    flex: 1 0 100%;
  }
}

/* Шапка: цельный баннер из макета (иконка + глитч «БабкаVPN») */

:root {
  --babka-neon-purple: #b026ff;
  --babka-glitch-top: #80ffff;
  --babka-glitch-bottom: #ffb0ff;
}

.header-tech-wrap .header-logo.header-wordmark {
  height: auto;
  min-height: calc(3.35rem - (0.75rem * var(--header-progress)));
  display: flex;
  align-items: center;
}

@media (max-width: 767px) {
  .header-tech-wrap--mobile-top .header-logo.header-wordmark {
    min-height: calc(2.95rem - (0.65rem * var(--header-progress)));
  }
}

@media (min-width: 768px) {
  .header-tech-wrap .header-logo.header-wordmark {
    min-height: calc(3.65rem - (0.85rem * var(--header-progress)));
  }
}

/* Логотип слева, панель по центру страницы — не слипаются */
.header-tech-wrap--split-brand .header-layout-row {
  align-items: center;
}

.header-tech-wrap--split-brand .header-brand-link {
  display: inline-flex;
  align-self: center;
  align-items: center;
}

.header-tech-wrap--split-brand .header-logo.header-wordmark {
  min-height: 0 !important;
  height: auto !important;
  transform: none !important;
  will-change: auto !important;
}

.header-tech-wrap--split-brand .header-panel-row {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  padding-top: 0;
}

@media (min-width: 768px) {
  .header-tech-wrap--split-brand .header-panel-row--desktop {
    display: flex;
  }

  .header-tech-wrap--split-brand .header-layout-row--balanced {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(0.75rem, 2vw, 2.25rem);
  }

  .header-tech-wrap--split-brand .header-layout-row--balanced .header-brand-link {
    grid-column: 1;
    justify-self: start;
    width: auto;
    max-width: none;
    min-width: max-content;
    margin-right: 0;
    z-index: 20;
    overflow: visible;
    flex-shrink: 0;
  }

  .header-tech-wrap--split-brand .header-layout-row--balanced .header-panel-row {
    grid-column: 2;
    justify-self: center;
    flex: none;
    width: 100%;
    max-width: min(62rem, 100%);
    min-width: 0;
    z-index: 1;
    padding-left: 0;
    padding-right: 0;
  }

  .header-tech-wrap--split-brand .header-layout-row--balanced .header-menu-toggle {
    grid-column: 3;
    justify-self: end;
  }

  .header-tech-wrap--split-brand .header-logo.header-wordmark {
    max-width: none;
    flex-shrink: 0;
  }

  .header-wordmark--split {
    width: max-content;
    max-width: none;
    min-width: max-content;
    flex-shrink: 0;
    overflow: visible;
  }

  #siteHeader .header-wordmark-text.babkavps-wordmark--glitch {
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: visible;
    min-width: max-content;
  }

  #siteHeader .header-nav-panel.header-tech {
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .header-logo-icon-wrap {
    width: auto;
    height: 56px;
  }

  .header-logo-icon-neon {
    transform: none;
    max-height: 56px;
  }

  .header-wordmark-text.babkavps-wordmark--glitch {
    font-size: clamp(1.45rem, 2.1vw, 1.85rem);
  }
}

@media (min-width: 1280px) {
  .header-tech-wrap--split-brand .header-layout-row--balanced {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: clamp(1.25rem, 3vw, 2.75rem);
  }

  .header-logo-icon-wrap {
    height: 64px;
  }

  .header-logo-icon-neon {
    max-height: 64px;
  }

  .header-wordmark-text.babkavps-wordmark--glitch {
    font-size: clamp(1.65rem, 2.2vw, 2.1rem);
  }
}

@media (min-width: 1536px) {
  .header-logo-icon-wrap {
    height: 72px;
  }

  .header-logo-icon-neon {
    max-height: 72px;
  }

  .header-wordmark-text.babkavps-wordmark--glitch {
    font-size: 2.15rem;
  }
}

#siteHeader .header-nav-panel.header-tech {
  width: 100%;
  max-width: 62rem;
}

@media (min-width: 768px) {
  #siteHeader .header-nav-panel.header-tech {
    width: auto;
  }
}

#siteHeader .header-logo.header-wordmark {
  background: transparent !important;
}

@media (min-width: 768px) {
  #siteHeader .header-tech-inner {
    flex-wrap: nowrap;
  }

  #siteHeader .header-nav-desktop {
    flex: 0 1 auto;
  }
}

/* Логотип: иконка + текст — одна связка, иконка шире по горизонтали */
.header-wordmark--split {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(0.45rem, 2vw, 0.75rem);
}

/* Иконка: только бабка с неоном (без круга/диска), рядом — глитч-текст */
.header-logo-icon-wrap {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto;
  height: clamp(52px, 11vw, 68px);
  overflow: visible;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  position: relative;
}

.header-logo-icon-wrap::after {
  content: "";
  position: absolute;
  inset: -18% -12%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 52%,
    rgba(128, 255, 255, 0.42) 0%,
    rgba(56, 189, 248, 0.18) 42%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 0;
}

.header-logo-icon-neon {
  display: block;
  width: auto;
  height: 100%;
  max-height: clamp(52px, 11vw, 68px);
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  background: transparent !important;
  border-radius: 0;
  animation: none !important;
  mix-blend-mode: normal;
  filter:
    drop-shadow(0 0 6px rgba(128, 255, 255, 0.95))
    drop-shadow(0 0 14px rgba(56, 189, 248, 0.65))
    drop-shadow(0 0 10px rgba(176, 38, 255, 0.5)) !important;
  transform: none;
  transform-origin: center center;
  position: relative;
  z-index: 1;
}

/* Header wordmark: single clean layer — no glitch pseudo duplicates */
#siteHeader .header-wordmark-text.babkavps-wordmark--glitch::before,
#siteHeader .header-wordmark-text.babkavps-wordmark--glitch::after {
  display: none !important;
  content: none !important;
  visibility: hidden !important;
  animation: none !important;
}

#siteHeader .header-wordmark-text.babkavps-wordmark--glitch {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: visible;
  padding-right: 0.18em;
  font-size: clamp(1.55rem, 4.83vw, 2.36rem);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
  align-self: center;
  padding-right: 0.35em;
  color: #f8fafc;
  background-image: linear-gradient(
    105deg,
    #7ef9ff 0%,
    #e8fbff 28%,
    #ff9ae8 55%,
    #c4b5fd 72%,
    #7ef9ff 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(126, 249, 255, 0.45))
    drop-shadow(0 0 14px rgba(255, 154, 232, 0.22));
}

.header-wordmark-text.babkavps-wordmark--glitch::before,
.header-wordmark-text.babkavps-wordmark--glitch::after {
  animation: header-text-glitch-jitter 2.9s steps(2, end) infinite;
}

@keyframes header-text-glitch-jitter {
  0%,
  86%,
  100% {
    transform: translate(0, 0);
  }
  88% {
    transform: translate(-3px, 0);
  }
  91% {
    transform: translate(3px, 1px);
  }
}

.header-tech-wrap--glitch-cyan-purple .header-logo.header-wordmark {
  filter: none !important;
  animation: none !important;
}

/* Старый цельный баннер — без глитч-анимации, если где-то остался */
.header-logo-wordmark-banner {
  animation: none !important;
}

/* Круглый неоновый логотип (только favicon / miniapp) */
.header-logo-circle {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(176, 38, 255, 0.65))
    drop-shadow(0 0 16px rgba(176, 38, 255, 0.35));
  animation: none !important;
}

@media (min-width: 640px) {
  .header-logo-circle {
    width: 48px;
    height: 48px;
  }
}

.header-brand-title.babka-glitch-wordmark {
  font-size: clamp(0.95rem, 3.8vw, 1.35rem);
}

/* Горизонтальный баннер */
.header-logo-wordmark-banner {
  display: block;
  height: clamp(58px, 15vw, 76px);
  width: auto;
  max-width: min(360px, 88vw);
  object-fit: contain;
  object-position: left center;
  background: transparent !important;
}

@media (min-width: 768px) {
  #siteHeader .header-logo-wordmark-banner {
    height: 96px;
    max-width: 440px;
  }
}

@media (min-width: 1280px) {
  #siteHeader .header-logo-wordmark-banner {
    height: 104px;
    max-width: 480px;
  }
}

/* main.css задаёт огромную высоту .header-logo — для баннера отключаем */
#siteHeader .header-logo.header-wordmark {
  height: auto !important;
  min-height: 0 !important;
  transform: none !important;
  will-change: auto !important;
}

#siteHeader .header-brand-link {
  will-change: auto !important;
  transform: none !important;
}

/* Опциональный CSS-глитч (если понадобится без картинки) */
.babka-glitch-wordmark,
.babkavps-wordmark.babkavps-wordmark--glitch {
  position: relative;
  display: inline-block;
  font-family: Montserrat, ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  white-space: nowrap;
  color: transparent;
}

.babka-glitch-wordmark::before,
.babka-glitch-wordmark::after,
.babkavps-wordmark--glitch::before,
.babkavps-wordmark--glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  font: inherit;
  letter-spacing: inherit;
}

.babka-glitch-wordmark::before,
.babkavps-wordmark--glitch::before {
  color: var(--babka-glitch-top);
  text-shadow: 0 0 8px rgba(128, 255, 255, 0.85), -2px 0 rgba(128, 255, 255, 0.4);
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
  transform: translate(-2px, 0);
}

.babka-glitch-wordmark::after,
.babkavps-wordmark--glitch::after {
  color: var(--babka-glitch-bottom);
  text-shadow: 0 0 8px rgba(255, 176, 255, 0.8), 2px 0 rgba(255, 176, 255, 0.4);
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
  transform: translate(2px, 0);
}

#siteHeader.header-tech-wrap {
  z-index: 400 !important;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(6, 8, 16, 0.86), rgba(6, 8, 16, 0.72)) !important;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48) !important;
}

#siteHeader .header-tech {
  background: rgba(5, 7, 18, 0.9) !important;
  background-image: none !important;
  backdrop-filter: blur(14px) saturate(1.35) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.35) !important;
  border: 1px solid rgba(128, 255, 255, 0.22) !important;
  border-top: none !important;
  box-shadow:
    0 0 28px rgba(176, 38, 255, 0.28),
    0 0 42px rgba(56, 189, 248, 0.16),
    inset 0 1px 0 rgba(128, 255, 255, 0.12) !important;
}

#siteHeader .header-nav-panel.header-tech {
  border-top: 1px solid rgba(128, 255, 255, 0.12) !important;
  overflow: visible;
}

.header-tech-wrap--glitch-cyan-purple .header-tech::before {
  opacity: 0.78 !important;
  inset: -2px -6px !important;
  background:
    repeating-linear-gradient(
      -62deg,
      transparent,
      transparent 10px,
      rgba(56, 80, 140, 0.06) 10px,
      rgba(56, 80, 140, 0.06) 11px
    ),
    linear-gradient(
      100deg,
      rgba(128, 255, 255, 0.18) 0%,
      rgba(176, 38, 255, 0.16) 45%,
      rgba(255, 120, 255, 0.12) 100%
    ) !important;
  animation: header-bar-glitch-sweep 3.8s ease-in-out infinite !important;
}

.header-tech-wrap--glitch-cyan-purple .header-tech::after {
  opacity: 0.95 !important;
  height: 2px !important;
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.75),
    0 0 22px rgba(176, 38, 255, 0.65) !important;
  animation: header-bar-glitch-line 2.4s linear infinite !important;
}

/* Панель: бегущая обводка голубой → фиолетовой → розовой */
@keyframes header-panel-border-run {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.header-tech-wrap--glitch-cyan-purple .header-nav-panel.header-tech::after,
#siteHeader .header-nav-panel.header-tech::after {
  inset: -1px !important;
  left: -1px !important;
  right: -1px !important;
  top: -1px !important;
  bottom: -1px !important;
  width: auto !important;
  height: auto !important;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    90deg,
    #22d3ee 0%,
    #38bdf8 10%,
    #67e8f9 18%,
    #818cf8 32%,
    #a855f7 46%,
    #b026ff 56%,
    #c026d3 66%,
    #ec4899 78%,
    #f472b6 88%,
    #fb7185 96%,
    #22d3ee 100%
  ) !important;
  background-size: 320% 100% !important;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.94 !important;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 7px rgba(34, 211, 238, 0.7))
    drop-shadow(0 0 14px rgba(168, 85, 247, 0.55))
    drop-shadow(0 0 18px rgba(236, 72, 153, 0.45));
  box-shadow: none !important;
  animation: header-panel-border-run 3.2s linear infinite !important;
}

.header-mobile-menu {
  box-shadow:
    0 0 28px rgba(128, 255, 255, 0.12),
    0 0 44px rgba(176, 38, 255, 0.14),
    0 16px 40px rgba(0, 0, 0, 0.35) !important;
}

#siteHeader.header-tech-wrap {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48) !important;
}

#siteHeader .header-tech,
.header-tech-wrap--glitch-cyan-purple .header-tech::before,
.header-tech-wrap--glitch-cyan-purple .header-tech::after {
  box-shadow: none !important;
}

#siteHeader .header-nav-panel.header-tech {
  min-height: calc(3.5rem - (0.5rem * var(--header-progress))) !important;
  padding-top: calc(0.42rem - (0.1rem * var(--header-progress))) !important;
  padding-bottom: calc(0.42rem - (0.1rem * var(--header-progress))) !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  border-radius: 1.1rem;
  border-color: transparent !important;
}

#siteHeader .header-nav-panel .header-tech-inner {
  min-height: 0;
  max-width: 100%;
  align-items: center;
}

#siteHeader .header-nav-panel .header-nav-desktop {
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

#siteHeader .header-nav-link {
  text-shadow: 0 0 12px rgba(128, 255, 255, 0.12);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    text-shadow 0.2s ease;
}

#siteHeader .header-nav-link:hover {
  text-shadow:
    0 0 10px rgba(128, 255, 255, 0.55),
    0 0 18px rgba(176, 38, 255, 0.35);
}

#siteHeader #headerConnectBtn {
  box-shadow: none !important;
  max-height: 2.35rem;
}

#siteHeader #headerConnectBtn.tech-btn::before {
  inset: 0 !important;
  border-radius: inherit;
  opacity: 0.55;
}

#siteHeader #headerConnectBtn.tech-btn::after {
  inset: 1px !important;
  border-radius: calc(12px - 1px);
}

#siteHeader .header-nav-link {
  padding: 0.42rem 0.62rem !important;
  font-size: 0.875rem !important;
  line-height: 1.2;
  white-space: nowrap;
}

#siteHeader #headerConnectBtn {
  min-height: 2.15rem !important;
  max-height: 2.35rem !important;
  padding: 0.38rem 0.95rem !important;
  font-size: 0.8125rem !important;
  white-space: nowrap;
  margin-left: 0.15rem !important;
}

@media (prefers-reduced-motion: reduce) {
  .header-wordmark-text.babkavps-wordmark--glitch::before,
  .header-wordmark-text.babkavps-wordmark--glitch::after,
  .header-tech-wrap--glitch-cyan-purple .header-tech::before,
  .header-tech-wrap--glitch-cyan-purple .header-tech::after,
  .header-tech-wrap--glitch-cyan-purple .header-nav-panel.header-tech::after {
    animation: none !important;
  }
}

@media (min-width: 768px) {
  #siteHeader .header-tech {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  #siteHeader .header-nav-panel .header-tech-inner {
    min-height: 0;
  }

  #siteHeader .header-nav-panel.header-tech {
    min-height: calc(3.65rem - (0.55rem * var(--header-progress))) !important;
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
  }

  #siteHeader .header-nav-panel .header-nav-desktop {
    gap: 0.2rem !important;
  }

  #siteHeader .header-nav-link {
    padding: 0.44rem 0.72rem !important;
    font-size: 0.9rem !important;
  }

  #siteHeader #headerConnectBtn {
    min-height: 2.2rem !important;
    max-height: 2.4rem !important;
    padding: 0.4rem 1.05rem !important;
    font-size: 0.85rem !important;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  #siteHeader .header-nav-panel .header-nav-desktop {
    gap: 0.2rem !important;
  }

  #siteHeader .header-nav-link {
    padding: 0.38rem 0.5rem !important;
    font-size: 0.8125rem !important;
  }

  #siteHeader #headerConnectBtn {
    margin-left: 0.4rem !important;
    padding: 0.36rem 0.8rem !important;
    font-size: 0.8rem !important;
  }
}

@media (min-width: 1280px) and (max-width: 1535px) {
  #siteHeader .header-nav-panel .header-nav-desktop {
    gap: 0.28rem !important;
  }

  #siteHeader .header-nav-link {
    padding: 0.42rem 0.62rem !important;
    font-size: 0.875rem !important;
  }

  #siteHeader #headerConnectBtn {
    margin-left: 0.5rem !important;
    padding: 0.4rem 0.95rem !important;
    font-size: 0.85rem !important;
  }
}

@media (min-width: 1536px) {
  #siteHeader .header-nav-panel .header-nav-desktop {
    gap: 0.35rem !important;
  }

  #siteHeader .header-nav-link {
    padding: 0.46rem 0.8rem !important;
    font-size: 0.925rem !important;
  }

  #siteHeader #headerConnectBtn {
    margin-left: 0.55rem !important;
    padding: 0.42rem 1.15rem !important;
    font-size: 0.875rem !important;
  }
}

/* Miniapp — Aurora Glass split-бренд: круглый лого + shimmer wordmark + переливающаяся полоска */
.miniapp-topbar-brand {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.miniapp-topbar .miniapp-topbar-wordmark {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.55rem, 2.2vw, 0.85rem);
  min-width: 0;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}

/* Круглый логотип: без чёрного квадрата, увеличен, neon purple ring */
.miniapp-topbar .miniapp-topbar-icon-wrap,
.miniapp-topbar .miniapp-topbar-icon-wrap.header-logo-icon-wrap {
  flex: 0 0 auto;
  width: clamp(2.85rem, 11.5vw, 3.55rem);
  height: clamp(2.85rem, 11.5vw, 3.55rem) !important;
  max-height: 3.55rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: transparent !important;
  box-shadow:
    0 0 0 2px rgba(176, 38, 255, 0.95),
    0 0 10px rgba(176, 38, 255, 0.7),
    0 0 18px rgba(176, 38, 255, 0.4),
    0 0 8px rgba(128, 255, 255, 0.25);
  position: relative;
}

.miniapp-topbar .miniapp-topbar-icon-wrap.header-logo-icon-wrap::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.miniapp-topbar .miniapp-topbar-icon,
.miniapp-topbar .header-logo-icon-neon {
  width: 100%;
  height: 100%;
  max-height: 100% !important;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 50%;
  background: transparent !important;
  filter:
    drop-shadow(0 0 4px rgba(176, 38, 255, 0.55))
    drop-shadow(0 0 10px rgba(128, 255, 255, 0.28));
  animation: ma-logo-glow-pulse 3.6s ease-in-out infinite !important;
}

/* Переливающаяся полоска между лого и wordmark (cyan ↔ magenta ↔ white) */
.miniapp-topbar .miniapp-topbar-wordmark.header-wordmark--split::before {
  content: "";
  flex: 0 0 3px;
  align-self: stretch;
  width: 3px;
  min-height: 1.6em;
  margin: 0 -0.15rem;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #7ef9ff 0%,
    #e8fbff 22%,
    #ff9ae8 48%,
    #c084fc 68%,
    #7ef9ff 100%
  );
  background-size: 100% 280%;
  box-shadow:
    0 0 8px rgba(126, 249, 255, 0.85),
    0 0 14px rgba(255, 154, 232, 0.55),
    0 0 18px rgba(176, 38, 255, 0.35);
  animation: ma-stripe-iridescent 2.8s linear infinite;
  order: 0;
}

.miniapp-topbar .miniapp-topbar-icon-wrap {
  order: -1;
}

@keyframes ma-stripe-iridescent {
  0% {
    background-position: 50% 0%;
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    background-position: 50% 100%;
    filter: hue-rotate(25deg) brightness(1.15);
  }
  100% {
    background-position: 50% 200%;
    filter: hue-rotate(0deg) brightness(1);
  }
}

.miniapp-topbar .miniapp-topbar-title-text.babkavps-wordmark--glitch {
  font-size: clamp(1.22rem, 5vw, 1.62rem);
  letter-spacing: -0.03em;
  line-height: 1;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8fbff;
  background-image: linear-gradient(
    105deg,
    #7ef9ff 0%,
    #e8fbff 28%,
    #ff9ae8 55%,
    #c4b5fd 72%,
    #7ef9ff 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(126, 249, 255, 0.45))
    drop-shadow(0 0 14px rgba(255, 154, 232, 0.22));
  animation:
    ma-wordmark-shimmer 5.5s ease-in-out infinite,
    ma-wordmark-micro 7.2s ease-in-out infinite;
}

.miniapp-topbar .miniapp-topbar-title-text.babkavps-wordmark--glitch::before,
.miniapp-topbar .miniapp-topbar-title-text.babkavps-wordmark--glitch::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  clip-path: none !important;
  transform: none !important;
}

@keyframes ma-wordmark-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 7px rgba(126, 249, 255, 0.5))
      drop-shadow(0 0 12px rgba(255, 154, 232, 0.18));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 9px rgba(255, 154, 232, 0.42))
      drop-shadow(0 0 14px rgba(126, 249, 255, 0.28));
  }
}

@keyframes ma-wordmark-micro {
  0%,
  86%,
  92%,
  100% {
    transform: translate(0, 0);
  }
  88% {
    transform: translate(-0.7px, 0);
  }
  90% {
    transform: translate(0.7px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .miniapp-topbar .miniapp-topbar-icon-wrap.header-logo-icon-wrap::after,
  .miniapp-topbar .header-logo-icon-neon,
  .miniapp-topbar .miniapp-topbar-title-text.babkavps-wordmark--glitch,
  .miniapp-topbar .miniapp-topbar-wordmark.header-wordmark--split::before {
    animation: none !important;
  }

  .miniapp-topbar .miniapp-topbar-icon-wrap.header-logo-icon-wrap::after {
    opacity: 0.85;
    transform: none;
  }

  .miniapp-topbar .miniapp-topbar-title-text.babkavps-wordmark--glitch {
    background-image: none;
    -webkit-text-fill-color: #e8fbff;
    color: #e8fbff;
    filter: drop-shadow(0 0 6px rgba(126, 249, 255, 0.35));
    transform: none;
  }

  .miniapp-topbar .miniapp-topbar-wordmark.header-wordmark--split::before {
    background: linear-gradient(180deg, #7ef9ff, #ff9ae8);
    filter: none;
  }
}

/* ─── Scroll: full panel close + overshoot + neon sphere ─── */
#siteHeader {
  /* longer / softer — fluid ease-out, gentle settle */
  --header-nav-ease: 0.52s cubic-bezier(0.33, 1, 0.4, 1);
  /* slight travel past end, then settle — soft overshoot (was snappy 1.18) */
  --header-nav-travel: 0.78s cubic-bezier(0.22, 1.06, 0.36, 1);
  --header-neon-ease: 0.58s cubic-bezier(0.33, 1, 0.4, 1);
  --header-neon-travel: 0.85s cubic-bezier(0.22, 1.05, 0.36, 1);
}

@keyframes header-neon-sphere-in {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }
  58% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#siteHeader .header-promo-bar {
  max-height: 4.5rem;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height var(--header-nav-ease),
    opacity var(--header-nav-ease),
    transform var(--header-nav-travel),
    padding var(--header-nav-ease),
    border-color var(--header-nav-ease);
}

#siteHeader .header-panel-row {
  max-height: 6rem;
  overflow: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity var(--header-nav-ease),
    transform var(--header-nav-travel),
    max-height var(--header-nav-ease),
    visibility var(--header-nav-ease);
}

#siteHeader .header-wordmark-text {
  max-width: 14rem;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition:
    max-width var(--header-nav-ease),
    opacity var(--header-nav-ease),
    transform var(--header-nav-travel),
    margin var(--header-nav-ease),
    visibility var(--header-nav-ease);
}

#siteHeader .header-wordmark--split::before {
  transition:
    opacity var(--header-nav-ease),
    transform var(--header-nav-ease),
    flex-basis var(--header-nav-ease),
    width var(--header-nav-ease),
    min-height var(--header-nav-ease),
    margin var(--header-nav-ease),
    box-shadow var(--header-nav-ease);
}

/* Travel lives on icon wrap — brand-link keeps transform:none elsewhere */
#siteHeader .header-logo-icon-wrap {
  transition:
    transform var(--header-nav-travel),
    filter var(--header-nav-ease);
}

/* Neon sphere layer (purple) — dormant until collapse */
#siteHeader .header-logo-icon-wrap::before {
  content: "";
  position: absolute;
  inset: -44%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 48%,
    rgba(224, 170, 255, 0.58) 0%,
    rgba(176, 38, 255, 0.4) 24%,
    rgba(176, 38, 255, 0.16) 48%,
    transparent 74%
  );
  box-shadow:
    0 0 0 1px rgba(224, 170, 255, 0.22),
    0 0 22px rgba(176, 38, 255, 0.55),
    0 0 46px rgba(176, 38, 255, 0.38),
    0 0 72px rgba(139, 92, 246, 0.24),
    inset 0 0 24px rgba(224, 170, 255, 0.2);
  opacity: 0;
  transform: scale(0.62);
  pointer-events: none;
  z-index: 0;
  transition:
    opacity var(--header-neon-ease),
    transform var(--header-neon-travel),
    box-shadow var(--header-neon-ease);
}

#siteHeader .header-logo-icon-wrap::after {
  transition: opacity var(--header-nav-ease), filter var(--header-nav-ease);
}

#siteHeader .header-layout-shell {
  transition: padding var(--header-nav-ease);
}

#siteHeader .header-nav-panel.header-tech {
  transition:
    opacity var(--header-nav-ease),
    min-height var(--header-nav-ease),
    padding var(--header-nav-ease),
    border-color var(--header-nav-ease),
    box-shadow var(--header-nav-ease);
}

#siteHeader.header-nav-collapsed .header-promo-bar {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
  transform: translateY(-120%);
  pointer-events: none;
}

#siteHeader.header-nav-collapsed .header-panel-row {
  max-height: 0;
  opacity: 0;
  /* travel past closed position; easing overshoots then settles */
  transform: translateY(-1.2rem) scale(0.95);
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
}

#siteHeader.header-nav-collapsed .header-nav-panel.header-tech {
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}

#siteHeader.header-nav-collapsed .header-nav-panel.header-tech::after {
  opacity: 0 !important;
  animation: none !important;
}

#siteHeader.header-nav-collapsed .header-wordmark-text {
  max-width: 0;
  opacity: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
  transform: translateX(-0.65rem);
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

/* Hide neon separator with the wordmark so only the icon remains */
#siteHeader.header-nav-collapsed .header-wordmark--split::before {
  opacity: 0 !important;
  flex: 0 0 0 !important;
  width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  transform: scaleY(0.15);
  box-shadow: none !important;
  pointer-events: none;
}

#siteHeader.header-nav-collapsed .header-logo-icon-wrap {
  transform: translateY(-0.42rem) scale(0.96);
}

#siteHeader.header-nav-collapsed .header-logo-icon-wrap::before {
  opacity: 1;
  transform: scale(1);
}

#siteHeader.header-nav-collapsed .header-logo-icon-wrap.header-logo-neon-sphere::before {
  animation: header-neon-sphere-in 0.92s cubic-bezier(0.22, 1.05, 0.36, 1) both;
}

#siteHeader.header-nav-collapsed .header-logo-icon-wrap::after {
  opacity: 0.28;
  filter: hue-rotate(40deg) saturate(1.2);
}

#siteHeader.header-nav-collapsed .header-logo-icon-neon {
  filter:
    drop-shadow(0 0 10px rgba(224, 170, 255, 0.95))
    drop-shadow(0 0 20px rgba(176, 38, 255, 0.78))
    drop-shadow(0 0 34px rgba(139, 92, 246, 0.48)) !important;
}

#siteHeader.header-nav-collapsed .header-layout-shell {
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
}

#siteHeader.header-nav-collapsed .header-logo-icon-wrap,
#siteHeader.header-nav-collapsed .header-logo-icon-neon,
#siteHeader.header-nav-collapsed .header-brand-link,
#siteHeader.header-nav-collapsed .header-menu-toggle {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 768px) {
  #siteHeader.header-nav-collapsed.header-tech-wrap--split-brand .header-layout-row--balanced {
    grid-template-columns: auto;
  }

  /* Keep panel in flow so max-height / opacity / travel can finish — no display:none snap */
  #siteHeader.header-nav-collapsed.header-tech-wrap--split-brand .header-layout-row--balanced .header-panel-row {
    width: 0;
    min-width: 0;
    max-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  #siteHeader .header-promo-bar,
  #siteHeader .header-panel-row,
  #siteHeader .header-wordmark-text,
  #siteHeader .header-wordmark--split::before,
  #siteHeader .header-logo-icon-wrap,
  #siteHeader .header-logo-icon-wrap::before,
  #siteHeader .header-logo-icon-wrap::after,
  #siteHeader .header-layout-shell,
  #siteHeader .header-nav-panel.header-tech {
    transition: none !important;
    animation: none !important;
  }

  #siteHeader.header-nav-collapsed .header-logo-icon-wrap::before {
    animation: none !important;
    opacity: 1;
    transform: scale(1);
  }

  #siteHeader.header-nav-collapsed .header-logo-icon-wrap {
    transform: translateY(-0.1rem) scale(0.97);
  }
}
