/* Entrances share the existing scroll controller and page motion switch. */
@media (prefers-reduced-motion: no-preference) {
  .motion-enabled .reveal { --motion-distance: 38px; }
  .motion-enabled .reveal.reveal-heading { --motion-distance: 28px; }
  .motion-enabled .reveal.is-visible {
    transition: opacity .75s ease, transform 1s cubic-bezier(.16,1,.3,1);
    transition-delay: var(--reveal-delay,0ms);
  }
  .motion-enabled .reveal-art.is-reveal-pending:not(.is-visible) {
    transform: translate3d(0,calc(30px * var(--motion-direction)),0) scale(.96);
  }
  /* The complete diagram moves together, including its hotspot overlays. */
  .motion-enabled .scene-canvas.reveal-art.is-visible { transform: none; }
  .motion-enabled .expert-service.is-visible .service-orbit {
    animation: aw-service-arrive .95s cubic-bezier(.16,1,.3,1) both;
    animation-delay: calc(var(--reveal-delay,0ms) + 100ms);
  }
  .motion-enabled .manifesto-line.ambient-visible span {
    transform-origin: left center;
    animation: aw-line-draw 1.4s cubic-bezier(.16,1,.3,1) both;
  }
  .motion-enabled .manifesto-line.ambient-visible span:nth-of-type(2) { animation-delay: .18s; }
  .motion-enabled .manifesto-line.ambient-visible i {
    animation: aw-node-breathe 3.8s ease-in-out infinite;
  }
  .motion-enabled .manifesto-line.ambient-visible i:nth-of-type(2) { animation-delay: .45s; }
  .motion-enabled .manifesto-line.ambient-visible i:nth-of-type(3) { animation-delay: .9s; }
  .motion-enabled .creative-word.ambient-visible { animation: aw-creative-float 5.5s ease-in-out infinite; }
  .portrait-heading { animation: aw-hero-copy .9s cubic-bezier(.16,1,.3,1) both; }
  .portrait-world--creative { --portrait-entry-x: -22px; }
  .portrait-world--security { --portrait-entry-x: 22px; }
  .portrait-world { animation: aw-hero-world 1.1s cubic-bezier(.16,1,.3,1) .18s both; }
  .security-scenario-detail[open] > .sc-card { animation: aw-scenario-open .45s ease both; }
}

/* Align the GPS halo with the corrected tractor receiver. */
.scene-canvas[data-scene="truck"]::after { left: 25%; top: 27.7778%; }
.security-scenario-detail > summary::marker { color: var(--accent); }
.security-scenario-detail > summary { transition: color .25s; }
.security-scenario-detail > summary:hover { color: var(--accent); }
.sc-stage { background: linear-gradient(145deg,#FFFFFF70,#EBECE530); }
.security-scenario-detail > .sc-card { scroll-margin-top: 110px; }
.sc-step[aria-current="step"] { background: #9C4E3108; }
.sc-card[data-sc-state="playing"] .sc-primary { box-shadow: 0 4px 16px #1831391a; }

@keyframes aw-hero-copy {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes aw-hero-world {
  from { opacity: 0; translate: var(--portrait-entry-x) 12px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes aw-service-arrive {
  from { opacity: 0; rotate: -35deg; scale: .82; }
  to { opacity: 1; rotate: 0deg; scale: 1; }
}
@keyframes aw-line-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes aw-node-breathe {
  0%,100% { scale: 1; box-shadow: 0 0 0 0 #D4A58B00; }
  50% { scale: 1.2; box-shadow: 0 0 0 7px #D4A58B12; }
}
@keyframes aw-creative-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes aw-scenario-open { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .motion-enabled .reveal { --motion-distance: 32px; }
  .motion-enabled .reveal.is-visible { transition-duration: .65s,.85s; }
  .motion-enabled .reveal-art.is-reveal-pending:not(.is-visible) {
    transform: translate3d(0,calc(24px * var(--motion-direction)),0) scale(.97);
  }
  .portrait-world--creative { --portrait-entry-x: -12px; }
  .portrait-world--security { --portrait-entry-x: 12px; }
}
@media (max-width: 860px) {
  .security-scenario-detail > .sc-card { scroll-margin-top: 94px; }
}

/* Pause and reduced motion reveal all content immediately. */
.motion-paused :is(.portrait-heading,.portrait-world,.service-orbit,.creative-word),
.motion-paused .manifesto-line :is(span,i),
.motion-paused .security-scenario-detail > .sc-card {
  animation: none !important;
  opacity: 1 !important;
  translate: none !important;
  scale: none !important;
  rotate: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .portrait-heading,.portrait-world,.service-orbit,.creative-word,
  .manifesto-line span,.manifesto-line i,.security-scenario-detail > .sc-card {
    animation: none !important;
    translate: none !important;
  }
}
