/**
 * Section: free trial banner (Figma "trial+marquee" 10665:68746).
 */

.hb-section.hb-section--trial {
	margin-top: var(--wp--preset--spacing--90);
	padding-block: 0;
}

.hb-section.hb-section--trial > * {
	margin-block: 0;
}

.hb-trial.hb-trial {
	position: relative;
	height: 37.8125rem;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--md);
	background-position: 50% 50%;
}

.hb-trial.hb-trial > * {
	margin: 0;
}

.hb-trial__text.hb-trial__text {
	position: absolute;
	z-index: 2;
	top: 3.875rem;
	left: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--60);
	width: min(34.5625rem, 100% - 2 * var(--wp--preset--spacing--50));
	transform: translateX(-50%);
}

.hb-trial__text.hb-trial__text > * {
	margin-block: 0;
}

.hb-trial__title.hb-trial__title {
	max-width: 29.3125rem;
	letter-spacing: -0.0625em;
	line-height: 0.875;
}

.hb-trial__text p {
	letter-spacing: -0.04em;
	line-height: 1.3;
}

.hb-trial__screen.hb-trial__screen {
	position: absolute;
	z-index: 1;
	top: 28.24rem;
	left: 50%;
	width: min(49.9375rem, 92%);
	transform: translateX(-50%);
	transition: transform 0.3s ease-out;
}

.hb-trial__screen img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 799 / 473;
}

.hb-trial:hover .hb-trial__screen,
.hb-trial:focus-within .hb-trial__screen {
	transform: translate(-50%, -3.9375rem);
}

/* Yellow reassurance band. */
.hb-trial__band.hb-trial__band {
	position: absolute;
	z-index: 3;
	right: 0;
	bottom: 0;
	left: 0;
	--hb-marquee-gap: var(--wp--preset--spacing--50);
	--hb-marquee-speed: 50;
	display: flex;
	align-items: center;
	min-height: 3.5rem;
	padding: 0.6875rem 0 0.75rem 0.75rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.hb-trial__band .hb-marquee__item {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.25;
	white-space: nowrap;
}

.hb-trial__band .hb-marquee__item::before {
	content: "";
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	background-color: currentColor;
	-webkit-mask: var(--hb-icon) center / contain no-repeat;
	mask: var(--hb-icon) center / contain no-repeat;
}

.has-icon--no-credit-card-line { --hb-icon: url("../../icons/no-credit-card-line.svg"); }
.has-icon--hearts-line { --hb-icon: url("../../icons/hearts-line.svg"); }
.has-icon--chat-ai-line { --hb-icon: url("../../icons/chat-ai-line.svg"); }
.has-icon--repeat-line { --hb-icon: url("../../icons/repeat-line.svg"); }

/* Phones: the text flows, the screenshot peeks out above the band. */
@media (max-width: 781.98px) {
	.hb-trial.hb-trial {
		display: flex;
		flex-direction: column;
		align-items: center;
		height: auto;
		padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50) 0;
	}

	.hb-trial__text.hb-trial__text {
		position: static;
		width: 100%;
		transform: none;
	}

	.hb-trial__actions.hb-trial__actions {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.hb-trial__actions .wp-block-button__link {
		width: 100%;
	}

	.hb-trial__screen.hb-trial__screen,
	.hb-trial:hover .hb-trial__screen,
	.hb-trial:focus-within .hb-trial__screen {
		position: relative;
		top: auto;
		left: auto;
		flex: none;
		width: 115%;
		height: 12.5rem;
		margin-top: var(--wp--preset--spacing--70);
		overflow: hidden;
		transform: none;
	}
}

/* Light variant (Figma push-trial type=light 10597:98182): text on the left,
 * the screenshot bleeding out of the bottom on the right. */
.hb-trial--light.hb-trial--light {
	height: 26rem;
	background-image: none;
	box-shadow: var(--hb-shadow-drop);
}

.hb-trial--light .hb-trial__text.hb-trial__text {
	top: 50%;
	left: 4rem;
	align-items: flex-start;
	width: 21.0625rem;
	text-align: left;
	transform: translateY(-50%);
}

.hb-trial--light .hb-trial__title.hb-trial__title {
	letter-spacing: -0.042em;
	line-height: 1;
}

/* Figma screen 10597:98171: 787 × 466, 2px ink border, 10px corners,
 * starting 80px left of the centre and cropped by the card. */
.hb-trial--light .hb-trial__screen.hb-trial__screen,
.hb-trial--light:hover .hb-trial__screen,
.hb-trial--light:focus-within .hb-trial__screen {
	top: 4rem;
	right: auto;
	left: calc(50% - 5rem);
	box-sizing: border-box;
	width: 49.1875rem;
	height: 29.125rem;
	overflow: hidden;
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 10px;
	transform: none;
}

.hb-trial--light .hb-trial__screen img {
	position: absolute;
	top: -1.4%;
	left: -0.5%;
	width: 101.31%;
	max-width: none;
	height: 102.68%;
	aspect-ratio: auto;
	object-fit: cover;
}

@media (max-width: 1023.98px) {
	.hb-trial--light .hb-trial__screen.hb-trial__screen,
	.hb-trial--light:hover .hb-trial__screen,
	.hb-trial--light:focus-within .hb-trial__screen {
		right: -6rem;
		left: auto;
		width: 60%;
		height: auto;
		aspect-ratio: 787 / 466;
	}
}

@media (max-width: 781.98px) {
	.hb-trial--light.hb-trial--light {
		height: auto;
	}

	.hb-trial--light .hb-trial__text.hb-trial__text {
		position: static;
		align-items: stretch;
		width: 100%;
		transform: none;
	}

	.hb-trial--light .hb-trial__screen.hb-trial__screen,
	.hb-trial--light:hover .hb-trial__screen,
	.hb-trial--light:focus-within .hb-trial__screen {
		position: relative;
		top: auto;
		right: auto;
		left: auto;
		width: 115%;
		height: 12.5rem;
		margin-top: var(--wp--preset--spacing--70);
		overflow: hidden;
		aspect-ratio: auto;
	}
}
