/**
 * Promo section styles (Get a 7% sale).
 * Loaded on front page only.
 *
 * @package Beaver_Movers
 */

/* Promo section (Figma: 1736:662 – Get a 7% sale) */
.beaver-section--promo {
	position: relative;
	overflow: visible;
	padding-top: 5.5rem;
	padding-bottom: var(--bm-space-section-y);
	margin-bottom: -60px;
	text-align: center;
	margin-top: 70px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

/*
 * Repeat + drift period must agree to the pixel:
 * tiled width × N must equal drift distance (−period), or seams show white (page under transparent SVG AA).
 */

/* Explicit period (same numbers as scaled tablet rule below). */
@keyframes beaver-promo-wave-drift {
	from {
		background-position: 0 50%;
	}

	to {
		background-position: -360px 50%;
	}
}

@keyframes beaver-promo-wave-drift-tall {
	from {
		background-position: 0 50%;
	}

	to {
		background-position: calc(0px - 360px * 264px / 239px) 50%;
	}
}

.beaver-promo__decoration {
	--promo-wave-w: 360px;
	--promo-wave-h: 239px;

	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
	height: var(--promo-wave-h);
	background-color: transparent;
	background-image: url(../images/promo-line.svg);
	background-repeat: repeat-x;
	background-position: 0 50%;
	background-size: var(--promo-wave-w) var(--promo-wave-h);
	animation: beaver-promo-wave-drift 22s linear infinite;
	pointer-events: none;
	backface-visibility: hidden;
}

.beaver-promo__text {
	position: relative;
	font-family: var(--bm-font-nav);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--bm-color-text-main);
	text-transform: uppercase;
	z-index: 1;
	margin: 0;
}

.beaver-promo__text a {
	color: inherit;
	text-decoration: none;
}

.beaver-promo__text a:hover,
.beaver-promo__text a:focus {
	text-decoration: underline;
	outline-offset: 4px;
}

.beaver-promo__social {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	z-index: 1;
}

.beaver-promo__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--bm-color-text-main);
	transition: opacity 0.2s ease, transform 0.2s ease;
	padding: 4px;
}

.beaver-promo__social-link:hover,
.beaver-promo__social-link:focus {
	opacity: 0.7;
	transform: scale(1.05);
}

.beaver-promo__social-link svg {
	width: 40px;
	height: 40px;
	display: block;
}

/* Figma wave (2246:1173) — tablet / narrow screens */
@media (max-width: 1024px) {
	.beaver-section--promo {
		margin-top: 40px;
		z-index: 1;
		margin-bottom: -52px;
	}

	.beaver-promo__decoration {
		--promo-wave-h: 264px;
		height: var(--promo-wave-h);
		background-repeat: repeat-x;
		background-size: auto calc(var(--promo-wave-h) + 1px);
		animation: beaver-promo-wave-drift-tall 22s linear infinite;
	}

	.beaver-promo__social-link svg {
		width: 36px;
		height: 36px;
	}

	.beaver-promo__social {
		gap: 8px;
	}
}

@media (max-width: 736px) {
	.beaver-promo__text {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.beaver-promo__decoration {
		animation: none;
	}
}