/*
 * NEG Management — homepage.
 *
 * Corporate consulting-firm direction (Onisey brief, ASLPM reference — see
 * front-page.php for the structural notes). Sections: hero, about, approach,
 * services, industries, QRA, why-choose, who-we-help, experience preview,
 * contact CTA. Loaded only on the front page.
 */

body.home {
	/* Denser section rhythm than the shared --neg-section-y (used by inner
	   pages, left untouched) — the homepage should read as substantial
	   rather than sparse/editorial. */
	--neg-home-section-y: clamp(3.5rem, 6vw, 6rem);
}

/* ============================ HERO ============================ */
/* Full-width, image-led corporate hero. One strong static photograph is the
   visual foundation (no split panel, no carousel); a controlled navy
   gradient overlay keeps the text block legible over it. */
.home-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 92vh;
	padding-top: calc(var(--neg-topbar-h) + var(--neg-header-h));
	overflow: hidden;
}

.home-hero__media {
	position: absolute;
	inset: 0;
}

.home-hero__image {
	position: absolute;
	inset: 0;
	background-image: url("../img/hero-infrastructure-no-people.webp");
	background-position: 58% center;
	background-size: cover;
	background-repeat: no-repeat;
}

.home-hero__overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(0deg, rgba(6, 20, 31, 0.92) 0%, rgba(6, 20, 31, 0.55) 45%, rgba(6, 20, 31, 0.28) 100%),
		linear-gradient(90deg, rgba(6, 20, 31, 0.55) 0%, rgba(6, 20, 31, 0.12) 55%);
}

.home-hero__content {
	position: relative;
	z-index: 1;
	max-width: 52rem; /* room for the long H1; paragraphs stay capped at 40rem */
	padding-block: 4rem clamp(3rem, 6vw, 5rem);
}

.home-hero__eyebrow {
	margin: 0 0 1.1rem;
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--neg-teal-light);
}

/* White heading with a soft brand-teal shadow (client request 2026-10-05).
   rgb(0, 165, 156) = --neg-teal; rgba used for the translucent shadow. */
.home-hero__title {
	margin: 0 0 1.75rem;
	color: #fff;
	text-shadow: 0 2px 3px rgba(0, 165, 156, 0.55), 0 0 20px rgba(0, 165, 156, 0.35);
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2.25rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
}

/* Client-supplied supporting paragraphs (2026-10-05). */
.home-hero__lede {
	max-width: 40rem;
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.0625rem);
}

.home-hero__lede + .home-hero__lede {
	margin-top: 0.9rem;
}

.home-hero__actions {
	display: flex;
	align-items: center;
	gap: 2rem;
	margin-top: 2.25rem;
	flex-wrap: wrap;
}

.neg-link--on-dark {
	color: #fff;
}

/* ========================= OUR APPROACH ========================= */
/* Ice-tint band between About NEG and Services — substantial (three
   client-supplied paragraphs) but capped so it doesn't outweigh the
   sections either side of it. */
.home-approach {
	padding-block: clamp(3rem, 6vw, 4.5rem);
	background: var(--neg-ice);
}

.home-approach__inner {
	max-width: 52rem;
}

.home-approach__inner h2 {
	margin: 0 0 1.1rem;
	color: var(--neg-navy);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	line-height: 1.15;
}

.home-approach__inner p {
	margin: 0 0 1.1rem;
	color: var(--neg-ink);
	font-size: 1.0625rem;
	line-height: 1.65;
}

.home-approach__inner p:last-child {
	margin-bottom: 0;
}

/* ========================= ABOUT NEG ========================= */
/* Traditional two-column company introduction: image on one side, a
   substantial copy block on the other — denser than a bare text section. */
.home-about {
	padding-block: var(--neg-home-section-y);
	background: var(--neg-paper);
}

.home-about__grid {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
}

.home-about__media {
	position: relative;
	aspect-ratio: 4 / 5;
}

.home-about__image {
	position: absolute;
	inset: 0;
	background-position: 58% center;
	background-size: cover;
	background-repeat: no-repeat;
}

.home-about__body {
	max-width: 34rem;
}

.home-about__body h2 {
	max-width: 20ch;
	margin: 0.85rem 0 1.25rem;
	font-size: clamp(1.75rem, 2.8vw, 2.5rem);
	line-height: 1.15;
}

.home-about__body p {
	margin: 0 0 1.25rem;
	color: var(--neg-muted);
	font-size: 1.0625rem;
}

.home-about__body p:first-child {
	color: var(--neg-ink);
}

.home-about__body .neg-link {
	color: var(--neg-navy);
}

/* ======================= WHO WE HELP ======================= */
/* Deliberately a supporting section, not a large homepage moment — compact
   heading, tight cards, less padding than the sections around it. */
.home-audiences {
	padding-block: clamp(2.75rem, 4.5vw, 4rem);
	background: #fff;
}

.home-audiences__head {
	max-width: 40rem;
	margin-bottom: 2rem;
}

.home-audiences__head h2 {
	max-width: 30ch;
	font-size: clamp(1.375rem, 1.8vw, 1.625rem);
	line-height: 1.2;
	margin: 0.6rem 0 0;
}

.home-audiences__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-top: 1px solid var(--neg-line);
}

.home-audience {
	padding: 1.5rem 1.5rem 1.75rem;
	border-bottom: 1px solid var(--neg-line);
	border-right: 1px solid var(--neg-line);
}

.home-audience:first-child {
	border-left: 1px solid var(--neg-line);
}

.home-audience__title {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
	line-height: 1.15;
}

.home-audience__text {
	margin: 0;
	color: var(--neg-muted);
	font-size: 0.8125rem;
}

/* ==================== SERVICES OVERVIEW ==================== */
.home-services {
	padding-block: var(--neg-home-section-y);
	background: var(--neg-navy-deep);
	color: #fff;
}

.home-services__head {
	display: grid;
	grid-template-columns: 170px 1fr 0.7fr;
	gap: 3.5rem;
	align-items: end;
	margin-bottom: 3.75rem;
}

.home-services__head h2 {
	margin: 0;
	color: #fff;
	font-size: clamp(2.25rem, 4.4vw, 3.75rem);
	line-height: 1.05;
}

.home-services__head p {
	margin: 0;
	color: rgba(255, 255, 255, 0.58);
}

.home-services__grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 2px;
}

/* Large, typography-led blocks alternating navy/blue — restrained corporate
   colour rather than photography we don't have or a white SaaS card grid.
   A coral tick is the only accent colour, kept deliberately sparing. */
.home-service {
	position: relative;
	grid-column: span 4;
	display: flex;
	flex-direction: column;
	min-height: 360px;
	padding: 2.75rem 2.4rem;
	color: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-service--navy {
	background: var(--neg-navy);
}

.home-service--blue {
	background: var(--neg-blue);
}

/* Exactly five services: 3 + 2 wide. Six (2026-09-29, Engineering added)
   falls through to the default span 4 — two even rows of three. */
.home-service:nth-child(4):nth-last-child(2),
.home-service:nth-child(5):last-child {
	grid-column: span 6;
}

.home-service:hover,
.home-service:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.home-service::before {
	content: "";
	display: block;
	width: 32px;
	height: 3px;
	margin-bottom: 1.75rem;
	background: var(--neg-coral);
}

.home-service__title {
	margin: 0 0 0.9rem;
	color: #fff;
	font-size: 1.6rem;
	line-height: 1.1;
}

.home-service__text {
	flex: 1;
	max-width: 26rem;
	margin: 0 0 1.75rem;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.78);
}

.home-service__link {
	display: inline-flex;
	align-items: baseline;
	gap: 0.55rem;
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 0.8125rem;
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 5px;
}

.home-service__link span {
	color: var(--neg-teal-light);
	text-decoration: none;
}

/* ==================== PROJECT EXPERIENCE PREVIEW ==================== */
/* Replaces the removed Industries section. A smaller preview of the same
   image-card language used on /projects/ — real featured image first, else
   a representative stock fallback, else a plain colour card. Restrained:
   4 items only, no implication these are NEG corporate contracts. */
.home-projects {
	padding-block: var(--neg-home-section-y);
	background: #fff;
}

.home-projects__head {
	max-width: 40rem;
	margin-bottom: 1.25rem;
}

.home-projects__head h2 {
	max-width: 24ch;
	margin: 0.85rem 0 0.75rem;
	font-size: clamp(1.75rem, 2.6vw, 2.25rem);
	line-height: 1.15;
}

.home-projects__head p {
	margin: 0;
	max-width: 34rem;
	color: var(--neg-muted);
}

.home-projects__note {
	margin: 0 0 1.5rem;
	color: var(--neg-muted);
	font-size: 0.8125rem;
	font-style: italic;
}

.home-projects__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2px;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	background: var(--neg-line);
}

.home-projects__item {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	padding: 1.5rem;
	color: #fff;
}

.home-projects__item--navy { background: var(--neg-navy); }
.home-projects__item--blue { background: var(--neg-blue); }
.home-projects__item--teal { background: var(--neg-teal-panel); }

.home-projects__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.home-projects__item--image:hover .home-projects__img {
	transform: scale(1.05);
}

.home-projects__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(6, 20, 31, 0.88) 0%, rgba(6, 20, 31, 0.35) 55%, rgba(6, 20, 31, 0.05) 100%);
	transition: background 0.3s ease;
}

.home-projects__item--image:hover .home-projects__overlay {
	background: linear-gradient(0deg, rgba(6, 20, 31, 0.94) 0%, rgba(6, 20, 31, 0.5) 60%, rgba(6, 20, 31, 0.15) 100%);
}

.home-projects__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.home-projects__title {
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.25;
}

.home-projects__location {
	font-size: 0.8125rem;
	opacity: 0.8;
}

/* =================== QUANTITATIVE RISK ANALYSIS =================== */
.home-qra {
	padding-block: clamp(4rem, 7vw, 6rem);
	background: var(--neg-teal-panel);
	color: #fff;
}

.home-qra__grid {
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: clamp(3rem, 7vw, 7.5rem);
	align-items: center;
}

.home-qra__head .neg-index__label {
	color: rgba(255, 255, 255, 0.68);
}

.home-qra__head h2 {
	max-width: 18ch;
	margin: 0.85rem 0 0;
	color: #fff;
	font-size: clamp(1.75rem, 2.8vw, 2.35rem);
	line-height: 1.15;
}

.home-qra__body {
	max-width: 40rem;
}

.home-qra__body p {
	margin: 0 0 1.5rem;
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.0625rem;
}

.home-qra__body .neg-link {
	color: #fff;
}

/* ====================== WHY CHOOSE NEG ====================== */
/* Dark full-width section with benefit columns — a traditional consultancy
   "Why Choose Us" treatment, not another pale/ice panel. */
.home-why {
	padding-block: var(--neg-home-section-y);
	background: var(--neg-navy);
	color: #fff;
}

.home-why__grid {
	display: grid;
	grid-template-columns: 0.7fr 1.3fr;
	gap: clamp(3rem, 7vw, 6rem);
}

.home-why__intro .neg-index__label {
	color: rgba(255, 255, 255, 0.6);
}

.home-why__intro h2 {
	margin: 0.85rem 0 1.25rem;
	color: #fff;
	font-size: clamp(1.9rem, 3.2vw, 2.75rem);
	line-height: 1.12;
}

.home-why__intro p {
	max-width: 28rem;
	color: rgba(255, 255, 255, 0.72);
}

.home-why__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.home-why__item {
	padding: 2rem 1.85rem;
	background: var(--neg-navy-deep);
	border-left: 3px solid var(--neg-coral);
}

.home-why__item h3 {
	margin: 0 0 0.6rem;
	color: #fff;
	font-size: 1.25rem;
}

.home-why__item p {
	margin: 0;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.9375rem;
}

/* ==================== EXPERIENCE PREVIEW ==================== */
.home-experience {
	padding-block: var(--neg-home-section-y);
	background: var(--neg-paper);
}

.home-experience__head {
	max-width: 40rem;
	margin-bottom: 2.5rem;
}

.home-experience__head h2 {
	max-width: 24ch;
	margin: 0.85rem 0 0.75rem;
	font-size: clamp(1.75rem, 2.6vw, 2.25rem);
	line-height: 1.15;
}

.home-experience__head p {
	margin: 0;
	max-width: 34rem;
	color: var(--neg-muted);
}

.home-experience__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	background: var(--neg-line);
	border: 1px solid var(--neg-line);
}

.home-experience__item {
	flex: 1 1 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	padding: 1.5rem;
	background: var(--neg-paper);
}

.home-experience__logo-box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 150px;
	height: 64px;
	background: #fff;
	border: 1px solid var(--neg-line);
	border-radius: var(--neg-radius);
}

.home-experience__logo-box img {
	display: block;
	width: auto;
	max-width: 118px;
	height: auto;
	max-height: 42px;
	object-fit: contain;
}

/* ======================= CONTACT CTA ======================= */
.home-contact {
	position: relative;
	padding-block: var(--neg-home-section-y);
	/* Brand coral fails WCAG AA behind this band's white text (axe: 2.37-2.75:1). */
	background: var(--neg-coral-panel);
	color: #fff;
	overflow: hidden;
}

.home-contact::after {
	content: "NEG";
	position: absolute;
	right: -20px;
	bottom: -90px;
	color: rgba(255, 255, 255, 0.09);
	font-family: var(--neg-font-display);
	font-weight: 800;
	font-size: 16rem;
	line-height: 1;
	pointer-events: none;
}

.home-contact__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: clamp(3rem, 8vw, 7rem);
}

.home-contact__eyebrow {
	margin: 0;
	font-family: var(--neg-font-display);
	font-weight: 700;
	font-size: 0.5625rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.home-contact__title {
	margin: 1.5rem 0 0;
	color: #fff;
	font-size: clamp(2.5rem, 5vw, 4.5rem);
	line-height: 1.04;
}

.home-contact__text {
	margin: 0.4rem 0 2.25rem;
	color: rgba(255, 255, 255, 0.92); /* raised from 0.85 — was 4.43:1 against the panel bg, just under WCAG AA */
}

.home-contact__actions {
	display: grid;
	gap: 1rem;
	justify-items: start;
}

.home-contact__phone {
	color: #fff;
	font-family: var(--neg-font-display);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 5px;
}

/* ========================= RESPONSIVE ========================= */
@media (max-width: 1024px) {
	.home-hero {
		min-height: 78vh;
	}

	.home-services__head {
		grid-template-columns: 110px 1fr;
	}

	.home-services__head p {
		grid-column: 2;
	}

	.home-audiences__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.home-audience:nth-child(odd) {
		border-left: 1px solid var(--neg-line);
	}

	.home-services__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.home-service,
	.home-service:nth-child(4):nth-last-child(2),
	.home-service:nth-child(5):last-child {
		grid-column: auto;
	}

	/* Odd count only: last card spans the 2-col row instead of leaving a gap. */
	.home-service:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.home-about__grid,
	.home-qra__grid,
	.home-why__grid,
	.home-contact__grid {
		grid-template-columns: 1fr;
		gap: 3rem;
	}

	.home-projects__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.home-hero {
		min-height: 68vh;
	}

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

	.home-hero__actions {
		align-items: flex-start;
		flex-direction: column;
		gap: 1.25rem;
	}

	.home-services__head,
	.home-why__grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	/* Undo the 1024px breakpoint's explicit 2nd-column placement — at a
	   single-column width that placement would otherwise force an unwanted
	   implicit 2nd grid track (and horizontal overflow). */
	.home-services__head p {
		grid-column: auto;
	}

	.home-audiences__grid,
	.home-services__grid {
		grid-template-columns: 1fr;
	}

	.home-audience {
		border-left: 1px solid var(--neg-line);
	}

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