.hero {
  position: relative;
  width: 100%;
  height: 880px;
  overflow: hidden;
  background: var(--color-dark-1100);
  isolation: isolate;
}

/* Стейдж хиро (топбар/бейджи/хедлайн) — вся абсолютная разметка внутри
   рассчитана на 1440px-фрейм (left/top в px из Figma), поэтому сама секция
   тянется на 100% под фон, а контент держим в центрированном 1440-блоке,
   не трогая ни один из существующих left/top. */
.hero__inner {
  position: relative;
  max-width: 1440px;
  height: 100%;
  margin-inline: auto;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(var(--parallax-y, 0px));
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: var(--color-dark-200);
}

/* Top bar */

.hero__topbar {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 163px;
  overflow: hidden;
}

/* Лого 162.942px высотой заполняет topbar почти впритык (163px) — при
   увеличении на ховере убираем обрезку именно топбаром, а не глобально */
.hero__topbar:has(.hero__logo:hover),
.hero__topbar:has(.hero__logo:focus-visible) {
  overflow: visible;
}

.hero__topbar-cluster {
  position: absolute;
  top: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__topbar-cluster--left {
  left: 33.11px;
}

.hero__topbar-cluster--right {
  left: 1098.11px;
}

.hero__social,
.hero__email,
.hero__phone {
  display: flex;
  align-items: center;
}

.hero__dots {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.hero__logo {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 164px;
  height: 162.942px;
  display: block;
  overflow: hidden;
  transition: border-radius 0.45s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

.hero__logo:hover,
.hero__logo:focus-visible {
  border-radius: 0 0 32px 32px;
  transform: translate(-50%, -16px);
}

.hero__logo img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Pills — shared by topbar and footer nav */

.hero__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-dark-800);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  color: var(--color-light-1000);
  border: none;
  white-space: nowrap;
}

.hero__pill--icon {
  width: 56px;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero__pill--icon img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.hero__pill--text {
  padding: 10px 16px;
}

.hero__pill--icon:hover,
.hero__pill--icon:focus-visible {
  background: var(--color-dark-500);
  transform: translateY(-2px);
}

/* Circular badges over the video */

.hero__badge {
  position: absolute;
  z-index: 20;
  width: 448px;
  height: 448px;
  cursor: pointer;
  transform: translateY(var(--parallax-y, 0px));
}

@keyframes hero-badge-ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__badge-ring,
  .hero__badge:hover .hero__badge-ring {
    animation: none;
  }
}

.hero__badge--left {
  left: 80.74px;
  top: 207.37px;
}

.hero__badge--right {
  left: 912px;
  top: 113.07px;
}

.hero__badge--right .hero__badge-ring {
  animation-delay: 1.3s;
}

/* Outer ring — the pulsing element, kept separate from the inner button */

.hero__badge-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-light-200);
  transform-origin: center;
  animation: hero-badge-ping 1.4s ease-out infinite;
}

/* Inner filled circle — the actual button, stays put and only reacts on hover */

.hero__badge-circle {
  position: absolute;
  left: 52.27px;
  top: 52.27px;
  width: 343.467px;
  height: 343.467px;
  border-radius: var(--radius-full);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(90deg, rgba(252, 246, 236, 0.08) 0%, rgba(252, 246, 236, 0.08) 100%);
  box-shadow: inset 0 20px 21px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.hero__badge-circle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Ховер-подсветка — тот же Light/400, что у кружков в футере */
.hero__badge-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--color-light-400);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.hero__badge:hover .hero__badge-circle {
  transform: scale(1.06);
}

.hero__badge:hover .hero__badge-circle::before {
  opacity: 1;
}

.hero__badge-text {
  color: var(--color-light-1000);
  text-align: center;
  letter-spacing: -0.04em;
}

.hero__badge-text--narrow {
  width: 216.959px;
}

.hero__badge-text--wide {
  width: 251.78px;
}

/* Headline */

.hero__headline {
  position: absolute;
  left: 50%;
  top: calc(50% + 72px);
  transform: translateX(-50%) translateY(var(--parallax-y, 0px));
  width: 456.628px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 40px;
  letter-spacing: -2.24px;
  color: var(--color-light-1000);
}

.hero__headline-accent {
  font-weight: 600;
  text-transform: uppercase;
}

/* Footer bar */

.hero__footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  z-index: 30;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* The site footer has its own back-to-top button and nav bubbles sharing
   the same bottom-center real estate as this fixed overlay — without
   hiding it, the two fight for hover/click once the footer scrolls into
   view, which reads as flicker/jitter. */
.hero__footer.is-hidden {
  opacity: 0;
}

.hero__footer.is-hidden .hero__menu-toggle,
.hero__footer.is-hidden .hero__call {
  pointer-events: none;
}

.hero__menu {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
}

/* Single morphing trigger — shrinks from a pill into a round plus-button */

.hero__menu-toggle {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: auto;
  border: none;
  outline: none;
  width: 278px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-dark-1100-800);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 10px 24px;
  color: var(--color-light-1000);
  overflow: hidden;
  transition:
    width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    padding 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.2s ease,
    transform 0.2s ease;
}

.hero__menu-toggle:hover,
.hero__menu-toggle:focus-visible {
  background: var(--color-dark-500);
  transform: translate(-50%, -2px);
}

.hero__menu-toggle-label {
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.hero__menu-toggle-icon {
  position: relative;
  width: 20px;
  height: 14px;
  flex-shrink: 0;
}

.hero__menu-toggle-line {
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1.5px;
  margin-top: -0.75px;
  background: var(--color-light-1000);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero__menu-toggle-line--1 {
  transform: translateY(-5px);
}

.hero__menu-toggle-line--2 {
  transform: translateY(5px);
}

.hero__menu.is-open .hero__menu-toggle {
  width: 56px;
  padding: 0;
  justify-content: center;
}

.hero__menu.is-open .hero__menu-toggle-label {
  opacity: 0;
  width: 0;
}

.hero__menu.is-open .hero__menu-toggle-line--1 {
  transform: translateY(0) rotate(45deg);
}

.hero__menu.is-open .hero__menu-toggle-line--2 {
  transform: translateY(0) rotate(-45deg);
}

/* Expanded menu panel — pops up from behind the toggle button */

.hero__menu-panel {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform-origin: bottom center;
  transform: translateX(-50%) translateY(12px) scale(0.85);
  width: 394px;
  max-width: calc(100vw - 32px);
  background: var(--color-dark-1100-800);
  backdrop-filter: blur(37px);
  -webkit-backdrop-filter: blur(37px);
  border-radius: 32px;
  padding: 56px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero__menu.is-open .hero__menu-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.hero__menu-label {
  color: var(--color-light-700);
}

.hero__menu-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero__menu-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.04em;
  color: var(--color-light-1000);
  transition: color 0.2s ease, transform 0.2s ease;
}

.hero__menu-link:hover,
.hero__menu-link:focus-visible {
  color: var(--color-primary);
  transform: translateX(6px);
}

.hero__menu-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.hero__menu-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.04em;
  color: var(--color-light-700);
  transition: color 0.2s ease;
}

.hero__menu-contact img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hero__menu-contact:hover,
.hero__menu-contact:focus-visible {
  color: var(--color-light-1000);
}

@media (prefers-reduced-motion: reduce) {
  .hero__nav,
  .hero__menu-close,
  .hero__menu-panel,
  .hero__nav-icon {
    transition: none;
  }
}

.hero__call {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(var(--color-dark-50), var(--color-dark-50)), var(--color-light-1000);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero__call img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
}

.hero__call::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-dark-200);
  opacity: 0;
  pointer-events: none;
}

.hero__call:hover {
  transform: scale(1.08);
}

.hero__call:hover::after {
  animation: hero-call-ping 1.2s ease-out infinite;
}

@keyframes hero-call-ping {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__call:hover::after {
    animation: none;
  }
}

/* ============ Mobile ≤767px — Figma 283:1054 ============ */
@media (max-width: 767px) {
  .hero {
    width: 100%;
    height: 796px;
  }

  /* Топбар: слева только иконка почты, справа только переключатель языка */
  .hero__topbar {
    height: 124px;
  }

  .hero__topbar-cluster--left {
    left: 16px;
    top: 41.6px;
  }

  .hero__topbar-cluster--right {
    left: auto;
    right: 16px;
    top: 41.6px;
  }

  /* Только топбар хиро — футер переиспользует hero__social/hero__email,
     его прятать нельзя */
  .hero__topbar .hero__social,
  .hero__topbar .hero__phone,
  .hero__topbar .hero__dots,
  .hero__topbar .hero__email .hero__pill--text {
    display: none;
  }

  .hero__logo {
    width: 124px;
    height: 123.2px;
  }

  /* Бейджи: контейнер 228px, круг 174.8px, белая обводка круга — из ноды */
  .hero__badge {
    width: 228px;
    height: 228px;
  }

  .hero__badge--right {
    left: auto;
    right: -17.3px;
    top: 136.91px;
  }

  .hero__badge--left {
    left: -20.53px;
    top: 340.26px;
  }

  /* Обводка — та же градиентная, что на десктопе (::after с mask),
     сплошную белую из ноды не используем */
  .hero__badge-circle {
    left: 26.6px;
    top: 26.6px;
    width: 174.8px;
    height: 174.8px;
  }

  .hero__badge-text,
  .hero__badge-text--narrow,
  .hero__badge-text--wide {
    width: 158.431px;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: -0.56px;
  }

  .hero__headline {
    top: 580px;
    width: calc(100% - 32px);
    max-width: 343px;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -1.68px;
  }

  /* Звонилка — Figma 291:3807: 40×56, радиус 100, Dark/50 поверх Light/1000,
     фиксирована в нижней панели рядом с меню (правый отступ 12, низ 16) */
  .hero__call {
    top: auto;
    right: 12px;
    bottom: 16px;
    width: 40px;
    height: 56px;
    border-radius: 100px;
  }

  .hero__call img {
    width: 20px;
    height: 20px;
  }
}

/* ============ Mobile ≤767px — меню, Figma 283:1408 / 283:3394 ============ */
@media (max-width: 767px) {
  .hero__menu {
    bottom: 16px;
  }

  .hero__menu-toggle {
    width: 218px;
  }

  /* Панель: на всю ширину минус боковые 16px, паддинг 48, зазор 40,
     до кнопки-крестика 8px (56 + 8 = 64) */
  .hero__menu-panel {
    width: calc(100vw - 32px);
    max-width: none;
    padding: 48px;
    gap: 40px;
    bottom: 64px;
  }
}
