/* OneSolution motion: the app's spring system, recreated for the website.
   assets/js/motion.js solves each spring (stiffness/damping, mass 1) and publishes it as
   --spring-<name> (a CSS linear() easing) and --spring-<name>-duration on <html>.
   Nothing is hidden unless that script runs (it adds .motion to <html>), and reduced-motion users get no motion. */

/* Scroll reveal: elements wait, invisible, until the script plays them in. */
.motion [data-reveal]:not(.is-visible) {
  opacity: 0;
}

/* "How it works": step circles fill in sequence, like the app's order tracker. */
.motion .work-process-one-step-number {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
}

.motion .work-process-one-step-number.is-done {
  background-color: #fff;
  border-color: #fff;
  color: #fa4405;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Shine once: a soft white band (35% of the button's width) sweeps across a download button. */
.home-one-hero-app-link-img {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 10px;
}

.home-one-hero-app-link-img::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  transform: translateX(-110%);
  pointer-events: none;
}

.home-one-hero-app-link-img.is-shining::after {
  animation: motion-shine 1.1s cubic-bezier(0.28, 0.11, 0.32, 1) 1 both;
}

@keyframes motion-shine {
  from { transform: translateX(-110%); }
  to   { transform: translateX(400%); }
}

/* Dropdown: the script plays its spring entrance, so drop the theme's fade. */
.motion .dropdown-menu {
  animation: none;
}

/* Panels changing height in place (FAQ answers, mobile menu) use the sheetHeight spring. */
.motion .collapsing {
  transition-duration: var(--spring-sheetHeight-duration, 0.35s) !important;
  transition-timing-function: var(--spring-sheetHeight, ease) !important;
}

/* Micro-interactions on hover (the press itself is a spring played by the script). */
.feature-one-card .feature-one-img-icon i,
.features-dots button .iconz img {
  transition: transform 0.4s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.feature-one-card:hover .feature-one-img-icon i {
  transform: scale(1.08);
}

.feature-one-card .feature-one-img-icon {
  transition: transform 0.4s cubic-bezier(0.28, 0.11, 0.32, 1), box-shadow 0.3s ease;
}

.feature-one-card:hover .feature-one-img-icon {
  transform: translateY(-3px);
}

.features-dots button:hover .iconz img {
  transform: scale(1.06);
}

/* Frosted glass header once it turns solid on scroll. */
header:not(.transparent) {
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

@media (prefers-reduced-motion: reduce) {
  .motion [data-reveal]:not(.is-visible) {
    opacity: 1 !important;
  }

  .home-one-hero-app-link-img.is-shining::after {
    animation: none !important;
  }
}

/* ------------------------------------------------------------------
   Live icons: each feature-card icon has its own idle motion that plays
   briefly, then rests, so the page feels alive without being busy.
   ------------------------------------------------------------------ */
.feature-cards .feature-one-img-icon i {
  display: inline-block;
  transform-origin: 50% 50%;
  animation: icon-float 4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

/* Stagger so neighbouring cards never move in sync. */
.feature-cards .row > :nth-child(4n+2) .feature-one-img-icon i { animation-delay: 0.7s; }
.feature-cards .row > :nth-child(4n+3) .feature-one-img-icon i { animation-delay: 1.4s; }
.feature-cards .row > :nth-child(4n+4) .feature-one-img-icon i { animation-delay: 2.1s; }

.feature-cards .feature-one-img-icon .fa-bell                                   { transform-origin: 50% 8%;  animation-name: icon-ring;   animation-duration: 3.5s; }
.feature-cards .feature-one-img-icon .fa-car, .feature-cards .feature-one-img-icon .fa-truck          {                            animation-name: icon-drive;  animation-duration: 3.2s; }
.feature-cards .feature-one-img-icon .fa-cogs                                   {                            animation: icon-spin 6s linear infinite; }
.feature-cards .feature-one-img-icon .fa-map-marker-alt                         { transform-origin: 50% 100%; animation-name: icon-bounce; animation-duration: 2.6s; }
.feature-cards .feature-one-img-icon .fa-robot                                  {                            animation-name: icon-nod;    animation-duration: 3.6s; }
.feature-cards .feature-one-img-icon .fa-camera                                 {                            animation-name: icon-flash;  animation-duration: 3.4s; }
.feature-cards .feature-one-img-icon .fa-search-dollar                          {                            animation-name: icon-search; animation-duration: 4s; }
.feature-cards .feature-one-img-icon .fa-gavel                                  { transform-origin: 80% 80%; animation-name: icon-strike; animation-duration: 3s; }
.feature-cards .feature-one-img-icon .fa-balance-scale                          { transform-origin: 50% 20%; animation-name: icon-rock;   animation-duration: 4s; }
.feature-cards .feature-one-img-icon .fa-tags                                   { transform-origin: 20% 20%; animation-name: icon-swing;  animation-duration: 3.4s; }
.feature-cards .feature-one-img-icon .fa-hand-holding-usd,
.feature-cards .feature-one-img-icon .fa-comment-dollar,
.feature-cards .feature-one-img-icon .fa-wallet,
.feature-cards .feature-one-img-icon .fa-id-card,
.feature-cards .feature-one-img-icon .fa-user-shield                            {                            animation-name: icon-pulse;  animation-duration: 3s; }
.feature-cards .feature-one-img-icon .fa-chart-line                             { transform-origin: 0 100%;  animation-name: icon-grow;   animation-duration: 3.2s; }
.feature-cards .feature-one-img-icon .fa-toggle-on                              {                            animation-name: icon-toggle; animation-duration: 3.6s; }
.feature-cards .feature-one-img-icon .fa-route                                  {                            animation-name: icon-wiggle; animation-duration: 3.4s; }
.feature-cards .feature-one-img-icon .fa-language                               {                            animation-name: icon-flip;   animation-duration: 4.4s; }
.feature-cards .feature-one-img-icon .fa-bolt                                   {                            animation-name: icon-flash;  animation-duration: 3s; }
.feature-cards .feature-one-img-icon .fa-calendar-check                         { transform-origin: 50% 100%; animation-name: icon-bounce; animation-duration: 3s; }

/* On hover the card's own lift-and-tilt takes over. */
.feature-cards .feature-one-card:hover .feature-one-img-icon i {
  animation: none;
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes icon-ring {
  0%, 40%, 100% { transform: rotate(0); }
  5%  { transform: rotate(16deg); }
  10% { transform: rotate(-14deg); }
  15% { transform: rotate(10deg); }
  20% { transform: rotate(-8deg); }
  25% { transform: rotate(4deg); }
  30% { transform: rotate(-2deg); }
}

@keyframes icon-drive {
  0%, 60%, 100% { transform: translateX(0); }
  10% { transform: translateX(-3px) translateY(-1px); }
  25% { transform: translateX(6px) translateY(-2px); }
  35% { transform: translateX(6px) translateY(0); }
  45% { transform: translateX(-1px); }
}

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

@keyframes icon-bounce {
  0%, 50%, 100% { transform: translateY(0) scale(1, 1); }
  10% { transform: translateY(0) scale(1.08, 0.9); }
  22% { transform: translateY(-9px) scale(0.95, 1.06); }
  34% { transform: translateY(0) scale(1.05, 0.95); }
  42% { transform: translateY(-2px) scale(1, 1); }
}

@keyframes icon-nod {
  0%, 50%, 100% { transform: rotate(0) translateY(0); }
  12% { transform: rotate(-8deg) translateY(-2px); }
  25% { transform: rotate(8deg) translateY(-2px); }
  38% { transform: rotate(0) translateY(0); }
}

@keyframes icon-flash {
  0%, 30%, 100% { transform: scale(1); filter: none; }
  8%  { transform: scale(0.88); }
  14% { transform: scale(1.12); filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)); }
  22% { transform: scale(1); filter: none; }
}

@keyframes icon-search {
  0%, 55%, 100% { transform: translate(0, 0); }
  12% { transform: translate(-4px, -3px); }
  24% { transform: translate(4px, -3px); }
  36% { transform: translate(3px, 3px); }
  46% { transform: translate(-3px, 2px); }
}

@keyframes icon-strike {
  0%, 45%, 100% { transform: rotate(0); }
  15% { transform: rotate(-28deg); }
  22% { transform: rotate(8deg); }
  28% { transform: rotate(0); }
}

@keyframes icon-rock {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-9deg); }
  75%      { transform: rotate(9deg); }
}

@keyframes icon-swing {
  0%, 50%, 100% { transform: rotate(0); }
  12% { transform: rotate(-14deg); }
  26% { transform: rotate(8deg); }
  38% { transform: rotate(-3deg); }
}

@keyframes icon-pulse {
  0%, 45%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(0.97); }
}

@keyframes icon-grow {
  0%, 55%, 100% { transform: scale(1); }
  20% { transform: scale(1.15, 1.25); }
  35% { transform: scale(0.98); }
}

@keyframes icon-toggle {
  0%, 100% { transform: scaleX(1); }
  45%      { transform: scaleX(1); }
  50%      { transform: scaleX(-1); }
  95%      { transform: scaleX(-1); }
}

@keyframes icon-wiggle {
  0%, 50%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-3px) rotate(-6deg); }
  30% { transform: translateX(3px) rotate(6deg); }
}

@keyframes icon-flip {
  0%, 40%, 100% { transform: rotateY(0); }
  20% { transform: rotateY(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .feature-cards .feature-one-img-icon i {
    animation: none !important;
  }
}
