/* Motion port 24.10.2026 (marko-motion-port.php): six patterns accepted by the owner in the local motion lab
 * (local-marko-motion-lab.*): 1 floor assembly, 2 live numbers, 5 lightbox and carousel timing, 7 two-form light,
 * 15A selection path, 16 price roll. Candidate, awaiting owner visual acceptance.
 * Values are copied from the lab and from the owners of each block; transform, opacity and stroke-dashoffset only;
 * every moment runs once or answers the visitor; prefers-reduced-motion shows the final state. */

/* ---------- 1. Floor assembly on /sborno-monolitnoe-perekrytie/ (marko-technology-hub.css values) ---------- */
/* One card under the four component cards: the drawing, a one-line legend of the stages, the source note. */
.marko-technology-hub .marko-mp-asm {
	margin: 18px 0 0;
	padding: 30px;
	border: 1px solid var(--marko-tech-border, #c9dce9);
	border-radius: 18px;
	background: #fff;
}

.marko-mp-asm__media {
	max-width: 700px;
	margin: 0 auto;
}

.marko-mp-asm__media svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

/* The wet tint of fresh concrete exists only during the pour. */
.marko-mp-asm .ml-asm__slab-wet {
	opacity: 0;
}

/* «Балки › Блоки › Сетка › Бетон»: a sequence, so an ordered list, but without numbers next to the 01-04 cards. */
.marko-technology-hub .marko-mp-asm__legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 0;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.marko-technology-hub .marko-mp-asm__legend > li {
	margin: 0;
	padding: 0;
	color: var(--marko-tech-blue-dark, #102f49);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.marko-mp-asm__legend > li + li::before {
	padding: 0 12px;
	color: var(--marko-tech-blue, #165582);
	font-weight: 400;
	content: "›";
}

.marko-technology-hub .marko-mp-asm figcaption {
	margin: 10px 0 0;
	color: var(--marko-tech-muted, #46586a);
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

@media (max-width: 767px) {
	.marko-technology-hub .marko-mp-asm {
		padding: 20px 16px;
		border-radius: 14px;
	}

	.marko-technology-hub .marko-mp-asm__legend > li {
		font-size: 16px;
	}

	.marko-mp-asm__legend > li + li::before {
		padding: 0 8px;
	}
}

/* The four words stay on one line down to 320 px. */
@media (max-width: 360px) {
	.marko-technology-hub .marko-mp-asm__legend > li {
		font-size: 15px;
	}

	.marko-mp-asm__legend > li + li::before {
		padding: 0 5px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	/* One sequence of about 3.5 s, timings of the lab. Held on its first frame until the block is in view. */
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__beam,
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__block,
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__mesh {
		animation: marko-mp-drop 520ms cubic-bezier(0.23, 1, 0.32, 1) both;
	}

	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__beam { --marko-mp-from: -150px; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__block { --marko-mp-from: -110px; animation-duration: 460ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__mesh { --marko-mp-from: -70px; animation-duration: 480ms; animation-delay: 2050ms; }

	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__b0 { animation-delay: 200ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__b1 { animation-delay: 310ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__b2 { animation-delay: 420ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k0 { animation-delay: 900ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k1 { animation-delay: 985ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k2 { animation-delay: 1070ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k3 { animation-delay: 1155ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k4 { animation-delay: 1240ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k5 { animation-delay: 1325ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k6 { animation-delay: 1410ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__k7 { animation-delay: 1495ms; }

	/* Concrete is poured, not raised (owner 24.10.2026: no straight fronts, like a real liquid). The masks in
	   floor-assembly.svg hold four irregular puddles in the plane of the slab, one per spot the hose visits: each
	   starts as a dot, spreads fast and then slower like a thick liquid, turns a little so its edge keeps moving,
	   and they run into each other. At rest every puddle is at full size, so the slab is shown whole. */
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob {
		transform-box: view-box;
		transform-origin: 0 0;
		animation: marko-mp-spread 1500ms cubic-bezier(0.3, 0.6, 0.6, 1) 2850ms both;
	}

	/* The hose moves left to right, along both long edges: each next puddle starts 110 ms later; neighbours turn
	   opposite ways. */
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--2 { animation-name: marko-mp-spread-b; animation-delay: 2960ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--3 { animation-delay: 3070ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--4 { animation-name: marko-mp-spread-b; animation-delay: 3180ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--5 { animation-delay: 3290ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--6 { animation-name: marko-mp-spread-b; animation-delay: 3400ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--7 { animation-delay: 3510ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--8 { animation-name: marko-mp-spread-b; animation-delay: 3620ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--9 { animation-delay: 3730ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__blob--10 { animation-name: marko-mp-spread-b; animation-delay: 3840ms; }

	/* Fresh concrete is darker and lightens as it settles. */
	.marko-mp-asm:is(.is-armed, .is-playing) .ml-asm__slab-wet {
		animation: marko-mp-wet 3200ms cubic-bezier(0.23, 1, 0.32, 1) 2850ms both;
	}

	/* The legend lights up with the drawing; the final state is all four stages at full strength. */
	.marko-mp-asm:is(.is-armed, .is-playing) .marko-mp-asm__legend > li {
		animation: marko-mp-stage 240ms ease-out both;
	}

	.marko-mp-asm:is(.is-armed, .is-playing) .marko-mp-asm__legend > li:nth-child(1) { animation-delay: 200ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .marko-mp-asm__legend > li:nth-child(2) { animation-delay: 900ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .marko-mp-asm__legend > li:nth-child(3) { animation-delay: 2050ms; }
	.marko-mp-asm:is(.is-armed, .is-playing) .marko-mp-asm__legend > li:nth-child(4) { animation-delay: 2600ms; }

	.marko-mp-asm.is-armed * {
		animation-play-state: paused !important;
	}
}

@keyframes marko-mp-drop {
	from { opacity: 0; transform: translateY(var(--marko-mp-from, -100px)); }
	to { opacity: 1; transform: none; }
}

/* A puddle from the point where the hose touches the slab: an island first, then it meets its neighbours, at the
   end only the far corners round off. Nothing is shown before the pour reaches the spot. */
@keyframes marko-mp-spread {
	from { transform: scale(.001) rotate(-16deg); }
	45% { transform: scale(.3) rotate(-8deg); }
	80% { transform: scale(.62) rotate(-2deg); }
	to { transform: none; }
}

@keyframes marko-mp-spread-b {
	from { transform: scale(.001) rotate(18deg); }
	45% { transform: scale(.3) rotate(9deg); }
	80% { transform: scale(.62) rotate(3deg); }
	to { transform: none; }
}

@keyframes marko-mp-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes marko-mp-wet {
	0%, 45% { opacity: .42; }
	to { opacity: 0; }
}

@keyframes marko-mp-stage {
	from { opacity: .4; }
	to { opacity: 1; }
}

/* ---------- 2 and 16. Rolling digits over the real text (the text stays in the DOM, the copy is aria-hidden) ---------- */
.marko-price-preview__amount strong,
.marko-beam-current-card__prices dd,
.marko-mh-proof-stat,
.marko-stalin-proof__figure {
	position: relative;
	font-variant-numeric: tabular-nums;
}

.marko-mp-rolling {
	color: transparent !important;
	-webkit-text-fill-color: transparent;
}

.marko-mp-roll {
	position: absolute;
	top: 0;
	left: 0;
	width: 0;
	height: 0;
	overflow: visible;
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
}

.marko-mp-roll > span {
	position: absolute;
	display: block;
	overflow: hidden;
	white-space: pre;
}

.marko-mp-roll__strip {
	display: block;
}

.marko-mp-roll__strip > span {
	display: block;
}

/* ---------- 5. Elementor photo view: a soft opening (no change to its focus handling) ---------- */
@media (prefers-reduced-motion: no-preference) {
	/* Runs only when the dialog is shown (display none -> block), never on a slide change inside it. */
	:is(body.marko-stalin-page, body.page-id-31018, body.page-id-38020) .elementor-lightbox {
		animation: marko-mp-fade 200ms ease-out both;
	}

	:is(body.marko-stalin-page, body.page-id-31018, body.page-id-38020) .elementor-lightbox .dialog-widget-content {
		animation: marko-mp-photo 280ms cubic-bezier(0.32, 0.72, 0, 1) both;
	}

	/* Carousel steps settle on the drawer curve of the lab; Swiper keeps its speed, drag and slide count. */
	:is(body.page-id-31018, body.page-id-38020) .elementor-widget-image-carousel .swiper-wrapper {
		transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
	}
}

@keyframes marko-mp-photo {
	from { opacity: 0; transform: scale(.97); }
	to { opacity: 1; transform: none; }
}

/* ---------- 7. Two forms (marko-local-home-enquiry): a light laps card 1, then card 2; both stay softly active ---------- */
.marko-local-enquiry .marko-local-enquiry__card {
	position: relative;
}

.marko-mp-trace {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

.marko-mp-trace rect {
	stroke: #7ab7dd;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-dasharray: .16 .84;
	opacity: 0;
}

.marko-local-enquiry.is-mp-done .marko-local-enquiry__grid > .marko-local-enquiry__card {
	border-color: rgba(30, 121, 183, .45);
	box-shadow: 0 8px 24px rgba(16, 47, 73, .04), 0 0 0 1px rgba(30, 121, 183, .12);
}

/* ---------- 15A. Home 47 «Как мы подбираем перекрытие»: comet 01 -> 02 -> 03, chevrons in the gaps, no line ---------- */
.marko-home-selection.is-mp-sel {
	position: relative;
	isolation: isolate;
}

.is-mp-sel .marko-home-selection__step {
	position: relative;
}

.is-mp-sel .marko-home-selection__step:focus {
	outline: none;
}

.is-mp-sel .marko-home-selection__step:focus-visible {
	outline: 3px solid #b46200;
	outline-offset: 3px;
}

.is-mp-sel .marko-home-selection__step::after {
	position: absolute;
	inset: -1px;
	border: 2px solid #1e79b7;
	border-radius: 12px;
	opacity: 0;
	pointer-events: none;
	content: "";
}

.is-mp-sel .marko-home-selection__number {
	position: relative;
	z-index: 2;
}

.is-mp-sel .marko-home-selection__number::before {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #1e79b7;
	transform: scale(0);
	content: "";
}

.is-mp-sel .marko-home-selection__number::after {
	position: absolute;
	inset: -5px;
	border: 2px solid #7ab7dd;
	border-radius: 50%;
	opacity: 0;
	content: "";
}

.marko-mp-sel__digits {
	position: relative;
}

.marko-mp-sel__check {
	position: absolute;
	inset: 8px;
	width: calc(100% - 16px);
	height: calc(100% - 16px);
	overflow: visible;
}

.marko-mp-sel__check path {
	stroke-dasharray: 1 1;
	stroke-dashoffset: 1;
}

.is-mp-sel a.marko-home-selection__button--primary {
	position: relative;
}

.is-mp-sel a.marko-home-selection__button--primary::after {
	position: absolute;
	inset: -6px;
	border: 2px solid #7ab7dd;
	border-radius: 11px;
	opacity: 0;
	pointer-events: none;
	content: "";
}

.marko-mp-sel__fx {
	position: absolute;
	inset: 0;
	z-index: 3;
	overflow: visible;
	pointer-events: none;
}

.marko-mp-sel__comet {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--len, 72px);
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(90deg, rgba(122, 183, 221, 0), rgba(122, 183, 221, .55) 62%, #1e79b7 96%);
	opacity: 0;
	transform: translate(var(--x0, 0), var(--y0, 0)) rotate(var(--rot, 0deg));
	transform-origin: 0 50%;
}

.marko-mp-sel__comet::after {
	position: absolute;
	top: 50%;
	right: -3px;
	width: 9px;
	height: 9px;
	margin-top: -4.5px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 0 0 2px #1e79b7, 0 0 10px 3px rgba(122, 183, 221, .8);
	content: "";
}

/* Order cue in the gaps: low-contrast accent, 3:1 or more against the page as a non-text graphic. */
.marko-mp-sel__chev {
	position: absolute;
	width: 14px;
	height: 18px;
	margin: -9px 0 0 -7px;
	color: #5b8db3;
	font-size: 20px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	opacity: 0;
}

.marko-mp-sel__chev.is-vertical {
	height: 10px;
	margin-top: -5px;
	font-size: 18px;
	line-height: 4px;
}

/* Final state (after the moment, with reduced motion and without the moment): path walked, your step. */
.is-mp-sel.is-done .marko-mp-sel__chev { opacity: 1; }
.is-mp-sel.is-done[data-upto="2"] .marko-mp-sel__chev--1,
.is-mp-sel.is-done[data-upto="3"] .marko-mp-sel__chev { color: #1e79b7; }
.is-mp-sel.is-done .marko-home-selection__number::before { transform: none; }
.is-mp-sel.is-done .marko-home-selection__step:nth-child(3)::after { opacity: 1; }
.is-mp-sel.is-done .marko-home-selection__step:nth-child(3) .marko-mp-sel__digits { opacity: 0; }
.is-mp-sel.is-done .marko-mp-sel__check path { stroke-dashoffset: 0; }

/* Hover or focus on a step after the moment: the path up to that step. */
.is-mp-sel.is-done[data-upto] .marko-home-selection__step::after { opacity: 0; }
.is-mp-sel.is-done[data-upto="1"] .marko-home-selection__step:nth-child(1)::after,
.is-mp-sel.is-done[data-upto="2"] .marko-home-selection__step:nth-child(2)::after,
.is-mp-sel.is-done[data-upto="3"] .marko-home-selection__step:nth-child(3)::after { opacity: 1; }
.is-mp-sel.is-done[data-upto="1"] .marko-home-selection__step:not(:nth-child(1)) .marko-home-selection__number::before,
.is-mp-sel.is-done[data-upto="2"] .marko-home-selection__step:nth-child(3) .marko-home-selection__number::before { transform: scale(0); }

@media (prefers-reduced-motion: no-preference) {
	.is-mp-sel.is-done .marko-home-selection__step::after,
	.is-mp-sel.is-done .marko-home-selection__number::before {
		transition: opacity 200ms ease-out, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
	}

	.is-mp-sel .marko-mp-sel__chev { transition: color 200ms ease-out; }

	/* The one moment, about 2.9 s: light 1 -> 2 -> 3, a check on 3, then the main button answers once. */
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(1) .marko-home-selection__number { animation: marko-mp-bump 320ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(1) .marko-home-selection__number::before { animation: marko-mp-light 340ms cubic-bezier(0.23, 1, 0.32, 1) 0ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(1) .marko-home-selection__number::after { animation: marko-mp-ring 640ms ease-out 0ms both; }
	.is-mp-sel.is-played .marko-mp-sel__comet--1 { animation: marko-mp-comet 650ms cubic-bezier(0.45, 0, 0.55, 1) 300ms both; }
	.is-mp-sel.is-played .marko-mp-sel__chev--1 { animation: marko-mp-on 300ms ease-out 700ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(2)::after { animation: marko-mp-flash 760ms ease-out 950ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(2) .marko-home-selection__number { animation: marko-mp-bump 320ms cubic-bezier(0.23, 1, 0.32, 1) 950ms; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(2) .marko-home-selection__number::before { animation: marko-mp-light 340ms cubic-bezier(0.23, 1, 0.32, 1) 950ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(2) .marko-home-selection__number::after { animation: marko-mp-ring 640ms ease-out 950ms both; }
	.is-mp-sel.is-played .marko-mp-sel__comet--2 { animation: marko-mp-comet 650ms cubic-bezier(0.45, 0, 0.55, 1) 1250ms both; }
	.is-mp-sel.is-played .marko-mp-sel__chev--2 { animation: marko-mp-on 300ms ease-out 1650ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(3)::after { animation: marko-mp-on 360ms ease-out 1900ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(3) .marko-home-selection__number { animation: marko-mp-bump 320ms cubic-bezier(0.23, 1, 0.32, 1) 1900ms; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(3) .marko-home-selection__number::before { animation: marko-mp-light 340ms cubic-bezier(0.23, 1, 0.32, 1) 1900ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(3) .marko-home-selection__number::after { animation: marko-mp-ring 640ms ease-out 1900ms both; }
	.is-mp-sel.is-played .marko-home-selection__step:nth-child(3) .marko-mp-sel__digits { animation: marko-mp-out 200ms ease-out 2150ms both; }
	.is-mp-sel.is-played .marko-mp-sel__check path { animation: marko-mp-check 400ms cubic-bezier(0.23, 1, 0.32, 1) 2150ms both; }
	.is-mp-sel.is-played a.marko-home-selection__button--primary { animation: marko-mp-pulse 520ms cubic-bezier(0.23, 1, 0.32, 1) 2400ms; }
	.is-mp-sel.is-played a.marko-home-selection__button--primary::after { animation: marko-mp-ring 640ms ease-out 2400ms both; }
}

.is-mp-sel.is-instant *,
.is-mp-sel.is-instant *::before,
.is-mp-sel.is-instant *::after {
	transition: none !important;
}

@keyframes marko-mp-light { from { transform: scale(0); } to { transform: none; } }
@keyframes marko-mp-comet {
	0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)); }
	15% { opacity: 1; }
	80% { opacity: 1; }
	100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(var(--rot)); }
}
@keyframes marko-mp-bump { 0%, 100% { transform: none; } 45% { transform: scale(1.06); } }
@keyframes marko-mp-ring { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes marko-mp-flash { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }
@keyframes marko-mp-on { from { opacity: 0; } to { opacity: 1; } }
@keyframes marko-mp-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes marko-mp-check { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes marko-mp-pulse { 0%, 100% { transform: none; } 45% { transform: scale(1.03); } }
