/*
 * Section: say hello (the "jl-hello" group).
 *
 * A quiet invitation to end a page that does not close on the green call to
 * action: under a hairline, a small label on the left and, on the right, a
 * heading, a short line, an arrow pill and an email link. The page then ends
 * on its own colour and the footer band eases in below it.
 *
 * Colours, fonts and edge spacing come from the theme. The fade-in only runs
 * once the script is running (html.jl-js).
 */

.jl-hello.jl-hello {
	--hl-pad: 48px;
	--hl-gap: 24px;
	--hl-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px var(--hl-gap);
	margin-block: 0;
	padding: 72px var(--hl-pad) 150px;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* The hairline above, inside the page edges. */
.jl-hello.jl-hello::before {
	content: "";
	position: absolute;
	top: 48px;
	right: var(--hl-pad);
	left: var(--hl-pad);
	height: 1px;
	background: var(--jl-line);
}

/* WordPress spaces out a Group's children; every part here sets its own spacing. */
.jl-hello.jl-hello > *,
.jl-hello .jl-hello__main > *,
.jl-hello .jl-hello__actions > * {
	margin-block: 0;
}

.jl-hello .jl-hello__main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 32px;
	min-width: 0;
}

.jl-hello .jl-hello__main h2 {
	font-size: clamp(2.5rem, 4.6vw, 4.25rem);
	letter-spacing: -0.03em;
	line-height: 1;
}

.jl-hello .jl-hello__lead {
	max-width: 400px;
	font-size: 1.1875rem;
	letter-spacing: -0.01em;
	line-height: 1.35;
}

.jl-hello .jl-hello__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 32px;
}

.jl-hello .jl-hello__actions .jl-arrow {
	font-size: 1rem;
	line-height: 1.4;
}

/* ---------- Motion (front only, once the script is running) ---------- */

.jl-js .jl-hello > .jl-tag,
.jl-js .jl-hello .jl-hello__main {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.9s var(--hl-ease) var(--d, 0ms), transform 0.9s var(--hl-ease) var(--d, 0ms);
}

.jl-js .jl-hello.is-in > .jl-tag,
.jl-js .jl-hello.is-in .jl-hello__main {
	opacity: 1;
	transform: none;
}

.jl-js .jl-hello .jl-hello__main {
	--d: 100ms;
}

/* ---------- Tablet: the label above the rest ---------- */
@media (max-width: 1099px) {
	.jl-hello.jl-hello {
		--hl-pad: 40px;
		--hl-gap: 20px;
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 699px) {
	.jl-hello.jl-hello {
		--hl-pad: 24px;
		--hl-gap: 12px;
		gap: 20px;
		padding-bottom: 88px;
	}
}

/* Set by the script if it could not prepare the section: everything shows at rest. */
.jl-hello.is-plain > * {
	opacity: 1 !important;
	transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.jl-js .jl-hello > .jl-tag,
	.jl-js .jl-hello .jl-hello__main {
		opacity: 1;
		transform: none;
		transition: none !important;
	}
}
