/* Стили сайта: наведение (из макета) и элементы первого экрана, которые перелетают на сайт. */
/* Базовые стили и анимации из макета сайта. */
.site {
  color: #141826;
}
.site a {
  color: oklch(0.5 0.2 268);
  text-decoration: none;
}
.site a:hover {
  color: oklch(0.4 0.2 280);
}
@keyframes ehFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
@keyframes ehSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes ehDrift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -30px) scale(1.08);
  }
  66% {
    transform: translate(-30px, 20px) scale(0.95);
  }
}
@keyframes ehGrid {
  to {
    background-position: 64px 64px;
  }
}
@keyframes ehPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}
@keyframes ehScan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(600%);
  }
}
@keyframes ehDash {
  to {
    stroke-dashoffset: -40;
  }
}
@keyframes ehNode {
  0%,
  100% {
    r: 6;
  }
  50% {
    r: 8;
  }
}
.hv1:hover {
  border-color: oklch(0.6 0.19 255);
  color: oklch(0.36 0.16 280);
}
.hv2:hover {
  background: oklch(0.42 0.2 285);
  color: #fff;
}
.hv3:hover {
  border-color: oklch(0.6 0.19 255);
}

/* Первый экран: логотип, фраза и кнопка — «перелетающие» элементы. Копии элементов сайта (.lockup,
   .title-copy, .cabinet-copy) повторяют его разметку один в один, чтобы в конце перелёта совпасть с оригиналами. */
.runway {
  height: var(--runway, 90vh);
}
.site {
  position: relative;
  z-index: 1;
}
.intro .hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.intro .fly {
  transform-origin: center center;
}
.intro .fly-stack {
  position: relative;
  display: grid;
  justify-items: center;
}
.intro .fly-stack > * {
  grid-area: 1 / 1;
  align-self: center;
}
/* Копия не занимает места: точка 0×0 в центре, вокруг которой она центрируется. */
.intro .ghost {
  width: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.intro .brand-mark {
  zoom: 1.7;
  margin-bottom: 20px;
}
.intro .brand-name {
  zoom: 4.6;
  margin-bottom: 4px;
}
.intro .brand-mark,
.intro .brand-name {
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1;
}
.intro .tagline {
  margin: 0;
}
.intro .title-copy {
  margin: 0;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #141826;
  width: min(980px, 100vw - 64px);
  flex: none;
  text-wrap: balance;
  text-align: center;
  pointer-events: none;
}
.intro .title-copy span {
  background: linear-gradient(90deg, oklch(0.42 0.2 285), oklch(0.6 0.19 255) 60%, oklch(0.7 0.14 185));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro .fly-cta-stack {
  margin-top: 36px;
}
.intro .cabinet {
  margin-top: 0;
}
.intro .cabinet-copy {
  color: #1b1f3b;
  border: 1px solid #e1e3ea;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
  opacity: 0;
  pointer-events: none;
}
.intro .scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 22px;
  height: 34px;
  margin-left: -11px;
  border: 1.5px solid #c9cddb;
  border-radius: 12px;
  opacity: 0.9;
}
.intro .scroll-hint span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #8c94a6;
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  60% {
    transform: translateY(9px);
    opacity: 0.2;
  }
}
/* Пока перелёт не закончен, оригиналы на сайте скрыты — их место занимают копии. */
.site.pending #nav-logo,
.site.pending #nav-cabinet,
.site.pending #hero-title {
  visibility: hidden;
}
@media (max-width: 1100px) {
  .intro .brand-name {
    zoom: 3.4;
  }
}
@media (max-width: 600px) {
  .intro .brand-mark {
    zoom: 1.45;
    margin-bottom: 18px;
  }
  .intro .brand-name {
    zoom: 1.7;
  }
  .intro .fly-cta-stack {
    margin-top: 28px;
  }
  .intro .scroll-hint {
    bottom: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .intro .scroll-hint span {
    animation: none;
  }
}

/* ── шапка сайта: после первого экрана прилипает к верху, прячется вниз и выплывает вверх ── */
.site-nav {
  position: relative;
  z-index: 30;
}
.site-nav.pinned .nav-inner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: none;
  padding: 12px max(32px, calc((100vw - 1200px) / 2 + 32px));
  background: rgba(246, 247, 251, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(27, 31, 59, 0.08);
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav.pinned.hidden .nav-inner {
  transform: translateY(-110%);
  transition-duration: 0.75s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 600px) {
  .site-nav.pinned .nav-inner {
    padding: 10px 16px;
  }
}

/* ── запрос демо ── */
.demo-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 24, 38, 0.5);
  animation: demo-fade 0.2s ease both;
}
.demo-wrap[hidden] {
  display: none;
}
.demo-modal {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow: 0 30px 80px rgba(20, 24, 38, 0.3);
  animation: demo-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes demo-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes demo-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.demo-icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(145deg, #4b33b8, #2a7be6);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  box-shadow: 0 12px 26px rgb(75 51 184 / 28%);
}
.demo-icon svg {
  width: 28px;
  height: 28px;
}
.demo-icon-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2dd4bf;
  border: 3px solid #fff;
}
.demo-modal h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #141826;
}
.demo-modal h3 {
  margin: 12px 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: #141826;
}
.demo-lead,
.demo-done p {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #4b5068;
}
.demo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: #f0f1f6;
  color: #3b4056;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#demo-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#demo-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #6b7080;
}
#demo-form input:not([type="checkbox"]) {
  height: 46px;
  border: 1.5px solid #e1e3ea;
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #141826;
  background: #fbfbfe;
  outline: none;
}
#demo-form input:focus {
  border-color: #4f46e5;
  background: #fff;
}
#demo-form input.invalid {
  border-color: #c22845;
}
.demo-check {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 600 !important;
  color: #3b4056 !important;
  line-height: 1.4;
  margin-top: 4px;
}
.demo-check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: #4f46e5;
  flex: none;
}
.demo-check a {
  color: #4f46e5;
}
.demo-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fde7eb;
  color: #c22845;
  font-size: 13.5px;
  font-weight: 700;
}
.demo-submit {
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #4b33b8, #2a7be6);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgb(79 70 229 / 26%);
  margin-top: 6px;
}
.demo-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.demo-done {
  text-align: center;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.demo-done[hidden] {
  display: none;
}
.demo-done-mark {
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: #d3f7ee;
  color: #0f766e;
  font-size: 30px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.demo-done .demo-submit {
  width: 100%;
}
body.demo-open {
  overflow: hidden;
}

/* ── подсветка пунктов верхнего меню ── */
.nav-inner a[href^="#"] {
  padding: 8px 12px;
  margin: 0 -12px;
  border-radius: 999px;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}
.nav-inner a[href^="#"]:hover {
  background: #e6ebff;
  color: #2f2688;
}
/* ── блок-схема на фоне «Покажем платформу на ваших процессах» ── */
.cta-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .cta-flow animate,
  .cta-flow animateMotion {
    display: none;
  }
}

/* ── кнопки «Запросить демо»: яркий градиент со свечением ── */
.demo-btn {
  position: relative;
  color: #fff !important;
  background: linear-gradient(120deg, #5b3de0 0%, #2a7be6 55%, #2dd4bf 130%);
  background-size: 160% 100%;
  background-position: 0% 50%;
  box-shadow:
    0 12px 28px -10px rgba(79, 70, 229, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition:
    background-position 0.4s ease,
    transform 0.15s ease,
    box-shadow 0.25s ease;
}
.demo-btn:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px -10px rgba(42, 123, 230, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  color: #fff;
}
.demo-btn-lg {
  background: linear-gradient(120deg, #2dd4bf 0%, #35a6ff 60%, #6d7bff 130%);
  box-shadow:
    0 22px 50px -14px rgba(20, 24, 38, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.demo-trap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
