/**
 * Cosmic Lingua Hero
 *
 * Dimensions match the former Slider Revolution hero (grid 1140 × 680 px):
 * above 1140 px viewport width the pixel values apply; below, everything scales
 * proportionally (--u = 1px * width / 1140), with minimum sizes for small screens.
 */

.cl-hero {
	--u: min(1px, calc(100vw / 1140));
	position: relative;
	overflow: hidden;
	height: max(260px, calc(680 * var(--u)));
	background-color: #16263d;
	color: #fff;
	isolation: isolate;
}

/* Full viewport width, even when the shortcode sits inside a container */
.cl-hero--full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

html:has(.cl-hero--full) {
	overflow-x: clip; /* prevents a horizontal scrollbar caused by 100vw */
}

.cl-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center top;
}

/* Dot overlay on the image (1px dot every 3px, as in the slider) */
.cl-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAAG0lEQVR4AWJiYGD4D8RgBOIwgllAAsQBUhAEAAAA//9Zk0qgAAAABklEQVQDACO2AQdCSU3+AAAAAElFTkSuQmCC");
	background-repeat: repeat;
}

.cl-hero__title,
.cl-hero__subtitle {
	position: absolute;
	left: 50%;
	width: max-content;
	max-width: 92%;
	margin: 0;
	text-align: center;
	text-shadow: none;
	animation: cl-hero-in 0.9s ease-out both;
}

.cl-hero__title {
	top: calc(50% - 93 * var(--u));
	transform: translate(-50%, -50%);
	padding: 0;
	font-family: "Jura", sans-serif;
	font-size: max(30px, calc(90 * var(--u)));
	font-weight: 700;
	line-height: 0.9333; /* 84px at 90px */
	letter-spacing: normal;
	text-transform: none;
	color: #fff;
}

.cl-hero__subtitle {
	top: calc(50% + 86 * var(--u));
	transform: translate(-50%, -50%);
	padding: calc(18 * var(--u)) calc(40 * var(--u));
	font-family: "Roboto", sans-serif;
	font-size: max(12px, calc(22 * var(--u)));
	font-weight: 700;
	line-height: 1.3636; /* 30px at 22px */
	letter-spacing: max(1px, calc(3 * var(--u)));
	text-transform: uppercase;
	color: #79ccea;
	/* Gradient frame, as on the live site (formerly #sliderSubtitle in Additional CSS) */
	border: 3px solid transparent;
	border-image: linear-gradient(45deg, #14a5d3, #20baa0) 1;
	animation-delay: 0.2s;
}

/* Scroll button (mouse icon), as in the slider only from notebook width */
.cl-hero__scroll {
	display: none;
	position: absolute;
	left: 50%;
	bottom: 57px;
	z-index: 1;
	box-sizing: border-box;
	width: 35px;
	height: 55px;
	margin-left: -17.5px;
	border: 3px solid rgba(255, 255, 255, 0.75);
	border-radius: 23px;
	transition: border-color 0.2s ease;
}

.cl-hero__scroll:hover,
.cl-hero__scroll:focus-visible {
	border-color: #fff;
}

.cl-hero__scroll:focus-visible {
	outline: 2px solid #79ccea;
	outline-offset: 4px;
}

.cl-hero__scroll span {
	position: absolute;
	top: 9px;
	left: 50%;
	width: 5px;
	height: 5px;
	margin-left: -2.5px;
	border-radius: 50%;
	background-color: #fff;
	animation: cl-hero-scroll 1.6s ease-in-out infinite;
}

@media (min-width: 1024px) {
	.cl-hero__scroll {
		display: block;
	}
}

@keyframes cl-hero-in {
	from {
		opacity: 0;
		transform: translate(-50%, calc(-50% + 20px));
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

@keyframes cl-hero-scroll {
	0% {
		opacity: 0;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translateY(20px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cl-hero__title,
	.cl-hero__subtitle,
	.cl-hero__scroll span {
		animation: none;
	}
}
