/**
 * Cover: the photo call with the text on the photo. A dark gradient from the bottom keeps the text
 * readable on any photo; the text uses light colours whatever the colour scheme.
 *
 * @package DeWittePrins\Theme
 * @since   0.1.0
 */

.wp-block-cover.photo-cta-overlay {
	margin-block: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--40);
	color: var(--wp--custom--color--on-plane);
}

.wp-block-cover.photo-cta-overlay :is(h2, h3, .is-kicker) {
	color: var(--wp--custom--color--on-plane);
}

@media (max-width: 47.99rem) {

	.has-global-padding > .wp-block-cover.photo-cta-overlay.alignwide {
		/* The constrained layout sets auto side margins with !important; only !important can override it here. */
		margin-inline: calc(var(--wp--style--root--padding-left) * -1) calc(var(--wp--style--root--padding-right) * -1) !important;
		max-width: none;
	}
}

@media (min-width: 48rem) {

	.wp-block-cover.photo-cta-overlay {
		padding: var(--wp--preset--spacing--60);
		border-radius: var(--wp--preset--border-radius--large);
		overflow: hidden;
	}
}

/*
 * Start page cover: the photo with a gradient from the side, the title, one line and a pale green
 * button. On wide screens it leaves room at the bottom for the three ways, which lie half over it.
 * On a phone the gradient comes from below and the text sits at the bottom.
 */
.wp-block-cover.home-cover {
	margin-block-start: 0;
	padding-inline: var(--wp--preset--spacing--40);
	color: var(--wp--custom--color--on-plane);
}

/* Core pins a positioned cover's content to auto width; the doubled class wins that back. */
.wp-block-cover.home-cover.home-cover.has-custom-content-position > .wp-block-cover__inner-container {
	inline-size: 100%;
	max-inline-size: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

.home-cover .home-cover__text {
	max-inline-size: 32.5rem;
}

.home-cover .home-cover__text > * {
	margin: 0;
}

.home-cover .home-cover__text > h1 {
	color: var(--wp--custom--color--on-plane);
	font-size: clamp(2.25rem, 1.25rem + 3.25vw, 3.625rem);
	font-weight: 600;
	line-height: 1.1;
}

.home-cover .home-cover__lead {
	margin-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.home-cover .wp-block-button .wp-block-button__link {
	border-color: var(--wp--preset--color--plane-button);
	background: var(--wp--preset--color--plane-button);
	color: var(--wp--custom--color--on-plane-button);
}

.home-cover .wp-block-button .wp-block-button__link:is(:hover, :focus) {
	border-color: var(--wp--custom--color--on-plane);
	background: var(--wp--custom--color--on-plane);
	color: var(--wp--preset--color--plane);
}

@media (max-width: 47.99rem) {

	.wp-block-cover.home-cover {
		align-items: flex-end;
		min-block-size: 35rem;
		padding-block-end: var(--wp--preset--spacing--60);
	}

	.home-cover > .wp-block-cover__background {
		/* The preset class sets the side gradient with !important; on a phone the plane comes from below. */
		background: var(--wp--preset--gradient--plane-below) !important;
	}
}

@media (min-width: 48rem) {

	.wp-block-cover.home-cover {
		padding-block-end: 6.875rem;
	}
}
