/* NEXTRADE 1.2: calm, branded motion; visual identity and layout remain unchanged. */
/* Motion intensity is managed in Appearance -> Customize -> NEXTRADE · Анимация. */
:root { --nx-motion-time: 760ms; --nx-motion-distance: 22px; }
.nx-motion-dynamic { --nx-motion-time: 880ms; --nx-motion-distance: 32px; }

@keyframes nx-text-enter {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes nx-hero-visual-enter {
  from { opacity: 0; transform: translate3d(0, 26px, 0) rotate(-3deg) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(-2deg) scale(1); }
}
@keyframes nx-glint {
  0%, 60%, 100% { opacity: 0; transform: translate3d(-115%, 0, 0); }
  70% { opacity: .60; }
  90% { opacity: 0; transform: translate3d(115%, 0, 0); }
}
@keyframes nx-dot {
  0%, 100% { box-shadow: 0 0 0 5px rgb(231 183 70 / .12); }
  50% { box-shadow: 0 0 0 9px rgb(231 183 70 / .025); }
}
@keyframes nx-caption-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}
@keyframes nx-ring-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.025); }
}

/* Hero text has a slight stagger, with no changes to font or layout. */
.nx-motion-gentle .hero-content .hero-eyebrow,
.nx-motion-dynamic .hero-content .hero-eyebrow { animation: nx-text-enter 650ms both 40ms; }
.nx-motion-gentle .hero-content h1,
.nx-motion-dynamic .hero-content h1 { animation: nx-text-enter 740ms cubic-bezier(.22,.75,.2,1) both 150ms; }
.nx-motion-gentle .hero-content .hero-description,
.nx-motion-dynamic .hero-content .hero-description { animation: nx-text-enter 740ms both 260ms; }
.nx-motion-gentle .hero-content .hero-buttons,
.nx-motion-dynamic .hero-content .hero-buttons { animation: nx-text-enter 750ms both 360ms; }
.nx-motion-gentle .hero-visual .visual-frame,
.nx-motion-dynamic .hero-visual .visual-frame { animation: nx-hero-visual-enter 900ms cubic-bezier(.2,.8,.2,1) backwards 230ms; }
.nx-motion-gentle .visual-glint,
.nx-motion-dynamic .visual-glint { background: linear-gradient(105deg, transparent 36%, rgb(244 216 154 / .15) 50%, transparent 64%); animation: nx-glint 12s ease-in-out 2s infinite; }
.nx-motion-dynamic .visual-glint { animation-duration: 9s; }
.nx-motion-gentle .visual-caption,
.nx-motion-dynamic .visual-caption { animation: nx-caption-float 7s ease-in-out 1.1s infinite; }
.nx-motion-gentle .live-dot,
.nx-motion-dynamic .live-dot { animation: nx-dot 4s ease-in-out infinite; }
.nx-motion-gentle .statement-circle,
.nx-motion-dynamic .statement-circle { animation: nx-ring-breathe 11s ease-in-out infinite; }
.nx-motion-dynamic .statement-circle { animation-duration: 7s; }

/* Consistent scroll reveals, only hidden when the JS observer is available. */
.nx-motion-ready .reveal { transition: opacity var(--nx-motion-time) ease, transform var(--nx-motion-time) cubic-bezier(.22,.7,.18,1); transition-delay: var(--nx-stagger-delay, 0ms); }
.nx-motion-ready .reveal:not(.visible) { opacity: 0; transform: translate3d(0, var(--nx-motion-distance), 0); }
.nx-motion-ready .reveal.visible { opacity: 1; transform: translate3d(0, 0, 0); }
.nx-motion-dynamic.nx-motion-ready .reveal:not(.visible) { filter: blur(2px); }
.nx-motion-dynamic.nx-motion-ready .reveal.visible { filter: blur(0); transition: opacity var(--nx-motion-time), transform var(--nx-motion-time), filter var(--nx-motion-time); transition-delay: var(--nx-stagger-delay, 0ms); }

/* Hamburger morphs into a close icon; the menu appears without layout jumps. */
@keyframes nx-menu-enter {
  from { opacity: 0; transform: translate3d(0, -8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.nx-motion-gentle .menu-toggle span,
.nx-motion-dynamic .menu-toggle span { transition: transform 240ms ease, opacity 180ms ease; }
.nx-motion-gentle .menu-toggle[aria-expanded='true'] span:first-child,
.nx-motion-dynamic .menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(8px) rotate(45deg); }
.nx-motion-gentle .menu-toggle[aria-expanded='true'] span:nth-child(2),
.nx-motion-dynamic .menu-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nx-motion-gentle .menu-toggle[aria-expanded='true'] span:last-child,
.nx-motion-dynamic .menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-8px) rotate(-45deg); }
.nx-motion-gentle .mobile-panel.open,
.nx-motion-dynamic .mobile-panel.open { animation: nx-menu-enter 260ms ease both; }

/* Small, deliberate interactions; no distracting continuous movement in content. */
@media (hover: hover) and (pointer: fine) {
  .nx-motion-gentle .desktop-nav .nav-link::before,
  .nx-motion-dynamic .desktop-nav .nav-link::before { content: ''; position: absolute; inset-inline: 0; bottom: -14px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform 260ms ease; }
  .nx-motion-gentle .desktop-nav .nav-link:hover::before,
  .nx-motion-dynamic .desktop-nav .nav-link:hover::before { transform: scaleX(1); }
  .nx-motion-gentle .brand-logo,
  .nx-motion-dynamic .brand-logo { transition: transform 300ms ease; transform-origin: center; }
  .nx-motion-gentle .brand:hover .brand-logo,
  .nx-motion-dynamic .brand:hover .brand-logo { transform: translate3d(0, -2px, 0); }
  .nx-motion-gentle .hero-buttons .button > span,
  .nx-motion-dynamic .hero-buttons .button > span,
  .nx-motion-gentle .feature-arrow,
  .nx-motion-dynamic .feature-arrow,
  .nx-motion-gentle .closing-inner .button > span,
  .nx-motion-dynamic .closing-inner .button > span { display: inline-block; transition: transform 280ms ease; }
  .nx-motion-gentle .hero-buttons .button:hover > span,
  .nx-motion-dynamic .hero-buttons .button:hover > span,
  .nx-motion-gentle .feature-card:hover .feature-arrow,
  .nx-motion-dynamic .feature-card:hover .feature-arrow,
  .nx-motion-gentle .closing-inner .button:hover > span,
  .nx-motion-dynamic .closing-inner .button:hover > span { transform: translate3d(4px, -2px, 0); }
  html[dir='rtl'] .hero-buttons .button:hover > span,
  html[dir='rtl'] .feature-card:hover .feature-arrow,
  html[dir='rtl'] .closing-inner .button:hover > span { transform: translate3d(-4px, -2px, 0); }
  .nx-motion-gentle .feature-card:hover,
  .nx-motion-gentle .detail-card:hover { transform: translateY(-7px); }
  .nx-motion-dynamic .feature-card:hover,
  .nx-motion-dynamic .detail-card:hover { transform: translateY(-9px); }
}

/* Avoid animation if the site owner disables it. */
.nx-motion-off *, .nx-motion-off *::before, .nx-motion-off *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.nx-motion-off .reveal, .nx-motion-off .reveal.visible { opacity: 1 !important; transform: none !important; filter: none !important; }
html:has(body.nx-motion-off) { scroll-behavior: auto; }

/* System preferences always override the site's motion setting. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .nx-motion-gentle *, .nx-motion-gentle *::before, .nx-motion-gentle *::after,
  .nx-motion-dynamic *, .nx-motion-dynamic *::before, .nx-motion-dynamic *::after { animation: none !important; transition: none !important; }
  .nx-motion-ready .reveal, .nx-motion-ready .reveal.visible { opacity: 1 !important; transform: none !important; filter: none !important; }
}
