/*
 * SYNLawn Hero (Elementor widget).
 *
 * A standalone copy of the Utah landing page hero. Nothing here depends on landing-utah.css.
 * Every default is a --sl-hero-* token on .sl-hero; data-theme="light" swaps the token set.
 * The widget's Style controls either set these tokens or target elements directly, and they
 * always win over the defaults below.
 *
 * Fonts ("SL Mostin", "SL Segoe UI") and the copy's .sl-btn button come from common.css.
 *
 * No breakpoints of its own. Sizes, padding and gaps are fluid clamp() values that interpolate the
 * Figma mobile (393) and desktop (1440) frames. Where the layout must switch (side by side vs
 * stacked, one form field per row), the widget's responsive controls set tokens per Elementor
 * device, so Elementor writes those media queries from the kit's breakpoints. The fallbacks
 * below are the stacked layout.
 */

@property --sl-hero-ring-angle {
	syntax: "<angle>";
	inherits: false;
	initial-value: 0deg;
}

/* Tokens */

.sl-hero {
	--sl-hero-green: #78be20;
	--sl-hero-green-dark: #539008;
	--sl-hero-deep-green: #2c5234;
	--sl-hero-soft-black: #2e2e30;

	--sl-hero-font-display: "SL Mostin", "Mostin", "Bebas Neue", "Arial Narrow", sans-serif;
	--sl-hero-font-body: "SL Segoe UI", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

	--sl-hero-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--sl-hero-dur: 400ms;

	/* Section */
	--sl-hero-bg: transparent;
	--sl-hero-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%), rgba(0, 0, 0, 0.75);
	--sl-hero-content: 76.75rem;
	/* Stacked layout uses the row gap, side by side the column gap. */
	--sl-hero-row-gap: 3.75rem;
	--sl-hero-col-gap: clamp(2.5rem, 5.6vw, 5rem);
	--sl-hero-row: row;

	/* Copy */
	--sl-hero-text: #fff;
	--sl-hero-heading-color: var(--sl-hero-text);
	--sl-hero-em-color: var(--sl-hero-green);
	--sl-hero-sub-color: var(--sl-hero-text);
	--sl-hero-body-color: var(--sl-hero-text);
	--sl-hero-copy-shadow: 0 2px 2.05rem rgba(0, 0, 0, 0.1);
	--sl-hero-logo-gap: clamp(1.625rem, 1.367rem + 1.05vw, 2.3125rem);
	--sl-hero-title-gap: 2.25rem;
	--sl-hero-sub-gap: 2.25rem;
	--sl-hero-body-gap: 2.25rem;

	/* Callout */
	--sl-hero-callout-bg: rgba(0, 0, 0, 0.4);
	--sl-hero-callout-color: var(--sl-hero-text);
	--sl-hero-ring-a: var(--sl-hero-green);
	--sl-hero-ring-b: var(--sl-hero-deep-green);
	--sl-hero-ring-width: 3px;
	--sl-hero-ring-play: running;

	/* Form card (styled by common/assets/css/form.css; only its width is the hero's) */
	--sl-hero-card-width: clamp(27.5rem, 37vw, 33.375rem);
}

/*
 * Light: from edits/Hero.png. White section with dark copy; the form card keeps its dark styling.
 * Body text and the callout aren't in that design, so their light values are extrapolated.
 */
.sl-hero[data-theme="light"] {
	--sl-hero-bg: #fff;
	--sl-btn-hover-color: var(--sl-hero-deep-green);
	--sl-hero-overlay: none;
	--sl-hero-text: #000;
	--sl-hero-body-color: var(--sl-hero-soft-black);
	/* A translucent white panel vanishes on a white section; light grey keeps the callout a box. */
	--sl-hero-callout-bg: #f5f5f5;
	--sl-hero-copy-shadow: none;
	--sl-hero-title-gap: 0.75rem;
}

/* Base */

.sl-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(3.75rem, 2.7175rem + 4.202vw, 6.5rem) clamp(0.75rem, -1.455rem + 8.978vw, 6.625rem) clamp(3.75rem, 3.2806rem + 1.91vw, 5rem);
	background-color: var(--sl-hero-bg);
	color: var(--sl-hero-text);
	font-family: var(--sl-hero-font-body);
	isolation: isolate;
	overflow-x: clip;
}

.sl-hero *,
.sl-hero *::before,
.sl-hero *::after {
	box-sizing: border-box;
}

.sl-hero :where(h1, h2, h3, h4, h5, h6, p, div) {
	margin: 0;
}

.sl-hero img {
	max-width: 100%;
	display: block;
}

.sl-hero :where(button, a, input, select, textarea):focus-visible {
	outline: 3px solid var(--sl-hero-green);
	outline-offset: 3px;
}

/* Background media */

.sl-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	border-radius: inherit;
}

.sl-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* The default overlay steps aside once an overlay is chosen in the Style tab. */
.elementor-widget-synlawn-hero:not(.sl-hero-overlay-classic):not(.sl-hero-overlay-gradient) .sl-hero__bg::after {
	background: var(--sl-hero-overlay);
}

/* Scoped under .sl-hero to outrank Elementor's `.elementor img { height: auto }`. */
.sl-hero .sl-hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* Fades in over the cover image once frames are playing. */
.sl-hero__video {
	opacity: 0;
	transition: opacity 800ms var(--sl-hero-ease);
}

.sl-hero__video.is-playing {
	opacity: 1;
}

/* Layout */

/*
 * Content › Layout › Layout (responsive, Side by side on Desktop and Stacked below by default)
 * sets --sl-hero-direction and the flex tokens per Elementor device.
 */
.sl-hero__inner {
	display: flex;
	flex-direction: var(--sl-hero-direction, column);
	align-items: var(--sl-hero-align, stretch);
	row-gap: var(--sl-hero-row-gap);
	column-gap: var(--sl-hero-col-gap);
	width: 100%;
	max-width: var(--sl-hero-content);
	margin-inline: auto;
}

.sl-hero--form-left {
	--sl-hero-row: row-reverse;
}

.sl-hero__copy {
	display: flex;
	flex: var(--sl-hero-copy-flex, 0 1 auto);
	flex-direction: column;
	min-width: 0;
}

.sl-hero__copy > * {
	margin: 0 0 var(--sl-hero-body-gap);
}

.sl-hero .sl-hero__copy > :last-child {
	margin-bottom: 0;
}

/* Copy */

.sl-hero__logo {
	align-self: flex-start;
	margin-bottom: var(--sl-hero-logo-gap);
}

.sl-hero__logo img {
	width: auto;
	height: clamp(3.4375rem, 2.9681rem + 1.91vw, 4.6875rem);
}

.sl-hero .sl-hero__title {
	margin-bottom: var(--sl-hero-title-gap);
	color: var(--sl-hero-heading-color);
	font-family: var(--sl-hero-font-display);
	/* 2.75rem on phones keeps a typical heading to three lines (it was 3.75rem, five lines at 393px). */
	font-size: clamp(2.75rem, 2.0932rem + 2.674vw, 4.5rem);
	font-weight: 700;
	line-height: 1.25em;
	letter-spacing: 0;
	text-transform: uppercase;
}

/* [h]…[/h] in the heading text; "Highlight on Its Own Line" puts it on its own line. */
.sl-hero__title--em-block .sl-hero__em {
	display: block;
}

.sl-hero .sl-hero__em {
	color: var(--sl-hero-em-color);
}

.sl-hero__sub {
	margin-bottom: var(--sl-hero-sub-gap);
	color: var(--sl-hero-sub-color);
	font-size: clamp(1.125rem, 1.0781rem + 0.191vw, 1.25rem);
	font-weight: 700;
	line-height: 1.55em;
	text-shadow: var(--sl-hero-copy-shadow);
}

.sl-hero__body {
	color: var(--sl-hero-body-color);
	font-size: clamp(0.9375rem, 0.9137rem + 0.096vw, 1rem);
	line-height: 1.55em;
	text-shadow: var(--sl-hero-copy-shadow);
}

.sl-hero__body p + p {
	margin-top: 0.75rem;
}

.sl-hero__body a {
	color: inherit;
	text-decoration: underline;
}

/* Copy button (.sl-btn, styled in common.css): sits left in the copy column. */

.sl-hero .sl-hero__copy .sl-btn {
	align-self: flex-start;
}

/* Financing callout: frosted glass with a border whose dark segment circles the box. */

.sl-hero__callout {
	position: relative;
	padding: 1.5rem 1.25rem;
	border-radius: 0.625rem;
	background-color: var(--sl-hero-callout-bg);
	-webkit-backdrop-filter: blur(0.625rem);
	backdrop-filter: blur(0.625rem);
	color: var(--sl-hero-callout-color);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.55em;
	text-align: center;
	text-shadow: var(--sl-hero-copy-shadow);
}

.sl-hero__callout::before {
	content: "";
	position: absolute;
	inset: 0;
	padding: var(--sl-hero-ring-width);
	border-radius: inherit;
	background: conic-gradient(from var(--sl-hero-ring-angle), var(--sl-hero-ring-a) 0turn, var(--sl-hero-ring-a) 0.5turn, var(--sl-hero-ring-b) 0.75turn, var(--sl-hero-ring-a) 1turn);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
	animation: sl-hero-ring 6s linear infinite;
	animation-play-state: var(--sl-hero-ring-play);
}

@keyframes sl-hero-ring {
	to {
		--sl-hero-ring-angle: 360deg;
	}
}

/*
 * Form card: the shared .sl-form-card (common/assets/css/form.css). The hero only sizes it: Content ›
 * Layout sets its flex and width per device.
 */

.sl-hero__card {
	flex: var(--sl-hero-card-flex, 0 1 auto);
	width: var(--sl-hero-card-w, 100%);
}

/* Entrance: copy rises in, form slides in from the right, on first paint. */

.sl-hero--animate .sl-hero__copy > *,
.sl-hero--animate .sl-hero__card {
	animation: sl-hero-rise 900ms var(--sl-hero-ease) both;
}

.sl-hero--animate .sl-hero__copy > :nth-child(2) {
	animation-delay: 100ms;
}

.sl-hero--animate .sl-hero__copy > :nth-child(3) {
	animation-delay: 200ms;
}

.sl-hero--animate .sl-hero__copy > :nth-child(4) {
	animation-delay: 300ms;
}

.sl-hero--animate .sl-hero__copy > :nth-child(5) {
	animation-delay: 400ms;
}

.sl-hero--animate .sl-hero__card {
	animation-name: sl-hero-slide-in;
	animation-delay: 250ms;
}

@keyframes sl-hero-rise {
	from {
		opacity: 0;
		transform: translateY(2.5rem);
	}
}

@keyframes sl-hero-slide-in {
	from {
		opacity: 0;
		transform: translateX(5rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sl-hero *,
	.sl-hero *::before,
	.sl-hero *::after {
		animation-duration: 1ms !important;
		animation-delay: 0ms !important;
		transition-duration: 1ms !important;
	}

	/* Looping effects stop outright; a 1ms infinite loop would flicker. */
	.sl-hero .sl-hero__callout::before {
		animation: none !important;
	}
}
