:root {
  --motion-navy: #081d3b;
  --motion-navy-deep: #041226;
  --motion-gold: #c8ab73;
  --motion-cyan: #13b8cc;
  --motion-ink: #172b46;
}

html {
  scroll-behavior: smooth;
}

.motion-route,
.motion-busy {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.motion-route[hidden],
.motion-busy[hidden] {
  display: none;
}

.motion-route {
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: all;
  color: #fff;
}

.motion-route-panel {
  position: absolute;
  inset-inline: 0;
  height: 51%;
  background:
    radial-gradient(circle at 20% 100%, rgb(19 184 204 / 10%), transparent 42%),
    var(--motion-navy-deep);
}

.motion-route-panel:first-child {
  top: 0;
  border-bottom: 1px solid rgb(200 171 115 / 24%);
}

.motion-route-panel:nth-child(2) {
  bottom: 0;
  border-top: 1px solid rgb(200 171 115 / 24%);
}

.motion-route-core {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  min-width: min(310px, calc(100vw - 48px));
  text-align: center;
}

.motion-route-panel,
.motion-route-core,
.motion-busy-card {
  will-change: transform, opacity;
}

.motion-route-mark,
.motion-busy-orbit {
  position: relative;
  width: 64px;
  height: 64px;
}

.motion-route-mark::before,
.motion-route-mark::after,
.motion-busy-orbit::before,
.motion-busy-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.motion-route-mark::before,
.motion-busy-orbit::before {
  inset: 4px;
  border: 1px solid rgb(200 171 115 / 38%);
  border-top-color: var(--motion-gold);
  border-right-color: var(--motion-gold);
}

.motion-route-mark::after,
.motion-busy-orbit::after {
  inset: 16px;
  border: 2px solid rgb(19 184 204 / 24%);
  border-bottom-color: var(--motion-cyan);
}

.motion-route-dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--motion-gold);
  box-shadow: 0 0 22px rgb(200 171 115 / 70%);
}

.motion-route-label,
.motion-busy-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.motion-route-label {
  color: #d7dfeb;
}

.motion-route-line {
  width: 180px;
  height: 1px;
  overflow: hidden;
  background: rgb(255 255 255 / 12%);
}

.motion-route-line::after {
  content: "";
  display: block;
  width: 44%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--motion-gold), var(--motion-cyan), transparent);
  animation: motion-line 1s ease-in-out infinite;
}

.motion-busy {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(4 18 38 / 48%);
  backdrop-filter: blur(5px);
  pointer-events: all;
}

.motion-busy-card {
  display: grid;
  justify-items: center;
  gap: 17px;
  width: min(330px, 100%);
  padding: 28px 30px;
  border: 1px solid rgb(200 171 115 / 30%);
  border-radius: 10px;
  background: rgb(8 29 59 / 96%);
  color: #fff;
  box-shadow: 0 24px 80px rgb(0 0 0 / 30%);
  text-align: center;
}

.motion-busy-orbit {
  width: 54px;
  height: 54px;
  animation: motion-orbit 1.1s linear infinite;
}

.motion-busy-label {
  color: #e6ebf3;
  line-height: 1.6;
}

.motion-busy-detail {
  margin: -8px 0 0;
  color: #9eafc4;
  font-size: 12px;
}

.motion-button-busy {
  position: relative;
  cursor: wait !important;
}

.motion-button-busy::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: motion-orbit .7s linear infinite;
}

.motion-button-busy > svg {
  display: none;
}

.motion-busy-open,
.motion-route-open {
  cursor: wait;
}

.motion-busy-open body,
.motion-route-open body {
  overflow: hidden;
}

@keyframes motion-orbit {
  to { transform: rotate(360deg); }
}

@keyframes motion-line {
  from { transform: translateX(-115%); }
  to { transform: translateX(330%); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .motion-route-line::after,
  .motion-busy-orbit,
  .motion-button-busy::before {
    animation: none;
  }
}

/* Branded loading for page transitions and sign-in. */
.motion-brand{display:grid;place-items:center;padding:22px 26px;border:1px solid rgb(216 183 63 / 22%);border-radius:16px;background:rgb(255 255 255 / 5%);animation:motion-brand-breathe 1.8s ease-in-out infinite}
.motion-brand img{display:block;width:220px;max-width:65vw;height:auto;object-fit:contain}
.motion-brand-small{padding:16px 20px}.motion-brand-small img{width:180px}
.motion-route-panel:first-child,.motion-route-panel:nth-child(2){border:0}
.motion-route-core{gap:24px}.motion-route-label{font-size:11px;letter-spacing:.12em}
@keyframes motion-brand-breathe{0%,100%{opacity:.78;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.motion-brand{animation:none}}
