/* TovarDosie Signature Motion v2: accessible, CSS-driven enhancement.
   All effects are decorative. No external assets or libraries. */

.td-scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  z-index: 1100;
  pointer-events: none;
  background: linear-gradient(90deg,#345fe1 0%,#6c91f1 55%,#22a995 100%);
  transform-origin: 0 50%;
  transform: scaleX(var(--td-scroll-progress,0));
  box-shadow: 0 0 14px rgba(69,110,226,.19);
}
.td-scroll-progress[hidden] {display: none!important}

.td-back-to-top {
  position: fixed;
  right: max(22px,env(safe-area-inset-right));
  bottom: max(22px,env(safe-area-inset-bottom));
  z-index: 1050;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d5e1f2;
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  color: #264bba;
  box-shadow: 0 13px 35px rgba(25,53,105,.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.td-back-to-top[hidden] {display: none!important}
.td-back-to-top svg {width: 21px;height: 21px}
.td-back-to-top:focus-visible {outline:3px solid #6585ff;outline-offset:3px}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .td-back-to-top:hover {transform:translateY(-3px);box-shadow:0 17px 40px rgba(25,53,105,.16)}
}

@keyframes td-motion-enter {
  from {opacity:0;transform:translate3d(0,17px,0)}
  to {opacity:1;transform:translate3d(0,0,0)}
}
@keyframes td-motion-stage {
  from {opacity:0;transform:translate3d(0,18px,0) scale(.978)}
  to {opacity:1;transform:translate3d(0,0,0) scale(1)}
}
@keyframes td-motion-float {
  0%,100% {transform:translate3d(0,0,0)}
  50% {transform:translate3d(0,-6px,0)}
}
@keyframes td-motion-chart {
  from {opacity:.48;transform:scaleY(.10)}
  to {opacity:1;transform:scaleY(1)}
}
@keyframes td-motion-shine {
  from {transform:translateX(-160%) skewX(-22deg)}
  to {transform:translateX(390%) skewX(-22deg)}
}

@media (prefers-reduced-motion:no-preference) and (prefers-contrast:no-preference) {
  /* First-paint animation applies to public marketing pages only. */
  .td-motion-enabled .landing .ultra-kicker {
    animation:td-motion-enter .65s cubic-bezier(.22,1,.36,1) .03s both;
  }
  .td-motion-enabled .landing .ultra-copy h1 {
    animation:td-motion-enter .84s cubic-bezier(.22,1,.36,1) .12s both;
  }
  .td-motion-enabled .landing .ultra-copy>p {
    animation:td-motion-enter .74s cubic-bezier(.22,1,.36,1) .23s both;
  }
  .td-motion-enabled .landing .ultra-actions {
    animation:td-motion-enter .70s cubic-bezier(.22,1,.36,1) .31s both;
  }
  .td-motion-enabled .landing .ultra-proof {
    animation:td-motion-enter .70s cubic-bezier(.22,1,.36,1) .40s both;
  }
  .td-motion-enabled .landing .command-stage {
    animation:td-motion-stage 1s cubic-bezier(.22,1,.36,1) .15s both;
  }
  .td-motion-enabled .td-motion-reveal {
    transition: opacity .70s cubic-bezier(.22,1,.36,1),
      transform .70s cubic-bezier(.22,1,.36,1)!important;
    transition-delay: var(--td-reveal-delay,0ms)!important;
  }
  .td-motion-enabled .td-motion-reveal:not(.td-motion-visible) {
    opacity: 0;
    transform: translate3d(0,18px,0);
  }
  .td-motion-enabled .td-motion-reveal.td-motion-visible {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
  .td-motion-enabled .landing .float-chip {
    animation:td-motion-float 8s ease-in-out infinite;
  }
  .td-motion-enabled .landing .chip-evidence {animation-delay:-2.2s}
  .td-motion-enabled .landing .chip-sla {animation-delay:-5.2s}
  .td-motion-enabled .landing .command-chart .chart-bars i {
    transform-origin:50% 100%;
    animation:td-motion-chart 1s cubic-bezier(.22,1,.36,1) both;
  }
  .td-motion-enabled .landing .chart-bars i:nth-child(1) {animation-delay:.55s}
  .td-motion-enabled .landing .chart-bars i:nth-child(2) {animation-delay:.62s}
  .td-motion-enabled .landing .chart-bars i:nth-child(3) {animation-delay:.69s}
  .td-motion-enabled .landing .chart-bars i:nth-child(4) {animation-delay:.76s}
  .td-motion-enabled .landing .chart-bars i:nth-child(5) {animation-delay:.83s}
  .td-motion-enabled .landing .chart-bars i:nth-child(6) {animation-delay:.90s}
  .td-motion-enabled .landing .chart-bars i:nth-child(7) {animation-delay:.97s}
}

.td-motion-enabled .landing .command-glow {
  background:radial-gradient(circle at var(--td-glow-x,50%) var(--td-glow-y,50%),
    rgba(92,156,236,.25),rgba(111,170,244,.09) 38%,transparent 76%);
}
@media (min-width:1221px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .td-motion-enabled .landing .command-card {
    transform:perspective(1350px)
      rotateY(calc(-3deg + var(--td-rotate-y,0deg)))
      rotateX(calc(1deg + var(--td-rotate-x,0deg)));
    transition:transform .33s ease-out,box-shadow .33s ease-out;
  }
  .td-motion-enabled .landing .command-stage.td-tilting .command-card {
    will-change:transform;
    box-shadow:0 42px 100px rgba(43,70,119,.20),0 1px 3px rgba(43,70,119,.04);
  }
}

/* Use gentle pointer feedback; never animate table rows or sensitive inputs. */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .landing .feature-card,
  .landing .price-card,
  .public-site .capability-grid article,
  .public-site .integration-cards article,
  .public-site .security-layers article {
    transition:transform .30s cubic-bezier(.22,1,.36,1),
      box-shadow .30s ease,border-color .30s ease;
  }
  .landing .feature-card:hover,
  .landing .price-card:hover,
  .public-site .capability-grid article:hover,
  .public-site .integration-cards article:hover,
  .public-site .security-layers article:hover {
    transform:translate3d(0,-4px,0);
    box-shadow:0 21px 46px rgba(31,59,109,.12)!important;
    border-color:#bed0f6!important;
  }
  .premium-app :is(.metric,.stat-card) {
    transition:transform .22s ease,box-shadow .22s ease;
  }
  .premium-app :is(.metric,.stat-card):hover {
    transform:translate3d(0,-2px,0);
    box-shadow:0 13px 31px rgba(32,62,108,.09);
  }
  .premium-app .sidebar nav a {
    transition:color .20s ease,background .20s ease,box-shadow .20s ease;
  }
  .premium-app .sidebar nav a:hover {
    box-shadow:inset 3px 0 rgba(130,174,255,.8);
  }
}

/* Reflective one-shot hover effect for marketing CTA controls. */
.landing :is(.ultra-primary,.btn.primary),
.public-site :is(.ultra-primary,.btn.primary) {
  position:relative;isolation:isolate;overflow:hidden;
}
.landing :is(.ultra-primary,.btn.primary)::after,
.public-site :is(.ultra-primary,.btn.primary)::after {
  content:"";pointer-events:none;position:absolute;
  top:-60%;bottom:-60%;left:0;width:24%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.27),transparent);
  opacity:0;transform:translateX(-160%) skewX(-22deg);
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .landing :is(.ultra-primary,.btn.primary):hover::after,
  .public-site :is(.ultra-primary,.btn.primary):hover::after {
    opacity:1;animation:td-motion-shine .82s ease-out 1 both;
  }
}

@media (max-width:780px) {
  .td-back-to-top {
    right:max(14px,env(safe-area-inset-right));
    bottom:max(16px,env(safe-area-inset-bottom));
    width:44px;height:44px;border-radius:13px;
  }
}

/* Explicit accessibility and non-script fallbacks. */
@media (prefers-reduced-motion:reduce), (prefers-contrast:more) {
  .td-motion-enabled .td-motion-reveal,
  .td-motion-enabled .td-motion-reveal:not(.td-motion-visible) {
    opacity:1!important;transform:none!important;transition:none!important;
  }
  .td-motion-enabled .landing :is(.ultra-kicker,.ultra-copy h1,.ultra-copy>p,.ultra-actions,.ultra-proof,.command-stage,.float-chip,.chart-bars i),
  .landing :is(.ultra-primary,.btn.primary)::after,
  .public-site :is(.ultra-primary,.btn.primary)::after {
    animation:none!important;
  }
  .td-motion-enabled .landing .command-card {
    transform:none!important;will-change:auto!important;
  }
  .td-back-to-top {transition:none!important}
}
@media print {
  .td-scroll-progress,.td-back-to-top {display:none!important}
  .td-motion-enabled .td-motion-reveal {
    opacity:1!important;transform:none!important;
  }
  .td-motion-enabled .landing .command-stage,
  .td-motion-enabled .landing .ultra-copy>* {
    animation:none!important;opacity:1!important;transform:none!important;
  }
}
