/*------------------------------------------------------------------
[ AB Home v2 — Streaming pipeline ]
Figma: 976:9741 (assets) · approved export (layout)
Rail line sits 85px above the cards; cards 384 × 300 in a 3-col grid (gap 24).
*/

.ab-hv2-pipe {
	padding: 46px 0 85px;
	background: transparent;
}

.ab-hv2-pipe__inner {
	position: relative;
}

.ab-hv2-section .ab-hv2-pipe__ambient {
	position: absolute;
	left: 50%;
	top: 0;
	width: 1380px;
	max-width: none;
	height: auto;
	margin-left: -690px;
	margin-top: -35px; /* card top (125) − 160 */
	pointer-events: none;
	z-index: 0;
}

/* ── Rail ───────────────────────────────────────────── */
.ab-hv2-pipe__rail {
	position: relative;
	height: 125px; /* line at 40px + 85px to the cards */
	z-index: 2;
}

.ab-hv2-pipe__line {
	position: absolute;
	left: 28px;
	right: 28px;
	top: 39px;
	height: 2px;
	border-radius: 1px;
	background: #653bf3;
}

.ab-hv2-pipe__node {
	position: absolute;
	top: 12px;
	width: 56px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ab-hv2-pipe__node--start { left: 0; }
.ab-hv2-pipe__node--end { right: 0; }

.ab-hv2-pipe__node-box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	background: #2b2b2b;
	box-shadow: 0 6px 24px rgba(101, 59, 243, 0.35);
}

.ab-hv2-section .ab-hv2-pipe__node-box img {
	width: 36px;
	height: 36px;
}

.ab-hv2-pipe__node-label {
	position: absolute;
	top: 62px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-family: var(--hv2-font-ui);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.7);
}

.ab-hv2-pipe__marker {
	position: absolute;
	top: 40px;
	width: 46px;
	height: 46px;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ab-hv2-section .ab-hv2-pipe__marker img {
	position: absolute;
	left: -23px;
	top: -23px;
	width: 92px;
	max-width: none;
	height: 92px;
}

.ab-hv2-pipe__marker span {
	position: relative;
	font-family: var(--hv2-font-ui);
	font-weight: 700;
	font-size: 17.25px;
	line-height: 1;
	color: #fff;
}

.ab-hv2-pipe__dir {
	position: absolute;
	top: 40px;
	width: 24px;
	height: 24px;
	transform: translate(-50%, -50%);
}

.ab-hv2-section .ab-hv2-pipe__dir img {
	position: absolute;
	left: 0;
	top: 0;
	width: 24px;
	height: 24px;
}

.ab-hv2-section .ab-hv2-pipe__dir .ab-hv2-pipe__dir-chevron {
	left: 4px;
	top: 4px;
	width: 16px;
	height: 16px;
}

/* ── Steps grid ─────────────────────────────────────── */
.ab-hv2-section .ab-hv2-pipe__steps {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(var(--hv2-pipe-cols, 3), minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ab-hv2-pipe__step {
	position: relative;
	margin: 0;
	padding: 0;
}

.ab-hv2-pipe__card {
	position: relative;
	height: 300px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 20px;
	background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%), linear-gradient(90deg, #232323 0%, #232323 100%);
}

.ab-hv2-section .ab-hv2-pipe__card-glow {
	position: absolute;
	left: 50%;
	top: -21px;
	width: 340px;
	max-width: none;
	height: 280px;
	margin-left: -171px;
	pointer-events: none;
}

.ab-hv2-pipe__chip {
	position: absolute;
	left: 15px;
	top: 15px;
	padding: 5px 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	font-family: var(--hv2-font-ui);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.8);
	white-space: nowrap;
}

.ab-hv2-section .ab-hv2-pipe__icon {
	position: absolute;
	left: 50%;
	top: 72px;
	width: 104px;
	height: 104px;
	margin-left: -52px;
}

/* Mini diagrams (bottom of the card) */
.ab-hv2-pipe__diagram {
	position: absolute;
	left: 15px;
	right: 15px;
	top: 219px;
	height: 64px;
}

.ab-hv2-pipe__bar-row {
	display: flex;
	align-items: center;
	height: 30px;
}

.ab-hv2-pipe__bar-label {
	flex: 0 0 90px;
	font-family: var(--hv2-font-ui);
	font-weight: 500;
	font-size: 12px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.7);
}

.ab-hv2-pipe__bar {
	display: block;
	height: 10px;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.18);
	width: calc(100% - 90px);
}

.ab-hv2-pipe__bar--1 {
	width: 79px;
	background: #b794ff;
}

.ab-hv2-pipe__diagram--tags {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	align-items: flex-start;
	padding-top: 18px;
	padding-left: 1px;
}

.ab-hv2-pipe__tag {
	display: inline-flex;
	padding: 6px 10px;
	border: 1px solid rgba(183, 148, 255, 0.35);
	border-radius: 8px;
	font-family: var(--hv2-font-ui);
	font-weight: 500;
	font-size: 12px;
	line-height: 1.3;
	color: #fff;
	white-space: nowrap;
}

.ab-hv2-pipe__diagram--track {
	display: flex;
	align-items: center;
	gap: 3px;
	padding-top: 17px;
	height: auto;
}

.ab-hv2-pipe__track {
	position: relative;
	flex: 1 1 auto;
	height: 2.3px;
	background: linear-gradient(90deg, #653bf3, #b794ff);
}

.ab-hv2-section .ab-hv2-pipe__track img {
	position: absolute;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -4px;
}

.ab-hv2-section .ab-hv2-pipe__track img:nth-child(1) { left: 6px; }
.ab-hv2-section .ab-hv2-pipe__track img:nth-child(2) { left: 86px; }
.ab-hv2-section .ab-hv2-pipe__track img:nth-child(3) { left: 166px; }

.ab-hv2-pipe__tag--end {
	flex: none;
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.08);
}

/* Connector between cards (aligned with the diagram row) */
.ab-hv2-pipe__connector {
	position: absolute;
	right: -30px; /* half of the 24px gap + half of 36px */
	top: 240px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 18px;
	background: #653bf3;
}

.ab-hv2-section .ab-hv2-pipe__connector img {
	width: 16px;
	height: 16px;
}

/* In / out chips at the sides of the first / last card */
.ab-hv2-pipe__io {
	position: absolute;
	top: 104px;
	z-index: 3;
	display: flex;
	align-items: center;
}

.ab-hv2-pipe__io--in {
	left: calc(-1 * min(67px, max(0px, (100vw - 1200px) / 2 - 8px)));
}

.ab-hv2-pipe__io--out {
	right: calc(-1 * min(97px, max(0px, (100vw - 1200px) / 2 - 8px)));
}

.ab-hv2-pipe__io-box {
	display: block;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	background: rgba(43, 43, 43, 0.92);
	box-shadow: 0 6px 24px rgba(101, 59, 243, 0.25);
	font-family: var(--hv2-font-regular);
	font-size: 18px;
	line-height: 1.05;
	color: rgba(255, 255, 255, 0.85);
	white-space: nowrap;
}

.ab-hv2-pipe__io--out .ab-hv2-pipe__io-box {
	padding: 17px 12px;
}

.ab-hv2-pipe__io-arrow {
	flex: none;
	width: 26px;
	height: 26px;
}

.ab-hv2-pipe__io--in .ab-hv2-pipe__io-arrow { margin-left: -10px; }
.ab-hv2-pipe__io--out .ab-hv2-pipe__io-arrow { margin-right: -6px; position: relative; z-index: 1; }

/* Text under each card */
.ab-hv2-pipe__text {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 28px 4px 0;
}

.ab-hv2-pipe__label {
	position: relative;
	padding-left: 27px;
	font-family: var(--hv2-font-ui);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.3;
	color: #b794ff;
}

.ab-hv2-pipe__label::before {
	content: '';
	position: absolute;
	left: 11px;
	top: 50%;
	width: 5px;
	height: 5px;
	margin-top: -2px;
	border-radius: 50%;
	background: currentColor;
}

.ab-hv2-section .ab-hv2-pipe__title {
	font-family: var(--hv2-font-display);
	font-weight: 700;
	font-size: 32px;
	line-height: 1.2;
	color: #fff;
}

/* text widths from the design: 309 / 356 / 255 */
.ab-hv2-pipe__step:nth-child(3n+1) .ab-hv2-pipe__desc { max-width: 309px; }
.ab-hv2-pipe__step:nth-child(3n+3) .ab-hv2-pipe__desc { max-width: 260px; }

.ab-hv2-section .ab-hv2-pipe__desc {
	max-width: 356px;
	font-family: var(--hv2-font-regular);
	font-size: 16px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.72);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1199px) {
	.ab-hv2-pipe__diagram--tags { flex-wrap: wrap; gap: 6px; padding-top: 4px; }
	.ab-hv2-pipe__io { display: none; }
}

@media (max-width: 991px) {
	.ab-hv2-pipe { padding: 40px 0 60px; }
	.ab-hv2-pipe__rail { display: none; }
	.ab-hv2-section .ab-hv2-pipe__steps {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
		max-width: 480px;
		margin: 0 auto;
	}
	.ab-hv2-pipe__connector {
		right: auto;
		left: 50%;
		top: auto;
		bottom: -42px;
		margin-left: -18px;
		transform: rotate(90deg);
	}
	.ab-hv2-section .ab-hv2-pipe__ambient { display: none; }
}

@media (max-width: 575px) {
	.ab-hv2-pipe__card { height: 280px; }
	.ab-hv2-section .ab-hv2-pipe__icon { width: 88px; height: 88px; margin-left: -44px; top: 70px; }
	.ab-hv2-pipe__diagram { top: 200px; }
	.ab-hv2-section .ab-hv2-pipe__title { font-size: 28px; }
}

/* ── Light travelling along the rail ───────────────────
   Runs only between the start and end icons (their edges at 56px):
   the clipping box hides it before/after the icons. */
.ab-hv2-pipe__light {
	position: absolute;
	left: 56px;
	right: 56px;
	top: 16px;
	height: 48px; /* room for the glow above/below the 2px line */
	overflow: hidden;
	pointer-events: none;
}

.ab-hv2-pipe__light span {
	position: absolute;
	top: 50%;
	left: 0;
	width: 160px;
	height: 4px;
	margin-top: -2px;
	border-radius: 4px;
	background: linear-gradient(90deg, rgba(183, 148, 255, 0) 0%, rgba(183, 148, 255, .9) 45%, #fff 70%, rgba(183, 148, 255, 0) 100%);
	box-shadow: 0 0 12px 2px rgba(183, 148, 255, .55), 0 0 28px 6px rgba(101, 59, 243, .45);
	transform: translateX(-160px);
	animation: ab-hv2-pipe-light 4.5s linear infinite; /* linear: the step pulses are timed against it */
}

@keyframes ab-hv2-pipe-light {
	from { left: 0;    transform: translateX(-100%); }
	to   { left: 100%; transform: translateX(0); }
}

/* ── Step pulse when the light passes 01 / 02 / 03 ──
   Same 4.5s cycle as the light; --pulse-delay is set per step in PHP. */
.ab-hv2-section .ab-hv2-pipe__icon,
.ab-hv2-section .ab-hv2-pipe__card-glow,
.ab-hv2-pipe__marker {
	animation: 4.5s ease-out var(--pulse-delay, 0s) infinite;
}

.ab-hv2-section .ab-hv2-pipe__icon      { animation-name: ab-hv2-pipe-icon-pulse; }
.ab-hv2-section .ab-hv2-pipe__card-glow { animation-name: ab-hv2-pipe-glow-pulse; }
.ab-hv2-pipe__marker                    { animation-name: ab-hv2-pipe-marker-pulse; }

@keyframes ab-hv2-pipe-icon-pulse {
	0%, 18%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(183, 148, 255, 0)); }
	6%            { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(183, 148, 255, .85)); }
}

@keyframes ab-hv2-pipe-glow-pulse {
	0%, 22%, 100% { opacity: 1; transform: scale(1); }
	7%            { opacity: 1; transform: scale(1.22); filter: brightness(1.35); }
}

@keyframes ab-hv2-pipe-marker-pulse {
	0%, 16%, 100% { transform: translate(-50%, -50%) scale(1); }
	6%            { transform: translate(-50%, -50%) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
	.ab-hv2-pipe__light { display: none; }
	.ab-hv2-section .ab-hv2-pipe__icon,
	.ab-hv2-section .ab-hv2-pipe__card-glow,
	.ab-hv2-pipe__marker { animation: none; }
}
