/* ===== Микроанимации (nd-motion.css). Скрытые состояния включает только JS классом html.nd-mo ===== */

/* 1. Появление секций: сдвиг 24px и opacity, 450 мс, один раз (12px за 280 мс владелец не заметил, 12.10.2026) */
html.nd-mo .nd-rv { opacity: 0; transform: translateY(24px); }
html.nd-mo .nd-rv.nd-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 3. Линия шагов «Как проходит подключение»: верхняя рамка каждого шага рисуется слева направо по очереди */
html.nd-mo .nd-steps .nd-step { position: relative; border-top-color: transparent; }
html.nd-mo .nd-steps .nd-step::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--nd-accent, #f3712b);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
html.nd-mo .nd-steps.nd-in .nd-step::after {
  transform: none;
  transition: transform 0.45s ease-out calc(var(--nd-i, 0) * 0.14s);
}
html.nd-mo .nd-steps .nd-step:nth-child(2) { --nd-i: 1; }
html.nd-mo .nd-steps .nd-step:nth-child(3) { --nd-i: 2; }
html.nd-mo .nd-steps .nd-step:nth-child(4) { --nd-i: 3; }
html.nd-mo .nd-steps .nd-step:nth-child(5) { --nd-i: 4; }

/* 4. Подсветка блока, где сменилась цена (регион): фон на 0,9 с, сама цифра не двигается */
@keyframes nd-flash {
  from { background-color: rgba(243, 113, 43, 0.16); }   /* без to: возврат к собственному фону блока, без скачка */
}
.nd-flash { animation: nd-flash 0.9s ease-out; }

/* 5. Подъём — только у плиток оборудования, у которых тень при наведении есть в DESIGN.md */
@media (hover: hover) {
  .nd-prodpage .nd-eq__item { transition: border-color 0.15s, transform 0.18s ease-out, box-shadow 0.18s ease-out; }
  .nd-prodpage .nd-eq__item:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26, 25, 25, 0.06); }
}

/* 6. Плавное раскрытие FAQ: нативно, где есть interpolate-size и ::details-content (Chromium 131+); иначе мгновенно, как сейчас */
@supports (interpolate-size: allow-keywords) and selector(::details-content) {
  .nd-faq details { interpolate-size: allow-keywords; }
  .nd-faq details::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
  }
  .nd-faq details[open]::details-content { block-size: auto; }
}


@media (prefers-reduced-motion: reduce) {
  .nd-flash { animation: none; }
  .nd-prodpage .nd-eq__item:hover { transform: none; }
  .nd-faq details::details-content { transition: none; }
}
@media print {
  html.nd-mo .nd-rv { opacity: 1; transform: none; }
  html.nd-mo .nd-steps .nd-step { border-top-color: var(--nd-accent, #f3712b); }
  html.nd-mo .nd-steps .nd-step::after { display: none; }
}
