:root {
  --motion-accent: #0875e1;
  --motion-accent-soft: rgba(8, 117, 225, 0.09);
  --motion-ink: #101a28;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 180ms;
  --motion-medium: 520ms;
}

html { scroll-behavior: smooth; }

/* Mike requested that the black top-left utility key never appear. */
.skip-link { display: none !important; }

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 9998;
  width: var(--page-progress, 0%);
  height: 3px;
  background: linear-gradient(90deg, #0875e1, #36a3ff);
  box-shadow: 0 0 14px rgba(8, 117, 225, 0.28);
  pointer-events: none;
}

.motion-ready [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition:
    opacity var(--motion-medium) var(--motion-ease),
    translate var(--motion-medium) var(--motion-ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

a,
button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

a[href],
button,
[role="button"] {
  position: relative;
  transition:
    color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    translate var(--motion-fast) var(--motion-ease);
}

a[href]:active,
button:active,
[role="button"]:active { translate: 0 1px; }

a[href]:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(8, 117, 225, 0.28);
  outline-offset: 4px;
}

.motion-interactive {
  overflow: hidden;
  isolation: isolate;
}

.motion-interactive::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(220px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), var(--motion-accent-soft), transparent 68%);
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}

.motion-interactive:hover::after,
.motion-interactive:focus-within::after { opacity: 1; }

.motion-lift {
  transition:
    translate 260ms var(--motion-ease),
    box-shadow 260ms ease,
    border-color 260ms ease;
}

.motion-lift:hover {
  translate: 0 -3px;
  border-color: rgba(8, 117, 225, 0.38) !important;
  box-shadow: 0 16px 38px rgba(24, 44, 74, 0.10);
}

/* Preserve the interaction language Mike approved on the homepage. */
.button {
  overflow: hidden;
  transform: translateZ(0);
}

.button:hover { translate: 0 -2px; box-shadow: 0 14px 34px rgba(31, 64, 104, 0.14); }
.button:active { translate: 0 0; scale: 0.98; }

.brand-logo {
  transition: rotate 240ms var(--motion-ease), scale 240ms var(--motion-ease), box-shadow 240ms var(--motion-ease);
}

.brand:hover .brand-logo {
  rotate: -3deg;
  scale: 1.05;
  box-shadow: 0 8px 20px rgba(38, 134, 75, 0.20);
}

.product-proof,
.product-proof img { transition: translate 320ms var(--motion-ease), scale 520ms var(--motion-ease), box-shadow 320ms var(--motion-ease); }
.product-proof:hover { translate: 0 -4px; box-shadow: 0 24px 54px rgba(31, 64, 104, 0.16); }
.product-proof:hover img { scale: 1.018; }

.route-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--color-accent, #0868e8);
  scale: 1 0;
  transition: scale 220ms var(--motion-ease);
}

.route-item:hover,
.route-item:focus-within {
  translate: 6px 0;
  background-color: rgba(232, 242, 255, 0.64);
}

.route-item:hover::before,
.route-item:focus-within::before { scale: 1 1; }

.demo-band li { transition: translate 200ms var(--motion-ease), background-color 200ms ease; }
.demo-band li:hover { translate: 0 -3px; background-color: rgba(255, 255, 255, 0.07); }

.motion-arrow {
  display: inline-block;
  transition: translate var(--motion-fast) var(--motion-ease);
}

a:hover .motion-arrow,
button:hover .motion-arrow { translate: 4px 0; }

.motion-ripple {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.16;
  pointer-events: none;
  animation: motion-ripple 560ms ease-out forwards;
}

.motion-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(8, 117, 225, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--motion-ink);
  box-shadow: 0 16px 44px rgba(16, 26, 40, 0.16);
  font-size: 14px;
  opacity: 0;
  translate: 0 12px;
  transition: opacity 220ms ease, translate 220ms var(--motion-ease);
  pointer-events: none;
}

.motion-toast.is-visible { opacity: 1; translate: 0 0; }

@keyframes motion-ripple {
  to { scale: 28; opacity: 0; }
}

@media (max-width: 720px) {
  .motion-toast { right: 16px; bottom: 16px; }
  .motion-lift:hover { translate: 0 -1px; box-shadow: 0 10px 24px rgba(24, 44, 74, 0.08); }
  .route-item:hover,
  .route-item:focus-within { translate: 0 -2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .motion-ready [data-reveal] { opacity: 1; translate: none; }
  body::before { display: none; }
}
