/*
 * EC Services — Editorial Yearbook treatment for the /services/ landing.
 *
 * Visual language shared with /our-projects/:
 *   - Palette: navy #04171A · gold #F9BE17 · green #39DBB0 · warm white
 *   - Display type: Fraunces variable serif
 *   - Body type:    Plus Jakarta Sans
 *   - Hover: 3px green underline + translateY(-4px) + image scale(1.04)
 *
 * Layout grammar:
 *   - Hero band with faint mint grid texture + gold rule + 3 stat callouts
 *   - Editorial service grid: alternating-side rows, each with one
 *     8/12-wide "feature" card + two 4/12 "medium" cards stacked beside it
 *   - 4-step "How we work" stripe (Design → Fabricate → Install → Support)
 *   - Closing CTA card (navy + green radial + gold pill)
 *
 * Every selector is parented under `.ec-services` so the cascade can't
 * bleed into OneUp/WPBakery component styles.
 */

/* =========================================================================
 *  ROOT WRAPPER + RESET
 * ========================================================================= */
.ec-services {
	font-family: var(--ec-font-body);
	color: var(--ec-navy);
	background: var(--ec-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	position: relative;
}
.ec-services *,
.ec-services *::before,
.ec-services *::after { box-sizing: border-box; }
.ec-services img { max-width: 100%; height: auto; display: block; }
.ec-services a { color: inherit; text-decoration: none; }
.ec-services p { margin: 0 0 1em; }
.ec-services ol, .ec-services ul { margin: 0; padding: 0; list-style: none; }

/* =========================================================================
 *  HERO BAND
 * ========================================================================= */
.ec-services .ec-services-hero,
.ec-services .ec-hero {
	position: relative;
	padding: 110px 24px 96px;
	background: var(--ec-navy);
	color: var(--ec-white);
	text-align: center;
	overflow: hidden;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ec-services .ec-services-hero::before,
.ec-services .ec-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(57,219,176,0.08) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(57,219,176,0.05) 1px, transparent 1px);
	background-size: 80px 80px, 80px 80px;
	background-position: center;
	pointer-events: none;
	mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.ec-services .ec-services-hero > *,
.ec-services .ec-hero > * { position: relative; z-index: 1; }
.ec-services .ec-hero-eyebrow {
	font-family: var(--ec-font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ec-gold-text);
	margin-bottom: 22px;
}
.ec-services h1.ec-hero-title,
.ec-services .ec-hero-title {
	font-family: var(--ec-font-display) !important;
	font-weight: 700;
	font-size: clamp(40px, 7vw, 88px) !important;
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: var(--ec-white) !important;
	margin: 0 auto 24px !important;
	max-width: 960px;
	font-variation-settings: "opsz" 144, "SOFT" 50;
}
.ec-services .ec-hero-title em {
	font-style: italic;
	font-weight: 500;
	color: var(--ec-green-text);
	font-variation-settings: "opsz" 144, "SOFT" 100;
}
.ec-services .ec-hero-sub {
	font-size: 18px;
	line-height: 1.5;
	max-width: 700px;
	margin: 0 auto 44px;
	color: rgba(255,255,255,0.78);
}
.ec-services .ec-hero-stats {
	display: flex;
	gap: 36px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 8px;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255,255,255,0.6);
}
.ec-services .ec-hero-stats > div {
	min-width: 150px;
}
.ec-services .ec-hero-stats strong {
	display: block;
	font-family: var(--ec-font-display);
	font-size: 26px;
	font-weight: 700;
	color: var(--ec-green-text);
	letter-spacing: -0.005em;
	margin-bottom: 4px;
	text-transform: none;
}
.ec-services .ec-services-hero::after,
.ec-services .ec-hero::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 96px;
	height: 3px;
	background: var(--ec-gold);
}

/* =========================================================================
 *  INNER CONTAINER
 * ========================================================================= */
.ec-services .ec-services-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 88px 24px 96px;
	position: relative;
}

/* =========================================================================
 *  EDITORIAL SERVICE GRID
 *
 *  Each row: 8fr (feature) + 4fr (two stacked mediums).
 *  Alternating rows flip the feature side for editorial rhythm.
 *
 *  Card sizes:
 *    feature: aspect-ratio 4/3 on the media; body below
 *    medium:  horizontal split, media-left or media-right
 * ========================================================================= */
.ec-services .ec-services-row {
	display: grid;
	grid-template-columns: 8fr 4fr;
	gap: 24px;
	margin-bottom: 32px;
	grid-template-areas:
		"feature m1"
		"feature m2";
}
.ec-services .ec-services-row--reverse {
	grid-template-columns: 4fr 8fr;
	grid-template-areas:
		"m1 feature"
		"m2 feature";
}
.ec-services .ec-services-row > .ec-service-card--feature {
	grid-area: feature;
}
.ec-services .ec-services-row > .ec-service-card--medium:nth-of-type(2) {
	grid-area: m1;
}
.ec-services .ec-services-row > .ec-service-card--medium:nth-of-type(3) {
	grid-area: m2;
}

/* Service card — base */
.ec-services .ec-service-card {
	position: relative;
	display: flex;
	background: var(--ec-warm-white);
	border-radius: 8px;
	overflow: hidden;
	transition: transform 240ms cubic-bezier(0.22,0.61,0.36,1), box-shadow 240ms ease;
	color: var(--ec-navy);
	min-height: 0;
}
.ec-services .ec-service-card::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--ec-green);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 320ms cubic-bezier(0.22,0.61,0.36,1);
	z-index: 3;
}
.ec-services .ec-service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 28px 56px -22px rgba(4,23,26,0.28);
}
.ec-services .ec-service-card:hover::after { transform: scaleX(1); }
.ec-services .ec-service-card:focus-visible {
	outline: 2px solid var(--ec-green);
	outline-offset: 4px;
}

/* Media wrapper holds the image and applies the scale-on-hover */
.ec-services .ec-card-media {
	position: relative;
	overflow: hidden;
	background: var(--ec-navy);
	flex-shrink: 0;
}
.ec-services .ec-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms cubic-bezier(0.22,0.61,0.36,1), filter 280ms ease;
	will-change: transform;
}
.ec-services .ec-service-card:hover .ec-card-media img {
	transform: scale(1.04);
	filter: brightness(1.04);
}
.ec-services .ec-card-media-fallback {
	width: 100%;
	height: 100%;
	background:
		radial-gradient(ellipse at 30% 20%, rgba(57,219,176,0.22), transparent 60%),
		radial-gradient(ellipse at 80% 80%, rgba(249,190,23,0.18), transparent 60%),
		var(--ec-navy);
}

/* Body — typography + link affordance */
.ec-services .ec-card-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 28px 32px 32px;
	flex: 1 1 auto;
	min-width: 0;
}
.ec-services h3.ec-card-name,
.ec-services .ec-card-name {
	font-family: var(--ec-font-display) !important;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--ec-navy) !important;
	margin: 0 0 10px !important;
	font-variation-settings: "opsz" 96;
	line-height: 1.08;
}
.ec-services .ec-card-tagline {
	font-size: 14px;
	color: var(--ec-text-dim);
	line-height: 1.5;
	margin: 0 0 16px;
	font-weight: 500;
}
.ec-services .ec-card-desc {
	font-size: 14.5px;
	color: var(--ec-text-dim);
	line-height: 1.55;
	margin: 0 0 18px;
	max-width: 56ch;
}
.ec-services .ec-card-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ec-green-text);
	transition: gap 220ms ease, color 220ms ease;
	margin-top: auto;
}
.ec-services .ec-card-link svg { transition: transform 220ms ease; }
.ec-services .ec-service-card:hover .ec-card-link {
	color: var(--ec-navy);
	gap: 10px;
}
.ec-services .ec-service-card:hover .ec-card-link svg { transform: translateX(2px); }

/* Feature card — image fills top, body below */
.ec-services .ec-service-card--feature {
	flex-direction: column;
	min-height: 100%;
}
.ec-services .ec-service-card--feature .ec-card-media {
	aspect-ratio: 4 / 3;
	width: 100%;
}
.ec-services .ec-service-card--feature .ec-card-name {
	font-size: clamp(28px, 2.6vw, 38px);
}
.ec-services .ec-service-card--feature .ec-card-body {
	padding: 32px 36px 38px;
}

/* Medium card — horizontal split (media-left default; -reverse for swap) */
.ec-services .ec-service-card--medium {
	flex-direction: row;
	min-height: 0;
	align-items: stretch;
}
.ec-services .ec-service-card--medium .ec-card-media {
	width: 44%;
	min-height: 100%;
	align-self: stretch;
}
.ec-services .ec-service-card--medium .ec-card-body {
	padding: 22px 24px 24px;
}
.ec-services .ec-service-card--medium .ec-card-name {
	font-size: 21px;
}
.ec-services .ec-service-card--medium-media-right .ec-card-media {
	order: 2;
}

/* When the row is reversed (mediums on the LEFT), let the mediums sit
 * comfortably with a slightly smaller feature so the two-medium column
 * doesn't get crushed.  Padding tightens on small medium cards. */
@media ( max-width: 1100px ) {
	.ec-services .ec-service-card--medium .ec-card-body { padding: 18px 20px 20px; }
	.ec-services .ec-service-card--medium .ec-card-name { font-size: 19px; }
}

/* =========================================================================
 *  PROCESS STRIPE — "How we work"
 * ========================================================================= */
.ec-services .ec-process-stripe {
	margin: 24px 0 64px;
	padding: 72px 0 24px;
	border-top: 1px solid var(--ec-rule-dim);
	position: relative;
}
.ec-services .ec-process-stripe-header {
	text-align: center;
	margin-bottom: 56px;
}
.ec-services .ec-process-stripe-header .ec-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ec-gold-text);
	margin-bottom: 14px;
}
.ec-services h2.ec-process-title,
.ec-services .ec-process-title {
	font-family: var(--ec-font-display) !important;
	font-weight: 700;
	font-size: clamp(28px, 3.6vw, 44px) !important;
	line-height: 1.1;
	letter-spacing: -0.015em;
	color: var(--ec-navy) !important;
	margin: 0 auto !important;
	max-width: 680px;
	font-variation-settings: "opsz" 96;
}
.ec-services .ec-process-title em {
	font-style: italic;
	color: var(--ec-green-text);
	font-weight: 600;
}
.ec-services .ec-process-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 36px;
	counter-reset: process;
}
.ec-services .ec-process-step {
	position: relative;
	text-align: left;
	padding-top: 8px;
}
.ec-services .ec-process-step + .ec-process-step::before {
	content: "";
	position: absolute;
	left: -18px;
	top: 24px;
	bottom: auto;
	width: 1px;
	height: 56px;
	background: var(--ec-rule-dim);
}
.ec-services .ec-process-num {
	font-family: var(--ec-font-display);
	font-weight: 900;
	font-size: 48px;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--ec-gold-text);
	margin-bottom: 14px;
	font-variation-settings: "opsz" 96;
}
.ec-services .ec-process-icon {
	display: block;
	width: 36px;
	height: 36px;
	margin-bottom: 18px;
	opacity: 0.92;
	/* Lucide SVGs ship as currentColor strokes — tint to gold via filter. */
	filter: invert(67%) sepia(86%) saturate(587%) hue-rotate(355deg) brightness(102%) contrast(96%);
}
.ec-services h3.ec-process-step-title,
.ec-services .ec-process-step-title {
	font-family: var(--ec-font-display) !important;
	font-size: 22px !important;
	font-weight: 700;
	color: var(--ec-navy) !important;
	margin: 0 0 8px !important;
	letter-spacing: -0.01em;
}
.ec-services .ec-process-step-desc {
	font-size: 14px;
	line-height: 1.55;
	color: var(--ec-text-dim);
	margin: 0;
}

/* =========================================================================
 *  CLOSING CTA
 * ========================================================================= */
.ec-services .ec-closing,
.ec-services .ec-services-closing {
	margin-top: 24px;
	padding: 80px 32px 80px;
	background: var(--ec-navy);
	color: var(--ec-white);
	border-radius: 8px;
	text-align: center;
	position: relative;
	overflow: hidden;
}
.ec-services .ec-closing::before {
	content: "";
	position: absolute;
	inset: -50% -10% auto auto;
	width: 540px;
	height: 540px;
	background: radial-gradient(circle, var(--ec-green-tint), transparent 60%);
	pointer-events: none;
}
.ec-services .ec-closing > * { position: relative; }
.ec-services .ec-closing-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ec-green-text);
	margin-bottom: 18px;
}
.ec-services .ec-closing .ec-closing-title,
.ec-services h2.ec-closing-title {
	font-family: var(--ec-font-display) !important;
	font-weight: 700;
	font-size: clamp(32px, 4.6vw, 52px) !important;
	line-height: 1.06;
	letter-spacing: -0.02em;
	max-width: 760px;
	margin: 0 auto 18px !important;
	color: var(--ec-white) !important;
	font-variation-settings: "opsz" 144, "SOFT" 50;
}
.ec-services .ec-closing .ec-closing-title em {
	font-style: italic;
	color: var(--ec-green-text) !important;
	font-weight: 500;
}
.ec-services .ec-closing-sub {
	font-size: 17px;
	line-height: 1.55;
	max-width: 600px;
	margin: 0 auto 38px;
	color: rgba(255,255,255,0.78);
}
.ec-services .ec-closing .ec-cta-btn,
.ec-services a.ec-cta-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	padding: 18px 30px !important;
	background: var(--ec-gold) !important;
	color: var(--ec-navy) !important;
	font-family: var(--ec-font-body) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase;
	border-radius: 999px;
	text-decoration: none !important;
	line-height: 1 !important;
	transition: transform 200ms ease, background 200ms ease;
}
.ec-services .ec-cta-btn::after {
	content: "→";
	transition: transform 220ms ease;
	font-weight: 400;
}
.ec-services .ec-cta-btn:hover {
	background: var(--ec-green) !important;
	transform: translateY(-2px);
}
.ec-services .ec-cta-btn:hover::after { transform: translateX(4px); }

/* =========================================================================
 *  RESPONSIVE
 *
 *  Tablet (≤1023): editorial row collapses — feature on top, mediums below
 *  Mobile  (≤767):  every card single-column, feature aspect → 4:3
 * ========================================================================= */
@media ( max-width: 1023px ) {
	.ec-services .ec-services-inner { padding: 56px 20px 72px; }
	.ec-services .ec-services-row,
	.ec-services .ec-services-row--reverse {
		grid-template-columns: 1fr;
		grid-template-areas:
			"feature"
			"m1"
			"m2";
		gap: 18px;
	}
	.ec-services .ec-service-card--feature .ec-card-media { aspect-ratio: 16 / 9; }
	.ec-services .ec-service-card--medium .ec-card-media { width: 38%; }
	.ec-services .ec-process-steps { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; }
	.ec-services .ec-process-step + .ec-process-step::before { display: none; }
}
@media ( max-width: 767px ) {
	.ec-services .ec-services-hero,
	.ec-services .ec-hero { padding: 72px 20px 72px; }
	.ec-services .ec-hero-stats { gap: 22px; }
	.ec-services .ec-hero-stats > div { min-width: 130px; }
	.ec-services .ec-service-card--feature .ec-card-body { padding: 24px 22px 28px; }
	.ec-services .ec-service-card--medium {
		flex-direction: column;
	}
	.ec-services .ec-service-card--medium .ec-card-media {
		width: 100%;
		aspect-ratio: 16 / 9;
	}
	.ec-services .ec-service-card--medium-media-right .ec-card-media {
		order: 0;
	}
	.ec-services .ec-process-steps { grid-template-columns: 1fr; }
	.ec-services .ec-closing { padding: 56px 22px 60px; }
}

/* =========================================================================
 *  PRINT
 * ========================================================================= */
@media print {
	.ec-services { color: #000; background: #fff; }
	.ec-services .ec-services-hero,
	.ec-services .ec-hero { background: #fff; color: #000; }
	.ec-services .ec-service-card { break-inside: avoid; }
	.ec-services .ec-closing { background: #fff; color: #000; }
}
