/*
 * Home page sections below the slider: intro, featured sites, product lines and blog.
 * Loaded on the front page only (see inc/home.php).
 */

.gp-home {
	--hm-navy: #111827;
	--hm-navy-soft: #1f2937;
	--hm-green: #7ac143;
	--hm-green-dark: #4f8a1f;
	--hm-soft: #f5f8f1;
	--hm-line: #e3e9dd;
	--hm-text: #374151;
	--hm-muted: #6b7280;
	--hm-radius: 16px;
	--hm-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .06);
	--hm-shadow-hover: 0 2px 4px rgba(17, 24, 39, .05), 0 16px 40px rgba(17, 24, 39, .12);

	color: var(--hm-text);
	font: 400 16px/1.65 var(--font-sans);
	-webkit-font-smoothing: antialiased;
}

.gp-home *,
.gp-home *::before,
.gp-home *::after {
	box-sizing: border-box;
}

.gp-home h1,
.gp-home h2,
.gp-home h3,
.gp-home p,
.gp-home ul {
	margin: 0;
	padding: 0;
	text-transform: none;
	letter-spacing: normal;
}

.gp-home ul {
	list-style: none;
}

.gp-home a {
	text-decoration: none;
}

.gp-home img {
	display: block;
	max-width: 100%;
}

.gp-home__inner {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Shared bits ---------- */

.gp-home__eyebrow {
	margin-bottom: 10px !important;
	color: var(--hm-green-dark);
	font-size: 13px;
	letter-spacing: .14em !important;
	text-transform: uppercase !important;
}

.gp-home__title {
	color: var(--hm-navy);
	font: 400 clamp(30px, 3.6vw, 44px)/1.15 var(--font-sans);
	letter-spacing: -.02em !important;
}

.gp-home__heading {
	color: var(--hm-navy);
	font: 400 clamp(26px, 2.8vw, 34px)/1.2 var(--font-sans);
	letter-spacing: -.015em !important;
}

.gp-home__lead {
	max-width: 620px;
	margin-top: 18px !important;
	color: var(--hm-muted);
	font-size: 18px;
}

.gp-home__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

.gp-home-btn {
	display: inline-flex;
	align-items: center;
	height: 48px;
	padding: 0 24px;
	border: 1px solid var(--hm-green);
	border-radius: 10px;
	background: var(--hm-green);
	color: var(--hm-navy) !important;
	font-size: 15px;
	transition: background-color .2s, border-color .2s, transform .2s;
}

.gp-home-btn:hover {
	border-color: #8fd457;
	background: #8fd457;
	transform: translateY(-1px);
}

.gp-home-btn--ghost {
	border-color: var(--hm-line);
	background: #fff;
}

.gp-home-btn--ghost:hover {
	border-color: var(--hm-green);
	background: var(--hm-soft);
}

.gp-home__section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 36px;
}

.gp-home__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	color: var(--hm-green-dark) !important;
	font-size: 15px;
}

.gp-home__more svg {
	transition: transform .2s;
}

.gp-home__more:hover svg {
	transform: translateX(3px);
}

.gp-home__badge {
	display: inline-block;
	margin-bottom: 14px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(122, 193, 67, .14);
	color: var(--hm-green-dark);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* ---------- Intro ---------- */

.gp-home-intro {
	padding: 72px 0 56px;
}

.gp-home-intro .gp-home__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
}

.gp-home-values {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.gp-home-value {
	padding: 24px;
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	background: #fff;
}

/* Odd count: the last card takes the full row. */
.gp-home-value:last-child:nth-child(odd) {
	grid-column: 1 / -1;
}

.gp-home-value__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: var(--hm-soft);
	color: var(--hm-green-dark);
}

.gp-home-value__title {
	margin-bottom: 6px !important;
	color: var(--hm-navy);
	font: 400 17px/1.35 var(--font-sans);
}

.gp-home-value p {
	color: var(--hm-muted);
	font-size: 14px;
	line-height: 1.6;
}

/* ---------- Featured sites ---------- */

.gp-home-sites {
	padding: 8px 0 80px;
}

.gp-home-sites__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.gp-home-site {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	background: #fff;
	box-shadow: var(--hm-shadow);
	transition: box-shadow .25s, transform .25s, border-color .25s;
}

.gp-home-site:hover {
	border-color: transparent;
	box-shadow: var(--hm-shadow-hover);
	transform: translateY(-4px);
}

.gp-home-site__media {
	display: block;
	aspect-ratio: 5 / 3;
	overflow: hidden;
	border-bottom: 1px solid var(--hm-line);
}

.gp-home-site__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}

.gp-home-site:hover .gp-home-site__media img {
	transform: scale(1.03);
}

.gp-home-site__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 22px;
}

.gp-home-site__label {
	display: block;
	color: var(--hm-navy);
	font-size: 17px;
	line-height: 1.3;
}

.gp-home-site__text {
	display: block;
	color: var(--hm-muted);
	font-size: 14px;
}

.gp-home-site__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--hm-soft);
	color: var(--hm-green-dark);
	transition: background-color .2s, color .2s;
}

.gp-home-site:hover .gp-home-site__arrow {
	background: var(--hm-green);
	color: var(--hm-navy);
}

/* ---------- Product lines ---------- */

.gp-home-lines {
	padding: 88px 0;
	background: var(--hm-soft);
	scroll-margin-top: 80px;
}

.gp-home-feature {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	overflow: hidden;
	margin-bottom: 24px;
	border-radius: var(--hm-radius);
	background: var(--hm-navy);
	color: #d1d5db;
	box-shadow: var(--hm-shadow);
}

.gp-home-feature__media {
	display: block;
	min-height: 100%;
	overflow: hidden;
}

.gp-home-feature__media img {
	width: 100%;
	height: 100%;
	min-height: 320px;
	object-fit: cover;
	transition: transform .5s;
}

.gp-home-feature:hover .gp-home-feature__media img {
	transform: scale(1.03);
}

.gp-home-feature__body {
	align-self: center;
	padding: 44px 48px;
}

.gp-home-feature .gp-home__badge {
	background: rgba(122, 193, 67, .18);
	color: var(--hm-green);
}

.gp-home-feature__title {
	margin-bottom: 14px !important;
	font: 400 clamp(24px, 2.4vw, 30px)/1.2 var(--font-sans);
}

.gp-home-feature__title a {
	color: #fff !important;
}

.gp-home-feature__title a:hover {
	color: var(--hm-green) !important;
}

.gp-home-feature p {
	font-size: 15px;
	line-height: 1.7;
}

.gp-home-feature__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px !important;
}

.gp-home-feature__links li {
	display: block;
}

.gp-home-feature__links a {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 999px;
	color: #fff !important;
	font-size: 14px;
	transition: border-color .2s, background-color .2s, color .2s;
}

.gp-home-feature__links a:hover {
	border-color: var(--hm-green);
	background: var(--hm-green);
	color: var(--hm-navy) !important;
}

.gp-home-lines__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.gp-home-line {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--hm-radius);
	background: #fff;
	box-shadow: var(--hm-shadow);
	transition: box-shadow .25s, transform .25s;
}

.gp-home-line:hover {
	box-shadow: var(--hm-shadow-hover);
	transform: translateY(-4px);
}

.gp-home-line__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.gp-home-line__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}

.gp-home-line:hover .gp-home-line__media img {
	transform: scale(1.04);
}

.gp-home-line__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 24px 24px 22px;
}

.gp-home-line__title {
	margin-bottom: 10px !important;
	font: 400 20px/1.3 var(--font-sans);
}

.gp-home-line__title a {
	color: var(--hm-navy) !important;
}

.gp-home-line__title a:hover {
	color: var(--hm-green-dark) !important;
}

.gp-home-line p {
	flex: 1;
	color: var(--hm-muted);
	font-size: 15px;
	line-height: 1.65;
}

.gp-home-line__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	color: var(--hm-green-dark) !important;
	font-size: 15px;
}

.gp-home-line__link svg {
	transition: transform .2s;
}

.gp-home-line:hover .gp-home-line__link svg {
	transform: translateX(3px);
}

/* ---------- Blog ---------- */

.gp-home-blog {
	padding: 88px 0 96px;
}

.gp-home-blog__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.gp-home-post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--hm-line);
	border-radius: var(--hm-radius);
	background: #fff;
	transition: box-shadow .25s, transform .25s, border-color .25s;
}

.gp-home-post:hover {
	border-color: transparent;
	box-shadow: var(--hm-shadow-hover);
	transform: translateY(-4px);
}

.gp-home-post__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--hm-soft);
}

.gp-home-post__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}

.gp-home-post:hover .gp-home-post__media img {
	transform: scale(1.04);
}

.gp-home-post__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--hm-green);
}

.gp-home-post__body {
	padding: 22px 24px 26px;
}

.gp-home-post time {
	color: var(--hm-muted);
	font-size: 13px;
}

.gp-home-post__title {
	margin: 6px 0 10px !important;
	font: 400 19px/1.35 var(--font-sans);
}

.gp-home-post__title a {
	color: var(--hm-navy) !important;
}

.gp-home-post__title a:hover {
	color: var(--hm-green-dark) !important;
}

.gp-home-post p {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	color: var(--hm-muted);
	font-size: 15px;
	line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
	.gp-home-intro {
		padding: 56px 0 40px;
	}

	.gp-home-intro .gp-home__inner,
	.gp-home-feature {
		grid-template-columns: 1fr;
	}

	.gp-home-intro .gp-home__inner {
		gap: 40px;
	}

	.gp-home-feature__media img {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.gp-home-feature__body {
		padding: 32px;
	}

	.gp-home-sites__grid,
	.gp-home-lines__grid,
	.gp-home-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gp-home-sites__grid > :last-child:nth-child(odd),
	.gp-home-blog__grid > :last-child:nth-child(odd) {
		display: none;
	}

	.gp-home-lines,
	.gp-home-blog {
		padding: 64px 0;
	}
}

@media (max-width: 640px) {
	.gp-home__inner {
		padding: 0 16px;
	}

	.gp-home-values,
	.gp-home-sites__grid,
	.gp-home-lines__grid,
	.gp-home-blog__grid {
		grid-template-columns: 1fr;
	}

	.gp-home-sites__grid > :last-child:nth-child(odd),
	.gp-home-blog__grid > :last-child:nth-child(odd) {
		display: flex;
	}

	.gp-home__section-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		margin-bottom: 28px;
	}

	.gp-home__lead {
		font-size: 17px;
	}

	.gp-home-sites {
		padding-bottom: 56px;
	}

	.gp-home-feature__body {
		padding: 26px 22px;
	}
}
