/* The home page hero: the welcome card and, beside it, the advertisement
   slider ("Home hero with slider" in the design canvas). The colours are
   the design's, which are the panel's palette; the public site has no
   tokens for them, so they are set here on the hero. The slider's slides
   are made in the panel (Home slider); its script is js/home-slider.js. */

.rl-hero {
	--rl-ground: #121315;
	--rl-card: #1A1B1E;
	--rl-media: #222327;
	--rl-line: #2A2C30;
	--rl-line-strong: #6B6E75;
	--rl-text: #F3F3F1;
	--rl-soft: #C7C9CD;
	--rl-dim: #A2A5AB;
	--rl-blue: #3B5FEF;
	--rl-link: #7D98FF;
	--rl-gold: #ECB73C;
	position: relative;
	overflow: hidden;
	background-color: var(--rl-ground);
	border-bottom: 1px solid #24262A;
	color: var(--rl-text);
}

.rl-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 80%;
	display: block;
}

.rl-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(18, 19, 21, .92) 0%, rgba(18, 19, 21, .72) 45%, rgba(18, 19, 21, .45) 100%);
}

/* As wide as the listing cards below it. */
.rl-hero-inner,
.rl-hero-strip-inner {
	box-sizing: border-box;
	width: calc(100% - 48px);
	max-width: 1300px;
	margin: 0 auto;
}

@media (min-width: 1601px) {
	.rl-hero-inner,
	.rl-hero-strip-inner {
		max-width: 1485px;
	}
}

.rl-hero-inner {
	position: relative;
	/* The site header (72px) floats over the top of the hero photo. */
	padding: calc(72px + 64px) 0 72px;
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: stretch;
}

.rl-hero-card {
	flex: 1 1 520px;
	min-width: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 28px;
	padding: 44px 44px 40px;
	background-color: rgba(18, 19, 21, .82);
	border: 1px solid var(--rl-line);
	border-top: 2px solid var(--rl-blue);
	border-radius: 2px;
}

/* No live slides: the card alone, at a width that still reads well. */
.rl-hero-inner--solo .rl-hero-card {
	flex: 0 1 760px;
}

.rl-hero-title {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	font-size: 58px;
	line-height: 1.04;
	font-weight: 600;
	letter-spacing: -0.02em;
	text-transform: none;
	color: var(--rl-text);
}

.rl-hero-eyebrow {
	font-size: 14px;
	line-height: 1.4;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--rl-gold);
}

.rl-hero-lead {
	margin: 0;
	max-width: 46ch;
	font-size: 18px;
	line-height: 1.55;
	color: var(--rl-soft);
}

.rl-hero-lead a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--rl-line-strong);
	text-underline-offset: 3px;
}

.rl-hero-lead a:hover {
	color: var(--rl-gold);
}

.rl-hero-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.rl-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 28px;
	box-sizing: border-box;
	border: 1px solid var(--rl-blue);
	border-radius: 2px;
	background-color: var(--rl-blue);
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.rl-hero-btn--primary:hover {
	background-color: #2F50D8;
	border-color: #2F50D8;
}

.rl-hero-btn--secondary {
	background-color: transparent;
	border-color: var(--rl-line-strong);
	color: var(--rl-text);
}

.rl-hero-btn--secondary:hover {
	border-color: var(--rl-text);
}

.rl-hero-trust {
	list-style: none;
	margin: 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--rl-line);
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	font-size: 14px;
	color: var(--rl-soft);
}

.rl-hero-trust li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.rl-hero-trust svg,
.rl-slider-arrow svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

.rl-hero-trust svg {
	stroke: var(--rl-gold);
}

/* ---------------------------------------------------------------- slider */

.rl-slider {
	--rl-slide-seconds: 6s;
	position: relative;
	flex: 1 1 460px;
	max-width: 580px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background-color: var(--rl-card);
	border: 1px solid var(--rl-line);
	border-radius: 2px;
	overflow: hidden;
}

/* Every slide in the one cell, so the card is as tall as the tallest
   slide and nothing on the page moves when they change. */
.rl-slider-stage {
	display: grid;
	flex: 1;
}

.rl-slide {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	visibility: hidden;
	opacity: 0;
}

.rl-slide.is-current {
	visibility: visible;
	opacity: 1;
	animation: rl-slide-in .45s ease both;
}

@keyframes rl-slide-in {
	from { opacity: 0; transform: translateX(14px); }
	to { opacity: 1; transform: none; }
}

.rl-slide-media {
	position: relative;
	height: 290px;
	flex: none;
	background-color: var(--rl-media);
}

.rl-slide-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rl-slide-tag {
	position: absolute;
	left: 16px;
	bottom: 16px;
	padding: 4px 10px;
	border-radius: 2px;
	background-color: rgba(13, 14, 15, .85);
	color: var(--rl-text);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.rl-slide-body {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 26px 28px 8px;
	min-height: 196px;
}

.rl-slide-title {
	margin: 0;
	font-size: 28px;
	line-height: 1.15;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-transform: none;
	text-wrap: balance;
	color: var(--rl-text);
}

.rl-slide-text {
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
	color: var(--rl-soft);
}

.rl-slide-price {
	font-size: 26px;
	line-height: 1;
	font-weight: 600;
	color: var(--rl-gold);
	font-variant-numeric: tabular-nums;
}

/* The button is on the bottom row, left of the counter and arrows that
   every slide shares. */
.rl-slide-cta {
	margin: auto 0 24px 28px;
	align-self: flex-start;
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	max-width: calc(100% - 232px);
	padding-top: 16px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	color: var(--rl-link);
}

.rl-slide-cta:hover {
	color: var(--rl-gold);
}

.rl-slider--single .rl-slide-cta {
	max-width: calc(100% - 56px);
}

/* The bar across the top of the photo, one segment a slide. Each is a
   button with a tall hit area around its thin line. */
.rl-slider-segs {
	position: absolute;
	left: 16px;
	right: 16px;
	top: 4px;
	display: flex;
	gap: 6px;
}

.rl-seg {
	flex: 1;
	position: relative;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.rl-seg::before,
.rl-seg i {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	height: 3px;
	border-radius: 2px;
}

.rl-seg::before {
	right: 0;
	background-color: rgba(255, 255, 255, .28);
}

.rl-seg i {
	display: block;
	width: 0;
	background-color: #FFFFFF;
}

.rl-seg.is-done i {
	width: 100%;
}

.rl-seg.is-current i {
	animation: rl-seg-fill var(--rl-slide-seconds) linear forwards;
}

.rl-slider.is-held .rl-seg.is-current i {
	animation-play-state: paused;
}

.rl-slider.is-still .rl-seg.is-current i {
	animation: none;
	width: 100%;
}

@keyframes rl-seg-fill {
	from { width: 0; }
	to { width: 100%; }
}

.rl-seg:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 0;
}

.rl-slider-controls {
	position: absolute;
	right: 28px;
	bottom: 24px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.rl-slider-count {
	margin-right: 4px;
	font-size: 13px;
	color: var(--rl-dim);
	font-variant-numeric: tabular-nums;
}

.rl-slider-arrow {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: 1px solid var(--rl-line-strong);
	border-radius: 2px;
	color: var(--rl-text);
	cursor: pointer;
}

.rl-slider-arrow:hover {
	border-color: var(--rl-dim);
}

@media (prefers-reduced-motion: reduce) {
	.rl-slide.is-current {
		animation: none;
	}
}

/* ------------------------------------------------- the strip under it */

.rl-hero-strip {
	background-color: #16171A;
	color: #F3F3F1;
}

.rl-hero-strip-inner {
	padding: 28px 0;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	flex-wrap: wrap;
}

.rl-hero-strip h2 {
	margin: 0;
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-transform: none;
}

.rl-hero-strip a {
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	color: #7D98FF;
}

.rl-hero-strip a:hover {
	color: #ECB73C;
}

/* --------------------------------------------------------------- smaller */

/* Once the two no longer fit side by side the slider takes the full row. */
@media (max-width: 1100px) {
	.rl-slider {
		max-width: none;
	}
}

@media (max-width: 800px) {
	.rl-hero-inner,
	.rl-hero-strip-inner {
		width: calc(100% - 32px);
		max-width: 600px;
	}

	.rl-hero-inner {
		padding: calc(72px + 32px) 0 40px;
		gap: 20px;
	}
}

@media (max-width: 720px) {
	.rl-hero-title {
		font-size: 40px;
	}

	.rl-hero-card {
		padding: 28px 24px;
		gap: 24px;
	}

	.rl-hero-lead {
		font-size: 17px;
	}

	.rl-slide-media {
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.rl-slide-body {
		padding: 22px 24px 8px;
		min-height: 0;
	}

	.rl-slide-title {
		font-size: 24px;
	}

	.rl-slide-cta {
		margin-left: 24px;
		max-width: calc(100% - 150px);
	}

	.rl-slider--single .rl-slide-cta {
		max-width: calc(100% - 48px);
	}

	.rl-slider-controls {
		right: 24px;
	}

	/* No room for the counter beside the button on a phone; the bar
	   across the photo already shows where you are. */
	.rl-slider-count {
		display: none;
	}

	.rl-hero-strip h2 {
		font-size: 22px;
	}
}

@media (max-width: 400px) {
	.rl-hero-actions .rl-hero-btn {
		flex: 1 1 100%;
	}
}
