/* ТАУРУС: общие анимации (Claude, 20.11.2026). Подключается в aspro_max/header.php
   на главной, страницах производства и контентных страницах. Без JS ничего не прячет. */

@media (prefers-reduced-motion: no-preference) {
  /* 1. Появление блоков при прокрутке: классы ставит motion.js только блокам ниже первого экрана */
  .tm-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  }
  .tm-reveal-item {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
    transition-delay: calc(var(--tm-i, 0) * 70ms + 120ms);
  }
  .tm-reveal.is-in,
  .tm-in .tm-reveal-item {
    opacity: 1;
    transform: none;
  }

  /* 5а. Плавные переходы между страницами (Chrome/Edge; остальные просто переходят) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: .25s; }

  /* 5б. Плавное раскрытие частых вопросов (Chrome 131+; остальные открывают сразу) */
  :root { interpolate-size: allow-keywords; }
  .tp-faq details::details-content,
  .tc-faq-item::details-content {
    height: 0;
    overflow: clip;
    transition: height .3s ease, content-visibility .3s allow-discrete;
  }
  .tp-faq details[open]::details-content,
  .tc-faq-item[open]::details-content { height: auto; }
  .tc-faq-item summary::after { transition: background-color .25s, color .25s; }
}

/* 3. Автолистание первого экрана: «01 / 04 ——— ❚❚». Блок создаёт motion.js,
   при выключенной в системе анимации JS его не создаёт. */
#v3Hero .tm-hero-status { display: flex; align-items: center; gap: 14px; }
#v3Hero .tm-hero-track {
  position: relative;
  width: 64px;
  height: 2px;
  border-radius: 2px;
  background: #cbc9bd;
  overflow: hidden;
}
#v3Hero .tm-hero-bar {
  position: absolute;
  inset: 0;
  background: #1f4b38;
  transform-origin: left;
  transform: scaleX(0);
}
#v3Hero .tm-hero-toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1f4b38;
  font-size: 10px;
  letter-spacing: -1px;
  cursor: pointer;
}
#v3Hero .tm-hero-toggle:hover { background: #e1e2d5; }
#v3Hero .tm-hero-toggle:focus-visible { outline: 2px solid #1f4b38; outline-offset: 2px; }
@media (max-width: 767px) {
  #v3Hero .tm-hero-status { gap: 10px; }
  #v3Hero .tm-hero-track { width: 40px; }
  #v3Hero .tm-hero-toggle { width: 24px; height: 24px; }
}

/* 4. Карта производства. Все элементы создаёт motion.js; без него схема остаётся картинкой. */
.tn-production-map .tm-station { transform-box: fill-box; transform-origin: center; }
.tn-production-map .tm-station.tm-hit { animation: tm-station-hit .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tm-station-hit { 40% { transform: scale(1.16); } }
.tn-production-map .tm-ring { fill: none; stroke: #e9af45; stroke-width: 3; transform-box: fill-box; transform-origin: center; }
.tn-production-map .tm-part-glow { fill: #e9af45; opacity: .3; }
.tn-production-map .tm-part-dot { fill: #e9af45; stroke: #fff; stroke-width: 3; }
.tn-production-map .tm-map-replay {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 7px 14px;
  border: 1px solid #ddd8ca;
  border-radius: 999px;
  background: #fff;
  color: #1f4b38;
  font: 600 13px/1.2 Manrope, sans-serif;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.tn-production-map .tm-map-replay:hover { background: #f2efe6; border-color: #63825c; }
.tn-production-map .tm-map-replay:focus-visible { outline: 2px solid #1f4b38; outline-offset: 2px; }
/* телефон: станции загораются по очереди, линия между ними дорастает вниз */
.tn-map-mobile.tm-play [data-name^="Станция ·"] [data-name^="Иконка"] { opacity: .35; transform: scale(.8); transition: opacity .3s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.tn-map-mobile.tm-play [data-name^="Станция ·"] [data-name="Трасса"] { transform: scaleY(0); transform-origin: top; transition: transform .3s ease .1s; }
.tn-map-mobile.tm-play .tm-lit [data-name^="Иконка"] { opacity: 1; transform: none; }
.tn-map-mobile.tm-play .tm-lit [data-name="Трасса"] { transform: none; }

@media print {
  .tm-reveal, .tm-reveal-item { opacity: 1 !important; transform: none !important; }
}
