/* Fine page rails stay just outside the content frame, including on narrow screens. */
body#atas {
  position: relative;
  --rail-inset: max(20px, calc((100% - 1296px) / 2 - 8px));
  --rail-period: 920px;
}
body#atas::before,
body#atas::after {
  position: absolute;
  z-index: 7;
  inset-block: 0;
  width: 2px;
  content: "";
  pointer-events: none;
  background-image: linear-gradient(90deg, #99969342 1px, transparent 1px);
}
body#atas::before { left: var(--rail-inset); }
body#atas::after { right: var(--rail-inset); }

@media (max-width: 760px) {
  body#atas { --rail-inset: 4px; --rail-period: 710px; }
}
@media (prefers-reduced-motion: no-preference) {
  body#atas::before, body#atas::after {
    --rail-angle: 180deg;
    background-image:
      linear-gradient(var(--rail-angle),
        transparent 0 30px, #55539a99 53px, #3a5894 70px,
        #5987ae 78px, #c98460 84px, #f2c98c 87px, transparent 89px),
      linear-gradient(90deg, #99969342 1px, transparent 1px);
    background-size: 2px var(--rail-period), 2px 100%;
    background-repeat: repeat-y;
    animation: tkd-rail 6s linear infinite;
  }
  body#atas::before { animation-delay: -1.2s; }
  body#atas::after { --rail-angle: 0deg; animation-direction: reverse; animation-delay: -2.6s; }
}
@keyframes tkd-rail {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 var(--rail-period), 0 0; }
}

/* A compact reflection follows the perimeter of the principal actions. */
@property --tkd-edge-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (mask-composite: exclude) {
    .nav-contact, .button.primary, .dt-button:not(.dt-button--soft) { position: relative; }
    :is(.nav-contact, .button.primary, .dt-button:not(.dt-button--soft))::after {
      content: "";
      position: absolute;
      inset: -1px;
      pointer-events: none;
      border-radius: inherit;
      padding: 1px;
      background: conic-gradient(from var(--tkd-edge-angle),
        transparent 0deg 195deg, #697ba700 208deg, #7889b8 257deg,
        #d4a989 277deg, #ffdeaf 285deg, transparent 294deg);
      mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      mask-composite: exclude;
      animation: tkd-edge 4.8s linear infinite;
    }
    .nav-contact::after { animation-delay: -2s; }
  }
}
@keyframes tkd-edge { to { --tkd-edge-angle: 360deg; } }
