/**
 * Homepage native-block layout.
 *
 * Scope every rule to .sph-home so the module cannot affect other pages.
 * Architecture: each section is an outer wp:group (alignfull, background
 * spans the viewport) + an inner wp:group container (max-width: 1280px,
 * content centered). Background fills the screen, content stays readable.
 *
 * Responsive: clamp() for fluid type/spacing, @media for grid breakpoints.
 * Same pattern proven in services.css / about.css.
 */

.sph-home {
	--home-dark: #0f141d;
	--home-ink: #18211c;
	--home-muted: #5d6962;
	--home-light: #f4f7f5;
	--home-white: #ffffff;
	--home-green: var(--sph-color-brand, #39a751);
	--home-green-dark: #267d39;
	--home-border: #dfe6e1;
	--home-container: 1280px;
	overflow: clip;
	background: var(--home-white);
	color: var(--home-ink);
	font-family: inherit;
	line-height: 1.65;
}

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

.sph-home h1,
.sph-home h2,
.sph-home h3,
.sph-home p,
.sph-home ol,
.sph-home ul,
.sph-home figure {
	margin-top: 0;
}

.sph-home h1,
.sph-home h2,
.sph-home h3 {
	color: inherit;
	font-family: inherit;
	letter-spacing: -0.025em;
}

.sph-home h1 {
	max-width: 760px;
	margin-bottom: 24px;
	font-size: clamp(2.55rem, 4.9vw, 4.65rem);
	line-height: 1.04;
}

.sph-home h2 {
	margin-bottom: 20px;
	font-size: clamp(2rem, 3.5vw, 3.25rem);
	line-height: 1.12;
}

.sph-home h3 {
	margin-bottom: 12px;
	font-size: clamp(1.08rem, 1.5vw, 1.3rem);
	line-height: 1.3;
}

.sph-home p {
	margin-bottom: 0;
}

/* ---- Section + container scaffolding ---- */

.sph-home__section {
	position: relative;
	width: 100%;
	padding: clamp(72px, 8vw, 120px) clamp(20px, 4.5vw, 64px);
}

.sph-home__container {
	position: relative;
	z-index: 1;
	width: min(100%, var(--home-container));
	margin: 0 auto;
}

.sph-home__eyebrow {
	margin-bottom: 18px;
	color: var(--home-green);
	font-size: 0.78rem;
	font-weight: 750;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sph-home__lead {
	max-width: 760px;
	font-size: clamp(1.04rem, 1.45vw, 1.2rem);
}

.sph-home__section-heading {
	max-width: 880px;
	margin-bottom: clamp(40px, 5vw, 64px);
}

/* ---- Buttons ---- */

.sph-home__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 32px;
}

.sph-home__button,
.sph-home__text-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sph-home__button {
	padding: 14px 22px;
}

.sph-home__button:hover,
.sph-home__text-link:hover {
	transform: translateY(-2px);
}

.sph-home__button--primary {
	background: var(--home-green);
	color: #07130a;
}

.sph-home__button--primary:hover {
	background: #4bd269;
	color: #07130a;
}

.sph-home__button--secondary {
	border-color: rgba(255, 255, 255, 0.34);
	background: rgba(255, 255, 255, 0.05);
	color: var(--home-white);
}

.sph-home__button--secondary:hover {
	border-color: rgba(255, 255, 255, 0.65);
	background: rgba(255, 255, 255, 0.1);
	color: var(--home-white);
}

.sph-home__button--light {
	background: var(--home-white);
	color: #184421;
}

.sph-home__button--light:hover {
	background: #effff2;
	color: #184421;
}

/* ---- Hero ---- */

.sph-home__hero {
	min-height: 700px;
	padding-top: clamp(80px, 7vw, 110px);
	padding-bottom: clamp(68px, 6vw, 90px);
	background:
		radial-gradient(circle at 12% 18%, rgba(57, 167, 81, 0.2), transparent 31%),
		radial-gradient(circle at 86% 72%, rgba(57, 167, 81, 0.1), transparent 28%),
		linear-gradient(135deg, #0b1017 0%, var(--home-dark) 55%, #101a14 100%);
	color: var(--home-white);
}

.sph-home__hero::before {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 44px 44px;
	content: '';
	mask-image: linear-gradient(to bottom, black, transparent 88%);
	pointer-events: none;
}

.sph-home__hero > .sph-home__container {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
	align-items: center;
	gap: clamp(48px, 5vw, 72px);
}

.sph-home__hero-copy > .sph-home__lead {
	color: #c7d1ca;
}

.sph-home__hero-visual {
	display: flex;
	justify-content: center;
	align-items: center;
}

.sph-home__hero-visual .wp-block-image {
	margin: 0;
}

.sph-home__hero-visual img {
	max-width: 100%;
	height: auto;
}

/* ---- Featured Power Solutions (4 product cards) ---- */

.sph-home__featured {
	background: var(--home-light);
}

.sph-home__featured-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(24px, 2.6vw, 32px);
}

.sph-home__card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: clamp(28px, 3.4vw, 44px);
	border: 1px solid var(--home-border);
	border-radius: 16px;
	background: var(--home-white);
	box-shadow: 0 10px 34px rgba(13, 37, 20, 0.055);
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.sph-home__card:hover {
	border-color: rgba(57, 167, 81, 0.45);
	box-shadow: 0 18px 46px rgba(13, 37, 20, 0.1);
	transform: translateY(-4px);
}

.sph-home__card-image {
	margin-bottom: 20px;
	border-radius: 12px;
	overflow: hidden;
}

.sph-home__card-image img {
	width: 100%;
	height: auto;
	display: block;
}

.sph-home__card-body > p {
	max-width: 680px;
	color: var(--home-muted);
}

/* ---- Explore Product Families (link cards) ---- */

.sph-home__families {
	background: var(--home-white);
}

.sph-home__families-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(24px, 2.6vw, 32px);
}

.sph-home__family-card {
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 2.8vw, 36px);
	border: 1px solid var(--home-border);
	border-radius: 14px;
	background: var(--home-white);
	box-shadow: 0 8px 24px rgba(13, 37, 20, 0.045);
	text-decoration: none;
	color: var(--home-ink);
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.sph-home__family-card:hover {
	border-color: rgba(57, 167, 81, 0.45);
	box-shadow: 0 14px 34px rgba(13, 37, 20, 0.075);
	transform: translateY(-3px);
}

.sph-home__family-card-image {
	margin-bottom: 16px;
	border-radius: 10px;
	overflow: hidden;
}

.sph-home__family-card-image img {
	width: 100%;
	height: auto;
	display: block;
}

.sph-home__family-card h3 {
	margin-bottom: 6px;
}

.sph-home__family-card p {
	color: var(--home-muted);
	font-size: 0.95rem;
}

/* ---- Why ServerPowerHub (homepage content-reframe) ---- */

.sph-home-why {
	width: 100%;
	padding: clamp(68px, 7vw, 104px) clamp(20px, 4.5vw, 64px);
	background: #0f141d;
	color: #ffffff;
}

.sph-home-why__container {
	width: min(100%, 1280px);
	margin: 0 auto;
}

.sph-home-why__heading {
	max-width: 820px;
	margin-bottom: clamp(36px, 4vw, 54px);
}

.sph-home-why__eyebrow {
	margin-bottom: 16px;
	color: #4bd269;
	font-size: 0.78rem;
	font-weight: 750;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sph-home-why__heading h2 {
	margin-bottom: 16px;
	font-size: clamp(2rem, 3.5vw, 3.25rem);
	line-height: 1.12;
}

.sph-home-why__heading > p:last-child {
	max-width: 760px;
	margin-bottom: 0;
	color: #c7d1ca;
	font-size: clamp(1.04rem, 1.45vw, 1.2rem);
	line-height: 1.65;
}

.sph-home-why__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.sph-home-why__card {
	min-height: 100%;
	padding: 28px 24px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.04);
}

.sph-home-why__card h3 {
	margin-bottom: 10px;
	font-size: 1.08rem;
	line-height: 1.3;
}

.sph-home-why__card p {
	margin-bottom: 0;
	color: #b9c6bd;
	font-size: 0.95rem;
	line-height: 1.6;
}

@media (max-width: 1100px) {
	.sph-home-why__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 780px) {
	.sph-home-why {
		padding-right: 24px;
		padding-left: 24px;
	}

	.sph-home-why__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.sph-home-why {
		padding-right: 20px;
		padding-left: 20px;
	}
}

/* ---- Key Applications (4 scenario cards) ---- */

.sph-home__applications {
	background: var(--home-light);
}

.sph-home__applications-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(24px, 2.6vw, 32px);
}

.sph-home__app-card {
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 2.8vw, 36px);
	border: 1px solid var(--home-border);
	border-radius: 14px;
	background: var(--home-white);
	box-shadow: 0 8px 24px rgba(13, 37, 20, 0.045);
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.sph-home__app-card:hover {
	border-color: rgba(57, 167, 81, 0.45);
	box-shadow: 0 14px 34px rgba(13, 37, 20, 0.075);
	transform: translateY(-3px);
}

.sph-home__app-card-image {
	margin-bottom: 18px;
	border-radius: 10px;
	overflow: hidden;
}

.sph-home__app-card-image img {
	width: 100%;
	height: auto;
	display: block;
}

.sph-home__app-card h3 {
	margin-bottom: 8px;
}

.sph-home__app-card > p {
	color: var(--home-muted);
	font-size: 0.95rem;
}

/* ---- Professional Sourcing (text + icon list) ---- */

.sph-home__sourcing {
	background: var(--home-white);
}

.sph-home__sourcing-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
	align-items: start;
	gap: clamp(48px, 6vw, 80px);
}

.sph-home__sourcing-copy > p {
	margin-bottom: 16px;
}

.sph-home__sourcing-copy > p:last-child {
	margin-bottom: 0;
}

.sph-home__sourcing-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sph-home__sourcing-list li {
	display: grid;
	grid-template-columns: 38px 1fr;
	gap: 14px;
	padding: 18px 0;
	border-top: 1px solid var(--home-border);
}

.sph-home__sourcing-list li > span {
	color: var(--home-green);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.sph-home__sourcing-list li strong {
	display: block;
	margin-bottom: 5px;
	color: var(--home-ink);
	font-size: 0.86rem;
	letter-spacing: 0.045em;
	text-transform: uppercase;
}

.sph-home__sourcing-list li p {
	color: var(--home-muted);
	font-size: 0.91rem;
	line-height: 1.55;
}

/* ---- Technical Support (process steps) ---- */

.sph-home__support {
	background: var(--home-dark);
	color: var(--home-white);
}

.sph-home__support .sph-home__section-heading > p:last-child {
	color: #aab8ae;
}

.sph-home__support-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(24px, 2.6vw, 32px);
}

.sph-home__support-card {
	padding: clamp(28px, 3vw, 40px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	background: rgba(22, 31, 42, 0.6);
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.sph-home__support-card:hover {
	border-color: rgba(57, 167, 81, 0.4);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.sph-home__support-card h3 {
	color: var(--home-white);
}

.sph-home__support-card > p {
	color: #b9c6bd;
	font-size: 0.95rem;
}

.sph-home__support-card .sph-home__step-list {
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.sph-home__support-card .sph-home__step-list li {
	position: relative;
	padding: 10px 0 10px 22px;
	color: #c7d1ca;
	font-size: 0.92rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sph-home__support-card .sph-home__step-list li::before {
	position: absolute;
	left: 0;
	top: 14px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--home-green);
	content: '';
}

/* ---- Final CTA ---- */

.sph-home__cta {
	padding-top: clamp(64px, 7vw, 92px);
	padding-bottom: clamp(64px, 7vw, 92px);
	background: var(--home-light);
}

.sph-home__cta-card {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
	align-items: center;
	gap: clamp(36px, 6vw, 80px);
	padding: clamp(34px, 5vw, 64px);
	border-radius: 22px;
	background: linear-gradient(130deg, #25833b, #39a751 58%, #2a8b40);
	box-shadow: 0 24px 60px rgba(35, 111, 52, 0.2);
	color: var(--home-white);
}

.sph-home__cta-card .sph-home__eyebrow {
	color: #d8ffe0;
}

.sph-home__cta-card h2 {
	max-width: 780px;
}

.sph-home__cta-card p:last-child {
	max-width: 740px;
	color: #e6f5e9;
}

.sph-home__cta-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 18px;
	margin-top: 0;
}

.sph-home__cta-actions .sph-home__button {
	width: 100%;
}

.sph-home__cta-links {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.sph-home__cta-links .sph-home__text-link {
	color: var(--home-white);
}

/* ---- Gutenberg hybrid adapters ---- */

.sph-home .wp-block-group,
.sph-home .wp-block-buttons {
	margin-block-start: 0;
	margin-block-end: 0;
}

.sph-home .wp-block-button.sph-home__button,
.sph-home .wp-block-button.sph-home__text-link {
	display: block;
	min-height: 0;
	margin-bottom: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
}

.sph-home .wp-block-button.sph-home__button > .wp-block-button__link,
.sph-home .wp-block-button.sph-home__text-link > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 14px 22px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sph-home .wp-block-button.sph-home__button--primary > .wp-block-button__link {
	background: var(--home-green);
	color: #07130a;
}

.sph-home .wp-block-button.sph-home__button--primary > .wp-block-button__link:hover {
	background: #4bd269;
	color: #07130a;
}

.sph-home .wp-block-button.sph-home__button--secondary > .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.34);
	background: rgba(255, 255, 255, 0.05);
	color: var(--home-white);
}

.sph-home .wp-block-button.sph-home__button--secondary > .wp-block-button__link:hover {
	border-color: rgba(255, 255, 255, 0.65);
	background: rgba(255, 255, 255, 0.1);
	color: var(--home-white);
}

.sph-home .wp-block-button.sph-home__button--light > .wp-block-button__link {
	background: var(--home-white);
	color: #184421;
}

.sph-home .wp-block-button.sph-home__button--light > .wp-block-button__link:hover {
	background: #effff2;
	color: #184421;
}

.sph-home .wp-block-button.sph-home__text-link > .wp-block-button__link,
.sph-home .wp-block-button.sph-home__text-link > .wp-block-button__link:hover {
	background: transparent;
	color: var(--home-white);
}

.sph-home .wp-block-button.sph-home__text-link > .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.5);
}

.sph-home .wp-block-button.sph-home__text-link > .wp-block-button__link:hover {
	border-color: rgba(255, 255, 255, 0.82);
	background: rgba(255, 255, 255, 0.1);
}

.sph-home .wp-block-button > .wp-block-button__link:focus-visible {
	outline: 3px solid rgba(72, 229, 107, 0.4);
	outline-offset: 3px;
}

/* ==================================================
   Responsive
================================================== */

@media (max-width: 1100px) {
	.sph-home__hero > .sph-home__container {
		grid-template-columns: 1fr;
	}

	.sph-home__hero-copy,
	.sph-home__hero-visual {
		max-width: 820px;
		margin: 0 auto;
	}

	.sph-home__featured-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sph-home__families-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sph-home__applications-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sph-home__support-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 780px) {
	.sph-home__section {
		padding-right: 24px;
		padding-left: 24px;
	}

	.sph-home__featured-grid,
	.sph-home__families-grid,
	.sph-home__applications-grid,
	.sph-home__sourcing-grid,
	.sph-home__cta-card {
		grid-template-columns: 1fr;
	}

	.sph-home__support-grid {
		grid-template-columns: 1fr;
	}

	.sph-home__actions,
	.sph-home__actions .sph-home__button,
	.sph-home__cta-actions,
	.sph-home__cta-actions .sph-home__button,
	.sph-home__cta-actions .sph-home__text-link {
		width: 100%;
	}

	.sph-home__cta-actions {
		align-items: flex-start;
	}
}

@media (max-width: 560px) {
	.sph-home h1 {
		font-size: clamp(2.35rem, 12vw, 3.15rem);
	}

	.sph-home__section {
		padding-right: 20px;
		padding-left: 20px;
	}

	.sph-home__card,
	.sph-home__family-card,
	.sph-home__app-card,
	.sph-home__cta-card {
		border-radius: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sph-home *,
	.sph-home *::before,
	.sph-home *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
