/* Only opted-in decorative nodes receive a pose. Layout and text stay still. */
[data-page-motion][data-page-motion-ready="true"] {
  translate: var(--page-motion-x, 0px) var(--page-motion-y, 0px);
  rotate: var(--page-motion-rotate, 0deg);
  scale: var(--page-motion-scale, 1);
  transform-origin: center;
  transition: translate 320ms cubic-bezier(.2,.7,.25,1), rotate 400ms cubic-bezier(.2,.7,.25,1), scale 480ms ease-out;
}
[data-page-motion="brand"][data-page-motion-ready="true"] { transition-duration: 180ms, 240ms, 180ms; }
[data-page-motion="card"][data-page-motion-ready="true"] { transition-duration: 220ms, 280ms, 220ms; }
[data-page-motion="footer"][data-page-motion-ready="true"] { transition-duration: 500ms, 560ms, 600ms; }
[data-page-motion-static="true"] { transition: none !important; }

/* Native anchor navigation remains usable before JavaScript or without it. */
[data-back-to-top] {
  position: fixed;
  z-index: 8;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dce8e4;
  border-radius: 50%;
  background: #123d42;
  color: #fff;
  box-shadow: 0 3px 16px #123d4226;
  text-decoration: none;
}
[data-back-to-top][hidden] { display: none; }
[data-back-to-top]:hover { background: #1c5358; }
[data-back-to-top]:focus-visible { outline: 3px solid #b5d3c2; outline-offset: 4px; }
[data-back-to-top] svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  [data-page-motion][data-page-motion-ready="true"] {
    translate: none !important;
    rotate: none !important;
    scale: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto !important; }
}
