/*
 * Shared by every SYNLawn Elementor block (registered as "synlawn-common"; each block's
 * stylesheet depends on it): font faces and the .sl-btn call-to-action button.
 *
 * Fonts use private family names. Elementor's custom font "Mostin" maps weight 700 to the
 * Medium file, and whichever @font-face loads last wins, so a shared name can't guarantee Bold.
 */

@font-face {
	font-family: "SL Mostin";
	src: url("/wp-content/uploads/2022/06/mostinbold-ov5oo-webfont.woff2") format("woff2"), url("/wp-content/uploads/2022/06/mostinbold-ov5oo-webfont.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SL Segoe UI";
	src: url("/wp-content/uploads/2022/06/SegoeUI.woff2") format("woff2"), url("/wp-content/uploads/2022/06/SegoeUI.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "SL Segoe UI";
	src: url("/wp-content/uploads/2022/06/SegoeUI-Bold.woff2") format("woff2"), url("/wp-content/uploads/2022/06/SegoeUI-Bold.woff") format("woff");
	font-weight: 600 700;
	font-style: normal;
	font-display: swap;
}

/*
 * Call-to-action button: the landing page's .lp-btn. Colors come from tokens a block can set on
 * its root (inherited) and the Style tab sets on the button itself:
 * --sl-btn-color, --sl-btn-hover-color, --sl-btn-hover-border.
 *
 * The fills live on two layers behind the label: ::before holds the Normal fill and ::after the
 * Hover fill, and hovering crossfades them. A gradient can't be interpolated, so transitioning
 * the background itself snaps mid-hover; opacity always animates. The doubled class outranks the
 * Elementor kit's link colors.
 */

.sl-btn.sl-btn {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.5625rem;
	padding: 1.125rem clamp(1rem, 0.4363rem + 2.292vw, 2.5rem);
	border: 2px solid transparent;
	border-radius: 6.25rem;
	background: transparent;
	color: var(--sl-btn-color, #fff);
	font-family: "SL Segoe UI", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.45em;
	letter-spacing: 2px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	filter: drop-shadow(0 4px 2px rgba(147, 209, 112, 0.05));
	transition: border-color 400ms cubic-bezier(0.22, 1, 0.36, 1), color 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sl-btn.sl-btn:is(:hover, :focus-visible) {
	border-color: var(--sl-btn-hover-border, #78be20);
	color: var(--sl-btn-hover-color, var(--sl-btn-color, #fff));
	text-decoration: none;
}

.sl-btn.sl-btn:focus-visible {
	outline: 3px solid #78be20;
	outline-offset: 3px;
}

.sl-btn.sl-btn::before,
.sl-btn.sl-btn::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	pointer-events: none;
	transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sl-btn.sl-btn::after,
.sl-btn.sl-btn:is(:hover, :focus-visible)::before {
	opacity: 0;
}

.sl-btn.sl-btn:is(:hover, :focus-visible)::after {
	opacity: 1;
}

/*
 * Default fill. A Normal background chosen in the Style tab replaces it: a gradient outranks this
 * rule directly, and a solid color (which only sets background-color) clears the image via the
 * widget's sl-cta-bg-classic class. Keyed on that class, not :not(), because a :not() on an
 * ancestor would also match the widget's parent container.
 */
.sl-btn.sl-btn::before {
	background-image: linear-gradient(90deg, #78be20 0%, #539008 100%);
}

.sl-cta-bg-classic .sl-btn.sl-btn::before {
	background-image: none;
}

@media (prefers-reduced-motion: reduce) {
	.sl-btn.sl-btn,
	.sl-btn.sl-btn::before,
	.sl-btn.sl-btn::after {
		transition-duration: 1ms;
	}
}
