/*
 * Homepage "Your Wedding at Jersey's Only Vineyard" feature.
 *
 * Applies to a large_feature row whose heading carries class "lm-card-heading"
 * (see template-parts/common/flexible_content.php). Loaded on the front page only.
 *
 * Proportions measured from "La Mare Wedding Website - Homepage update.pdf" (1604px wide artboard:
 *   photo 1059 wide, card 713 x 644, card 64px down, overlapping the photo by 168px), scaled to the
 *   same 1170px column as the other homepage features.
 * Below 992px the card sits under the photo, overlapping its bottom edge.
 */

.large-feature.large-feature--card {
	--u: calc(min(100vw, 1920px) / 1920);
	--lm-ink: #23231f;
	--lm-gold: #bbac8a;
	--lm-cream: #f8f8f5;
	--lm-serif: "Fraunces", Georgia, serif;
	--lm-sans: "Montserrat", Arial, sans-serif;
	overflow-x: clip;
}

.large-feature.large-feature--card .overflow-container {
	width: auto;
	max-width: none;
	padding: 20px 0 0;
	background: none;
}

.large-feature.large-feature--card .layout {
	display: block;
	box-shadow: none;
}

.large-feature.large-feature--card .layout .image {
	width: 100%;
	margin: 0;
}

.large-feature.large-feature--card .layout .image a {
	display: block;
}

.large-feature.large-feature--card .layout .image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1059 / 755;
	object-fit: cover;
}

.large-feature.large-feature--card .layout .content {
	display: block;
	width: calc(100% - 32px);
	margin: -48px 16px 0 auto;
	position: relative;
	z-index: 1;
}

.large-feature.large-feature--card .layout .content .content-inner {
	min-height: 0;
	padding: 40px 28px 44px;
	background: var(--lm-cream);
	color: var(--lm-ink);
	text-align: left;
	font-family: var(--lm-sans);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy p {
	margin: 0 0 1.5em;
	font-family: var(--lm-sans);
	font-size: 1em;
	font-weight: 500;
	line-height: inherit;
	color: var(--lm-ink);
}

.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy p:last-child {
	margin-bottom: 0;
}

.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy a:not(.lm-card-button) {
	color: inherit;
	text-decoration: underline;
}

.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy h3.lm-card-heading {
	margin: 0 0 0.4em;
	padding: 0;
	font-family: var(--lm-serif);
	font-style: italic;
	font-weight: 300;
	font-variation-settings: "opsz" 72;
	font-size: clamp(30px, 8vw, 40px);
	line-height: 1.15;
	letter-spacing: 0;
	text-transform: none;
	color: var(--lm-ink);
}

.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy a.lm-card-button {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 190px;
	width: max-content;
	margin: 0;
	padding: 13px 36px;
	border: 1px solid var(--lm-gold);
	border-radius: 10px;
	background: var(--lm-gold);
	color: var(--lm-ink);
	font: 500 14px/1.3 var(--lm-sans);
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}

.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy a.lm-card-button:hover,
.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy a.lm-card-button:focus-visible {
	border-color: var(--lm-ink);
	background: var(--lm-ink);
	color: #fff;
}

/* the button's own paragraph shouldn't add a gap under it */
.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy p:has(> a.lm-card-button) {
	margin-bottom: 0;
	padding-top: 0.6em;
}

@media (min-width: 992px) {
	/* Same 1170px column as the sections above and below, centred.
	   Proportions are those of the design (photo 1059, card 713, overlap 168, drop 64 of 1604). */
	.large-feature.large-feature--card .overflow-container {
		width: min(1170px, calc(100% - 60px));
		max-width: none;
		margin-left: auto;
		margin-right: auto;
	}

	.large-feature.large-feature--card .layout {
		display: flex;
		align-items: flex-start;
	}

	.large-feature.large-feature--card .layout .image {
		order: 1;
		flex: none;
		width: calc(1059 / 1604 * 100%);
		margin: 0;
	}

	.large-feature.large-feature--card .layout .content {
		order: 2;
		flex: none;
		width: calc(713 / 1604 * 100%);
		margin: calc(64 / 1604 * 100%) 0 0 calc(-168 / 1604 * 100%);
	}

	.large-feature.large-feature--card .layout .content .content-inner {
		box-sizing: border-box;
		min-height: 0;
		aspect-ratio: 713 / 644;
		padding: 9.2% 11.6% 8%;
		font-size: 15px;
	}

	.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy h3.lm-card-heading {
		font-size: clamp(26px, 3vw, 35px);
		line-height: 1.25;
		margin-bottom: 15px;
	}

	.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy p:has(> a.lm-card-button) {
		padding-top: 12px;
	}
}

/* Same type sizes as the wedding pages: 15px body (14px under 768px), 14px buttons. */
@media (min-width: 768px) {
	.large-feature.large-feature--card .layout .content .content-inner {
		font-size: 15px;
	}
}

@media (max-width: 479px) {
	.large-feature.large-feature--card .layout .content .content-inner .lm-card-copy a.lm-card-button {
		width: 100%;
		max-width: 300px;
	}
}

/*
 * Homepage body copy
 *
 * Every block on the homepage (template-pages/page-home.php wraps them in .home-blocks, so new
 * blocks are included automatically) uses the same body copy as the wedding pages and the wedding
 * feature above: Montserrat 500, 15px / 1.5 (14px under 768px), ink #23231f.
 * The :not(#lm) is only there to out-rank the older per-block rules in style.css. Display text
 * (.super-large-text, .large-text) and third-party widgets are left alone.
 */
.start-page-content.home .home-blocks :is(p, li):not(#lm):not(.ti-widget *):not(.super-large-text *):not(.large-text *) {
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0;
	color: #23231f;
}

@media (min-width: 768px) {
	.start-page-content.home .home-blocks :is(p, li):not(#lm):not(.ti-widget *):not(.super-large-text *):not(.large-text *) {
		font-size: 15px;
	}
}

/* copy that sits on a photo stays white */
.start-page-content.home .home-blocks .overlay :is(p, li):not(#lm) {
	color: #fff;
}

/* Same space above the photo as the other large features (their 30px padding + 60/70px image offset),
   so the gap to the section above matches the gap to the section below. */
@media (min-width: 768px) {
	.large-feature.large-feature--card .overflow-container {
		padding-top: 90px;
	}
}

@media (min-width: 840px) {
	.large-feature.large-feature--card .overflow-container {
		padding-top: 100px;
	}
}
