/* EZMove motion + loading — layered on existing purple/orange system */

:root {
  --ez-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ez-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----- Page boot ----- */
#ezmove-root {
  animation: ez-fade-up 0.55s var(--ez-ease-out) both;
}

@keyframes ez-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ez-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ez-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ez-slide-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ez-spin {
  to { transform: rotate(360deg); }
}

@keyframes ez-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes ez-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes ez-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-7px) rotate(-3deg); }
}

@keyframes ez-orb {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 #8847df33; }
  50% { transform: scale(1.04); box-shadow: 0 0 0 10px #8847df00; }
}

@keyframes ez-progress {
  0% { transform: translateX(-40%); }
  100% { transform: translateX(140%); }
}

/* ----- Shared loader ----- */
.ez-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid #e8daf8;
  border-top-color: var(--purple, #8847df);
  border-radius: 50%;
  animation: ez-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.ez-spinner.lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

.button.is-loading,
.button:disabled.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}

.button.is-loading .ez-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: #ffffff55;
  border-top-color: #fff;
}

/* ----- Hero / marketing polish ----- */
.hero-float {
  animation: ez-float 4.5s var(--ez-ease) infinite;
}

.hero-copy > * {
  animation: ez-slide-up 0.6s var(--ez-ease-out) both;
}
.hero-copy > .eyebrow { animation-delay: 0.05s; }
.hero-copy > h1 { animation-delay: 0.12s; }
.hero-copy > p { animation-delay: 0.2s; }
.hero-actions { animation: ez-slide-up 0.6s var(--ez-ease-out) 0.28s both; }
.hero-assurances { animation: ez-slide-up 0.6s var(--ez-ease-out) 0.36s both; }
.hero-visual { animation: ez-scale-in 0.7s var(--ez-ease-out) 0.15s both; }

.service-card {
  animation: ez-slide-up 0.55s var(--ez-ease-out) both;
}
.service-card:nth-child(1) { animation-delay: 0.05s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.15s; }
.service-card:nth-child(4) { animation-delay: 0.2s; }
.service-card:nth-child(5) { animation-delay: 0.25s; }
.service-card:nth-child(6) { animation-delay: 0.3s; }

.step {
  animation: ez-slide-up 0.55s var(--ez-ease-out) both;
}
.step:nth-child(1) { animation-delay: 0.08s; }
.step:nth-child(2) { animation-delay: 0.16s; }
.step:nth-child(3) { animation-delay: 0.24s; }
.step:nth-child(4) { animation-delay: 0.32s; }

.button {
  transition: background 0.22s var(--ez-ease), transform 0.22s var(--ez-ease), box-shadow 0.22s var(--ez-ease), filter 0.22s;
}
.button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.service-dialog,
.internet-dialog {
  animation: ez-scale-in 0.28s var(--ez-ease-out);
}
.service-dialog::backdrop,
.internet-dialog::backdrop {
  animation: ez-fade-in 0.25s ease;
}

.assistant-orb {
  animation: ez-orb 2.8s var(--ez-ease) infinite;
}

/* ----- Internet finder: step enter + loading ----- */
.internet-container {
  animation: ez-fade-up 0.4s var(--ez-ease-out) both;
}

.internet-progress li.current button span {
  box-shadow: 0 0 0 4px #8847df22;
  transition: box-shadow 0.3s var(--ez-ease);
}

.address-card,
.needs-card,
.results-heading,
.selection-card {
  animation: ez-slide-up 0.45s var(--ez-ease-out) both;
}

.internet-lookup {
  margin-top: 18px;
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid #e4d6f6;
  background: linear-gradient(145deg, #fbf8ff 0%, #fff6ef 100%);
  display: grid;
  gap: 14px;
  animation: ez-scale-in 0.35s var(--ez-ease-out);
}

.internet-lookup-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.internet-lookup-head strong {
  display: block;
  font: 700 15px/1.35 var(--font-heading, Manrope, sans-serif);
  letter-spacing: -0.02em;
  color: var(--ink, #202132);
}

.internet-lookup-head span {
  display: block;
  font-size: 13px;
  color: var(--muted, #73717f);
  margin-top: 2px;
}

.internet-lookup-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #ebe3f5;
  overflow: hidden;
}

.internet-lookup-bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple, #8847df), var(--orange, #ff9254));
  animation: ez-progress 1.15s var(--ez-ease) infinite;
}

.internet-lookup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.internet-lookup-steps span {
  font-size: 11px;
  font-weight: 650;
  color: #7a5a9e;
  background: #fff;
  border: 1px solid #eadff6;
  padding: 6px 10px;
  border-radius: 999px;
  animation: ez-pulse 1.6s ease-in-out infinite;
}
.internet-lookup-steps span:nth-child(2) { animation-delay: 0.2s; }
.internet-lookup-steps span:nth-child(3) { animation-delay: 0.4s; }

.plan-card,
.plan-tile,
.results-grid > article,
.plans-grid > article,
.plans-list > .plan-card {
  animation: ez-slide-up 0.45s var(--ez-ease-out) both;
}
.plans-list > .plan-card:nth-child(1),
.results-grid > article:nth-child(1),
.plans-grid > article:nth-child(1) { animation-delay: 0.04s; }
.plans-list > .plan-card:nth-child(2),
.results-grid > article:nth-child(2),
.plans-grid > article:nth-child(2) { animation-delay: 0.08s; }
.plans-list > .plan-card:nth-child(3),
.results-grid > article:nth-child(3),
.plans-grid > article:nth-child(3) { animation-delay: 0.12s; }
.plans-list > .plan-card:nth-child(4),
.results-grid > article:nth-child(4),
.plans-grid > article:nth-child(4) { animation-delay: 0.16s; }
.plans-list > .plan-card:nth-child(5),
.results-grid > article:nth-child(5),
.plans-grid > article:nth-child(5) { animation-delay: 0.2s; }
.plans-list > .plan-card:nth-child(n + 6),
.results-grid > article:nth-child(n + 6),
.plans-grid > article:nth-child(n + 6) { animation-delay: 0.24s; }

.ez-skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, #f3edf9 25%, #ebe2f6 40%, #f3edf9 55%);
  background-size: 200% 100%;
  animation: ez-shimmer 1.4s linear infinite;
}

.address-card.is-busy {
  position: relative;
}
.address-card.is-busy form {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.05);
  transition: opacity 0.25s ease;
}

/* Partner dashboard soft polish */
.partner-shell,
.pd-shell,
[data-partner-dashboard] {
  animation: ez-fade-up 0.45s var(--ez-ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  #ezmove-root,
  .hero-float,
  .hero-copy > *,
  .hero-actions,
  .hero-assurances,
  .hero-visual,
  .service-card,
  .step,
  .internet-container,
  .address-card,
  .needs-card,
  .results-heading,
  .selection-card,
  .internet-lookup,
  .plan-card,
  .results-grid > article,
  .plans-grid > article,
  .assistant-orb,
  .ez-spinner,
  .internet-lookup-bar > i,
  .internet-lookup-steps span,
  .ez-skeleton,
  .assistant-message.is-typing span,
  .service-dialog,
  .internet-dialog {
    animation: none !important;
  }
}
