/* Жидкое меню для телефона: кнопка внизу справа, пункты вытекают с gooey-эффектом */
/* На десктопе не показывается — там обычная навигация сверху */

.goo-menu {
  display: block;
  position: fixed;
  right: 16px;
  top: max(14px, env(safe-area-inset-top));
  width: 56px;
  height: 56px;
  z-index: 900;
}

/* на телефоне верхнее меню прячем — его заменяет кнопка «+» */
@media (max-width: 640px) {
  .nav--wide,
  .nav {
    display: none;
  }
}

/* ---------- слой форм с goo-фильтром (без текста) ---------- */

.goo-layer {
  position: absolute;
  right: 0;
  top: 0;
  width: 250px;
  height: 440px;
  filter: url(#goo-filter);
  pointer-events: none;
  z-index: 0;
}

.goo-blob {
  position: absolute;
  right: 0;
  top: 0;
  height: 46px;
  border-radius: 999px;
  background: #ececec;
  transform: translate3d(0, 0, 0) scale(0.55);
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease;
  transition-delay: var(--delay, 0ms);
  will-change: transform;
}

.goo-menu.is-open .goo-blob {
  opacity: 1;
  transform: translate3d(0, var(--y), 0) scale(1);
}

/* ---------- слой подписей: без фильтра, текст остаётся чётким ---------- */

.goo-items {
  position: absolute;
  right: 0;
  top: 0;
  width: 250px;
  height: 440px;
  pointer-events: none;
  z-index: 1;
}

.goo-item {
  position: absolute;
  right: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  color: #111;
  text-decoration: none;
  font-family: 'Unbounded', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0) scale(0.85);
  transform-origin: right top;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease;
  transition-delay: var(--delay, 0ms);
  pointer-events: none;
  background: none;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

.goo-menu.is-open .goo-item {
  opacity: 1;
  transform: translateY(var(--y)) scale(1);
  pointer-events: auto;
}

/* ---------- кнопка-переключатель ---------- */

.goo-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #ececec;
  color: #111;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.goo-toggle:active { transform: scale(0.94); }

.goo-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.goo-menu.is-open .goo-toggle {
  background: #dcdcdc;
}

.goo-menu.is-open .goo-toggle svg {
  transform: rotate(135deg);
}

/* ---------- затемнение фона ---------- */

.goo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 899;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.goo-backdrop.is-on {
  opacity: 1;
  pointer-events: auto;
}

/* пока меню открыто — страница не прокручивается */
body.goo-locked {
  overflow: hidden;
}
