/* Nexus hero — BBI-inspired social / ads cluster (light hero) */
.nx-cluster {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  overflow: visible;
}
.nx-cluster__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(440px, 72vh);
  margin: 0 auto;
  overflow: visible;
}
.nx-cluster__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.nx-cluster__lines line {
  stroke-linecap: round;
  stroke-width: 0.45px;
}
.nx-cluster__lines line.is-social { stroke: rgba(37, 99, 235, 0.28); }
.nx-cluster__lines line.is-ads {
  stroke: rgba(14, 165, 233, 0.42);
  stroke-dasharray: 1.2 1.1;
}
.nx-cluster__lines line.is-support {
  stroke: rgba(37, 99, 235, 0.22);
  stroke-width: 0.55px;
  stroke-dasharray: 1.6 1.15;
}
.nx-cluster__orbit {
  fill: none;
  stroke: rgba(37, 99, 235, 0.18);
  stroke-width: 0.45px;
}
.nx-cluster__orbit.is-outer {
  stroke: rgba(100, 116, 139, 0.2);
  stroke-dasharray: 1.5 1.2;
}
.nx-cluster__orbit.is-support {
  stroke: rgba(14, 165, 233, 0.16);
  stroke-dasharray: 1.4 1.05;
}
.nx-cluster__stage.is-live .nx-cluster__orbit {
  animation: nx-orbit-spin 48s linear infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}
.nx-cluster__stage.is-live .nx-cluster__orbit.is-outer {
  animation-duration: 64s;
  animation-direction: reverse;
}
.nx-cluster__stage.is-live .nx-cluster__orbit.is-support {
  animation-duration: 80s;
}
.nx-cluster__core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: clamp(118px, 30%, 150px);
  height: clamp(118px, 30%, 150px);
  padding: 0.65rem;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 28%, #60a5fa, #2563eb 52%, #1d4ed8);
  box-shadow:
    0 0 0 6px rgba(37, 99, 235, 0.12),
    0 0 0 14px rgba(37, 99, 235, 0.06),
    0 16px 40px rgba(37, 99, 235, 0.22);
  transform: translate(-50%, -50%);
  animation: nx-cluster-core 0.65s ease both, nx-core-glow 3.2s ease-in-out infinite 0.7s;
}
.nx-cluster__core-mark {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
}
.nx-cluster__core-sub {
  display: block;
  margin-top: 0.15rem;
  max-width: 7.5em;
  font-size: clamp(0.56rem, 1.3vw, 0.68rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.95;
}
.nx-cluster__node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: max-content;
  max-width: 6.5rem;
  transform: translate(-50%, -50%);
  animation: nx-cluster-in 0.55s ease both;
}
.nx-cluster__node:nth-child(4) { animation-delay: 40ms; }
.nx-cluster__node:nth-child(5) { animation-delay: 80ms; }
.nx-cluster__node:nth-child(6) { animation-delay: 120ms; }
.nx-cluster__node:nth-child(7) { animation-delay: 160ms; }
.nx-cluster__node:nth-child(8) { animation-delay: 200ms; }
.nx-cluster__node:nth-child(9) { animation-delay: 240ms; }
.nx-cluster__node:nth-child(10) { animation-delay: 280ms; }
.nx-cluster__node:nth-child(11) { animation-delay: 320ms; }
.nx-cluster__node:nth-child(12) { animation-delay: 360ms; }
.nx-cluster__node:nth-child(13) { animation-delay: 400ms; }
.nx-cluster__node:nth-child(14) { animation-delay: 440ms; }
.nx-cluster__node:nth-child(15) { animation-delay: 480ms; }
.nx-cluster__node:nth-child(16) { animation-delay: 520ms; }
.nx-cluster__node:nth-child(17) { animation-delay: 560ms; }
.nx-cluster__node:nth-child(18) { animation-delay: 600ms; }
.nx-cluster__bubble {
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: nx-bubble-float 3.8s ease-in-out infinite;
}
.nx-cluster__node:nth-child(4) .nx-cluster__bubble { animation-delay: 0s; }
.nx-cluster__node:nth-child(5) .nx-cluster__bubble { animation-delay: 0.35s; }
.nx-cluster__node:nth-child(6) .nx-cluster__bubble { animation-delay: 0.7s; }
.nx-cluster__node:nth-child(7) .nx-cluster__bubble { animation-delay: 1.05s; }
.nx-cluster__node:nth-child(8) .nx-cluster__bubble { animation-delay: 1.4s; }
.nx-cluster__node:nth-child(9) .nx-cluster__bubble { animation-delay: 1.75s; }
.nx-cluster__node:nth-child(10) .nx-cluster__bubble { animation-delay: 2.1s; }
.nx-cluster__node:nth-child(11) .nx-cluster__bubble { animation-delay: 0.55s; }
.nx-cluster__node:nth-child(12) .nx-cluster__bubble { animation-delay: 0.9s; }
.nx-cluster__node:nth-child(13) .nx-cluster__bubble { animation-delay: 1.25s; }
.nx-cluster__node:nth-child(14) .nx-cluster__bubble { animation-delay: 1.6s; }
.nx-cluster__node:nth-child(15) .nx-cluster__bubble { animation-delay: 1.95s; }
.nx-cluster__node:nth-child(16) .nx-cluster__bubble { animation-delay: 2.3s; }
.nx-cluster__node:nth-child(17) .nx-cluster__bubble { animation-delay: 0.2s; }
.nx-cluster__node:nth-child(18) .nx-cluster__bubble { animation-delay: 0.45s; }
.nx-cluster__node.is-lg .nx-cluster__bubble { width: 54px; height: 54px; }
.nx-cluster__node.is-md .nx-cluster__bubble { width: 46px; height: 46px; }
.nx-cluster__node.is-sm .nx-cluster__bubble { width: 40px; height: 40px; }
.nx-cluster__node.is-ads .nx-cluster__bubble {
  border-color: rgba(14, 165, 233, 0.75);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1), 0 0 0 4px rgba(14, 165, 233, 0.14);
}
.nx-cluster__node:hover .nx-cluster__bubble {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
  animation-play-state: paused;
}
.nx-cluster__bubble svg {
  width: 24px !important;
  height: 24px !important;
}
.nx-cluster__node.is-lg .nx-cluster__bubble svg {
  width: 26px !important;
  height: 26px !important;
}
.nx-cluster__badge {
  position: absolute;
  top: -0.15rem;
  right: 0.05rem;
  z-index: 4;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
  background: linear-gradient(135deg, #bae6fd, #7dd3fc);
}
.nx-cluster__label {
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.15;
  color: #475569;
  text-align: center;
  white-space: nowrap;
}
.nx-cluster__node.is-ads .nx-cluster__label { color: #0284c7; }
.nx-cluster__support {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 5;
  display: flex;
  justify-content: center;
  width: 6.2rem;
  max-width: 6.2rem;
  transform: translate(-50%, -50%);
}
.nx-cluster__support span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  padding: 0.28rem 0.5rem;
  border-radius: 12px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: #0f172a;
  background: linear-gradient(145deg, #fff 0%, #eff6ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.nx-cluster__support:hover span {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}
.nx-cluster__support.is-top { transform: translate(-50%, calc(-100% - 10px)); }
.nx-cluster__support.is-right { transform: translate(18%, -50%); }
.nx-cluster__support.is-bottom { transform: translate(-50%, 18%); }
.nx-cluster__support.is-left { transform: translate(-118%, -50%); }
.nx-cluster__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1rem;
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.nx-cluster__legend .is-social { color: #64748b; }
.nx-cluster__legend .is-ads { color: #0284c7; }
.nx-cluster__legend .is-grow { color: #2563eb; }

@keyframes nx-cluster-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes nx-cluster-core {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes nx-bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes nx-core-glow {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(37, 99, 235, 0.12),
      0 0 0 14px rgba(37, 99, 235, 0.06),
      0 16px 40px rgba(37, 99, 235, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(37, 99, 235, 0.16),
      0 0 0 18px rgba(37, 99, 235, 0.08),
      0 20px 48px rgba(37, 99, 235, 0.28);
  }
}
@keyframes nx-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1023px) {
  .nx-cluster { max-width: min(100%, 420px); }
  .nx-cluster__label { display: none; }
  .nx-cluster__node {
    left: calc(50% + (var(--x) - 50%) * 0.84);
    top: calc(50% + (var(--y) - 50%) * 0.84);
  }
  .nx-cluster__support {
    left: calc(50% + (var(--x) - 50%) * 0.8);
    top: calc(50% + (var(--y) - 50%) * 0.8);
    width: 5.4rem;
    max-width: 5.4rem;
  }
  .nx-cluster__support.is-top,
  .nx-cluster__support.is-right,
  .nx-cluster__support.is-bottom,
  .nx-cluster__support.is-left {
    transform: translate(-50%, -50%);
  }
  .nx-cluster__node.is-lg .nx-cluster__bubble { width: 46px; height: 46px; }
  .nx-cluster__node.is-md .nx-cluster__bubble { width: 40px; height: 40px; }
  .nx-cluster__node.is-sm .nx-cluster__bubble { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-cluster__node,
  .nx-cluster__core,
  .nx-cluster__orbit,
  .nx-cluster__bubble { animation: none !important; }
  .nx-cluster__node:hover .nx-cluster__bubble { transform: none; }
}
