/* Nexo landing: motion and interaction layer. Scoped to the public landing only. */

html.nexo-landing-motion {
  scroll-behavior: smooth;
}

html.nexo-landing-motion .public-landing {
  --nexo-pointer-x: 50%;
  --nexo-pointer-y: 35%;
  --nexo-scroll-shift: 0px;
  position: relative;
  overflow: clip;
}

.nexo-scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 130;
  width: 100%;
  height: 3px;
  pointer-events: none;
  transform: scaleX(var(--nexo-progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, #05855b 0%, #62bf55 58%, #b8d94d 100%);
  box-shadow: 0 1px 8px rgba(6, 121, 80, .28);
  will-change: transform;
}

html.nexo-landing-motion .public-hero {
  isolation: isolate;
}

html.nexo-landing-motion .public-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .52;
  background:
    radial-gradient(480px circle at var(--nexo-pointer-x) var(--nexo-pointer-y), rgba(125, 213, 113, .19), transparent 68%),
    radial-gradient(260px circle at calc(var(--nexo-pointer-x) + 10%) calc(var(--nexo-pointer-y) + 18%), rgba(21, 139, 100, .10), transparent 72%);
  transition: opacity .25s ease;
}

html.nexo-landing-motion .public-hero > :not(.public-hero__glow):not(.public-network-backdrop):not(.nexo-particle-field) {
  position: relative;
  z-index: 2;
}

html.nexo-landing-motion .public-network-backdrop--hero {
  transform: translate3d(0, var(--nexo-scroll-shift), 0) scale(1.025);
  transform-origin: center top;
  will-change: transform;
}

.nexo-particle-field {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.nexo-particle {
  position: absolute;
  left: var(--nexo-x);
  top: var(--nexo-y);
  width: var(--nexo-size);
  height: var(--nexo-size);
  border: 1px solid rgba(36, 150, 103, .36);
  border-radius: 50%;
  opacity: 0;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 0 0 5px rgba(91, 190, 105, .045), 0 0 18px rgba(8, 126, 83, .15);
  animation: nexoParticleDrift var(--nexo-duration) ease-in-out var(--nexo-delay) infinite;
}

html.nexo-landing-motion .public-product {
  --nexo-tilt-x: 0deg;
  --nexo-tilt-y: 0deg;
  --nexo-float-y: 0px;
  transform: perspective(1200px) rotateX(var(--nexo-tilt-x)) rotateY(var(--nexo-tilt-y)) translate3d(0, var(--nexo-float-y), 0);
  transform-style: preserve-3d;
  transition: transform .16s ease-out;
  will-change: transform;
}

html.nexo-landing-motion .public-product__photo,
html.nexo-landing-motion .public-product__window,
html.nexo-landing-motion .public-float-card {
  transform-style: preserve-3d;
}

html.nexo-landing-motion .public-product__photo {
  transform: translateZ(10px);
}

html.nexo-landing-motion .public-product__window {
  transform: translateZ(30px);
  box-shadow: 0 24px 60px rgba(16, 75, 53, .18), 0 0 0 1px rgba(255, 255, 255, .64) inset;
}

html.nexo-landing-motion .public-float-card--verified {
  transform: translateZ(48px);
  animation: nexoFloatVerified 5.4s ease-in-out infinite;
}

html.nexo-landing-motion .public-float-card--match {
  transform: translateZ(44px);
  animation: nexoFloatMatch 6.2s ease-in-out -.9s infinite;
}

html.nexo-landing-motion .public-product__orb {
  animation: nexoOrbBreath 5.5s ease-in-out infinite;
}

html.nexo-landing-motion .public-button,
html.nexo-landing-motion .public-link-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), box-shadow .24s ease, border-color .24s ease;
}

html.nexo-landing-motion .public-button::before,
html.nexo-landing-motion .public-link-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2px;
  pointer-events: none;
  transform: translateX(-125%) skewX(-18deg);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .42) 48%, transparent 76%);
  transition: transform .65s cubic-bezier(.2, .75, .25, 1);
}

html.nexo-landing-motion .public-button:hover,
html.nexo-landing-motion .public-link-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(5, 104, 70, .16);
}

html.nexo-landing-motion .public-button:hover::before,
html.nexo-landing-motion .public-link-button:hover::before {
  transform: translateX(125%) skewX(-18deg);
}

html.nexo-landing-motion .public-button svg,
html.nexo-landing-motion .public-link-button svg {
  transition: transform .24s ease;
}

html.nexo-landing-motion .public-button:hover svg,
html.nexo-landing-motion .public-link-button:hover svg {
  transform: translateX(4px);
}

html.nexo-landing-motion .nexo-reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(.985);
  filter: blur(4px);
  transition:
    opacity .72s cubic-bezier(.2, .72, .2, 1) var(--nexo-delay, 0ms),
    transform .72s cubic-bezier(.2, .72, .2, 1) var(--nexo-delay, 0ms),
    filter .72s ease var(--nexo-delay, 0ms);
}

html.nexo-landing-motion .nexo-reveal.nexo-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

html.nexo-landing-motion .public-proof__grid > div,
html.nexo-landing-motion .public-story-card,
html.nexo-landing-motion .public-benefit-grid > *,
html.nexo-landing-motion .public-how__grid > article,
html.nexo-landing-motion .public-data-card {
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}

html.nexo-landing-motion .public-proof__grid > div:hover,
html.nexo-landing-motion .public-benefit-grid > *:hover,
html.nexo-landing-motion .public-how__grid > article:hover {
  transform: translateY(-5px);
}

html.nexo-landing-motion .public-story-card:hover,
html.nexo-landing-motion .public-data-card:hover {
  transform: translateY(-7px) scale(1.012);
  border-color: rgba(51, 151, 103, .34);
  box-shadow: 0 20px 38px rgba(15, 73, 52, .11);
}

html.nexo-landing-motion .public-company-ecosystem__links circle {
  transform-origin: center;
  animation: nexoOrbitPulse 5.5s ease-in-out infinite;
}

html.nexo-landing-motion .public-company-ecosystem__links circle:nth-of-type(2) {
  animation-delay: -2.4s;
}

html.nexo-landing-motion .public-company-ecosystem__links line {
  stroke-dasharray: 12 12;
  animation: nexoLinkFlow 12s linear infinite;
}

html.nexo-landing-motion .public-company-node {
  animation: nexoNodeFloat 4.8s ease-in-out calc(var(--node-index, 0) * -.42s) infinite;
  transition: filter .25s ease, transform .25s ease;
}

html.nexo-landing-motion .public-company-node:hover {
  animation-play-state: paused;
  filter: drop-shadow(0 12px 18px rgba(4, 108, 73, .16));
}

html.nexo-landing-motion .public-company-core__icon {
  animation: nexoCorePulse 3.2s ease-in-out infinite;
}

/* Interactive company ecosystem: visible signal flow, depth and guided focus. */
html.nexo-landing-motion .public-company-ecosystem {
  --nexo-eco-rx: 0deg;
  --nexo-eco-ry: 0deg;
  perspective: 1200px;
  transform: rotateX(var(--nexo-eco-rx)) rotateY(var(--nexo-eco-ry));
  transform-style: preserve-3d;
  transition: transform .22s ease-out;
  will-change: transform;
}

html.nexo-landing-motion .public-company-ecosystem::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 56%;
  aspect-ratio: 1;
  pointer-events: none;
  border-radius: 50%;
  opacity: .3;
  translate: -50% -50%;
  background: conic-gradient(from 0deg, transparent 0 12%, rgba(46, 187, 114, .28) 18%, transparent 24% 48%, rgba(142, 210, 80, .22) 56%, transparent 64% 100%);
  filter: none;
  mask: radial-gradient(circle, transparent 58%, #000 60% 62%, transparent 64%);
  animation: nexoEcoScan 14s linear infinite;
}

.nexo-eco-energy {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.nexo-eco-energy > i {
  position: absolute;
  left: 0;
  top: 0;
  width: 135px;
  height: 135px;
  border: 1px solid rgba(48, 179, 111, .3);
  border-radius: 50%;
  opacity: 0;
  translate: -50% -50%;
  animation: nexoEnergyRing 4.2s cubic-bezier(.18, .68, .35, 1) infinite;
}

.nexo-eco-energy > i:nth-child(2) { animation-delay: 1.4s; }
.nexo-eco-energy > i:nth-child(3) { animation-delay: 2.8s; }

html.nexo-landing-motion .public-company-ecosystem__links {
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(40, 162, 104, .08));
}

html.nexo-landing-motion .public-company-ecosystem__links line {
  stroke-width: 1.45;
  transition: opacity .3s ease, stroke-width .3s ease;
}

html.nexo-landing-motion .nexo-flow-dot {
  fill: #17a66f;
  stroke: rgba(255, 255, 255, .96);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(7, 137, 88, .7));
  animation: nexoPacketGlow 1.35s ease-in-out infinite alternate;
}

html.nexo-landing-motion .public-company-core {
  z-index: 4;
  transition: scale .34s cubic-bezier(.2, .8, .2, 1), filter .34s ease, box-shadow .34s ease;
  animation: nexoCoreLive 4s ease-in-out infinite;
}

html.nexo-landing-motion .public-company-core::after {
  content: "";
  position: absolute;
  inset: -9px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(93, 206, 120, .26);
  border-radius: inherit;
  opacity: .55;
  animation: nexoCoreHalo 3.1s ease-out infinite;
}

html.nexo-landing-motion .public-company-node {
  z-index: 3;
  scale: 1;
  opacity: 1;
  cursor: default;
  transition: scale .34s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, filter .3s ease, box-shadow .3s ease;
}

html.nexo-landing-motion .public-company-node > i {
  animation: nexoNodeSignal 2.2s ease-in-out calc(var(--node-index, 0) * -.32s) infinite;
}

html.nexo-landing-motion .public-company-ecosystem.nexo-eco-engaged .public-company-node:not(.nexo-eco-active) {
  scale: 1;
  opacity: 1;
  filter: none;
}

html.nexo-landing-motion .public-company-ecosystem .public-company-node.nexo-eco-active {
  scale: 1.045;
  opacity: 1;
  filter: none;
  box-shadow: 0 0 0 2px rgba(45, 177, 109, .2), 0 14px 28px rgba(10, 91, 65, .13);
}

html.nexo-landing-motion .public-company-ecosystem.nexo-eco-engaged .public-company-core {
  scale: 1.02;
  filter: none;
}

html.nexo-landing-motion .public-company-ecosystem__caption {
  z-index: 5;
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}

html.nexo-landing-motion .public-company-ecosystem.nexo-eco-engaged .public-company-ecosystem__caption {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(9, 101, 70, .11);
}

html.nexo-landing-motion .public-data-tabs button {
  transition: transform .24s ease, box-shadow .24s ease, background-color .24s ease, border-color .24s ease;
}

html.nexo-landing-motion .public-data-tabs button:hover {
  transform: translateY(-3px);
}

html.nexo-landing-motion .public-data-tabs button.is-active span {
  animation: nexoTabPulse 2.8s ease-in-out infinite;
}

html.nexo-landing-motion .public-data-grid.nexo-panel-enter > * {
  animation: nexoCardEnter .52s cubic-bezier(.2, .76, .2, 1) both;
}

html.nexo-landing-motion .public-data-grid.nexo-panel-enter > *:nth-child(2) {
  animation-delay: 70ms;
}

html.nexo-landing-motion .public-data-grid.nexo-panel-enter > *:nth-child(3) {
  animation-delay: 140ms;
}

@keyframes nexoParticleDrift {
  0%, 100% { opacity: 0; transform: translate3d(0, 18px, 0) scale(.65); }
  18%, 76% { opacity: .58; }
  50% { opacity: .9; transform: translate3d(var(--nexo-drift), -28px, 0) scale(1); }
}

@keyframes nexoFloatVerified {
  0%, 100% { transform: translate3d(0, 0, 48px) rotate(.15deg); }
  50% { transform: translate3d(0, -9px, 48px) rotate(-.35deg); }
}

@keyframes nexoFloatMatch {
  0%, 100% { transform: translate3d(0, 0, 44px) rotate(-.15deg); }
  50% { transform: translate3d(0, 8px, 44px) rotate(.4deg); }
}

@keyframes nexoOrbBreath {
  0%, 100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(1.055); filter: saturate(1.14); }
}

@keyframes nexoOrbitPulse {
  0%, 100% { opacity: .34; transform: scale(1); }
  50% { opacity: .72; transform: scale(1.025); }
}

@keyframes nexoLinkFlow {
  to { stroke-dashoffset: -96; }
}

@keyframes nexoNodeFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@keyframes nexoCorePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 151, 100, .08); }
  50% { box-shadow: 0 0 0 11px rgba(26, 151, 100, .02); }
}

@keyframes nexoEcoScan {
  to { rotate: 1turn; }
}

@keyframes nexoEnergyRing {
  0% { opacity: 0; scale: .45; }
  14% { opacity: .48; }
  82%, 100% { opacity: 0; scale: 2.55; }
}

@keyframes nexoPacketGlow {
  from { opacity: .6; r: 3; }
  to { opacity: 1; r: 4.8; }
}

@keyframes nexoCoreLive {
  0%, 100% { box-shadow: 0 18px 50px rgba(5, 100, 67, .12); }
  50% { box-shadow: 0 24px 68px rgba(4, 122, 79, .23); }
}

@keyframes nexoCoreHalo {
  0% { opacity: .58; scale: .96; }
  70%, 100% { opacity: 0; scale: 1.09; }
}

@keyframes nexoNodeSignal {
  0%, 100% { opacity: .52; scale: .82; box-shadow: 0 0 0 0 rgba(20, 172, 105, .28); }
  50% { opacity: 1; scale: 1.08; box-shadow: 0 0 0 5px rgba(20, 172, 105, 0); }
}

@keyframes nexoTabPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes nexoCardEnter {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@media (max-width: 760px) {
  .nexo-scroll-progress { height: 2px; }

  html.nexo-landing-motion .public-hero::after {
    opacity: .35;
    background: radial-gradient(300px circle at 74% 26%, rgba(125, 213, 113, .17), transparent 72%);
  }

  html.nexo-landing-motion .public-product {
    transform: none !important;
  }

  html.nexo-landing-motion .public-company-node {
    animation-duration: 5.8s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.nexo-landing-motion { scroll-behavior: auto; }

  .nexo-scroll-progress,
  .nexo-particle-field {
    display: none !important;
  }

  html.nexo-landing-motion .nexo-reveal,
  html.nexo-landing-motion .nexo-reveal.nexo-visible {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  html.nexo-landing-motion .public-landing *,
  html.nexo-landing-motion .public-landing *::before,
  html.nexo-landing-motion .public-landing *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
