/*------------------------------------------------------------------
[ AB Product v2 — Diagram (inline SVG) ]
Layer classes come from the Figma layer names (n-*, ab-dg-*).
*/
.ab-hv2-dg {
	position: relative;
	width: 100%;
}

.ab-hv2-dg > svg,
.ab-hv2-dg > img {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.ab-dg text {
	font-family: 'Manrope', sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.ab-dg .ab-dg-runner,
.ab-dg .ab-dg-dot,
.ab-dg .ab-dg-glow,
.ab-dg .ab-dg-edge-light,
.ab-dg .n-window-extended,
.ab-dg .n-window-legacy,
.ab-dg .n-runner-peak,
.ab-dg .n-runner-window-end {
	transform-box: fill-box;
	transform-origin: center;
}

/* runners: travel along straight flow lines, pulse elsewhere */
.ab-hv2-dg--motion .ab-dg-runner {
	animation: ab-dg-pulse 2.6s ease-in-out infinite;
}

.ab-hv2-dg--motion .ab-dg-runner--move {
	animation: ab-dg-run 3.2s linear infinite;
}

.ab-hv2-dg--motion .ab-dg-runner:nth-of-type(2n) { animation-delay: -1.1s; }
.ab-hv2-dg--motion .ab-dg-runner:nth-of-type(3n) { animation-delay: -2s; }

/* green status dot in the caption pill */
.ab-hv2-dg--motion .ab-dg-dot {
	animation: ab-dg-blink 2.2s ease-in-out infinite;
}

/* soft glow under the Scalstrm cards */
.ab-hv2-dg--motion .ab-dg-glow {
	animation: ab-dg-breathe 5s ease-in-out infinite;
}

.ab-hv2-dg--motion .ab-dg-edge-light {
	animation: ab-dg-twinkle 3.4s ease-in-out infinite;
}

.ab-hv2-dg--motion .ab-dg-edge-light:nth-of-type(2n) { animation-delay: -1.7s; }

/* "Extend live programmatic windows": bars grow when the diagram enters the viewport */
.ab-hv2-dg--motion.wpb_start_animation .n-window-legacy,
.ab-hv2-dg--motion.wpb_start_animation .n-window-extended {
	transform-origin: left center;
	animation: ab-dg-grow 1.8s cubic-bezier(.22, .61, .36, 1) .35s both;
}

.ab-hv2-dg--motion.wpb_start_animation .n-window-legacy { animation-duration: .7s; }

.ab-hv2-dg--motion.wpb_start_animation .n-runner-window-end {
	animation: ab-dg-fade 0.4s ease 2s both, ab-dg-pulse 2.6s ease-in-out 2.4s infinite;
}

@keyframes ab-dg-run {
	0%   { transform: translate(var(--dx0, 0), var(--dy0, 0)); opacity: 0; }
	12%  { opacity: 1; }
	85%  { opacity: 1; }
	100% { transform: translate(var(--dx1, 0), var(--dy1, 0)); opacity: 0; }
}

@keyframes ab-dg-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50%      { transform: scale(1.45); opacity: .55; }
}

@keyframes ab-dg-blink {
	0%, 100% { opacity: 1; }
	50%      { opacity: .35; }
}

@keyframes ab-dg-breathe {
	0%, 100% { opacity: .65; }
	50%      { opacity: 1; }
}

@keyframes ab-dg-twinkle {
	0%, 100% { opacity: .25; }
	50%      { opacity: 1; }
}

@keyframes ab-dg-grow {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

@keyframes ab-dg-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Stacked layout (tablet / mobile): some drawings sit off-centre inside their
   Figma frame (they are aligned to the text column on desktop) — centre them. */
@media (max-width: 991px) {
	.ab-hv2-dg--sgai > svg   { transform: translateX(6.15%); }
	.ab-hv2-dg--effort > svg { transform: translateX(-1.42%); }
	.ab-hv2-dg--hero > svg   { transform: translateX(-1.49%); }
}

@media (prefers-reduced-motion: reduce) {
	.ab-hv2-dg .ab-dg * {
		animation: none !important;
	}
}
