/*
  V4 — MOTION DIRECTOR
  Anime.js choreographs content; CSS View Transitions remain the chapter cuts.
*/

.v4 .slide.active,
.v4 .slide.active .step.revealed,
.v4 .slide.active .tool-stop,
.v4 .slide.active .scenario.revealed,
.v4 .slide.active .case-row.flagged,
.v4 .hero-image,
.v4 .photo-bg {
  animation: none;
}

.v4 .slide :is(
  h1, h2, .section-label, .overline, .kicker, .error-line, .question-block,
  .tool-stop, .v3-risk-spectrum span, .v3-data-bands span, .document-sheet,
  .escalation-path > *, .lane, .scenario, .cleanroom-flow > *,
  .approval-pipeline > *, .rail-stop, .demo-flow > *, .source-sheet,
  .ai-triage, .case-table tbody tr, .role, .prompt-panel, .finding,
  .user-demand, .safe-refusal, .approval-table tbody tr, .form-line
) {
  will-change: transform, opacity;
}

.anime-trace {
  position: absolute;
  inset: 0;
  z-index: 23;
  width: 1920px;
  height: 1080px;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  mix-blend-mode: screen;
}

.anime-trace-shadow,
.anime-trace-path {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}

.anime-trace-shadow {
  stroke: rgba(0, 0, 0, .28);
  stroke-width: 9;
}

.anime-trace-path {
  stroke: #75f3f4;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(67, 234, 238, .9));
}

.anime-case-live .anime-trace-path {
  stroke: #ffc66e;
  filter: drop-shadow(0 0 10px rgba(255, 173, 50, .95));
}

.anime-signal-live .anime-trace {
  opacity: .46;
}

.anime-signal {
  position: absolute;
  z-index: 24;
  top: 26px;
  left: 50%;
  display: grid;
  grid-template-columns: auto 126px auto;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
  color: #9adfe3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.anime-signal i {
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transform-origin: left center;
  box-shadow: 0 0 12px rgba(25, 198, 209, .75);
}

.anime-signal b { color: #ffc369; }
.anime-signal-live .anime-signal { opacity: .92; }
.anime-case-live .anime-signal i { background: linear-gradient(90deg, var(--amber), #ff5867); }

.v4 .hero-gate-sigil,
.v4 .manifesto-mark,
.v4 .orbit-center {
  will-change: transform, opacity;
}

.v4 .case-table tbody tr,
.v4 .approval-table tbody tr {
  transform-origin: left center;
}

.v4 .v3-risk-spectrum span,
.v4 .v3-data-bands span {
  transform-origin: 50% 100%;
}

@media (prefers-reduced-motion: reduce) {
  .anime-trace,
  .anime-signal { display: none !important; }
  .v4 .slide,
  .v4 .slide * {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .anime-trace,
  .anime-signal { display: none !important; }
}
