/**
 * Floating scenes: mockups placed on a stage with fixed proportions.
 *   [shotpay_float_scene]  product, phone and order card, no background
 *   [shotpay_float_home]   product, phone, profile and order card, on a light stage (.sp-scene--home)
 *
 * Desktop: each item is positioned with percentages (left, top, width) and
 * tilted with --rot. Change those values to move an item.
 *
 * Mobile (767px and below): the stage stops positioning. The items sit in a
 * two-column grid in normal page flow, so they cannot land on the text.
 *
 * Motion comes from assets/js/float.js (class sp-float).
 */

/* ---------------------------------------------------------------------------
   Desktop: first scene
   --------------------------------------------------------------------------- */

.sp-scene {
	position: relative;
	width: 100%;
	max-width: 1160px;
	margin: 0 auto;
	aspect-ratio: 1160 / 850;
}

.sp-scene__item {
	position: absolute;
	display: block;
	height: auto;
	max-width: none;
	transform: rotate(var(--rot, 0deg));
}

.sp-scene__item--product {
	left: 3%;
	top: 19%;
	width: 28%;
	--rot: -4deg;
}

.sp-scene__item--phone {
	left: 33.4%;
	top: 4.7%;
	width: 33.1%;
	--rot: 0deg;
}

.sp-scene__item--order {
	left: 71%;
	top: 49%;
	width: 26%;
	--rot: 4deg;
}

/* ---------------------------------------------------------------------------
   Desktop: home composition, on a light stage
   --------------------------------------------------------------------------- */

.sp-scene--home {
	max-width: 1140px;
	aspect-ratio: 1140 / 740;
	background: transparent;
	border: 0;
	border-radius: 0;
	overflow: visible;
}

.sp-scene--home .sp-scene__item--product {
	left: 4.4%;
	top: 19%;
	width: 27.4%;
	--rot: -5deg;
}

.sp-scene--home .sp-scene__item--phone {
	left: 33.2%;
	top: 8.8%;
	width: 33.7%;
	--rot: 0deg;
}

.sp-scene--home .sp-scene__item--profile {
	left: 69%;
	top: 11.9%;
	width: 26.3%;
	--rot: 4deg;
}

.sp-scene--home .sp-scene__item--order {
	left: 69%;
	top: 60%;
	width: 24.5%;
	--rot: -3deg;
}

/* ---------------------------------------------------------------------------
   Mobile and tablet (767px and below). Keep this block LAST: it overrides the
   desktop positions above, and both scenes match on specificity.
   --------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.sp-scene,
	.sp-scene--home {
		aspect-ratio: auto;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
		align-items: center;
	}

	.sp-scene--home {
		padding: 24px 16px;
	}

	.sp-scene .sp-scene__item,
	.sp-scene--home .sp-scene__item {
		position: relative;
		left: auto;
		top: auto;
		width: 100%;
		min-width: 0;
	}

	/* First scene: product left, order right, phone across both columns below. */
	.sp-scene .sp-scene__item--product {
		grid-column: 1;
		grid-row: 1;
	}

	.sp-scene .sp-scene__item--order {
		grid-column: 2;
		grid-row: 1;
	}

	.sp-scene .sp-scene__item--phone,
	.sp-scene--home .sp-scene__item--phone {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-self: center;
		width: 62%;
	}

	/* Home: product and profile side by side, phone across, order centred below. */
	.sp-scene--home .sp-scene__item--product {
		grid-column: 1;
		grid-row: 1;
	}

	.sp-scene--home .sp-scene__item--profile {
		grid-column: 2;
		grid-row: 1;
	}

	.sp-scene--home .sp-scene__item--order {
		grid-column: 1 / -1;
		grid-row: 3;
		justify-self: center;
		width: 70%;
	}
}
