.cluster-hero { padding-top: clamp(48px, 7vw, 100px); }
.cluster-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.cluster-hero h1 { font-size: clamp(2.2rem, 4.2vw, 4rem); letter-spacing: -.025em; margin-bottom: 24px; }
.cluster-hero-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; max-width: 42em; }
.cluster-hero .actions { justify-content: flex-start; margin: 28px 0 20px; }
.cluster-diagram { margin: 0; padding: 24px; border: 1px solid var(--hairline-strong); border-radius: 16px; background: var(--surface); }
.diagram-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .8rem; }
.cluster-diagram { --node-gap: 12px; --cluster-inset: 20px; --incoming-distance: calc(48px + var(--cluster-inset) + 1px); }
.cluster-source { position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; margin: 28px 0 0; padding-bottom: 48px; }
.cluster-source > .mono { color: var(--muted); font-size: .75rem; }
.job-stream { position: absolute; z-index: 1; top: calc(100% - 48px); left: 50%; width: 1px; height: var(--incoming-distance); }
.job-stream::before { content: ''; position: absolute; inset: 0; background: var(--accent); }
.job-stream i { position: absolute; top: 0; left: -6px; width: 12px; height: 8px; border-radius: 2px; background: var(--amber); opacity: 0; }
.cluster-boundary { border: 1px dashed var(--hairline-strong); border-radius: 12px; padding: var(--cluster-inset); }
.master-nodes, .worker-nodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--node-gap); }
.cluster-node { position: relative; display: grid; gap: 4px; border: 1px solid var(--hairline-strong); border-radius: 8px; padding: 14px 10px; background: var(--ground); font-size: .72rem; }
.cluster-node > .mono { font-size: .68rem; color: var(--muted); }
.node-light { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-bottom: 5px; }
.worker-nodes .node-light { background: var(--amber); }
.master-nodes .cluster-node:not(.cluster-leader) { opacity: .45; }
.cluster-leader { border-color: var(--amber); background: var(--amber-soft); }
.cluster-leader::after { content: ''; position: absolute; inset: -5px; border: 1px solid var(--amber); border-radius: 12px; box-shadow: 0 0 18px var(--amber-soft); opacity: .7; pointer-events: none; }
.cluster-vip { position: absolute; top: -11px; right: 6px; display: flex; }
.cluster-vip > .mono { background: var(--surface-2); color: var(--amber); border: 1px solid var(--amber); padding: 2px 8px; border-radius: var(--radius-pill); font-size: .65rem; }
/* The routes start at the leader's lower edge and end at each Worker's upper edge. */
.assignment-routes { height: 72px; margin-inline: calc((100% - 2 * var(--node-gap)) / 6); }
.assignment-routes svg { display: block; width: 100%; height: 100%; overflow: visible; }
.assignment-route { fill: none; stroke: var(--amber); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cluster-assignment-job { fill: var(--amber); opacity: 0; transform-box: view-box; }
.assignment-route:nth-of-type(2), .cluster-assignment-job:nth-of-type(2), .worker-nodes .cluster-node:nth-child(2) { --job-delay: -8s; }
.assignment-route:nth-of-type(3), .cluster-assignment-job:nth-of-type(3), .worker-nodes .cluster-node:nth-child(3) { --job-delay: -4s; }
.node-gpu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 8px; }
.node-gpu i { height: 12px; background: var(--accent); border-radius: 2px; }
.cluster-jumps { display: flex; flex-wrap: wrap; gap: 12px 30px; padding-block: 24px; border-block: 1px solid var(--hairline); font-size: .9rem; color: var(--muted); }
.cluster-jumps a:hover { color: var(--accent-bright); }
.cluster-section { border-bottom: 1px solid var(--hairline); }
.cluster-heading { max-width: 800px; margin-bottom: 44px; }
.cluster-heading > p:last-child { margin-top: 20px; color: var(--muted); }
.cluster-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.cluster-shot { min-width: 0; margin: 0; }
.cluster-shot .screen-viewport { position: relative; }
.cluster-shot .cursor, .cluster-shot .ripple { display: none; }
.cluster-shot figcaption { color: var(--muted); margin-top: 12px; font-size: .8rem; }
.cluster-shot-pending { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; color: var(--muted); font-size: .85rem; background: var(--ground); text-align: center; }
.build-sequence { position: relative; padding-left: 28px; }
.build-rail { position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--hairline); overflow: hidden; }
.build-rail span { display: block; height: 100%; background: var(--accent); transform-origin: top; }
.build-steps { display: grid; gap: 64px; }
.build-step { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 48px; align-items: center; }
.step-number { display: inline-block; color: var(--accent-bright); font-size: 1.7rem; margin-bottom: 16px; }
.build-copy p { color: var(--muted); margin-top: 16px; }
[data-progress-ready] .build-step:not(.is-current) .step-number { color: var(--muted); }
.connect-steps { display: grid; gap: 28px; }
.connect-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 20px; }
.connect-steps p { color: var(--muted); margin-top: 12px; }
.operation-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }
.operation-card { padding: 28px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: var(--surface); }
.operation-card p { color: var(--muted); margin-top: 14px; font-size: .9rem; }
.operation-art { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; height: 94px; margin-bottom: 26px; overflow: hidden; background: var(--ground); border-radius: 8px; }
.operation-art i { z-index: 1; width: 26px; height: 34px; background: var(--surface-2); border: 1px solid var(--accent); border-radius: 4px; }
.art-path { position: absolute; left: 18%; right: 18%; top: 50%; height: 1px; background: var(--hairline-strong); }
.art-mark { position: absolute; right: 15%; bottom: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.art-upgrade i { border-top: 7px solid var(--accent); }
.art-backup i { width: 34px; height: 25px; border-radius: 50% / 20%; border-bottom: 4px solid var(--accent); }
.art-upkeep .art-mark { width: 20px; height: 20px; border-radius: 50%; border: 3px dashed var(--accent); background: var(--ground); }
.art-offline .art-path { background: none; border-top: 1px dashed var(--muted); }
.art-offline i:last-of-type { background: var(--accent-soft); }
.cluster-wide-shot { margin: 48px auto 0; max-width: 1000px; }
.gpu-operator { padding-left: 24px; border-left: 2px solid var(--accent); margin-bottom: 36px; }
.gpu-operator p { color: var(--muted); margin-top: 12px; }
.gpu-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 44px; }
.gpu-modes p { color: var(--muted); margin-top: 12px; }
.gpu-art { display: flex; gap: 5px; height: 64px; padding: 10px; margin-bottom: 20px; border: 1px solid var(--hairline-strong); border-radius: 8px; background: var(--surface); }
.gpu-art i { flex: 1; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 3px; }
.gpu-shared i:nth-child(2) { background: var(--amber-soft); border-color: var(--amber); }
.gpu-mig { display: grid; grid-template-columns: repeat(3, 1fr); }
.tools-grid { align-items: start; }
.tools-grid article > p { color: var(--muted); margin: 18px 0 24px; }
.cluster-contact { margin-top: 24px; }
/* Default is the final, static scene. Wide motion assigns one job every 4 s, rotating Workers over 12 s. */
@media (prefers-reduced-motion: no-preference) {
  .cluster-motion .job-stream i { animation: cluster-job 4s linear infinite paused; }
  .cluster-motion .cluster-leader::after { animation: cluster-decide 4s ease-in-out infinite paused; }
  .cluster-motion .assignment-route { animation: cluster-assign 12s linear var(--job-delay, 0s) infinite paused; }
  .cluster-motion .cluster-assignment-job { animation: cluster-to-left 12s linear var(--job-delay, 0s) infinite paused; }
  .cluster-motion .cluster-assignment-job:nth-of-type(2) { animation-name: cluster-to-middle; }
  .cluster-motion .cluster-assignment-job:nth-of-type(3) { animation-name: cluster-to-right; }
  .cluster-motion .node-gpu i { animation: cluster-gpu 12s ease-in-out var(--job-delay, 0s) infinite paused; }
  .operation-art.cluster-motion i { animation: cluster-node 4s ease-in-out infinite; animation-play-state: paused; }
  .operation-art.cluster-motion i:nth-of-type(2) { animation-delay: -1s; }
  .operation-art.cluster-motion i:nth-of-type(3) { animation-delay: -2s; }
  .art-nodes.cluster-motion i:last-of-type { animation-name: cluster-add-node; }
  .art-backup.cluster-motion i { animation-name: cluster-backup; }
  .art-upkeep.cluster-motion i { animation-name: cluster-upkeep; }
  .art-upkeep.cluster-motion .art-mark { animation: cluster-maintain 6s linear infinite; animation-play-state: paused; }
  .art-offline.cluster-motion i { animation-name: cluster-offline; }
  .cluster-motion[data-running] .job-stream i, .cluster-motion[data-running] .node-gpu i,
  .cluster-motion[data-running] .cluster-leader::after, .cluster-motion[data-running] .assignment-route,
  .cluster-motion[data-running] .cluster-assignment-job,
  .operation-art[data-running] i, .art-upkeep[data-running] .art-mark { animation-play-state: running; }
}
@keyframes cluster-job {
  0% { transform: translateY(0); opacity: 0; }
  3% { opacity: 1; }
  30% { transform: translateY(var(--incoming-distance)); opacity: 1; }
  30.01%, 100% { transform: translateY(var(--incoming-distance)); opacity: 0; }
}
@keyframes cluster-decide { 0%, 30%, 48%, 100% { opacity: .15; } 36%, 42% { opacity: 1; } }
@keyframes cluster-assign { 0%, 14%, 34%, 100% { opacity: .2; } 17%, 33% { opacity: 1; } }
@keyframes cluster-to-left {
  0%, 17% { transform: translate(50%, 0); opacity: 0; }
  17.01% { opacity: 1; }
  20% { transform: translate(50%, 30px); }
  24% { transform: translate(0, 30px); }
  27% { transform: translate(0, 72px); opacity: 1; }
  27.01%, 100% { transform: translate(0, 72px); opacity: 0; }
}
@keyframes cluster-to-middle {
  0%, 17% { transform: translate(50%, 0); opacity: 0; }
  17.01% { opacity: 1; }
  27% { transform: translate(50%, 72px); opacity: 1; }
  27.01%, 100% { transform: translate(50%, 72px); opacity: 0; }
}
@keyframes cluster-to-right {
  0%, 17% { transform: translate(50%, 0); opacity: 0; }
  17.01% { opacity: 1; }
  20% { transform: translate(50%, 30px); }
  24% { transform: translate(100%, 30px); }
  27% { transform: translate(100%, 72px); opacity: 1; }
  27.01%, 100% { transform: translate(100%, 72px); opacity: 0; }
}
@keyframes cluster-gpu { 0%, 27%, 34%, 100% { opacity: .25; } 28%, 33% { opacity: 1; } }
@keyframes cluster-assign-light { 0%, 42%, 100% { opacity: .2; } 51%, 99% { opacity: 1; } }
@keyframes cluster-to-middle-light {
  0%, 51% { transform: translate(50%, 0); opacity: 0; }
  51.01% { opacity: 1; }
  81% { transform: translate(50%, 72px); opacity: 1; }
  81.01%, 100% { transform: translate(50%, 72px); opacity: 0; }
}
@keyframes cluster-gpu-light { 0%, 81%, 100% { opacity: .25; } 82%, 99% { opacity: 1; } }
@keyframes cluster-node { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: .5; } }
@keyframes cluster-add-node { 0%, 10%, 100% { transform: scale(.6); opacity: 0; } 35%, 75% { transform: scale(1); opacity: 1; } }
@keyframes cluster-backup { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes cluster-upkeep { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes cluster-maintain { to { transform: rotate(360deg); } }
@keyframes cluster-offline { 0%, 100% { transform: scale(1); } 50% { transform: scale(.9); } }
@media (max-width: 899.98px) {
  .cluster-hero-grid, .cluster-two-col, .build-step { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cluster-hero-copy { max-width: 720px; }
  .cluster-diagram { max-width: 640px; width: 100%; }
  .operation-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-steps { gap: 48px; }
}
@media (max-width: 599.98px) {
  .cluster-diagram { padding: 16px; --cluster-inset: 12px; --node-gap: 6px; }
  .cluster-node { padding: 10px 6px; font-size: .65rem; }
  .cluster-source { gap: 12px; }
  .cluster-source > strong { max-width: 50%; }
  .cluster-jumps { gap: 12px 20px; }
  .operation-cards, .gpu-modes { grid-template-columns: minmax(0, 1fr); }
  .operation-card { padding: 22px; }
  .build-sequence { padding-left: 18px; }
}
/* Fewer animated elements on touch and narrow layouts; no frame-driven canvas or pointer effects. */
@media (max-width: 899.98px), (pointer: coarse), (hover: none) {
  .cluster-motion .assignment-route, .cluster-motion .node-gpu i { animation: none; }
  .cluster-motion .cluster-assignment-job:not(:nth-of-type(2)) { display: none; }
}
@media (max-width: 899.98px), (pointer: coarse) {
  .operation-art.cluster-motion i:not(:first-of-type) { animation: none; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 899.98px), (prefers-reduced-motion: no-preference) and (pointer: coarse), (prefers-reduced-motion: no-preference) and (hover: none) {
  .cluster-motion .assignment-route { opacity: .2; }
  .cluster-motion .assignment-route:nth-of-type(2) { animation: cluster-assign-light 4s linear infinite paused; }
  .cluster-motion .cluster-assignment-job:nth-of-type(2) { animation: cluster-to-middle-light 4s linear infinite paused; }
  .cluster-motion .worker-nodes .cluster-node:not(:nth-child(2)) .node-gpu { opacity: .25; }
  .cluster-motion .worker-nodes .cluster-node:nth-child(2) .node-gpu { animation: cluster-gpu-light 4s ease-in-out infinite paused; }
  .cluster-motion[data-running] .assignment-route:nth-of-type(2), .cluster-motion[data-running] .cluster-assignment-job:nth-of-type(2),
  .cluster-motion[data-running] .worker-nodes .cluster-node:nth-child(2) .node-gpu { animation-play-state: running; }
}
