/* 15.11 Технологии v6: схемы глав (js/home/tech-figs.js). Только transform/opacity, без фильтров.
   Анимация идёт только у текущей главы (.ts-cue.is-on) и только пока блок на экране (.ts.tg-run).
   Задержка каждого элемента = --t0 + --d: в prefers-reduced-motion --t0 = --still (отрицательная), анимации на паузе —
   получается осмысленный стоп-кадр, где всё уже показано. Размеры и место схемы в карточке — css/home-white.css (.ts-fig). */
.tg { --t0: 0s; --still: -2.5s; }
/* всё рисуется внутри 320×180; мягкие углы у «разрезов» во всю ширину */
.ts-fig.tg { overflow: hidden; border-radius: 10px; }
.tg * { transform-box: fill-box; }
.tg-lab { font: 500 10.5px "Montserrat", sans-serif; fill: #6b6a7e; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.tg-lab.tg-ink { fill: #1b1a2e; font-weight: 600; }
.tg-lab.tg-strong { font-weight: 800; font-size: 15px; fill: #1b1a2e; letter-spacing: -0.01em; }
.tg-lead { fill: none; stroke: #8f8da0; stroke-width: .7; }
.tg-dot { fill: #1b1a2e; }
.tg-v { fill: #8a76bd; }
.tg-j { fill: #8a76bd; }
.tg-badge-t { font: 700 12px "Montserrat", sans-serif; fill: #fff; letter-spacing: .01em; }
.tg-hole { fill: #1b1a2e; }
.tg-thr { fill: none; stroke: #6c5f8a; stroke-width: 1.1; stroke-linecap: round; }

/* стартовые (невидимые) состояния — только у текущей главы, чтобы стоп-кадр без анимации был полным */
.ts-cue.is-on .tg-call { animation: tg-in .5s ease both; }
@keyframes tg-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }

/* пар: крошечные частицы поднимаются сквозь слои (честный масштаб — капля в разы крупнее) */
.tg--intro { --rise: -112px; --still: -3s; }
.tg--membrane { --rise: -180px; --still: -2.5s; }
.tg--vapor { --rise: -168px; --still: -2s; }
.ts-cue.is-on .tg-v { animation: tg-rise 3.4s linear infinite both; }
.ts-cue.is-on .tg-vs--wide .tg-v { animation-name: tg-rise2; animation-duration: 3.6s; }
@keyframes tg-rise { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .9; } 85% { opacity: .75; } 100% { transform: translate(var(--dx), var(--rise)); opacity: 0; } }
@keyframes tg-rise2 { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(0, calc(var(--rise) * .5)); opacity: .9; }
  100% { transform: translate(var(--dx), var(--rise)); opacity: 0; } }

/* Знакомство: лупа вырастает из плеча, капля ложится на ткань, пар идёт изнутри */
.ts-cue.is-on .tg-lens { animation: tg-lens .8s cubic-bezier(.2, .8, .2, 1) both; --d: .1s; }
@keyframes tg-lens { from { transform: translate(-96px, -34px) scale(.1); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
.ts-cue.is-on .tg-cone { animation: tg-fade .4s ease both; --d: .45s; }
.ts-cue.is-on .tg-vs { animation: tg-fade .6s ease both; --d: .5s; }
@keyframes tg-fade { from { opacity: 0; } to { opacity: 1; } }
.tg-fall, .tg-dfall, .tg-mfall { transform-origin: 50% 100%; }
.ts-cue.is-on .tg-fall { animation: tg-fall .9s cubic-bezier(.5, 0, .5, 1) both; }
@keyframes tg-fall { 0% { transform: translateY(-80px); opacity: 0; } 12% { opacity: 1; } 55% { transform: none; } 66% { transform: scale(1.12, .86); } 80% { transform: scale(.97, 1.03); } 100% { transform: none; opacity: 1; } }

/* DWR: без пропитки капля и масло растекаются и впитываются; с DWR C6 — шарики, вода скатывается */
.tg--dwr { --still: -1.8s; }
.ts-cue.is-on .tg-soak { animation: tg-soakfall 4.4s cubic-bezier(.45, 0, .7, .4) infinite both; }
@keyframes tg-soakfall { 0% { transform: translateY(-110px); opacity: 0; } 4% { opacity: 1; } 14% { transform: none; opacity: 1; } 16%, 100% { transform: none; opacity: 0; } }
.tg-film { transform-origin: 50% 50%; }
.ts-cue.is-on .tg-film { animation: tg-film 4.4s ease-out infinite both; }
@keyframes tg-film { 0%, 13% { transform: scaleX(.3); opacity: 0; } 15% { opacity: 1; } 28% { transform: none; opacity: 1; } 46%, 100% { transform: none; opacity: 0; } }
.tg-wet { transform-origin: 50% 50%; }
.ts-cue.is-on .tg-wet { animation: tg-wet 4.4s ease-out infinite both; }
@keyframes tg-wet { 0%, 18% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: none; } 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
.ts-cue.is-on .tg-bead { animation: tg-beadfall 4.4s cubic-bezier(.45, 0, .7, .4) infinite both; }
@keyframes tg-beadfall { 0% { transform: translateY(-110px); opacity: 0; } 4% { opacity: 1; } 14% { transform: none; } 18% { transform: scale(1.14, .86); } 23% { transform: scale(.96, 1.04); }
  28% { transform: none; } 88% { opacity: 1; } 96%, 100% { transform: none; opacity: 0; } }
.ts-cue.is-on .tg-ride { animation: tg-ride 4.4s cubic-bezier(.5, 0, .8, .5) infinite both; }
@keyframes tg-ride { 0%, 50% { transform: none; opacity: 1; } 68% { transform: translateX(62px); opacity: 1; } 76%, 100% { transform: translate(78px, 26px); opacity: 0; } }

/* мембрана: капли падают и остаются снаружи */
.ts-cue.is-on .tg-mfall { animation: tg-mfall 3.2s cubic-bezier(.45, 0, .7, .4) infinite both; }
@keyframes tg-mfall { 0% { transform: translateY(-100px); opacity: 0; } 6% { opacity: 1; } 22% { transform: none; } 27% { transform: scale(1.12, .88); } 33% { transform: scale(.97, 1.03); }
  38% { transform: none; } 82% { opacity: 1; } 94%, 100% { transform: none; opacity: 0; } }

/* водяной столб: вода поднимается до отметки, давит на ткань, под тканью сухо */
.tg--column { --still: -2.6s; }
.tg-wfill { transform-origin: 50% 100%; }
.ts-cue.is-on .tg-wfill { animation: tg-wfill 5s cubic-bezier(.35, 0, .25, 1) infinite both; }
@keyframes tg-wfill { 0%, 4% { transform: scaleY(.03); } 40%, 84% { transform: scaleY(1); } 96%, 100% { transform: scaleY(.03); } }
.ts-cue.is-on .tg-wlev { animation: tg-wlev 5s cubic-bezier(.35, 0, .25, 1) infinite both; }
@keyframes tg-wlev { 0%, 4% { transform: translateY(calc(var(--h) * .03)); } 40%, 84% { transform: translateY(var(--h)); } 96%, 100% { transform: translateY(calc(var(--h) * .03)); } }
.ts-cue.is-on .tg-push { animation: tg-push 5s ease infinite both; }
@keyframes tg-push { 0%, 26% { opacity: 0; transform: translateY(-4px); } 36% { opacity: 1; transform: none; } 84% { opacity: 1; } 90%, 100% { opacity: 0; } }
.ts-cue.is-on .tg-res { animation: tg-res 5s ease infinite both; }
@keyframes tg-res { 0%, 30% { opacity: 0; } 40%, 86% { opacity: 1; } 94%, 100% { opacity: 0; } }

/* пар: у тела частиц много, снаружи мало — поток идёт туда, где суше */
.ts-cue.is-on .tg-j { animation: tg-jit 2.2s ease-in-out infinite both; }
@keyframes tg-jit { 0%, 100% { transform: none; } 50% { transform: translate(var(--dx), -2px); } }
.tg-arrow { transform-origin: 50% 100%; }
.ts-cue.is-on .tg-arrow { animation: tg-grow .9s cubic-bezier(.3, .7, .2, 1) both; --d: .3s; }
@keyframes tg-grow { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }

/* слои: собраны → раскрываются с подписями → снова собираются в один материал */
.tg--layers { --still: -2.5s; }
.tg-l1 { --e: -30px; } .tg-l2 { --e: -16px; --d: .04s; } .tg-l3 { --e: -4px; --d: .08s; } .tg-l4 { --e: 12px; --d: .12s; }
.ts-cue.is-on .tg-l1, .ts-cue.is-on .tg-l2, .ts-cue.is-on .tg-l3, .ts-cue.is-on .tg-l4 { animation: tg-ex 5.6s cubic-bezier(.3, .7, .2, 1) infinite both; }
@keyframes tg-ex { 0%, 3% { transform: none; } 18%, 82% { transform: translateY(var(--e)); } 96%, 100% { transform: none; } }
.ts-cue.is-on .tg--layers .tg-call { animation: tg-callc 5.6s ease infinite both; }
@keyframes tg-callc { 0%, 13% { opacity: 0; transform: translateX(-4px); } 19%, 80% { opacity: 1; transform: none; } 85%, 100% { opacity: 0; } }

/* утеплитель: тёплые частицы от тела застревают между волокнами, снежинки остаются снаружи */
.tg--warm { --still: -2.6s; }
.ts-cue.is-on .tg-heat { animation: tg-trap 3.2s cubic-bezier(.2, .6, .3, 1) infinite both; }
@keyframes tg-trap { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(var(--dx), var(--dy)); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * -1), calc(var(--dy) + 6px)); opacity: 0; } }
.ts-cue.is-on .tg-cold { animation: tg-snow 2.6s linear infinite both; }
@keyframes tg-snow { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 72% { transform: translate(var(--dx), 37px); opacity: 1; } 100% { transform: translate(var(--dx), 38px); opacity: 0; } }
.ts-cue.is-on .tg-glow { animation: tg-fade 1s ease both; }
.tg-loft { transform-origin: 50% 0; }
.ts-cue.is-on .tg-loft { animation: tg-loft 3.2s ease-in-out infinite both; }
@keyframes tg-loft { 0%, 100% { transform: none; } 50% { transform: scaleY(1.035); } }
.ts-cue.is-on .tg-badge { animation: tg-in .5s ease both; --d: .8s; }

/* швы: игла прокалывает, через проколы проступила бы вода — ролик прикатывает термоленту */
.tg--seam { --still: -2.6s; }
.ts-cue.is-on .tg-needle { animation: tg-needle 5.2s linear infinite both; }
@keyframes tg-needle { 0% { transform: translateX(0); opacity: 1; } 20% { transform: translateX(var(--tx)); opacity: 1; } 23%, 100% { transform: translateX(var(--tx)); opacity: 0; } }
.ts-cue.is-on .tg-bob { animation: tg-bob .15s ease-in-out infinite both; }
@keyframes tg-bob { 50% { transform: translateY(5px); } }
.tg-hole { transform-origin: 50% 50%; }
.ts-cue.is-on .tg-hole, .ts-cue.is-on .tg-thr { animation: tg-hole 5.2s ease infinite both; }
@keyframes tg-hole { 0% { opacity: 0; transform: scale(.2); } 2% { opacity: .9; transform: none; } 86% { opacity: .9; } 94%, 100% { opacity: 0; } }
.tg-seep { transform-origin: 50% 0; }
.ts-cue.is-on .tg-seep { animation: tg-seep 5.2s ease infinite both; }
@keyframes tg-seep { 0% { opacity: 0; transform: scale(.3); } 4% { opacity: 1; transform: none; } 14% { opacity: 1; } 18%, 100% { opacity: 0; } }
.tg-tape { transform-origin: 0 50%; }
.ts-cue.is-on .tg-tape { animation: tg-tape 5.2s cubic-bezier(.4, 0, .6, 1) infinite both; }
@keyframes tg-tape { 0%, 21% { transform: scaleX(0); opacity: 1; } 40% { transform: none; } 86% { opacity: 1; transform: none; } 94% { opacity: 0; transform: none; } 100% { opacity: 0; transform: scaleX(0); } }
.ts-cue.is-on .tg-roller { animation: tg-roller 5.2s cubic-bezier(.4, 0, .6, 1) infinite both; }
@keyframes tg-roller { 0%, 19% { transform: translateX(0); opacity: 0; } 21% { opacity: 1; transform: translateX(0); } 40% { transform: translateX(var(--tx)); opacity: 1; } 45%, 100% { transform: translateX(var(--tx)); opacity: 0; } }
.ts-cue.is-on .tg-hot { animation: tg-hot .5s ease-in-out infinite alternate both; }
@keyframes tg-hot { from { opacity: .35; transform: translateY(1px); } to { opacity: 1; transform: translateY(-1px); } }
.ts-cue.is-on .tg-c1 { animation: tg-c1 5.2s ease infinite both; }
@keyframes tg-c1 { 0%, 12% { opacity: 0; } 18%, 86% { opacity: 1; } 92%, 100% { opacity: 0; } }
.ts-cue.is-on .tg--seam .tg-c2 { animation: tg-c2 5.2s ease infinite both; }
@keyframes tg-c2 { 0%, 38% { opacity: 0; } 44%, 86% { opacity: 1; } 92%, 100% { opacity: 0; } }

/* пояс и манжета: снег залетает под край и упирается в пояс/манжету */
.tg--skirt, .tg--gaiter { --still: -1s; }
.ts-cue.is-on .tg-up { animation: tg-up 1.9s cubic-bezier(.2, .7, .4, 1) infinite both; }
@keyframes tg-up { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 1; } 45% { transform: translate(var(--dx), var(--dy)); } 52% { transform: translate(var(--dx), calc(var(--dy) + 2px)); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 2), 4px); opacity: 0; } }
.ts-cue.is-on .tg-spray { animation: tg-hit 1.5s cubic-bezier(.15, .6, .35, 1) infinite both; }
@keyframes tg-hit { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 1; } 50% { transform: translate(var(--dx), var(--dy)); opacity: 1; }
  100% { transform: translate(calc(var(--dx) + 5px), calc(var(--dy) + 24px)); opacity: 0; } }

/* митенки: перчатка надевается поверх манжеты, снег на запястье больше не попадает */
.tg--mitten { --still: -2.6s; }
.ts-cue.is-on .tg-glove { animation: tg-glove 5.2s cubic-bezier(.3, .7, .2, 1) infinite both; }
@keyframes tg-glove { 0%, 17% { transform: translateX(120px); opacity: 0; } 23% { opacity: 1; } 36%, 84% { transform: none; opacity: 1; } 94%, 100% { transform: translateX(120px); opacity: 0; } }
.tg-hole2 { transform-origin: 50% 50%; }
.ts-cue.is-on .tg-hole2 { animation: tg-ringp 1.2s ease-in-out infinite both; }
@keyframes tg-ringp { 50% { transform: scale(1.3); opacity: .35; } }
.ts-cue.is-on .tg-tap { animation: tg-tap 1.8s ease-in infinite both; }
@keyframes tg-tap { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(var(--dx), 38px); opacity: 1; } 100% { transform: translate(calc(var(--dx) * 2.4), 30px); opacity: 0; } }
.ts-cue.is-on .tg--mitten .tg-c2 { animation: tg-c2m 5.2s ease infinite both; }
@keyframes tg-c2m { 0%, 33% { opacity: 0; } 39%, 84% { opacity: 1; } 90%, 100% { opacity: 0; } }

/* посадка: ремень затягивается, талия чуть сужается, фиксатор шнурка поднимается */
.tg--fit { --still: -1.8s; }
.tg-waist { transform-origin: 50% 50%; }
.ts-cue.is-on .tg-waist { animation: tg-waist 4.4s cubic-bezier(.4, 0, .2, 1) infinite both; }
@keyframes tg-waist { 0%, 8% { transform: none; } 30%, 74% { transform: scaleX(.955); } 92%, 100% { transform: none; } }
.ts-cue.is-on .tg-tail { animation: tg-tail 4.4s cubic-bezier(.4, 0, .2, 1) infinite both; }
@keyframes tg-tail { 0%, 8% { transform: none; } 30%, 74% { transform: translateX(16px); } 92%, 100% { transform: none; } }
.ts-cue.is-on .tg-cord { animation: tg-cord 4.4s cubic-bezier(.4, 0, .2, 1) infinite both; }
@keyframes tg-cord { 0%, 10% { transform: none; } 32%, 74% { transform: translateY(-6px); } 92%, 100% { transform: none; } }
.ts-cue.is-on .tg-pull { animation: tg-pull 4.4s ease infinite both; }
@keyframes tg-pull { 0%, 6% { opacity: 0; } 14%, 30% { opacity: 1; } 40%, 100% { opacity: 0; } }

/* финал: технологии отмечаются по очереди, кольца мягко пульсируют */
.tg--final { --still: -3s; }
.ts-cue.is-on .tg-pinf { animation: tg-pop .5s ease both; }
@keyframes tg-pop { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.tg-ring { transform-origin: 50% 50%; opacity: 0; }
.ts-cue.is-on .tg-ring { animation: tg-ring 2.6s ease-out infinite both; }
@keyframes tg-ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }

/* задержка = --t0 + --d (правило последним, чтобы перекрыть задержки из shorthand выше) */
#technologies .ts-cue.is-on .tg * { animation-delay: calc(var(--t0) + var(--d, 0s)); }
#technologies:not(.tg-run) .tg * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .tg { --t0: var(--still); }
  .ts-cue.is-on .tg * { animation-play-state: paused !important; }
}

/* reduced motion: общий сброс в kaiju.css (* { animation-duration: .01ms !important }) обнулил бы стоп-кадр —
   возвращаем схемам их длительности; анимации всё равно стоят на паузе в кадре --still */
@media (prefers-reduced-motion: reduce) {
  #technologies .tg-call { animation-duration: .5s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-v { animation-duration: 3.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-lens { animation-duration: .8s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-cone { animation-duration: .4s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-vs { animation-duration: .6s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-fall { animation-duration: .9s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-soak { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-film { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-wet { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-bead { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-ride { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-mfall { animation-duration: 3.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-wfill { animation-duration: 5s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-wlev { animation-duration: 5s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-push { animation-duration: 5s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-res { animation-duration: 5s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-j { animation-duration: 2.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-arrow { animation-duration: .9s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-l1, #technologies .ts-cue.is-on .tg-l2, #technologies .ts-cue.is-on .tg-l3, #technologies .ts-cue.is-on .tg-l4 { animation-duration: 5.6s !important; animation-iteration-count: infinite !important; }
  #technologies .tg--layers .tg-call { animation-duration: 5.6s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-heat { animation-duration: 3.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-cold { animation-duration: 2.6s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-glow { animation-duration: 1s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-loft { animation-duration: 3.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-badge { animation-duration: .5s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-needle { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-bob { animation-duration: .15s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-hole, #technologies .ts-cue.is-on .tg-thr { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-seep { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-tape { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-roller { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-hot { animation-duration: .5s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-c1 { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg--seam .tg-c2 { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-up { animation-duration: 1.9s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-spray { animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-glove { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-hole2 { animation-duration: 1.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-tap { animation-duration: 1.8s !important; animation-iteration-count: infinite !important; }
  #technologies .tg--mitten .tg-c2 { animation-duration: 5.2s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-waist { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-tail { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-cord { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-pull { animation-duration: 4.4s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-pinf { animation-duration: .5s !important; animation-iteration-count: 1 !important; }
  #technologies .tg-ring { animation-duration: 2.6s !important; animation-iteration-count: infinite !important; }
  #technologies .tg-vs--wide .tg-v { animation-duration: 3.6s !important; }
}
