/* ==========================================================
   Services Showcase – front-end
   ========================================================== */
.ssg-section {
	--ssg-primary: #5a8a00;
	--ssg-accent: #f39c12;
	--ssg-dark: #14231a;
	--ssg-text: #5f6b63;
	--ssg-bg: #f6f9f1;
	--ssg-card: #ffffff;
	--ssg-radius: 22px;
	--ssg-cols: 3;
	--ssg-gap: clamp(18px, 2.4vw, 32px);

	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: clamp(56px, 8vw, 110px) 16px;
	background:
		radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ssg-primary) 14%, transparent) 1px, transparent 0) 0 0 / 26px 26px,
		var(--ssg-bg);
	font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	box-sizing: border-box;
}
.ssg-section *,
.ssg-section *::before,
.ssg-section *::after { box-sizing: border-box; }

/* soft floating blobs */
.ssg-blob {
	position: absolute;
	z-index: -1;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	filter: blur(80px);
	opacity: .35;
	pointer-events: none;
	animation: ssg-float 14s ease-in-out infinite alternate;
}
.ssg-blob--1 { top: -120px; left: -140px; background: var(--ssg-primary); }
.ssg-blob--2 { bottom: -160px; right: -120px; background: var(--ssg-accent); animation-delay: -6s; opacity: .25; }
@keyframes ssg-float {
	to { transform: translate(60px, 40px) scale(1.15); }
}

.ssg-container { max-width: 1240px; margin: 0 auto; }

/* ---------- Header ---------- */
.ssg-header { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); }

.ssg-tagline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 16px 7px 12px;
	margin-bottom: 16px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ssg-primary) 12%, #fff);
	color: var(--ssg-primary);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.ssg-tagline svg { width: 16px; height: 16px; }

.ssg-title {
	margin: 0;
	font-family: "Nunito", "Poppins", sans-serif;
	font-weight: 900;
	font-size: clamp(30px, 4.6vw, 52px);
	line-height: 1.12;
	letter-spacing: -.01em;
	color: var(--ssg-primary);
}
.ssg-title span {
	background: linear-gradient(100deg, var(--ssg-accent), color-mix(in srgb, var(--ssg-accent) 70%, #ff5e3a));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.ssg-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 18px auto;
	color: var(--ssg-accent);
}
.ssg-divider i {
	display: block;
	width: 48px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, var(--ssg-primary));
}
.ssg-divider i:last-child { transform: scaleX(-1); }
.ssg-divider svg { width: 22px; height: 22px; }

.ssg-subtitle {
	margin: 0;
	color: var(--ssg-text);
	font-size: clamp(15px, 1.6vw, 17px);
	line-height: 1.7;
}

/* ---------- Grid ---------- */
.ssg-grid {
	display: grid;
	grid-template-columns: repeat(var(--ssg-cols), minmax(0, 1fr));
	gap: var(--ssg-gap);
}

/* ---------- Card ---------- */
.ssg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--ssg-card);
	border-radius: var(--ssg-radius);
	text-decoration: none !important;
	color: inherit;
	box-shadow:
		0 1px 2px rgba(20, 35, 26, .04),
		0 12px 30px -12px rgba(20, 35, 26, .14);
	transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s ease;
	will-change: transform;
}
/* animated gradient border on hover */
.ssg-card::before {
	content: "";
	position: absolute;
	inset: 0;
	padding: 2px;
	border-radius: inherit;
	background: linear-gradient(135deg, var(--ssg-primary), var(--ssg-accent));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity .45s ease;
	pointer-events: none;
	z-index: 3;
}
.ssg-card:hover,
.ssg-card:focus-visible {
	transform: translateY(-10px);
	box-shadow:
		0 2px 4px rgba(20, 35, 26, .05),
		0 30px 60px -20px color-mix(in srgb, var(--ssg-primary) 45%, transparent);
}
.ssg-card:hover::before,
.ssg-card:focus-visible::before { opacity: 1; }
.ssg-card:focus-visible { outline: none; }

/* image */
.ssg-media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--ssg-radius) var(--ssg-radius) 0 0;
	clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}
.ssg-img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	transform: scale(1.02);
	transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), filter .6s ease;
}
.ssg-img--placeholder {
	background: linear-gradient(135deg, color-mix(in srgb, var(--ssg-primary) 50%, #fff), color-mix(in srgb, var(--ssg-accent) 40%, #fff));
}
.ssg-card:hover .ssg-img { transform: scale(1.12) rotate(.6deg); filter: saturate(1.15); }

.ssg-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, color-mix(in srgb, var(--ssg-dark) 70%, transparent) 100%);
	opacity: .35;
	transition: opacity .5s ease;
}
.ssg-card:hover .ssg-shade { opacity: .6; }

/* glass number badge */
.ssg-num {
	position: absolute;
	top: 16px;
	right: 16px;
	min-width: 46px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .22);
	border: 1px solid rgba(255, 255, 255, .45);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font-family: "Nunito", sans-serif;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: .06em;
	text-align: center;
	transition: background .4s ease, transform .4s ease;
}
.ssg-card:hover .ssg-num { background: var(--ssg-accent); border-color: var(--ssg-accent); transform: rotate(-6deg) scale(1.06); }

/* floating icon */
/* icon sits on the seam between image and text */
.ssg-icon {
	position: relative;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	margin: -46px 0 0 26px;
	border-radius: 18px;
	background: linear-gradient(135deg, var(--ssg-primary), color-mix(in srgb, var(--ssg-primary) 70%, #000));
	color: #fff;
	border: 4px solid var(--ssg-card);
	box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--ssg-primary) 70%, transparent);
	transition: transform .6s cubic-bezier(.2, .8, .2, 1), background .5s ease, box-shadow .5s ease;
}
.ssg-icon svg { width: 30px; height: 30px; }
.ssg-icon-img { width: 34px !important; height: 34px !important; object-fit: contain; filter: brightness(0) invert(1); }
.ssg-card:hover .ssg-icon {
	transform: translateY(-6px) rotate(-8deg);
	background: linear-gradient(135deg, var(--ssg-accent), color-mix(in srgb, var(--ssg-accent) 65%, #e0452a));
	box-shadow: 0 16px 28px -8px color-mix(in srgb, var(--ssg-accent) 70%, transparent);
}

/* body */
.ssg-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px 28px 28px;
}
.ssg-card-title {
	margin: 0 0 10px;
	font-family: "Nunito", "Poppins", sans-serif;
	font-weight: 800;
	font-size: clamp(19px, 1.7vw, 22px);
	line-height: 1.3;
	color: var(--ssg-dark);
	transition: color .35s ease;
}
.ssg-card:hover .ssg-card-title { color: var(--ssg-primary); }

.ssg-desc {
	margin: 0 0 22px;
	color: var(--ssg-text);
	font-size: 15px;
	line-height: 1.7;
}

.ssg-more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	align-self: flex-start;
	color: var(--ssg-primary);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: .02em;
	text-transform: uppercase;
	position: relative;
	padding-bottom: 4px;
}
.ssg-more::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--ssg-primary), var(--ssg-accent));
	transform: scaleX(.3);
	transform-origin: left;
	transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.ssg-more svg {
	width: 18px;
	height: 18px;
	transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.ssg-card:hover .ssg-more::after { transform: scaleX(1); }
.ssg-card:hover .ssg-more svg { transform: translateX(6px); }

/* ---------- Bottom button ---------- */
.ssg-footer { text-align: center; margin-top: clamp(44px, 5vw, 64px); }
.ssg-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 16px 34px;
	border-radius: 999px;
	overflow: hidden;
	isolation: isolate;
	background: var(--ssg-primary);
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .06em;
	text-transform: uppercase;
	box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--ssg-primary) 80%, transparent);
	transition: transform .35s ease, box-shadow .35s ease;
}
.ssg-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(110deg, var(--ssg-accent), color-mix(in srgb, var(--ssg-accent) 65%, #e0452a));
	transform: translateX(-101%);
	transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.ssg-btn svg { width: 18px; height: 18px; transition: transform .35s ease; }
.ssg-btn:hover,
.ssg-btn:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--ssg-accent) 80%, transparent);
}
.ssg-btn:hover::before,
.ssg-btn:focus-visible::before { transform: translateX(0); }
.ssg-btn:hover svg { transform: translateX(5px); }

/* ---------- Scroll reveal ---------- */
.ssg-js .ssg-reveal {
	opacity: 0;
	transform: translateY(40px);
	transition:
		opacity .8s ease var(--ssg-delay, 0ms),
		transform .8s cubic-bezier(.2, .8, .2, 1) var(--ssg-delay, 0ms),
		box-shadow .5s ease;
}
.ssg-js .ssg-reveal.is-visible { opacity: 1; transform: none; }
/* once visible, the card hover transform should respond instantly */
.ssg-js .ssg-card.is-visible { transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s ease, opacity .8s ease; }
.ssg-js .ssg-card.is-visible:hover { transform: translateY(-10px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.ssg-grid { grid-template-columns: repeat(min(var(--ssg-cols), 3), minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.ssg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.ssg-section { padding-left: 16px; padding-right: 16px; }
	.ssg-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
	.ssg-body { padding: 14px 22px 24px; }
	.ssg-icon { margin-left: 20px; width: 58px; height: 58px; }
	.ssg-icon svg { width: 26px; height: 26px; }
	.ssg-btn { width: 100%; justify-content: center; }
	.ssg-blob { width: 260px; height: 260px; }
}

/* touch devices: no sticky hover lift */
@media (hover: none) {
	.ssg-card:hover, .ssg-js .ssg-card.is-visible:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ssg-section *, .ssg-section *::before { animation: none !important; transition: none !important; }
	.ssg-js .ssg-reveal { opacity: 1; transform: none; }
}
