/* Большая сделка — motion layer v1, crisp hotfix
   Только визуальное движение: не меняет размеры, сетку, тексты и логику.
   Без blur/filter на тексте и карточках; drift/pop используют только смещение. */

html.bs-motion-enabled [data-bs-motion] {
  --bs-motion-x: 0px;
  --bs-motion-y: 0px;
  --bs-motion-scale-x: 1;
  --bs-motion-scale-y: 1;
  --bs-motion-rotate: 0deg;
  --bs-motion-delay: 0ms;
  --bs-motion-duration: 760ms;
  translate: var(--bs-motion-x) var(--bs-motion-y);
  scale: var(--bs-motion-scale-x) var(--bs-motion-scale-y);
  rotate: var(--bs-motion-rotate);
  transition-property: translate, scale, rotate;
  transition-duration: var(--bs-motion-duration);
  transition-delay: var(--bs-motion-delay);
  transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}

html.bs-motion-enabled [data-bs-motion="left"] {
  --bs-motion-x: -44px;
}

html.bs-motion-enabled [data-bs-motion="right"] {
  --bs-motion-x: 44px;
}

html.bs-motion-enabled [data-bs-motion="up"] {
  --bs-motion-y: 34px;
}

html.bs-motion-enabled [data-bs-motion="down"] {
  --bs-motion-y: -28px;
}

html.bs-motion-enabled [data-bs-motion="drift-left"] {
  --bs-motion-x: -34px;
  --bs-motion-y: 18px;
}

html.bs-motion-enabled [data-bs-motion="drift-right"] {
  --bs-motion-x: 34px;
  --bs-motion-y: 18px;
}

html.bs-motion-enabled [data-bs-motion="pop"] {
  --bs-motion-y: 18px;
}

html.bs-motion-enabled [data-bs-motion="spin-pop"] {
  --bs-motion-y: 12px;
  --bs-motion-scale-x: .78;
  --bs-motion-scale-y: .78;
  --bs-motion-rotate: -9deg;
  --bs-motion-duration: 920ms;
}

html.bs-motion-enabled [data-bs-motion="sweep-left"] {
  --bs-motion-x: -22px;
  --bs-motion-duration: 880ms;
}

html.bs-motion-enabled [data-bs-motion="sweep-right"] {
  --bs-motion-x: 22px;
  --bs-motion-duration: 880ms;
}

html.bs-motion-enabled [data-bs-motion="sweep-up"] {
  --bs-motion-y: 22px;
  --bs-motion-duration: 860ms;
}

html.bs-motion-enabled [data-bs-motion="grow-x"] {
  --bs-motion-scale-x: .02;
  --bs-motion-scale-y: 1;
  transform-origin: left center;
  --bs-motion-duration: 1050ms;
}

html.bs-motion-enabled [data-bs-motion="grow-y"] {
  --bs-motion-scale-x: 1;
  --bs-motion-scale-y: .02;
  transform-origin: center top;
  --bs-motion-duration: 980ms;
}

html.bs-motion-enabled [data-bs-motion].bs-motion-in {
  translate: 0 0;
  scale: 1 1;
  rotate: 0deg;
}

/* Наведение не переопределяем: после входной анимации элемент полностью
   возвращается к исходным hover-переходам основного сайта. */

@media (max-width: 767px) {
  html.bs-motion-enabled [data-bs-motion="left"],
  html.bs-motion-enabled [data-bs-motion="drift-left"] { --bs-motion-x: -24px; }
  html.bs-motion-enabled [data-bs-motion="right"],
  html.bs-motion-enabled [data-bs-motion="drift-right"] { --bs-motion-x: 24px; }
  html.bs-motion-enabled [data-bs-motion="up"] { --bs-motion-y: 24px; }
  html.bs-motion-enabled [data-bs-motion="down"] { --bs-motion-y: -20px; }
}

@media (prefers-reduced-motion: reduce) {
  html.bs-motion-enabled [data-bs-motion],
  html.bs-motion-enabled [data-bs-motion].bs-motion-in {
    translate: none !important;
    scale: none !important;
    rotate: none !important;
    clip-path: none !important;
    transition: none !important;
  }
}

/* HOTFIX: первый экран — пункты под подзаголовком не меняют геометрию при hover.
   Раньше hover увеличивал padding-left, из-за чего длинная строка могла переноситься
   и менять высоту блока. Теперь тот же лёгкий сдвиг делается transform-ом,
   который не участвует в расчёте ширины/высоты макета. */
#hero .hero-bullet {
  padding-left: 0 !important;
  transition: transform .22s ease, color .22s, background-color .22s !important;
}

#hero .hero-bullet:hover {
  padding-left: 0 !important;
  transform: translateX(.55rem);
}

@media (max-width: 767px), (hover: none) {
  #hero .hero-bullet:hover {
    transform: none;
  }
}

/* ============================================================
   HOVER POLISH v2 — мягкая живая реакция без рывков и размытия.
   Важно: не меняем padding/margin/width/height/font-size.
   Используем только translate, фон, тень и цвет — геометрия сайта стабильна.
   Статьи и контакты оставлены без изменений: их hover уже утверждён.
   ============================================================ */

@media (hover: hover) and (pointer: fine) {
  /* Общий характер — плавный, без резкого старта/остановки. */
  #audience .audience-point,
  #not-fit .notfit-row,
  #why-value-matters .value-panel,
  #what-calculator-shows .calculator-node,
  #how-it-works .process-route-step,
  #about .expert-fact,
  #about .expert-accordion,
  #consultation .consultation-column,
  #consultation .consultation-note,
  #consultation .consultation-actions,
  #faq .stage3-faq-button {
    transition-timing-function: cubic-bezier(.22, 1, .36, 1) !important;
  }

  /* 1. Для кого — лёгкий подъём + чуть более глубокая плашка. */
  #audience .audience-point {
    transition: translate .34s cubic-bezier(.22,1,.36,1),
                box-shadow .34s ease,
                background-color .34s ease !important;
  }
  #audience .audience-point:hover {
    translate: 0 -3px;
    box-shadow: 0 18px 38px -32px rgba(0,0,0,.72);
  }

  /* 2. Кому не подойдёт — движение в сторону, без изменения padding. */
  #not-fit .notfit-row {
    transition: translate .34s cubic-bezier(.22,1,.36,1),
                background-color .3s ease,
                box-shadow .3s ease !important;
  }
  #not-fit .notfit-row:hover {
    padding-left: .7rem !important;
    translate: 5px 0;
    box-shadow: inset 2px 0 0 var(--accent-gold-deep);
  }

  /* 3. Почему важна оценка — не поднимаем, а мягко подсвечиваем плоскость. */
  #why-value-matters .value-panel {
    transition: opacity .34s ease,
                transform .42s cubic-bezier(.22,1,.36,1),
                background-color .34s ease,
                box-shadow .34s ease !important;
  }
  #why-value-matters .value-panel:hover {
    box-shadow: inset 0 1px 0 var(--accent-gold-deep),
                inset 0 -1px 0 var(--editorial-line),
                0 16px 34px -34px rgba(0,0,0,.72);
  }

  /* 4. Что покажет калькулятор — именно здесь возвращаем живой hover:
        мягкий подъём карточки + золото в глубине + движение иконки. */
  #what-calculator-shows .calculator-node {
    transition: opacity .32s ease,
                transform .36s cubic-bezier(.22,1,.36,1),
                translate .36s cubic-bezier(.22,1,.36,1),
                background-color .32s ease,
                box-shadow .36s ease !important;
  }
  #what-calculator-shows .calculator-node:hover {
    translate: 0 -4px;
    opacity: 1;
    box-shadow: inset 0 1px 0 var(--accent-gold-deep),
                0 22px 42px -34px rgba(0,0,0,.82);
  }
  #what-calculator-shows .calculator-node svg {
    transition: translate .34s cubic-bezier(.22,1,.36,1), color .3s ease !important;
  }
  #what-calculator-shows .calculator-node:hover svg {
    translate: 0 -2px;
    color: var(--accent-gold-deep);
  }

  /* 5. Как проходит оценка — не одинаковый подъём: три шага слегка
        тянутся к центру маршрута, а номер становится заметнее. */
  #how-it-works .process-route-step {
    transition: translate .38s cubic-bezier(.22,1,.36,1),
                box-shadow .34s ease,
                background-color .34s ease !important;
  }
  #how-it-works .process-route-step:nth-child(1):hover { translate: 4px -2px; }
  #how-it-works .process-route-step:nth-child(2):hover { translate: 0 -4px; }
  #how-it-works .process-route-step:nth-child(3):hover { translate: -4px -2px; }
  #how-it-works .process-route-step:hover {
    box-shadow: inset 0 1px 0 var(--accent-gold-deep),
                0 18px 38px -34px rgba(0,0,0,.72);
  }
  #how-it-works .process-route-number {
    transition: translate .38s cubic-bezier(.22,1,.36,1), color .34s ease !important;
  }
  #how-it-works .process-route-step:hover .process-route-number {
    translate: 0 -3px;
    color: var(--accent-gold-deep);
  }

  /* 6. Об эксперте — факты слегка сдвигаются, аккордеоны только подсвечиваются. */
  #about .expert-fact {
    transition: translate .34s cubic-bezier(.22,1,.36,1),
                background-color .3s ease,
                box-shadow .3s ease !important;
  }
  #about .expert-fact:hover {
    translate: 4px 0;
    box-shadow: inset 2px 0 0 var(--accent-gold-deep);
  }
  #about .expert-accordion {
    transition: background-color .32s ease, box-shadow .32s ease !important;
  }
  #about .expert-accordion:hover {
    box-shadow: inset 0 1px 0 var(--accent-gold-deep),
                inset 0 -1px 0 var(--editorial-line) !important;
  }

  /* 7. Консультация — панели реагируют по-разному, но очень легко. */
  #consultation .consultation-column {
    transition: background-color .32s ease, box-shadow .32s ease !important;
  }
  #consultation .consultation-column:hover {
    background: var(--editorial-hover);
    box-shadow: inset 0 1px 0 var(--editorial-line);
  }
  #consultation .consultation-note {
    transition: translate .34s cubic-bezier(.22,1,.36,1),
                background-color .32s ease !important;
  }
  #consultation .consultation-note:hover {
    translate: 4px 0;
    background: var(--editorial-hover);
  }
  #consultation .consultation-actions {
    transition: box-shadow .34s ease, background-color .32s ease !important;
  }
  #consultation .consultation-actions:hover {
    box-shadow: inset 0 1px 0 var(--accent-gold-deep);
    background: var(--editorial-hover);
  }

  /* 8. FAQ — вопрос не прыгает; меняется только свет и номер. */
  #faq .stage3-faq-button {
    transition: background-color .3s ease, color .3s ease !important;
  }
  #faq .stage3-faq-button:hover {
    background: var(--editorial-hover);
  }
  #faq .stage3-faq-number {
    transition: translate .32s cubic-bezier(.22,1,.36,1), color .3s ease !important;
  }
  #faq .stage3-faq-button:hover .stage3-faq-number {
    translate: 3px 0;
    color: var(--accent-gold);
  }
}

/* На сенсорных устройствах hover-полировку не симулируем. */
@media (hover: none), (pointer: coarse) {
  #audience .audience-point,
  #not-fit .notfit-row,
  #what-calculator-shows .calculator-node,
  #how-it-works .process-route-step,
  #about .expert-fact,
  #consultation .consultation-note {
    translate: none !important;
  }
}
