/**
 * Front page sections
 */

/* Transparent header over hero until scroll */
body.is-front-page-hero .service-header:not(.is-scrolled) {
	background: transparent;
	box-shadow: none;
}

.home-page .site-section {
	padding: 0;
}

.home-section {
	padding-block: var(--space-section);
}

.home-section__title {
	margin: 0 0 var(--space-inner);
	font-size: var(--text-2xl);
	font-weight: 800;
	color: var(--text-title);
}

.home-section__title--center {
	text-align: center;
}

/* Hero — full viewport, content clears fixed header */
.home-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100dvh;
	min-height: 100svh;
	padding-block: var(--space-xl);
	background-color: var(--bg-surface);
	background-image: var(--home-hero-bg);
	background-size: cover;
	background-position: center;
	text-align: center;
}

body.admin-bar .home-hero {
	min-height: calc(100dvh - 32px);
	min-height: calc(100svh - 32px);
}

@media (max-width: 782px) {
	body.admin-bar .home-hero {
		min-height: calc(100dvh - 46px);
		min-height: calc(100svh - 46px);
	}
}

.home-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		hsla(0, 0%, 0%, 0.2) 0%,
		hsla(0, 0%, 0%, 0.45) 40%,
		hsla(0, 0%, 0%, 0.7) 100%
	);
}

.home-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-m);
	max-width: 90rem;
	padding-top: 8rem;
	padding-bottom: var(--space-m);
}

.home-hero__title {
	margin: 0;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--text-title);
	text-transform: none;
}

.home-hero__lead {
	margin: 0;
	max-width: 72rem;
	font-size: var(--text-l);
	font-weight: 400;
	line-height: 1.5;
	color: var(--text-body);
	opacity: 0.95;
}

.home-hero__cta {
	margin-top: var(--space-xs);
	padding: 1.4rem 2.8rem;
	border-radius: var(--radius-xs);
	font-size: var(--text-m);
	text-transform: none;
}

/* Why — stepped cards (1/3 high, 2/4 low) */
.home-why__grid {
	--home-why-step: clamp(4rem, 6vw, 8rem);

	display: grid;
	grid-template-columns: var(--columns-4);
	gap: var(--space-m);
	align-items: start;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-why__card:nth-child(even) {
	margin-top: var(--home-why-step);
}

.home-why__card {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	align-self: start;
	height: auto;
	padding: var(--space-m);
	background: hsla(0, 0%, 8%, 1);
	border-color: var(--border-primary);
}

.home-why__icon {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.home-why__icon img {
	width: 4.8rem;
	height: 4.8rem;
	object-fit: contain;
}

.home-why__card-title {
	margin: 0;
	font-size: var(--text-l);
	font-weight: 700;
}

.home-why__card-text {
	margin: 0;
	font-size: var(--text-s);
	line-height: 1.55;
	opacity: 0.9;
}

/* About */
.home-about__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-inner);
	align-items: center;
}

.home-about__text {
	font-size: var(--text-m);
	line-height: 1.65;
	opacity: 0.92;
}

.home-about__text p {
	margin: 0;
}

.home-about__media {
	margin: 0;
	border-radius: var(--radius-m);
	overflow: hidden;
}

.home-about__media img {
	display: block;
	width: 100%;
	height: auto;
	filter: grayscale(100%);
}

/* Practices */
.home-practices__grid {
	margin-top: var(--space-m);
}

.home-practices__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: var(--space-inner);
}

.home-practices__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	min-width: min(100%, 28rem);
	padding: 1.4rem 2.4rem;
	border-radius: var(--radius-xs);
	background: var(--bg-surface);
	color: var(--text-title);
	font-family: var(--font-body);
	font-size: var(--text-m);
	font-weight: 600;
	text-decoration: none;
	transition:
		background-color 0.2s ease,
		box-shadow 0.2s ease,
		color 0.2s ease;
}

.home-practices__more-text {
	text-transform: none;
	font-variant: normal;
	letter-spacing: normal;
}

.home-practices__more:hover {
	background: var(--primary);
	box-shadow: var(--shadow-interactive-hover);
	color: var(--text-title);
}

.home-practices__more-icon {
	display: flex;
	flex-shrink: 0;
	width: 2.4rem;
	height: 1.8rem;
	color: var(--primary);
	transition: color 0.2s ease;
}

.home-practices__more:hover .home-practices__more-icon {
	color: var(--text-title);
}

.home-practices__more-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Clients */
.home-clients__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: var(--space-inner);
	align-items: center;
}

.home-clients__text {
	font-size: var(--text-m);
	line-height: 1.65;
	opacity: 0.92;
}

.home-clients__text p {
	margin: 0;
}

.home-clients__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 12rem;
	padding: var(--space-s);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-m);
	background: hsla(0, 0%, 8%, 1);
}

.home-clients__logo img {
	max-width: 100%;
	max-height: 8rem;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Recognition */
.home-recognition__slider {
	margin-top: var(--space-m);
}

.home-recognition__slider.dsa-home-slider-wrap {
	padding-inline: 5.6rem;
}

.home-recognition__slide {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	margin: 0;
}

.home-recognition__open {
	display: block;
	width: 100%;
	padding: 0;
	border: none;
	background: none;
	color: inherit;
	cursor: zoom-in;
	text-align: inherit;
}

.home-recognition__open:hover .home-recognition__frame {
	border-color: color-mix(in srgb, var(--primary) 45%, transparent);
	box-shadow: var(--shadow-interactive-hover);
}

.home-recognition__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: var(--space-m);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-m);
	background: hsla(0, 0%, 8%, 1);
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.home-recognition__frame img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

.home-recognition__caption {
	margin: 0;
	font-size: var(--text-s);
	line-height: 1.4;
	text-align: center;
	color: var(--text-body);
	opacity: 0.85;
}

.home-recognition__slider .dsa-home-slider__slide {
	flex-basis: calc((100% - var(--space-s) * 3) / 4);
	min-width: calc((100% - var(--space-s) * 3) / 4);
}

.home-recognition-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1090;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--layout-gutter);
}

.home-recognition-lightbox[hidden] {
	display: none;
}

.home-recognition-lightbox.is-open {
	display: flex;
}

.home-recognition-lightbox__overlay {
	position: absolute;
	inset: 0;
	background: hsla(0, 0%, 0%, 0.88);
}

.home-recognition-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-s);
	width: min(96rem, 100%);
	max-height: min(92vh, 80rem);
	padding: var(--space-m);
}

.home-recognition-lightbox__close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4.4rem;
	height: 4.4rem;
	padding: 0;
	border: none;
	border-radius: var(--radius-full);
	background: var(--primary);
	color: var(--text-title);
	font-size: 2.4rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.home-recognition-lightbox__close:hover {
	background: var(--primary-hover);
	box-shadow: var(--shadow-interactive-hover);
}

.home-recognition-lightbox__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: min(78vh, 72rem);
	margin-inline: auto;
	object-fit: contain;
}

.home-recognition-lightbox__caption {
	margin: 0;
	max-width: 72rem;
	font-size: var(--text-m);
	line-height: 1.45;
	text-align: center;
	color: var(--text-title);
}

/* Team */
.home-team__slider {
	--home-team-shadow-pad: 3.2rem;

	margin-top: var(--space-m);
}

.home-team__slider .dsa-home-slider {
	align-items: flex-start;
}

.home-team__slider .dsa-home-slider__slide {
	flex-basis: calc((100% - var(--space-s) * 3) / 4);
	min-width: calc((100% - var(--space-s) * 3) / 4);
	padding: var(--home-team-shadow-pad) 0.2rem;
	box-sizing: border-box;
}

.home-team__card {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.home-team__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	width: 100%;
	border-radius: var(--radius-s);
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.2s ease;
}

.home-team__link:hover,
.home-team__link:focus-visible {
	box-shadow: var(--shadow-interactive-hover);
}

.home-team__link:hover .home-team__name,
.home-team__link:focus-visible .home-team__name {
	color: var(--primary);
}

.home-team__photo {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	margin: 0;
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 36rem;
	overflow: hidden;
}

.home-team__photo-media {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
}

.home-team__photo-media::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	height: 45%;
	background: linear-gradient(to top, var(--bg-body) 0%, transparent 100%);
	pointer-events: none;
}

.home-team__photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center bottom;
	filter: grayscale(100%);
}

.home-team__meta {
	padding: var(--space-s) var(--space-2xs) var(--space-m);
	text-align: center;
}

.home-team__name {
	margin: 0 0 var(--space-3xs);
	font-size: var(--text-l);
	font-weight: 700;
	color: var(--text-title);
}

.home-team__position {
	margin: 0;
	font-size: var(--text-s);
	line-height: 1.4;
	color: var(--text-body);
	opacity: 0.85;
}

/* Sliders (shared) */
.dsa-home-slider-wrap {
	position: relative;
	overflow: hidden;
}

.home-team__slider.dsa-home-slider-wrap {
	padding-inline: 5.6rem;
}

.home-clients__slider.dsa-home-slider-wrap {
	overflow: hidden;
}

.dsa-home-slider {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--space-s);
	overflow-x: hidden;
	scroll-behavior: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.dsa-home-slider::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.dsa-home-slider--touch {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
}

.dsa-home-slider__slide {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.home-clients__slider .dsa-home-slider__slide {
	flex-basis: calc((100% - var(--space-s) * 2) / 3);
	min-width: calc((100% - var(--space-s) * 2) / 3);
}

.dsa-home-slider-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4.4rem;
	height: 4.4rem;
	padding: 0;
	border: none;
	border-radius: var(--radius-xs);
	background: hsla(0, 0%, 30%, 0.65);
	color: var(--text-title);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background 0.2s ease;
}

.dsa-home-slider-arrow:hover {
	background: hsla(0, 0%, 40%, 0.85);
}

.dsa-home-slider-arrow--prev {
	left: 0;
}

.dsa-home-slider-arrow--next {
	right: 0;
}

.dsa-home-slider-arrow--hidden {
	visibility: hidden;
	pointer-events: none;
}

@media (max-width: 1024px) {
	.home-why__grid {
		--home-why-step: clamp(3rem, 5vw, 6rem);

		grid-template-columns: var(--columns-2);
	}

	.home-team__slider .dsa-home-slider__slide,
	.home-recognition__slider .dsa-home-slider__slide {
		flex-basis: calc((100% - var(--space-s)) / 2);
		min-width: calc((100% - var(--space-s)) / 2);
	}

	.home-recognition__slider.dsa-home-slider-wrap {
		padding-inline: 4.4rem;
	}
}

@media (max-width: 768px) {
	.home-hero__inner {
		padding-top: 7rem;
	}

	.home-about__grid,
	.home-clients__grid {
		grid-template-columns: 1fr;
	}

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

	.home-why__card:nth-child(even) {
		margin-top: 0;
	}

	.home-clients__slider .dsa-home-slider__slide {
		flex-basis: calc((100% - var(--space-s)) / 2);
		min-width: calc((100% - var(--space-s)) / 2);
	}

	.home-team__slider .dsa-home-slider__slide,
	.home-recognition__slider .dsa-home-slider__slide {
		flex-basis: 72%;
		min-width: 72%;
	}

	.home-team__slider.dsa-home-slider-wrap,
	.home-recognition__slider.dsa-home-slider-wrap {
		padding-inline: 4.4rem;
	}

	.dsa-home-slider-arrow {
		width: 3.6rem;
		height: 3.6rem;
	}
}

@media (max-width: 470px) {
	.home-team__slider .dsa-home-slider,
	.home-recognition__slider .dsa-home-slider {
		gap: 0;
	}

	.home-team__slider .dsa-home-slider__slide,
	.home-recognition__slider .dsa-home-slider__slide {
		flex: 0 0 100%;
		min-width: 100%;
		max-width: 100%;
		scroll-snap-stop: always;
	}

	.home-team__slider.dsa-home-slider-wrap,
	.home-recognition__slider.dsa-home-slider-wrap {
		padding-inline: 3.6rem;
	}
}
