/* home-services.css — task_0020 + 0020b brands strip
 * Brands strip + 8-card services grid replacing legacy home-slides + home-content.
 * Mobile-first, pure CSS (no WOW.js/no JS), tokens-only.
 */

/* ── Brands strip (directly below hero) ─────────── */
.home-brands {
	padding: 1.75rem 1rem;
	background: var(--c-white);
	border-bottom: 1px solid rgba(35, 31, 32, .06);
}

.home-brands__container {
	max-width: 1320px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.home-brands__label {
	margin: 0;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--c-dark);
	opacity: .65;
	text-align: center;
}

/* Marquee viewport — overflow hidden + edge-fade mask */
.home-brands__viewport {
	width: 100%;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	        mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.home-brands__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 2.5rem;
	width: max-content;
	animation: brands-marquee 40s linear infinite;
}

.home-brands__viewport:hover .home-brands__track,
.home-brands__viewport:focus-within .home-brands__track {
	animation-play-state: paused;
}

/* Mobile: shorter loop so motion doesn't feel sluggish at narrow widths */
@media (max-width: 767.98px) {
	.home-brands__track { animation-duration: 28s; }
}

@keyframes brands-marquee {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

.home-brands__item {
	margin: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.home-brands__logo {
	display: block;
	height: 36px;
	width: auto;
	max-width: 140px;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: .55;
	transition: filter .25s ease, opacity .25s ease;
}

.home-brands__logo:hover {
	filter: grayscale(0%);
	opacity: 1;
}

@media (min-width: 640px) {
	.home-brands { padding: 2rem 1.5rem; }
	.home-brands__track { gap: 3rem; }
	.home-brands__logo { height: 40px; max-width: 160px; }
}

@media (min-width: 1200px) {
	.home-brands { padding: 2.5rem 2rem; }
	.home-brands__track { gap: 4rem; }
	.home-brands__logo { height: 44px; max-width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
	.home-brands__viewport {
		-webkit-mask-image: none;
		        mask-image: none;
		overflow-x: auto;
		overflow-y: hidden;
	}
	.home-brands__track {
		animation: none;
		width: auto;
	}
	/* Hide duplicate set under reduced-motion — no loop needed */
	.home-brands__item[aria-hidden="true"] { display: none; }
	.home-brands__logo { transition: none; }
}


.home-services {
	padding: 3rem 1rem;
	background:
		radial-gradient(circle at 12% 8%, rgba(244, 111, 12, .08) 0%, transparent 45%),
		radial-gradient(circle at 88% 92%, rgba(120, 166, 54, .08) 0%, transparent 45%),
		var(--c-white);
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

/* Top-edge brand gradient strip — matches trust/cta/process/footer rhythm */
.home-services::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	width: 96px;
	height: 4px;
	transform: translateX(-50%);
	background: linear-gradient(90deg, var(--c-orange-brand), var(--c-green-brand));
	border-radius: 0 0 4px 4px;
	pointer-events: none;
	z-index: 1;
}

/* Decorative bg-mark — pressure washer wand mirrors home-cta texture */
.home-services__bg-mark {
	position: absolute;
	left: -3rem;
	bottom: -2rem;
	width: 280px;
	height: 280px;
	color: var(--c-orange-brand);
	opacity: .045;
	z-index: 0;
	pointer-events: none;
	transform: rotate(8deg);
}

.home-services__bg-mark svg {
	width: 100%;
	height: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	.home-services__bg-mark {
		animation: home-services-mark-drift 18s ease-in-out infinite alternate;
	}
}

@keyframes home-services-mark-drift {
	from { transform: rotate(8deg)  translate(0,    0); }
	to   { transform: rotate(14deg) translate(8px, -6px); }
}

.home-services__container {
	max-width: 1320px;
	margin: 0 auto;
	position: relative;
	z-index: 2;
}

.home-services__eyebrow {
	margin: 0 auto .65rem;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--c-orange-brand);
	text-align: center;
}

.home-services__heading {
	margin: 0 0 .5rem;
	font-size: clamp(1.625rem, 4.5vw, 2.5rem);
	font-weight: 900;
	letter-spacing: -.01em;
	line-height: 1.1;
	color: var(--c-dark);
	text-align: center;
}

.home-services__heading-accent {
	color: var(--c-orange-brand);
	position: relative;
	display: inline-block;
	padding-bottom: .15em;
}

.home-services__heading-accent::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 100%;
	background: linear-gradient(90deg, var(--c-orange-brand), var(--c-orange-shade));
	border-radius: 3px;
	transform-origin: left center;
	transform: scaleX(0);
}

@media (prefers-reduced-motion: no-preference) {
	.home-services__heading-accent::after {
		animation: home-services-underline-paint 700ms cubic-bezier(.22, .61, .36, 1) 200ms forwards;
	}
}
@media (prefers-reduced-motion: reduce) {
	.home-services__heading-accent::after {
		transform: scaleX(1);
	}
}

@keyframes home-services-underline-paint {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

.home-services__intro {
	margin: 0 auto 2rem;
	max-width: 56rem;
	text-align: center;
	color: var(--c-dark);
	font-size: clamp(.9375rem, 1.6vw, 1.0625rem);
	line-height: 1.55;
	opacity: .85;
}

/* ── Photo-bento services grid (task_0048) ─────────────────
 * Replaces the box-with-icon pattern: each service is a full-bleed photo
 * card with text overlay. First card spans 2×2 (feature) at desktop, last
 * spans 2×1 (wide closer). Real service photos from /images/gallery/. */
.home-services__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.home-services__card {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	min-height: 240px;
}

.home-services__link {
	position: relative;
	display: block;
	width: 100%;
	min-height: 240px;
	border-radius: 16px;
	overflow: hidden;
	color: var(--c-white);
	text-decoration: none;
	background: var(--c-dark);
	box-shadow: 0 4px 14px rgba(35, 31, 32, .08);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
	isolation: isolate;
}

.home-services__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	transition: transform .6s cubic-bezier(.22, .61, .36, 1), filter .35s ease;
}

/* Veil — dark gradient bottom-half for caption legibility, plus a subtle orange tint at top */
.home-services__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(180deg,
			rgba(35, 31, 32, .15) 0%,
			rgba(35, 31, 32, .25) 40%,
			rgba(35, 31, 32, .85) 100%);
	transition: background .35s ease;
}

.home-services__caption {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: .35rem;
	height: 100%;
	padding: 1.25rem 1.25rem 1.1rem;
	justify-content: flex-end;
}

.home-services__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: -.005em;
	color: var(--c-white);
	text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.home-services__desc {
	margin: 0;
	font-size: .875rem;
	line-height: 1.45;
	color: var(--c-white);
	opacity: .9;
	max-height: 0;
	overflow: hidden;
	transition: max-height .35s cubic-bezier(.2, .8, .2, 1), margin-top .35s ease;
}

.home-services__cta {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: .5rem;
	color: var(--c-orange-brand);
	font-weight: 800;
	font-size: .8125rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.home-services__cta-arrow {
	display: inline-block;
	transition: transform .25s ease;
}

/* Hover: scale photo, lift card, lighten veil, reveal description */
.home-services__link:hover,
.home-services__link:focus-visible {
	transform: translateY(-4px);
	box-shadow:
		0 18px 36px rgba(35, 31, 32, .25),
		0 0 0 1px rgba(244, 111, 12, .25);
	outline: none;
}

.home-services__link:focus-visible {
	box-shadow:
		0 18px 36px rgba(35, 31, 32, .25),
		0 0 0 3px rgba(244, 111, 12, .65);
}

.home-services__link:hover .home-services__photo,
.home-services__link:focus-visible .home-services__photo {
	transform: scale(1.06);
}

.home-services__link:hover .home-services__veil,
.home-services__link:focus-visible .home-services__veil {
	background:
		linear-gradient(180deg,
			rgba(35, 31, 32, .25) 0%,
			rgba(35, 31, 32, .45) 40%,
			rgba(35, 31, 32, .9) 100%);
}

.home-services__link:hover .home-services__desc,
.home-services__link:focus-visible .home-services__desc {
	max-height: 4.5em;
	margin-top: .25rem;
}

.home-services__link:hover .home-services__cta-arrow,
.home-services__link:focus-visible .home-services__cta-arrow {
	transform: translateX(4px);
}

/* Override Bootstrap's global `a:hover { text-decoration: underline }` for service tiles. */
.home-services__link,
.home-services__link:hover,
.home-services__link:focus-visible,
.home-services__link *,
.home-services__link:hover *,
.home-services__link:focus-visible * {
	text-decoration: none;
}

/* ── Tablet ─────────────────────────────────────── */
@media (min-width: 640px) {
	.home-services {
		padding: 3.5rem 1.5rem;
	}
	.home-services__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.25rem;
	}
	.home-services__card,
	.home-services__link {
		min-height: 220px;
	}
}

/* ── Bento grid kicks in (≥1024) ───────────────── */
@media (min-width: 1024px) {
	.home-services__grid {
		grid-template-columns: repeat(4, 1fr);
		grid-auto-rows: 220px;
		gap: 1.25rem;
	}
	.home-services__card,
	.home-services__link {
		min-height: 0;
		height: 100%;
	}
	.home-services__card--feature {
		grid-column: span 2;
		grid-row: span 2;
	}
	.home-services__card--feature .home-services__title {
		font-size: 1.5rem;
	}
	.home-services__card--feature .home-services__desc {
		font-size: .9375rem;
	}
	.home-services__card--wide {
		grid-column: span 2;
	}
}

/* ── Wide desktop ──────────────────────────────── */
@media (min-width: 1200px) {
	.home-services {
		padding: 4.5rem 2rem;
	}
	.home-services__grid {
		grid-auto-rows: 240px;
		gap: 1.5rem;
	}
	.home-services__heading {
		margin-bottom: .75rem;
	}
	.home-services__intro {
		margin-bottom: 3rem;
	}
	.home-services__card--feature .home-services__title {
		font-size: 1.75rem;
	}
}

/* ── Reduced motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.home-services__link,
	.home-services__photo,
	.home-services__veil,
	.home-services__desc,
	.home-services__cta-arrow,
	.home-services__bg-mark {
		transition: none !important;
		animation: none !important;
	}
	.home-services__link:hover,
	.home-services__link:focus-visible {
		transform: none;
	}
	.home-services__link:hover .home-services__photo,
	.home-services__link:focus-visible .home-services__photo {
		transform: none;
	}
	.home-services__link:hover .home-services__cta-arrow,
	.home-services__link:focus-visible .home-services__cta-arrow {
		transform: none;
	}
	.home-services__link:hover .home-services__desc,
	.home-services__link:focus-visible .home-services__desc {
		max-height: 4.5em;
	}
}

/* ── Card load-in stagger — gated to no-preference ────────── */
@media (prefers-reduced-motion: no-preference) {
	.home-services__grid[data-stagger] .home-services__card {
		opacity: 0;
		transform: translateY(14px);
		animation: home-services-card-in 600ms cubic-bezier(.22, .61, .36, 1) forwards;
	}
	.home-services__grid[data-stagger] .home-services__card:nth-child(1) { animation-delay:   0ms; }
	.home-services__grid[data-stagger] .home-services__card:nth-child(2) { animation-delay:  90ms; }
	.home-services__grid[data-stagger] .home-services__card:nth-child(3) { animation-delay: 180ms; }
	.home-services__grid[data-stagger] .home-services__card:nth-child(4) { animation-delay: 270ms; }
	.home-services__grid[data-stagger] .home-services__card:nth-child(5) { animation-delay: 360ms; }
	.home-services__grid[data-stagger] .home-services__card:nth-child(6) { animation-delay: 450ms; }
	.home-services__grid[data-stagger] .home-services__card:nth-child(7) { animation-delay: 540ms; }
	.home-services__grid[data-stagger] .home-services__card:nth-child(8) { animation-delay: 630ms; }
}

@keyframes home-services-card-in {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}
