/* ==========================================================================
   Landing pages: layout primitives for the data-driven sections
   (content + per-widget styles live in inc/landings/*.php)
   ========================================================================== */

.sec,
.box {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	box-sizing: border-box;
	position: relative;
	min-width: 0;
	max-width: 100%;
}

.sec--row { flex-direction: row; }
.sec--column { flex-direction: column; }
.sec--row-reverse { flex-direction: row-reverse; }
.sec--column-reverse { flex-direction: column-reverse; }

.sec.has-bg {
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.sec {
	width: 100%;
}

/* The product hero carries min-height:100vh from the ported data, which on a
   phone means a whole screen of photo before the copy starts (live's own band
   is ~80% of the viewport there). Let it hug its content on small screens, but
   keep the floating header's space: the bar is 60px and sits on top of the
   hero, so the copy needs a clear 100px + gap above it or the logo lands on the
   first line. */
@media (max-width: 767px) {
	.sec[style*="min-height:100vh"] {
		min-height: auto !important;
		padding-top: 120px !important;
	}
}

/* ---------- mobile ---------- */
/* Product photo cards keep the wide crop live shows on a phone. Without this the
   portrait sources (514x862) render at their natural ratio, so a single card is
   ~790px tall and the whole product block doubles in length. */
@media (max-width: 767px) {
	.box:has(> .photo-caption) > .w-img {
		aspect-ratio: 4 / 3;
		height: auto;
		object-fit: cover;
	}
}

/* ---------- widgets ---------- */
.w-h {
	width: 100%;
	min-width: 0;
	margin: 0;
	font-family: var(--font-head);
	font-size: 1.8rem;
	font-weight: 600;
	line-height: 1.3;
}

.w-txt {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	font-size: 1rem;
	line-height: 1.4;
}

.w-html {
	display: block;
	box-sizing: border-box;
	width: 100%;
}

/* per-widget overrides copied from the Elementor data (data-el targets) */
[data-el="67ae534"] {
	width: 747px;
	max-width: 100%;
}

/* contact page: the quote form is an 80% column of its 1210px band */
[data-el="8cc45b5"] {
	width: 100%;
}

[data-el="d209891"] {
	width: 80%;
	margin-left: auto;
	margin-right: auto;
}

.w-html > .wpforms-container,
.w-html > #wpforms-57,
.w-html > form {
	width: 100%;
	max-width: 100%;
}

.w-txt p {
	margin: 0 0 0.9rem;
}

/* a shortcode (form) sitting inside a box should take the full width; .w-sc is
   the display:contents wrapper a shortcode widget now renders into, so the
   selector has to reach through it as well */
.box > .wpforms-container,
.sec > .wpforms-container,
.w-sc > .wpforms-container,
.w-sc #wpforms-57,
.w-html > .wpforms-container,
.w-html #wpforms-57 {
	width: 100%;
	max-width: 100%;
}

.w-img {
	display: block;
	max-width: 100%;
	height: auto;
	/* an <img> is a flex item here; without this it stretches to the row height
	   and the picture distorts (Elementor had a wrapper div instead) */
	align-self: flex-start;
}

.w-icon {
	display: block;
	max-width: 100%;
	height: auto;
}

/* round badge wrapping a coop icon (be-a-dealer) */
.icon-bg {
	box-sizing: content-box;
	aspect-ratio: auto;
}

.icon-bg[style*="width"] {
	height: auto !important;
}

.w-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: auto;
	font-family: var(--font-head);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--white);
	background: var(--ink);
	padding: 0.66rem 2.5rem 0.66rem 1.1rem;
	transition: filter 0.2s ease;
}

.w-btn:hover {
	filter: brightness(0.9);
}

.w-counter {
	display: inline-flex;
	align-items: baseline;
	gap: 0;
	font-size: 1.8rem;
	font-weight: 700;
	min-width: 0;
	margin-right: 3rem;
}

.w-counter:last-child {
	margin-right: 0;
}

.w-box-counters {
	display: flex;
	gap: 4rem;
}

.w-counter__suffix {
	white-space: nowrap;
}

.w-counter__suffix span {
	font-family: var(--font-alt);
	font-size: 1.2rem;
	font-weight: 600;
	margin-left: 10px;
}

/* a shortcode widget (wpforms, product grid) carries the ported classes on a
   display:contents wrapper so layout stays exactly as if it were bare */
.w-sc {
	display: contents;
}

/* the inquiry form on the dark FAQ band mirrors live: transparent fields with a
   hairline white border. Live leaves the country <select> as a white box and the
   typed text dark; both are fixed here. */
.w-sc .wpforms-container input,
.w-sc .wpforms-container textarea {
	color: #fff !important;
}

.w-sc .wpforms-container select {
	background-color: transparent !important;
	border-color: #fff !important;
	color: #fff !important;
}

.w-sc .wpforms-container select option {
	color: #333;
}

.w-video {
	width: 100%;
}

.w-video iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

/* Elementor keeps the 55% column down to 600px, then the video goes full width */
@media (max-width: 600px) {
	.w-video {
		width: 100% !important;
	}
}

/* live measures: a 2.67px #EE6E00 rule on the widget box with 20px of padding,
   and the items themselves at 1.2rem/600 in #e5e5e5 */
.w-list {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	border-left: 2.67px solid #ee6e00;
	padding-left: 20px;
	font-size: 1.2rem;
	font-weight: 600;
}

/* ---------- FAQ accordion ---------- */
/* the FAQ band sits on a dark photo (12137f7), so the copy has to be light: live
   measures rgb(255,255,255) for the question, and the answer inherits it here
   too because live's own #333 is unreadable on that background */
.w-faq {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 20px;
	color: #fff;
}

.w-faq details {
	border: 1px solid #f5f5f5;
}

.w-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 10px;
	border: 1px solid #f5f5f5;
	cursor: pointer;
	list-style: none;
	font-size: 1rem;
	font-weight: 400;
	color: #fff;
}

.w-faq summary::-webkit-details-marker {
	display: none;
}

.w-faq summary::after {
	content: "";
	flex: none;
	width: 12px;
	height: 12px;
	border-right: 2px solid #ee6e00;
	border-bottom: 2px solid #ee6e00;
	transform: rotate(45deg);
	transition: transform 0.25s ease;
}

.w-faq details[open] summary::after {
	transform: rotate(-135deg);
}

.w-faq__a {
	padding: 20px;
	font-size: 1rem;
	line-height: 1.4;
}

.w-faq__a > :last-child {
	margin-bottom: 0;
}

/* ---------- tab group ---------- */
.w-tabs {
	width: 100%;
}

.w-tabs__nav {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 1.5rem;
}

.w-tabs__nav button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	box-sizing: border-box;
	padding: 1.4rem 1rem;
	border: 0;
	border-bottom: 1px solid currentColor;
	font-size: 1.2rem;
	font-weight: 600;
	text-align: left;
}

.w-tabs__nav button::after {
	content: "+";
	font-size: 1.4rem;
	line-height: 1;
}

.w-tabs__nav button[aria-selected="true"]::after {
	content: "\2013";
}

.w-tabs__nav button[aria-selected="true"] {
	color: var(--orange);
	border-color: var(--orange);
}

.w-tabs__panel {
	padding-bottom: 1.5rem;
}

.w-carousel {
	display: flex;
	gap: 30px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	max-width: 100%;
}

.w-carousel__slide {
	flex: 0 0 auto;
	width: calc((100% - 90px) / 4);
	min-width: 220px;
	scroll-snap-align: start;
	background: var(--bg-2);
}

/* testimonial cards: image, orange title, body copy */
.w-carousel__img {
	width: 100%;
	aspect-ratio: 3.4 / 1;
	height: auto;
	object-fit: cover;
	display: block;
}

.w-carousel__body {
	padding: 1.2rem 1.3rem 1.6rem;
}

.w-carousel__title {
	margin: 0 0 0.7rem;
	color: var(--orange);
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.6;
}

.w-carousel__text {
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--text-1);
}

.w-carousel__text p:last-child {
	margin-bottom: 0;
}

/* horizontal scroll strips are supposed to overflow their box on purpose */
.w-carousel {
	overflow-x: auto;
	scrollbar-width: none;
}

.w-carousel::-webkit-scrollbar {
	display: none;
}

.w-carousel--legacy {
	contain: paint;
}

.w-carousel__slide img {
	width: 100%;
	height: auto;
}

/* ---------- tables coming from product shortcodes ---------- */
.w-txt table {
	width: 100%;
	border-collapse: collapse;
}

.w-map,
.w-map iframe {
	display: block;
	width: 100%;
}

.w-map iframe {
	height: 540px;
	border: 0;
	/* the old site rendered the embed desaturated */
	filter: saturate(0);
}

@media (max-width: 767px) {
	.w-map iframe {
		height: 500px;
	}
}

/* hide helpers matching Elementor's responsive visibility */
@media (min-width: 1025px) {
	.hide-desktop { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
	.hide-tablet { display: none !important; }
}

@media (max-width: 767px) {
	.hide-mobile { display: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 767px) {
	.sec,
	.box {
		max-width: 100%;
	}

	/* stack the columns at one width. The ported data nests rows inside rows with
	   32%/60% widths from the desktop grid, so only overriding the section's own
	   children left the inner cards narrower than their neighbours. */
	main .sec > .box:not(.w-bleed),
	main .box > .box:not(.w-bleed) {
		width: 100% !important;
		min-width: 0;
	}

	/* :not(.w-bleed) keeps these level with the 100% rule above, which carries the
	   same pseudo-class and would otherwise out-rank them */
	main [data-el="5d2217d"] > .box:not(.w-bleed),
	main [data-el="9fe4c15"] > .box[style*="width:48%"],
	main [data-el="9fe4c15"] > .box[style*="width:49%"] {
		width: calc(50% - 6px) !important;
	}

	/* A text block that keeps its desktop share of the row becomes a narrow
	   column once the row stacks (40% of a phone column is 131px, which turned a
	   9-line paragraph into a 480px-tall sliver). Fill the column on a phone. */
	main .w-txt[style*="width:"] {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* the second screen bleeds to the edges, so its copy needs the inset the band
	   no longer provides; the photo stays edge to edge */
	main > .sec.is-bleed > [data-el="ed48042"] {
		padding-left: 8% !important;
		padding-right: 8% !important;
	}

	/* stacked cards used to sit flush against each other on a phone: keep a gap
	   between the rows the way live's rounded cards do */
	.sec--row,
	.box.sec--row {
		row-gap: 14px;
	}

	/* inside a carousel slide the 2x2 mosaic has to stay 2-up: stacking it made
	   every slide ~1250px tall and the slider unusable */
	main .w-carousel__slide .box.w-half,
	main .w-carousel__slide .box[style*="width:49%"],
	main .w-carousel__slide .box[style*="width:48%"] {
		width: calc(50% - 6px) !important;
	}

	/* about: four icon+label tiles read better 2-up than as a long single column */
	main [data-el="0373c80"] > .box:not(.w-bleed) {
		width: calc(50% - 8px) !important;
	}

	/* about: the 50% photos sit next to a card that goes full width on a phone, so
	   the photo has to follow it (the .box rule below never reached .w-img) */
	main [data-el="de951ed"] > .w-img,
	main [data-el="949ac0f"] > .w-img,
	main [data-el="19dc791"] > .w-img {
		width: 100% !important;
	}

	/* about: the honour certificate is another 48% side image that ends up alone
	   on its row (inside the full-bleed band) */
	main [data-el="806d9ea"] > [data-el="841543a"] {
		width: 100% !important;
	}

	/* brand walls: six 15% logos per row leave 49px marks on a phone, so pair the
	   row down to three */
	main .w-img[style*="width:15%"] {
		width: 30% !important;
	}

	/* about: the robot-arm photo is a 48% side image on desktop, but it sits alone
	   on its row once the copy above it stacks - bleed it to the window edges */
	main [data-el="bcfda80"] > [data-el="c85da07"] {
		/* 100vw is safe here: phones have no scrollbar to add to it. flex: none
		   because as a flex item the oversized width was shrunk back to 328px */
		width: 100vw !important;
		max-width: 100vw !important;
		flex: none !important;
		margin-left: calc(50% - 50vw) !important;
		margin-right: calc(50% - 50vw) !important;
	}

	/* the R&D band bleeds to the edges, but its copy kept the desktop 8% right
	   margin, so the text sat at 10px while every other block starts at 31px */
	main [data-el="806d9ea"] > [data-el="fb14dce"] {
		margin-right: 0 !important;
		padding-left: 8% !important;
		padding-right: 8% !important;
	}

	/* about hero: the video block leads on a phone */
	[data-el="fece09f"] > [data-el="8ca43a6"] {
		order: -1;
	}

	/* on a phone the tool cards come before the copy; the desktop layout keeps the
	   source order (copy first), so this is a visual swap only */
	[data-el="3dc2905"] > [data-el="d4cc799"] { order: 1; }
	[data-el="3dc2905"] > [data-el="e167123"] { order: 2; }

	/* centred heading above a left-aligned paragraph: the orange line was the only
	   block on this stack still hugging the left edge */
	[data-el="0d49874"] {
		text-align: center !important;
	}

	/* the white-to-orange gradient only reads on the wide layout */
	[data-el="9e83591"] {
		background-image: none !important;
	}

	/* this cards row keeps a 2% left inset from the desktop 60/40 split, which
	   only makes it look shorter than the panel above it once it is stacked */
	[data-el="d4cc799"] {
		padding-left: 0 !important;
	}

	/* tighten the vertical rhythm of the product bands: 5% of the width is 28px a
	   side on a phone and every band adds it again, which reads as a lot of dead
	   space between the cards */
	main > .sec:not(.sec--full) {
		padding-top: 3% !important;
		padding-bottom: 3% !important;
	}

	/* the section intros and the brand lockup carry desktop-sized margins */
	[data-el="380128a"] > .w-txt,
	[data-el="3dc2905"] > .w-txt {
		margin-top: 16px !important;
		margin-bottom: 24px !important;
	}

	.brand-lockup {
		margin-bottom: 24px !important;
	}

	/* Full-Service row: the live container wraps its widgets too */
	[data-el="c9ec83d"] > * {
		width: 100% !important;
		margin-right: 0 !important;
	}

	.w-h {
		font-size: 1.6rem;
	}
}

/* ---------- promoted out of the inline styles, which repeated them per element ---------- */
/* One content column for the whole site - the same gutter the header, the
   footer and .wrap use (--gutter: 8%), so the copy lines up with the logo and
   the footer columns instead of sitting 5% further out. Past 1920px the extra
   term keeps the content at 84% of 1920 and centres it, exactly like .wrap in
   style.css. Only bands that sit directly in <main> are padded, and the opening
   banner is left alone so a full-bleed hero still runs edge to edge. */
main > .sec:not(.sec--full) {
	padding-left: max(var(--gutter), calc((100% - 1920px) / 2 + 153.6px)) !important;
	padding-right: max(var(--gutter), calc((100% - 1920px) / 2 + 153.6px)) !important;
}

/* Two bands indent themselves instead of letting the band above do it: the
   product hero writes padding:10% 8% 5% 8% and the about hero padding:5% 0% 5% 8%
   on a full-bleed band. Those percentages measure the window, so past 1920px they
   kept growing while the header, the footer and every other band stopped - the
   hero copy ended up ~270px left of the logo. Same capped column as above. */
main > .sec--full[style*="8%"] {
	padding-left: max(var(--gutter), calc((100% - 1920px) / 2 + 153.6px)) !important;
	padding-right: max(var(--gutter), calc((100% - 1920px) / 2 + 153.6px)) !important;
}

/* the about hero indents its copy on the left only and lets the photo run to the
   window edge: keep that shape, but give both edges the inset a 1920px window
   would have had, or the copy and the two 48% columns stretch out of the column. */
main > .sec--full > [style*="padding:5% 0% 5% 8%"] {
	padding-left: max(var(--gutter), calc((100% - 1920px) / 2 + 153.6px)) !important;
	padding-right: max(0px, calc((100% - 1920px) / 2)) !important;
}

/* A band that runs edge to edge on purpose (the home "second screen"): its own
   children carry whatever inset the copy needs, so the photo can start at the
   window edge like the reference. Vertical padding is left alone. Past 1920px
   it stops growing like every other band and centres, so the photo edge stays
   inside the same 1920 box as the rest of the page. */
main > .sec.is-bleed {
	width: min(100%, 1920px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* A band already carries the page gutter. An inner wrapper that repeats the same
   8% lands its content at 84% of the column, which reads as copy that stops
   short of the logo/footer edge - the single most common "this block is narrower
   than the header" report on this port. Drop only the horizontal repeat, only
   for wrappers without a background of their own (a painted panel keeps its
   inset), and leave the vertical padding alone. */
main > .sec > .box[style*="padding:5% 8%"]:not([style*="background"]),
main > .sec > .box[style*="padding:10% 8%"]:not([style*="background"]),
main > .sec > .box[style*="padding:4.2% 8%"]:not([style*="background"]),
main > .sec > .box[style*="padding:4% 8%"]:not([style*="background"]) {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* The four-value spelling repeats the full gutter on both sides and can sit
   several levels deep (the "Why Partner" block is three boxes down), so this
   one is not limited to a band's direct children. A wrapper that only insets
   its left side (5% 0% 5% 8%) is a banner, not a repeat, and is left alone. */
main .box[style*="padding:5% 8% 5% 8%"]:not([style*="background"]),
main .box[style*="padding:10% 8% 5% 8%"]:not([style*="background"]),
main .box[style*="padding:4% 8% 4% 8%"]:not([style*="background"]) {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* An image that has to run to the window edges, up to the 1920px cap. It sits in
   a band whose 8% gutter is 8/84 of the content column, so widening by 1/0.84
   and pulling the overhang back with a negative margin cancels it without vw
   arithmetic (which would add the scrollbar width). Past 1920px the min()
   settles the width at 1920 and the margin at the rest of the centring.
   !important because the ported data carries an inline margin. */
.w-bleed {
	width: min(100% / 0.84, 1920px) !important;
	max-width: none;
	margin-left: calc((100% - min(100% / 0.84, 1920px)) / 2) !important;
	margin-right: calc((100% - min(100% / 0.84, 1920px)) / 2) !important;
}

/* The category rows fit their photos to the copy with js/site.js. Until that
   runs (and whenever it bails out) a photo cell would stretch to the row's
   height, and img{height:100%} + object-fit:cover turns that into a huge zoom
   into the middle of the picture. Keep them at their own height. */
[data-el="a421759"],
[data-el="9fe4c15"],
[data-el="5d2217d"],
[data-el="cdbcf30"],
[data-el="d4cc799"] {
	align-self: flex-start;
}

/* a column holding a single, narrower item: .sec/.box set align-content:
   flex-start, so the flex line shrinks to the item and align-self:center has no
   room to move it - size the line to the column instead */
.img-center {
	align-content: center;
}

.w-half {
	width: 50%;
	padding: 0;
}

/* Some rows carry a column gap (24-60px) from Elementor, and line breaking counts
   that gap: 50% + 50% + gap never fits, so the pair wrapped and the copy ended up
   as a narrow centred column. A zero flex basis takes the gap out of the breaking
   decision and lets grow hand each cell (100% - gap) / 2, which is what the live
   containers did. Matched on the inline style because that is where the gap is. */
.sec--row[style*="gap:"] > .box.w-half,
.sec--row-reverse[style*="gap:"] > .box.w-half {
	flex: 1 1 0;
}

/* below the wrap point the pair goes back to stacking (see .sec--row > .box) */
@media (max-width: 767px) {
	.sec--row[style*="gap:"] > .box.w-half,
	.sec--row-reverse[style*="gap:"] > .box.w-half {
		flex: 1 1 auto;
	}
}

/* photo card caption sitting on the picture. Compound selector because it has
   to keep beating .w-h (and .w-h's smaller size below 1281px) the way the
   inline string it replaces did. */
.w-h.photo-caption {
	position: absolute;
	left: 1rem;
	width: auto;
	font-size: 1.8rem;
	font-weight: 600;
	line-height: 2.52rem;
	color: rgb(255, 255, 255);
	text-align: left;
	margin: 0;
}

/* buttons are inline widgets on the live site: never let flex stretch them */
.w-btn {
	flex: none;
	align-self: flex-start;
}

/* on the live site every image is its own widget inside a block wrapper, so it
   never stretches to the height of the flex box it sits in */
.box > .w-img,
.box > .w-icon {
	align-self: flex-start;
}

/* homepage product cards: the row stretches a card to its tallest neighbour (the
   grey copy panel), so let the photo fill that height instead of leaving a white
   strip underneath - cropped, not squashed. Scoped to the homepage, because on
   other landing pages the same markup is not inside a stretched row. */
.page-id-8535 .box:has(> .w-h) > .w-img:only-of-type {
	height: 100%;
	object-fit: cover;
}

/* dots under a testimonial strip */
.w-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 1.6rem;
}

.w-dots button {
	width: 9px;
	height: 9px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--orange);
	background: transparent;
}

.w-dots button[aria-current="true"] {
	background: var(--orange);
}

/* Elementor keeps the 84% content column inside the 8% page gutter; the flex
   centring is unreliable on wide viewports, so pin the inset explicitly */
.sec > .box[style*="width:84%"],
.box > .box[style*="width:84%"] {
	margin-left: 8%;
	margin-right: 8%;
	width: 84%;
	box-sizing: border-box;
}

/* above 1920px that 8% keeps growing with the window while every band stops at
   the 1920px column, so the row has to be told what the column is. Inside a band
   that already carries it, the row is simply the column's width; inside a
   full-bleed band the margins are the column, so they take the capped inset.
   (the width is an inline style, hence the !important) */
@media (min-width: 1921px) {
	.sec:not(.sec--full) [style*="width:84%"] {
		margin-left: 0;
		margin-right: 0;
		width: 100% !important;
	}

	.sec--full [style*="width:84%"] {
		margin-left: var(--page-gutter);
		margin-right: var(--page-gutter);
		width: calc(100% - 2 * var(--page-gutter)) !important;
	}
}

/* a carousel the reference site never initialised (1px tall) stays hidden */
.is-empty-carousel {
	display: none !important;
}

/* Elementor's base text style also steps down at its 1281px breakpoint
   (1rem / 1.4rem  ->  0.95rem / 1.2rem); the data ships inline sizes, so the
   override has to win over them */
@media (max-width: 1281px) {
	.w-txt,
	.w-txt p,
	.w-rows__x,
	.w-rows__x p {
		font-size: 0.95rem !important;
		line-height: 1.2rem !important;
	}
}

/* half-width image inside ported page copy (was style="width:50%") */
.c-img-half {
	width: 50%;
	max-width: 100%;
	height: auto;
}
