.hub-map { color: #f1efff; letter-spacing: 0; }
.hub-node { will-change: transform, opacity; }
.hub-ai { margin: 0 auto; max-width: 680px; text-align: center; }
.hub-ai-heading { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 15px; }
.hub-ai-heading > svg { color: #c4b5fd; }
.hub-optional { color: #d9d2ff; border: 1px solid rgb(167 139 250 / 0.5); border-radius: 4px; padding: 2px 6px; font-size: 10px; }
.hub-ai p { margin: 8px 0 18px; font-size: 12px; color: #c9c3ec; }
.hub-providers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; }
.hub-chip {
  display: flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.04));
  border: 1px solid rgb(167 139 250 / 0.38); border-radius: 10px;
  box-shadow: 0 8px 22px rgb(6 3 30 / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.1);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #f5f3ff; font-size: 12px; font-weight: 600;
}
.hub-chip-logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #fff; }
.hub-logo { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.hub-chip .hub-logo { width: 18px; height: 18px; }
.hub-ai-connection { height: 58px; display: flex; align-items: center; justify-content: center; color: #b7a9f7; }
.hub-ai-connection > svg { display: none; }

/* Logo tiles: white for brand marks, violet glass for line icons. */
.hub-tile {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; overflow: hidden; line-height: 0;
  background: linear-gradient(180deg, #ffffff, #eeebff);
  box-shadow: 0 0 0 1px rgb(167 139 250 / 0.6), 0 8px 20px rgb(8 4 40 / 0.55), 0 0 24px rgb(109 74 255 / 0.35);
}
.hub-tile .hub-logo { display: block; width: 24px; height: 24px; max-width: 66%; max-height: 66%; object-fit: contain; }
/* Full-colour Google marks are wider than tall; give them the same optical weight as the square marks. */
.hub-tile .hub-logo[src*="gmail-color"] { width: 26px; height: 20px; }
.hub-tile .hub-logo[src*="googlecalendar-color"] { width: 25px; height: 25px; }
.hub-tile > svg { display: block; flex-shrink: 0; }
/* The tile is a <span>; caption rules such as ".hub-node span" must never
   override its centering, or the logo pins to the top-left and is clipped. */
.hub-map .hub-tile, .hub-map .hub-node .hub-tile, .hub-map .hub-node > span.hub-tile {
  display: flex; align-items: center; justify-content: center;
  font-size: 0; margin: 0; padding: 0;
}
.hub-tile-glass {
  background: linear-gradient(180deg, rgb(139 108 255 / 0.4), rgb(109 74 255 / 0.18));
  color: #ece8ff;
  box-shadow: 0 0 0 1px rgb(196 181 253 / 0.55), 0 8px 20px rgb(8 4 40 / 0.55), 0 0 24px rgb(109 74 255 / 0.35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

.hub-network { position: relative; }
.hub-connections { position: absolute; width: 100%; height: var(--hub-net-h, 690px); top: 0; left: 0; pointer-events: none; overflow: visible; }
.hub-wire { fill: none; stroke: url(#hub-wire-grad); stroke-width: 1.2; stroke-linecap: round; }
.hub-wire-in { stroke: url(#hub-intake-grad); stroke-width: 1.5; }
.hub-signal { fill: none; stroke: #ddd6fe; stroke-width: 2.2; stroke-linecap: round; color: #a78bfa; }
.hub-signal-return { stroke: #a5f3fc; color: #22d3ee; }
.hub-signal-in { stroke: #fef3c7; stroke-width: 2.6; color: #fbbf24; }
.hub-junction { fill: #fde68a; stroke: #1c1259; stroke-width: 2; filter: drop-shadow(0 0 6px #fbbf24); }
.hub-intake-arrow { fill: none; stroke: #fde68a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px #fbbf24); }

.hub-channels, .hub-stack, .hub-core, .hub-intake { position: relative; }
.hub-group-title, .hub-intake-title { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 12px; font-weight: 600; color: #e4dfff; }
.hub-group-title > span { font-size: 10px; color: #b7a9f7; }
.hub-new {
  display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.02em;
  color: #231400; background: linear-gradient(180deg, #fde68a, #fbbf24); box-shadow: 0 0 14px rgb(251 191 36 / 0.45);
}
.hub-channel-list, .hub-intake-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hub-channel strong, .hub-stack-item strong, .hub-intake-card strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; color: #f5f3ff; }
.hub-channel .hub-node span, .hub-stack-item .hub-node span, .hub-intake-card span { display: block; color: #c9c3ec; font-size: 11px; line-height: 1.4; margin-top: 1px; }

/* Prospects in cards: amber accent marks the inbound direction. */
.hub-intake-card {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 12px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.03));
  border: 1px solid rgb(251 191 36 / 0.38);
  box-shadow: 0 10px 26px rgb(6 3 30 / 0.5), inset 0 1px 0 rgb(255 255 255 / 0.08);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hub-intake-card .hub-tile { width: 32px; height: 32px; border-radius: 9px; }
.hub-intake-card .hub-tile-glass {
  background: linear-gradient(180deg, rgb(251 191 36 / 0.32), rgb(251 191 36 / 0.1)); color: #fef3c7;
  box-shadow: 0 0 0 1px rgb(253 230 138 / 0.5), 0 0 18px rgb(251 191 36 / 0.25);
}
.hub-intake-card strong { font-size: 12px; }
.hub-intake-card span { font-size: 10px; }

.hub-core { width: 100%; min-height: 199px; }
.hub-mobile-logo { display: none; width: 100%; height: auto; object-fit: contain; }
/* The mark's image keeps its glow below the chin; pull the word up onto it as on desktop. */
.hub-mobile-wordmark { display: none; position: relative; margin-top: -20%; text-align: center; font-size: 29px; line-height: 1.25; font-weight: 700; }
.hub-stack-group { padding: 11px 0; border-top: 1px solid rgb(167 139 250 / 0.2); }
.hub-stack-group h4 { color: #c4b8f5; font-size: 10px; font-weight: 500; margin-bottom: 10px; }
.hub-automation { display: flex; gap: 18px; }

.hub-caption { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 11px; color: #e4dfff; }
.hub-key { display: flex; align-items: center; gap: 8px; }
.hub-key i { width: 18px; height: 2px; border-radius: 2px; }
.hub-key-out i { background: #c4b5fd; box-shadow: 0 0 8px #a78bfa; }
.hub-key-back i { background: #67e8f9; box-shadow: 0 0 8px #22d3ee; }
.hub-key-in i { background: #fcd34d; box-shadow: 0 0 8px #fbbf24; }
.hub-footnote { margin-top: 14px; text-align: center; font-size: 10px; color: #bdb5e6; }
.hub-mobile-arrow { display: none; }

@media (min-width: 901px) {
  .hub-network { display: block; height: var(--hub-net-h, 690px); }
  .hub-channels, .hub-channel-list, .hub-stack, .hub-stack-group, .hub-automation, .hub-intake-list { display: contents; }
  .hub-network .hub-group-title, .hub-stack-group h4 { display: none; }
  .hub-core { position: absolute; width: 30%; left: 35%; top: 200px; pointer-events: none; }
  /* Orbit slot: the tile's centre sits 14px above the orbit point (wires land on it). */
  .hub-network .hub-orbit-item {
    position: absolute; left: var(--orbit-x); top: var(--orbit-y);
    transform: translate(-50%, -34px); width: 160px; min-height: 0; padding: 0; margin: 0;
  }
  .hub-orbit-item > .hub-node {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px;
  }
  .hub-orbit-item strong { line-height: 18px; }
  .hub-orbit-item .hub-node span { font-size: 10px; }
  /* Prospects in: cards end at 23% (x=230 in SVG units), where their wires start. */
  .hub-intake { position: absolute; inset: 0; pointer-events: none; }
  .hub-intake-head { position: absolute; left: 0; top: 470px; }
  .hub-intake-title { margin: 0; }
  .hub-network .hub-intake-item { position: absolute; left: 0; width: 23%; top: var(--intake-y); transform: translateY(-50%); }
}
@media (max-width: 900px) {
  .hub-network { display: flex; flex-direction: column; gap: 20px; }
  .hub-connections { display: none; }
  .hub-mobile-arrow { display: block; margin: 0 auto; color: #b7a9f7; }
  .hub-intake .hub-mobile-arrow { margin-top: 20px; color: #fcd34d; }
  .hub-ai-connection > svg { display: block; }
  .hub-channels, .hub-stack, .hub-intake { width: 100%; }
  .hub-group-title, .hub-intake-title { margin-bottom: 14px; }
  .hub-channel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hub-intake-list { gap: 8px; }
  .hub-channel > .hub-node { display: flex; align-items: center; gap: 8px; padding: 10px 8px; }
  .hub-channel strong { font-size: 11px; }
  .hub-channel .hub-node span { font-size: 9px; }
  .hub-network .hub-tile { width: 32px; height: 32px; border-radius: 9px; }
  .hub-channel .hub-logo, .hub-stack-item .hub-logo, .hub-automation .hub-logo { width: 20px; height: 20px; }
  .hub-core { width: min(100%, 290px); margin: 0 auto; }
  .hub-mobile-logo { display: block; }
  .hub-mobile-wordmark { display: block; }
  .hub-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hub-stack > h3 { grid-column: 1 / -1; margin-bottom: 0; }
  .hub-stack-item > .hub-node { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
  .hub-stack-group:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .hub-stack-group:last-child h4 { grid-column: 1 / -1; margin-bottom: 0; }
  .hub-stack-item strong { font-size: 11px; }
  .hub-automation { gap: 12px; flex-wrap: wrap; }
  .hub-automation .hub-node { display: grid; justify-items: center; gap: 7px; font-size: 11px; }
  .hub-caption { gap: 12px; font-size: 10px; flex-wrap: wrap; }
  .hub-footnote { line-height: 1.7; }
}

/*
 * Each connector carries dashes on a pathLength of 100, so an offset of
 * 100 -> 0 walks a dash from the path's start to its end, and 0 -> 100 walks it
 * back. CSS rather than SVG <animateMotion> on purpose: the universal
 * prefers-reduced-motion guard in globals.css stops a CSS animation, and cannot
 * touch SMIL. Outbound wires start at the mark (fwd = outreach out, rev =
 * replies back); intake wires start at the source card (fwd = prospects in).
 */
@keyframes hub-dash-fwd {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}
@keyframes hub-dash-rev {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 100; }
}
.hub-pulse-fwd,
.hub-pulse-rev {
  filter: drop-shadow(0 0 4px currentColor);
}
.hub-pulse-fwd { animation: hub-dash-fwd 3.4s linear infinite; }
.hub-pulse-rev { animation: hub-dash-rev 3.4s linear infinite; }

/* No panel of its own: the glow and grid sit on the page background and
   dissolve toward the edges, so the diagram reads as part of the section. */
.hub-map {
  position: relative; isolation: isolate;
  margin: 0 0 2rem; padding: 2rem clamp(.75rem, 3vw, 2rem) 1.5rem;
  background: none;
}
.hub-map::before {
  content: ""; position: absolute; inset: -4rem 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 55%, rgb(109 74 255 / .28), transparent 62%),
    repeating-linear-gradient(90deg, rgb(167 139 250 / .07) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(rgb(167 139 250 / .07) 0 1px, transparent 1px 42px);
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 52%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 52%, #000 35%, transparent 100%);
}
.hub-providers { margin: 0; }
.hub-stack-group h4 { margin-top: 0; }
.hub-map:not(.hub-visible) .hub-signal, .hub-map:not(.hub-visible) .hub-node { animation-play-state: paused; }
@media (max-width: 900px) {
  .hub-map { background-position: center; }
  .hub-automation { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-map .hub-signal { display: none; }
  .hub-map [data-hub-node], .hub-map [data-hub-fade], .hub-map [data-hub-wire] {
    opacity: 1 !important; transform: none !important; filter: none !important; stroke-dashoffset: 0 !important;
  }
}
