/* Mobius Networking on the home page (#networking): a live network map. Copy on the left, the stage
   on the right: a canvas crowd of faint dots, You in the middle, six people who light up for a search,
   lines that draw out, emails that travel and replies that come back. networking.js runs it. */

.nx {
  --nx-c: 56, 189, 248;          /* sky */
  --nx-hi: 165, 228, 252;
  --nx-ok: 52, 211, 153;         /* a reply */
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  padding: clamp(88px, 11vw, 160px) 0 clamp(88px, 10vw, 140px);
  background:
    radial-gradient(60% 50% at 78% 46%, rgba(var(--nx-c), 0.10), transparent 70%),
    radial-gradient(40% 40% at 6% 10%, rgba(143, 120, 245, 0.07), transparent 70%),
    linear-gradient(180deg, #050a1f 0%, #03061a 100%);
}
/* a hairline that fades in from the left, with one bright point travelling along it */
.nx::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--nx-hi), 0.32) 30%, rgba(255, 255, 255, 0.08) 75%, transparent);
}
.nx::after {
  content: ""; position: absolute; top: -1px; left: 0; width: 140px; height: 3px; z-index: 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(var(--nx-hi), 0.95), transparent);
  filter: drop-shadow(0 0 6px rgba(var(--nx-c), 0.8));
  animation: nx-run 9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes nx-run { 0% { transform: translateX(-160px); } 60%, 100% { transform: translateX(100vw); } }

.nx-grid { position: relative; z-index: 1; display: grid; gap: 48px; align-items: center; }

/* ------------------------------------------------ Copy */
.nx-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: -0.005em; color: rgb(var(--nx-hi));
}
.nx-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--nx-c)); box-shadow: 0 0 12px rgba(var(--nx-c), 0.9); }
.nx-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgb(var(--nx-c)); animation: nx-ping 2.4s ease-out infinite; }
@keyframes nx-ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }
.nx-free {
  padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #04121f;
  background: linear-gradient(135deg, #c4eeff, #38bdf8);
}

.nx-title {
  margin: 0;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98;
  font-size: clamp(38px, 4.9vw, 62px); color: #fff;
}
.nx-line { display: block; white-space: nowrap; }
/* the last words rotate (who hire / who refer / who decide / who reply), stacked in one cell so the
   line never jumps, and sit on a line with a dot at each end: one person to another */
.nx-hl { position: relative; display: inline-block; white-space: nowrap; color: rgb(var(--nx-hi)); }
.nx-rot { display: inline-grid; }
.nx-word {
  grid-area: 1 / 1; justify-self: start; opacity: 0; transform: translateY(0.35em); filter: blur(8px);
  transition: opacity 0.55s var(--ease-out), transform 0.75s var(--ease-out), filter 0.55s var(--ease-out);
}
.nx-word.is-on { opacity: 1; transform: none; filter: none; }
.nx-word.is-out { opacity: 0; transform: translateY(-0.3em); filter: blur(8px); }
.nx-link {
  position: absolute; left: -0.06em; bottom: -0.16em; width: calc(var(--nx-w, 100%) + 0.12em); height: 0.22em; overflow: visible;
  transition: width 0.6s var(--ease-out);
  fill: rgb(var(--nx-c)); stroke: rgb(var(--nx-c)); stroke-width: 2.5; stroke-linecap: round;
}
.nx-link path { fill: none; stroke-width: 2.5px; stroke-dasharray: 1; stroke-dashoffset: 1; animation: nx-draw 1.4s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.nx-link circle { stroke: none; filter: drop-shadow(0 0 4px rgba(var(--nx-c), 0.9)); }
/* with JS, the line waits until the section is on screen (networking.js adds .nx-in) */
html:not(.no-js) .nx:not(.nx-in) .nx-link path { animation-play-state: paused; }
@keyframes nx-draw { to { stroke-dashoffset: 0; } }

.nx-lede { margin: 30px 0 0; max-width: 30em; font-size: clamp(17px, 1.35vw, 19.5px); line-height: 1.55; color: var(--ink-dim); text-wrap: pretty; }

.nx-try { margin-top: 34px; }
.nx-try-label { margin: 0 0 12px; font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--ink-faint); }
.nx-chips { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 560px) { .nx-chips { flex-wrap: nowrap; } }
.nx-chip {
  position: relative; overflow: hidden; cursor: pointer; white-space: nowrap; text-decoration: none;
  padding: 10px 16px; border: 0; border-radius: 999px;
  font-family: var(--f-display); font-weight: 600; font-size: 14.5px; line-height: 1.2; color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.nx-chip:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(var(--nx-hi), 0.45); transform: translateY(-1px); }
.nx-chip.is-active {
  color: #fff; background: rgba(var(--nx-c), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--nx-c), 0.7), 0 10px 30px -12px rgba(var(--nx-c), 0.8);
}
/* the active chip fills left to right while its search plays, so the cycle reads as a timer */
.nx-chip::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: rgb(var(--nx-hi)); transform: scaleX(0); transform-origin: left;
}
.nx-chip.is-timing::after { transform: scaleX(1); transition: transform var(--nx-dur, 9s) linear; }
.nx-chip:focus-visible { outline: 2px solid rgb(var(--nx-hi)); outline-offset: 3px; }

.nx-cta { margin-top: 38px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.nx-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 28px; border-radius: 999px;
  font-family: var(--f-display); font-weight: 700; font-size: 16.5px; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, #1580c4 0%, #1466c2 50%, #2747d6 100%);
  box-shadow: 0 14px 40px -14px rgba(var(--nx-c), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.nx-btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }
.nx-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 20px 50px -14px rgba(var(--nx-c), 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.nx-btn:hover svg { transform: translateX(3px); }
.nx-more { font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--ink); border-bottom: 1px solid rgba(var(--nx-hi), 0.35); padding-bottom: 2px; }
.nx-more:hover { color: #fff; border-color: #fff; }
.nx-fine { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-faint); }

/* ------------------------------------------------ The stage */
.nx-stage {
  --nx-av: 44px;
  position: relative; height: clamp(420px, 108vw, 470px); border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(46% 42% at 50% 50%, rgba(var(--nx-c), 0.12), transparent 70%),
    linear-gradient(180deg, rgba(12, 22, 48, 0.75), rgba(5, 9, 26, 0.9));
  box-shadow: inset 0 0 0 1px rgba(var(--nx-c), 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 60px 120px -60px rgba(var(--nx-c), 0.5);
}
/* faint concentric rings around You: reach, one email at a time */
.nx-stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background: repeating-radial-gradient(circle, transparent 0 58px, rgba(var(--nx-hi), 0.055) 59px 60px);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 62%); mask: radial-gradient(circle, #000 20%, transparent 62%);
}
.nx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.nx-query {
  position: absolute; z-index: 3; left: 16px; right: 16px; top: 16px;
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 14px;
  background: rgba(8, 14, 34, 0.78); box-shadow: inset 0 0 0 1px rgba(var(--nx-c), 0.32), 0 10px 30px -14px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: rgb(var(--nx-hi)); font-size: 15px;
}
.nx-query svg { width: 16px; height: 16px; flex: none; }
.nx-query-text { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.nx-caret { width: 1.5px; height: 18px; background: rgb(var(--nx-hi)); animation: nx-blink 1s steps(1) infinite; }
@keyframes nx-blink { 50% { opacity: 0; } }

.nx-you {
  position: absolute; z-index: 3; left: 50%; top: 52%; width: 66px; height: 66px; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  font-family: var(--f-display); font-weight: 800; font-size: 15px; color: #04121f;
  background: radial-gradient(circle at 35% 30%, #e6f8ff, #7fd3fb 55%, #2a9be0);
  box-shadow: 0 0 0 6px rgba(var(--nx-c), 0.14), 0 0 0 14px rgba(var(--nx-c), 0.06), 0 0 50px rgba(var(--nx-c), 0.6);
}
.nx-you::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(var(--nx-hi), 0.7); animation: nx-ping 3s ease-out infinite; }

.nx-people { position: absolute; inset: 0; z-index: 2; }
.nx-p {
  position: absolute; left: 0; top: 0; width: 184px; margin-left: -92px; margin-top: calc(var(--nx-av) / -2);
  display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: auto;
  opacity: 0; transform: translate(var(--x), var(--y)) scale(0.6);
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out);
}
.nx-p.is-on { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }
.nx-p.is-off { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.85); transition-duration: 0.35s; }
/* people above You carry their name on top, so the line from You reaches the circle first */
.nx-p.nx-up { translate: 0 calc(-100% + var(--nx-av)); }
.nx-p.nx-up .nx-av { order: 3; }
.nx-p.nx-up .nx-name { order: 1; margin-top: 0; }
.nx-p.nx-up .nx-role { order: 2; margin: 2px 0 9px; }
.nx-av {
  position: relative; width: var(--nx-av); height: var(--nx-av); border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 13.5px; color: #04121f;
  background: var(--av, linear-gradient(135deg, #c4eeff, #38bdf8));
  box-shadow: 0 0 0 3px rgba(5, 9, 26, 0.9), 0 0 0 4px rgba(255, 255, 255, 0.14);
  transition: box-shadow 0.4s;
}
.nx-p.is-sent .nx-av { box-shadow: 0 0 0 3px rgba(5, 9, 26, 0.9), 0 0 0 5px rgba(var(--nx-c), 0.85), 0 0 22px rgba(var(--nx-c), 0.6); }
.nx-p.is-replied .nx-av { box-shadow: 0 0 0 3px rgba(5, 9, 26, 0.9), 0 0 0 5px rgba(var(--nx-ok), 0.95), 0 0 28px rgba(var(--nx-ok), 0.7); }
/* a small envelope on the avatar once the email lands, a check once they reply */
.nx-av::after {
  content: ""; position: absolute; right: -4px; top: -4px; width: 18px; height: 18px; border-radius: 50%;
  background: rgb(var(--nx-c)) center / 11px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304121f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 2px #050a1f; transform: scale(0); transition: transform 0.4s var(--ease-out);
}
.nx-p.is-sent .nx-av::after { transform: scale(1); }
.nx-p.is-replied .nx-av::after {
  background-color: rgb(var(--nx-ok));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304121f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.nx-name { margin-top: 9px; font-family: var(--f-display); font-weight: 700; font-size: 13.5px; line-height: 1.2; color: #fff; text-shadow: 0 1px 8px #050a1f, 0 0 2px #050a1f; }
.nx-role { margin-top: 2px; font-size: 11.5px; line-height: 1.3; color: var(--ink-dim); max-width: 100%; text-shadow: 0 1px 8px #050a1f, 0 0 2px #050a1f; }
.nx-p.is-replied .nx-name { color: #a7f3d0; }
.nx-tag {
  margin-top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 1.5;
  color: rgb(var(--nx-hi)); background: rgba(var(--nx-c), 0.12); box-shadow: inset 0 0 0 1px rgba(var(--nx-c), 0.3);
}
.nx-p.is-replied .nx-tag { color: #a7f3d0; background: rgba(var(--nx-ok), 0.14); box-shadow: inset 0 0 0 1px rgba(var(--nx-ok), 0.4); }

/* the reply shows under the name of whoever wrote back, in place of their title */
.nx-bubble {
  display: block; max-width: 176px; max-height: 0; margin-top: 0; padding: 0 11px; overflow: hidden;
  border-radius: 12px; font-size: 12px; line-height: 1.35; text-align: center; color: #eafff6;
  background: rgba(10, 40, 34, 0.92); box-shadow: inset 0 0 0 1px rgba(var(--nx-ok), 0.45), 0 12px 30px -12px rgba(0, 0, 0, 0.9);
  opacity: 0; transition: max-height 0.5s var(--ease-out), padding 0.5s var(--ease-out), margin 0.5s var(--ease-out), opacity 0.4s;
  pointer-events: none;
}
.nx-p.is-replied .nx-bubble { max-height: 64px; margin-top: 6px; padding: 7px 11px; opacity: 1; }
.nx-p.is-replied .nx-role { display: none; }

.nx-hud {
  position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 14px;
  display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-faint);
}
.nx-hud b { font-family: var(--f-display); font-weight: 800; font-size: 16px; color: #fff; margin-right: 3px; }
.nx-hud-reply b { color: rgb(var(--nx-ok)); }
.nx-hud-from { margin-left: auto; }
.nx-hud b.is-bump { animation: nx-bump 0.5s var(--ease-out); }
@keyframes nx-bump { 40% { transform: scale(1.35); } }
.nx-hud b { display: inline-block; }

/* small stages: names and tags only */
@media (max-width: 559.98px) {
  .nx-stage { --nx-av: 38px; }
  .nx-p { width: 112px; margin-left: -56px; }
  .nx-av::after { right: -8px; top: -7px; width: 16px; height: 16px; background-size: 10px; }
  .nx-role { display: none; }
  .nx-p.nx-up .nx-name { margin-bottom: 9px; }
  .nx-name { font-size: 12.5px; }
  .nx-bubble { max-width: 150px; font-size: 11.5px; }
  .nx-hud-from { display: none; }
  .nx-cta { flex-direction: column; align-items: flex-start; }
  .nx-btn { width: 100%; justify-content: center; }
}

@media (min-width: 1020px) {
  .nx-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(48px, 6vw, 96px); }
  .nx-stage { height: 500px; }
}

@media (prefers-reduced-motion: reduce) {
  .nx::after, .nx-live::after, .nx-you::after, .nx-caret { animation: none; }
  .nx-link path { animation: none; stroke-dashoffset: 0; }
  .nx-p, .nx-av::after, .nx-bubble { transition: none; }
  .nx-chip.is-timing::after { transition: none; transform: scaleX(0); }
  .nx-word { transition: none; }
}
