/* Связи измеряются при изменении геометрии; CSS ведёт пакеты и отклик.
   Текст рассказчика неподвижен. */
.ex-visual[data-motion-scene] {
  --flow-color:#e4cf9c;
  translate:calc(var(--px,0) * var(--su)) calc(var(--py,0) * .65 * var(--su));
  transition:translate 700ms cubic-bezier(.2,.7,.2,1);
  animation:ex-scene-flight 12s ease-in-out infinite;
}
.ex-stage[data-tone="family"] .ex-visual { --flow-color:#95e6d3; }
.ex-stage[data-tone="personal"] .ex-visual { --flow-color:#c8b1ff; }
.ex-stage[data-tone="alert"] .ex-visual { --flow-color:#f6a593; }
.ex-stage--overload .ex-visual { animation-duration:7s; }
@keyframes ex-scene-flight { 0%,100% { transform:translate3d(calc(-.65 * var(--su)),calc(.5 * var(--su)),0); } 50% { transform:translate3d(calc(.8 * var(--su)),calc(-.7 * var(--su)),0); } }
.ex-start__cosmos,.ex-finale__galaxy { translate:calc(var(--px,0) * 1.75 * var(--su)) calc(var(--py,0) * 1.1 * var(--su)); transition:translate 900ms ease-out; }
.ex-connections {
  position:absolute; inset:0; width:100%; height:100%; overflow:visible;
  pointer-events:none; z-index:5; fill:none; color:var(--flow-color);
  opacity:0; transition:opacity .7s;
}
[data-flow-ready="true"] > .ex-connections { opacity:1; }
.ex-flow { opacity:0; transition:opacity .6s; }
.ex-flow[data-active="true"] { opacity:1; }
.ex-flow path { stroke:currentColor; stroke-linecap:round; }
.ex-flow__wire { stroke-width:clamp(1px,calc(.07 * var(--su)),3px); opacity:.22; }
.ex-flow__trail { stroke-width:clamp(3px,calc(.22 * var(--su)),9px); stroke-dasharray:12 88; opacity:.22; }
.ex-flow__packet { stroke-width:clamp(3px,calc(.25 * var(--su)),10px); stroke-dasharray:2 98; filter:drop-shadow(0 0 4px currentColor); }
[data-flow-ready="true"] .ex-flow[data-active="true"] :is(.ex-flow__trail,.ex-flow__packet) { animation:ex-signal-travel 5.6s linear var(--flow-delay) infinite; }
.ex-flow__port { r:clamp(2.5px,calc(.18 * var(--su)),7px); fill:currentColor; opacity:.6; }
.ex-flow__arrival { r:clamp(6px,calc(.42 * var(--su)),17px); stroke:currentColor; stroke-width:clamp(1.5px,calc(.1 * var(--su)),4px); transform-box:fill-box; transform-origin:center; opacity:0; }
[data-flow-ready="true"] .ex-flow[data-active="true"] .ex-flow__arrival { animation:ex-signal-arrive 5.6s linear var(--flow-delay) infinite; }
[data-flow-node] { animation:ex-node-receive 5.6s linear var(--receive-delay) infinite; }
@keyframes ex-signal-travel { 0% { stroke-dashoffset:100; opacity:0; } 8% { opacity:1; } 72% { stroke-dashoffset:0; opacity:1; } 82%,100% { stroke-dashoffset:0; opacity:0; } }
@keyframes ex-signal-arrive { 0%,64% { opacity:0; transform:scale(.4); } 73% { opacity:.95; transform:scale(.7); } 91%,100% { opacity:0; transform:scale(2.8); } }
@keyframes ex-node-receive { 0%,65%,100% { filter:drop-shadow(0 0 0 transparent); } 76% { filter:drop-shadow(0 0 10px color-mix(in srgb,var(--flow-color) 38%,transparent)); } }
/* Память: новые провода точно стыкуются с четырьмя хранилищами. */
[data-flow-ready="true"] .ex-memory__links { visibility:hidden; }
.ex-memory__rings::before,.ex-memory__rings::after,.ex-project__orbit::before,.ex-idea__halo::before {
  content:""; position:absolute; inset:-12px; border:1px solid #c3b0f24a; border-radius:50%; animation:ex-ring-expand 5.6s ease-out infinite;
}
.ex-memory__rings::after { animation-delay:-2.8s; }
@keyframes ex-ring-expand { from { scale:.65; opacity:.8; } to { scale:1.6; opacity:0; } }
.ex-project__orbit { animation:ex-orbit-precess 22s linear infinite; }
@keyframes ex-orbit-precess { to { rotate:360deg; } }
.ex-idea__star > .ui-icon { animation:ex-star-turn 16s ease-in-out infinite; }
@keyframes ex-star-turn { 0%,100% { rotate:-12deg; scale:.9; } 50% { rotate:28deg; scale:1.15; } }

.ex-car__body { stroke-dasharray:1800; animation:ex-car-scan 8s ease-in-out infinite; }
@keyframes ex-car-scan { 0%,100% { stroke-dashoffset:0; opacity:1; } 45% { stroke-dashoffset:180; opacity:.45; } }
.ex-pet__portrait svg { animation:ex-pet-look 9s ease-in-out infinite; transform-origin:50% 80%; }
.ex-pet:nth-child(2) .ex-pet__portrait svg { animation-delay:-4.5s; }
@keyframes ex-pet-look { 0%,30%,100% { rotate:-3deg; translate:0 0; } 50%,65% { rotate:5deg; translate:0 -5px; } }
.ex-world__bridge > .ui-icon { animation:ex-core-spin 18s linear infinite; }
@keyframes ex-core-spin { to { rotate:360deg; } }
.ex-source-card__stamp { animation:ex-source-verify 5.6s ease-in-out infinite; }
@keyframes ex-source-verify { 0%,100% { opacity:.45; } 55%,75% { opacity:1; } }
.ex-social__header .ex-avatar { animation:ex-member-pulse 6s ease-in-out infinite; }
.ex-social__header .ex-avatar:nth-child(2) { animation-delay:-2s; }
.ex-social__header .ex-avatar:nth-child(3) { animation-delay:-4s; }
@keyframes ex-member-pulse { 0%,60%,100% { translate:0 0; } 75% { translate:0 -5px; box-shadow:0 0 15px #b9eed355; } }
.ex-document > div { transform-origin:left; animation:ex-document-write 8s ease-in-out infinite; }
.ex-document > div:nth-child(3n) { animation-delay:-2s; }
@keyframes ex-document-write { 0%,100% { scale:.82 1; opacity:.5; } 35%,70% { scale:1 1; opacity:1; } }
.ex-photo > svg { animation:ex-photo-depth 16s ease-in-out infinite; transform-origin:50% 70%; }
.ex-photo { overflow:hidden; }
@keyframes ex-photo-depth { 0%,100% { scale:1; } 50% { scale:1.055; } }
.ex-timeblock { overflow:hidden; }
.ex-timeblock::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(100deg,transparent 20%,#fff3 49%,transparent 75%);
  animation:ex-event-scan 6s ease-in-out infinite; animation-delay:calc(var(--i,0) * -1.6s);
}
@keyframes ex-event-scan { 0%,20% { translate:-110% 0; } 75%,100% { translate:110% 0; } }
.ex-idea__interruptions > span { animation:ex-interruption 8s ease-in-out infinite; }
.ex-idea__interruptions > span:nth-child(2) { animation-delay:-3s; }
.ex-idea__interruptions > span:nth-child(3) { animation-delay:-5s; }
@keyframes ex-interruption { 0%,100% { translate:-8px 6px; } 50% { translate:10px -9px; } }
/* Четыре монтажных перехода. Эстафета объектов продолжает работать. */
.exhibition .pres-veil { bottom:var(--presenter-height,100px); }
.exhibition[data-transition="blackout"] .pres-veil { background:#020308; }
.exhibition[data-transition="blackout"][data-phase="leaving"] .pres-veil { animation:ex-black-in 350ms ease-in both; }
.exhibition[data-transition="blackout"][data-phase="entering"] .pres-veil { animation:ex-black-out 900ms ease-out both; }
.exhibition[data-transition="blackout"] .pres-veil__horizon { display:none; }
@keyframes ex-black-in { from { opacity:0; } to { opacity:1; } }
@keyframes ex-black-out { 0%,18% { opacity:1; } 100% { opacity:0; } }
.exhibition[data-transition="sweep"] .pres-veil { background:linear-gradient(105deg,#050810 38%,#253448 49%,#bce9ec 50%,#152334 51%,#050810 64%); }
.exhibition[data-transition="sweep"][data-phase="leaving"] .pres-veil { animation:ex-sweep-in 350ms ease-in both; }
.exhibition[data-transition="sweep"][data-phase="entering"] .pres-veil { animation:ex-sweep-out 900ms var(--ease-out) both; }
@keyframes ex-sweep-in { from { opacity:0; clip-path:inset(0 100% 0 0); } to { opacity:.9; clip-path:inset(0 0 0 0); } }
@keyframes ex-sweep-out { from { opacity:.9; clip-path:inset(0 0 0 0); } to { opacity:0; clip-path:inset(0 0 0 100%); } }
.exhibition[data-transition="iris"] .pres-veil { background:radial-gradient(ellipse at 65% 48%,#b3d6e522,#050810 60%); }
.exhibition[data-transition="iris"][data-phase="leaving"] .pres-veil { animation:ex-iris-in 350ms ease-in both; }
.exhibition[data-transition="iris"][data-phase="entering"] .pres-veil { animation:ex-iris-out 900ms var(--ease-out) both; }
@keyframes ex-iris-in { from { opacity:0; clip-path:circle(0% at 65% 48%); } to { opacity:.85; clip-path:circle(110% at 65% 48%); } }
@keyframes ex-iris-out { from { opacity:.85; clip-path:circle(110% at 65% 48%); } to { opacity:0; clip-path:circle(0% at 65% 48%); } }
.exhibition[data-transition="sweep"]:not([data-handoff]) .stage--entering .stage__frame { animation:ex-scene-slide 900ms var(--ease-out) both; }
@keyframes ex-scene-slide { from { opacity:0; transform:translateX(calc(var(--dir) * 8 * var(--su))); } }
.exhibition[data-transition="iris"]:not([data-handoff]) .stage--entering .stage__frame { animation:ex-scene-zoom 900ms var(--ease-out) both; }
@keyframes ex-scene-zoom { from { opacity:0; transform:scale(1.12); } }
.exhibition[data-gathering="true"] .ex-visual { animation:none; translate:none; }
.exhibition:is([data-hidden="true"],[data-play-mode="paused"]) *,
.exhibition:is([data-hidden="true"],[data-play-mode="paused"]) *::before,
.exhibition:is([data-hidden="true"],[data-play-mode="paused"]) *::after { animation-play-state:paused !important; }
.exhibition[data-reduced="true"] .ex-flow__packet,
.exhibition[data-reduced="true"] .ex-flow__trail,
.exhibition[data-reduced="true"] .ex-flow__arrival { display:none; }
.exhibition[data-reduced="true"] :is(.ex-visual,.ex-start__cosmos,.ex-finale__galaxy) { translate:none; }
.exhibition[data-reduced="true"] *::before,.exhibition[data-reduced="true"] *::after { animation:none !important; }
@media(prefers-reduced-motion:reduce) {
  .exhibition *::before,.exhibition *::after { animation:none !important; }
  .ex-flow__packet,.ex-flow__trail,.ex-flow__arrival { display:none; }
  .ex-visual,.ex-start__cosmos,.ex-finale__galaxy { translate:none !important; }
}
@media(max-width:760px) {
  .ex-visual[data-motion-scene] { translate:none; animation-name:ex-scene-flight-mobile; }
  .ex-connections { overflow:hidden; }
  .ex-flow__packet { stroke-width:2.5; }
  @keyframes ex-scene-flight-mobile { 0%,100% { transform:translateY(2px); } 50% { transform:translateY(-3px); } }
}

/* Орбитальная камера и две плоскости света за содержимым сцены. */
.ex-visual[data-motion-scene]::before {
  content:""; position:absolute; inset:8% -3%; pointer-events:none; z-index:-1;
  border:1px solid color-mix(in srgb,var(--flow-color) 13%,transparent);
  border-radius:50%; transform:rotateX(64deg) rotateZ(-20deg);
  box-shadow:0 0 65px #a6b6ff0a,inset 0 0 45px #bbccff08;
  animation:ex-chamber-turn 26s ease-in-out infinite;
}
.ex-visual[data-motion-scene]::after {
  content:""; position:absolute; inset:-10% -4%; pointer-events:none; z-index:-1;
  background:radial-gradient(ellipse at 70% 25%,#90cdec12,transparent 42%);
  animation:ex-chamber-light 10s ease-in-out infinite alternate;
}
@keyframes ex-chamber-turn { 0%,100% { rotate:-8deg; scale:1; } 50% { rotate:12deg; scale:1.08; } }
@keyframes ex-chamber-light { from { translate:-8% 6%; opacity:.4; } to { translate:7% -8%; opacity:1; } }
.ex-stage:is(.ex-stage--overload,.ex-stage--sphere,.ex-stage--focus) .ex-visual::before { display:none; }

.ex-profile__port { position:absolute; left:50%; top:32%; width:3px; height:3px; border-radius:50%; background:#d6c3ff; box-shadow:0 0 14px #c6b3ff; }
/* Сохраняем суммарные интервалы, оставляя видимый коридор между портами. */
.ex-idea__quote { margin-bottom:2.21em; }
.ex-idea__quote p { margin-bottom:0; }
.ex-recall__paths { padding:0; margin:1.5em 0; }
/* Область ввода и отправки закреплена: в чатах движутся аватары, файл и
   сигналы, поэтому на кнопку можно уверенно нажать мышью или пальцем. */
.exhibition .ex-visual:has(.ex-social) { animation:none; translate:none; }
