/* KanhaOS high-end 2D motion layer */
.fx-cursor {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), rgba(124, 58, 237, 0.06) 42%, transparent 68%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s;
  will-change: transform;
}
body.has-pointer .fx-cursor { opacity: 1; }

#fx-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}

.bg-atmosphere {
  animation: nebula-drift 22s ease-in-out infinite alternate;
  background-size: 140% 140%;
}
@keyframes nebula-drift {
  0% { background-position: 0% 0%, 100% 0%, 50% 100%; }
  100% { background-position: 18% 12%, 82% 18%, 40% 88%; }
}

.bg-grid {
  animation: grid-breathe 12s ease-in-out infinite;
}
@keyframes grid-breathe {
  0%, 100% { opacity: 0.12; transform: scale(1); }
  50% { opacity: 0.22; transform: scale(1.03); }
}

/* Brand mark pulse */
.brand-mark {
  animation: mark-glow 3.5s ease-in-out infinite;
}
@keyframes mark-glow {
  0%, 100% { box-shadow: 0 0 16px rgba(34, 211, 238, 0.35); }
  50% { box-shadow: 0 0 28px rgba(124, 58, 237, 0.55); }
}

/* Hero entrance cascade */
.hero-copy > * {
  opacity: 0;
  transform: translateY(22px);
  animation: rise-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.22s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.3s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.38s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.46s; }
.hero-copy > *:nth-child(7) { animation-delay: 0.54s; }
@keyframes rise-in {
  to { opacity: 1; transform: none; }
}

.hero-brand .grad,
.footer-tagline {
  background-size: 200% auto;
  animation: shimmer-text 5s linear infinite;
}
@keyframes shimmer-text {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-title em {
  display: inline-block;
  animation: unlimited-pulse 2.8s ease-in-out infinite;
}
@keyframes unlimited-pulse {
  0%, 100% { text-shadow: 0 0 18px rgba(34, 211, 238, 0.35); transform: translateY(0); }
  50% { text-shadow: 0 0 36px rgba(34, 211, 238, 0.7); transform: translateY(-1px); }
}

.phase-badge {
  position: relative;
  overflow: hidden;
}
.phase-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.45) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: badge-shine 3.5s ease-in-out infinite;
}
@keyframes badge-shine {
  0%, 55% { transform: translateX(-120%); }
  85%, 100% { transform: translateX(120%); }
}

/* ——— Robot stage: CSS orbit (JS enhances spin) ——— */
.robot-stage {
  --orbit-r: 190px;
  --orbit-spin: 0deg;
  perspective: 900px;
  transform-style: preserve-3d;
}
.robot-stage .halo {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: inset 0 0 40px rgba(34, 211, 238, 0.08);
  animation: halo-spin 28s linear infinite;
  z-index: 0;
  pointer-events: none;
}
.robot-stage .halo.delay {
  inset: 2%;
  border-color: rgba(124, 58, 237, 0.22);
  animation-duration: 40s;
  animation-direction: reverse;
  opacity: 0.7;
}
@keyframes halo-spin {
  to { transform: rotate(360deg); }
}

.orbit-ring {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 24px rgba(34, 211, 238, 0.35),
    inset 0 0 24px rgba(34, 211, 238, 0.12);
  pointer-events: none;
  z-index: 1;
}

.orbit-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.orbit-item {
  --n: 8;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  margin: 0;
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--orbit-spin) + (var(--i) * 360deg / var(--n))))
    translateY(calc(-1 * var(--orbit-r)))
    rotate(calc(-1 * (var(--orbit-spin) + (var(--i) * 360deg / var(--n)))));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  z-index: 3;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  font-size: inherit;
  color: #e0f2fe;
  will-change: transform;
}

.oi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 0;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35), 0 0 18px rgba(34,211,238,0.2);
  position: relative;
}
.oi-icon::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #fff;
}
.oi-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  white-space: nowrap;
}

.oi-chat { background: linear-gradient(145deg, #0284c8, #0369a1); }
.oi-chat::after { border-radius: 50% 50% 50% 4px; width: 16px; height: 14px; }
.oi-wa { background: linear-gradient(145deg, #22c55e, #15803d); }
.oi-wa::after { border-radius: 50%; width: 16px; height: 16px; }
.oi-erp { background: linear-gradient(145deg, #3b82f6, #1d4ed8); }
.oi-erp::after { content: "ERP"; font-size: 0.55rem; font-weight: 900; color: #fff; width: auto; height: auto; background: none; }
.oi-crm { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.oi-crm::after { width: 12px; height: 12px; border-radius: 2px; box-shadow: 4px -4px 0 #fff; background: #fff; }
.oi-seo { background: linear-gradient(145deg, #a855f7, #6d28d9); }
.oi-seo::after { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: transparent; }
.oi-trade { background: linear-gradient(145deg, #f59e0b, #d97706); }
.oi-trade::after { width: 16px; height: 10px; clip-path: polygon(0 100%, 35% 40%, 60% 70%, 100% 0, 100% 100%); }
.oi-voice { background: linear-gradient(145deg, #ec4899, #be185d); }
.oi-voice::after { width: 8px; height: 14px; border-radius: 4px; box-shadow: -6px 0 0 #fff, 6px 0 0 #fff; }
.oi-store { background: linear-gradient(145deg, #fbbf24, #b45309); }
.oi-store::after { content: "★"; font-size: 0.85rem; width: auto; height: auto; background: none; color: #fff; }

.orbit-item:hover .oi-icon {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.55);
}

/* Robot orb living motion */
.robot-orb {
  animation: float-orb 4.5s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.3s;
  will-change: transform;
  z-index: 2;
}
.robot-orb::before {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: conic-gradient(from var(--spin, 0deg), transparent, rgba(34,211,238,0.55), transparent 30%, rgba(124,58,237,0.5), transparent 60%);
  animation: conic-spin 4s linear infinite;
  z-index: -1;
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
@keyframes conic-spin { to { --spin: 360deg; transform: rotate(360deg); } }
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.robot-orb:hover {
  box-shadow:
    0 0 0 10px rgba(34, 211, 238, 0.18),
    0 0 80px rgba(124, 58, 237, 0.75),
    0 0 120px rgba(34, 211, 238, 0.4);
}
.robot-orb.is-pressed { transform: scale(0.94) !important; }

.robot-face .eye {
  transform-origin: center;
  animation: blink 5.5s infinite;
}
.robot-face .eye.right { animation-delay: 0.08s; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 96% { transform: scaleY(0.08); }
}
.robot-face .pupil {
  transition: transform 0.15s ease-out;
}
.robot-face .mouth {
  animation: smile 4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes smile {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1.5px); }
}
.robot-face .antenna {
  animation: antenna-bob 2.6s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes antenna-bob {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

.orb-caption {
  animation: caption-float 3.2s ease-in-out infinite;
}
@keyframes caption-float {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.85; }
  50% { transform: translateX(-50%) translateY(-6px); opacity: 1; }
}

/* Buttons — shine sweep */
.btn {
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: none;
}
.btn:hover::after {
  animation: btn-shine 0.7s ease forwards;
}
@keyframes btn-shine {
  to { transform: translateX(130%); }
}
.btn-primary {
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Marquee */
.works-with { overflow: hidden; }
.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 28s linear infinite;
  padding: 4px 0;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Tilt / glass cards */
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.25s, box-shadow 0.25s;
  will-change: transform;
}
.product-tile,
.price-card,
.blog-card,
.module-chip,
.showcase-visual {
  position: relative;
}
.product-tile::after,
.price-card.popular::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, transparent, rgba(34,211,238,0.5), transparent, rgba(124,58,237,0.45), transparent);
  background-size: 300% 300%;
  animation: border-flow 7s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
}
@keyframes border-flow {
  to { background-position: 300% 0; }
}

.module-chip {
  animation: chip-idle 5s ease-in-out infinite;
}
.module-chip:nth-child(3n) { animation-delay: 0.6s; }
.module-chip:nth-child(3n+1) { animation-delay: 1.2s; }
.module-chip:nth-child(3n+2) { animation-delay: 1.8s; }
@keyframes chip-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.module-chip .dot {
  animation: dot-breathe 2s ease-in-out infinite;
}
@keyframes dot-breathe {
  0%, 100% { box-shadow: 0 0 6px currentColor; transform: scale(1); }
  50% { box-shadow: 0 0 14px currentColor; transform: scale(1.25); }
}

.showcase-visual {
  animation: showcase-float 7s ease-in-out infinite;
}
.showcase-visual img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.showcase-visual:hover img { transform: scale(1.03); }
@keyframes showcase-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Reveal with stagger */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  filter: blur(6px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}
.product-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.product-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.product-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.product-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.product-grid .reveal:nth-child(5) { transition-delay: 0.25s; }
.product-grid .reveal:nth-child(6) { transition-delay: 0.3s; }
.product-grid .reveal:nth-child(7) { transition-delay: 0.35s; }
.product-grid .reveal:nth-child(8) { transition-delay: 0.4s; }
.blog-grid .reveal:nth-child(1) { transition-delay: 0.08s; }
.blog-grid .reveal:nth-child(2) { transition-delay: 0.16s; }
.blog-grid .reveal:nth-child(3) { transition-delay: 0.24s; }

/* Stats count glow */
.stat strong {
  background: linear-gradient(90deg, #fff, var(--cyan), #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-text 4s linear infinite;
}

/* Dual FAB tease (marketing hint near footer padding) */
.fab-tease {
  position: fixed;
  right: 28px;
  bottom: 110px;
  z-index: 40;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--cyan);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
}
.fab-tease.show {
  opacity: 0.9;
  transform: none;
  animation: caption-float 3s ease-in-out infinite;
}

@media (max-width: 980px) {
  .fx-cursor { display: none; }
  .orbit-item { width: 64px; }
  .oi-icon { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-atmosphere, .bg-grid, .brand-mark, .robot-orb, .orbit-item,
  .module-chip, .showcase-visual, .marquee-track, .btn-primary,
  .hero-copy > *, .product-tile::after { animation: none !important; }
  .reveal { filter: none; transform: none; opacity: 1; }
  .fx-cursor, #fx-particles { display: none !important; }
}
