/* Asset hub: text beside a diagram. Sources (left) send pulses along wires into the core; the core's stages light up
   one after another. All motion is CSS and stops under prefers-reduced-motion. */
.hub { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hub__txt { display: grid; gap: 18px; color: var(--fg-2); font-size: var(--fs-body); line-height: 1.6; }
.hub__txt .h2 { color: var(--fg); margin-bottom: 8px; }
.hub__viz { display: grid; grid-template-columns: auto minmax(48px, 1fr) minmax(220px, 300px); align-items: stretch; }

.hub__src { display: grid; grid-template-rows: repeat(var(--n), 1fr); gap: 10px; }
.hub__src li { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; background: var(--ink-2); border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 500; max-width: 15em; line-height: 1.3; }
.hub__src .ico { width: 28px; height: 28px; }

.hub__wires { width: 100%; height: 100%; overflow: visible; }
.hub__wires path { fill: none; stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hub__wires .hub__pulse { stroke: var(--yellow); stroke-width: 2; stroke-dasharray: 6 94; stroke-dashoffset: 100; opacity: 0; }

.hub__core { position: relative; align-self: center; border: 1px solid var(--yellow); background: var(--ink-1); padding: 22px 22px 18px; display: grid; gap: 14px; }
.hub__core::before, .hub__core::after { content: ""; position: absolute; width: 10px; height: 10px; border: 2px solid var(--yellow); }
.hub__core::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.hub__core::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.hub__ring { position: absolute; inset: -1px; border: 1px solid var(--yellow); opacity: 0; pointer-events: none; }
.hub__name { font-family: var(--f-display); font-size: clamp(34px, 3.4vw, 48px); line-height: 1; letter-spacing: 0.01em; }
.hub__stages { display: grid; gap: 2px; margin: 0 -10px; padding: 0; list-style: none; }
.hub__stages li { overflow-wrap: break-word; display: grid; grid-template-columns: 22px 22px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-left: 2px solid transparent; color: var(--fg-3); font-size: var(--fs-sm); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.hub__stages .ico { width: 22px; height: 22px; color: currentColor; }
.hub__stages .ico .a { stroke: currentColor; }
.hub__k { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: no-preference) {
  .hub__wires .hub__pulse { animation: hub-pulse 3.2s cubic-bezier(.5, 0, .5, 1) infinite; animation-delay: calc(var(--i) * 0.55s); }
  .hub__ring { animation: hub-ring 3.2s ease-out infinite 1.4s; }
  .hub__stages li { animation: hub-stage calc(var(--s) * 1.6s) steps(1, end) infinite; animation-delay: calc(var(--i) * 1.6s); }
  .hub__stages li .ico .a { animation: hub-stage-a calc(var(--s) * 1.6s) steps(1, end) infinite; animation-delay: calc(var(--i) * 1.6s); }
  .hub__src li { animation: hub-src 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 0.55s); }
}
@keyframes hub-pulse { 0% { stroke-dashoffset: 100; opacity: 1; } 70% { stroke-dashoffset: 0; opacity: 1; } 71%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes hub-ring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08, 1.12); } }
@keyframes hub-src { 0%, 100% { border-color: var(--line); } 8% { border-color: var(--yellow); } 30% { border-color: var(--line); } }
/* One stage at a time: lit for 1/s of the cycle. */
@keyframes hub-stage { 0% { color: var(--fg); border-left-color: var(--yellow); background: var(--ink-3); } 20% { color: var(--fg-3); border-left-color: transparent; background: transparent; } }
@keyframes hub-stage-a { 0% { stroke: var(--yellow); } 20% { stroke: currentColor; } }
/* Without motion the stages are simply readable. */
@media (prefers-reduced-motion: reduce) { .hub__stages li { color: var(--fg-2); } }

@media (max-width: 1180px) { .hub { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .hub__viz { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hub__src li { min-width: 0; }
  .hub__wires { display: none; }
  .hub__src { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .hub__src li { white-space: normal; }
  .hub__core { align-self: stretch; }
}
