/* ==========================================================
   BFMS - Home page
   ========================================================== */

/* ---------- Hero slider ---------- */
/* Scroll runway: the pinned stage stays on screen while this section scrolls */
.hero-home {
	--c: 1;
	--t1: 1;
	--t2: 1;
	--t3: 1;
	--cue: 0;
	--cover: 58%;
	height: 100vh;
	height: 100svh;
	position: relative;
	overflow: visible;
	background: transparent;
	border-radius: 0;
}

.hero-pin {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	background: var(--black);
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Video fills the whole screen */
.hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	transform: scale(calc(1 + var(--c) * .07));
	filter: brightness(calc(1 - var(--c) * .18));
	will-change: transform;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .35) 100%);
	pointer-events: none;
	z-index: 1;
}

/* Black curtain rising from the bottom */
.hero-curtain {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(180deg,
		rgba(0, 0, 0, 0)    0%,
		rgba(0, 0, 0, .04)  8%,
		rgba(0, 0, 0, .14)  18%,
		rgba(0, 0, 0, .32)  30%,
		rgba(0, 0, 0, .54)  44%,
		rgba(0, 0, 0, .74)  58%,
		rgba(0, 0, 0, .88)  72%,
		rgba(0, 0, 0, .94)  85%,
		rgba(0, 0, 0, .96) 100%);
	transform: translate3d(0, calc(100% - var(--c) * var(--cover)), 0);
	will-change: transform;
}

.hero-home .hero-content {
	position: relative;
	z-index: 3;
	padding-bottom: 60px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
}

/* Hero Heading: each line slides up out of a mask */
.hero-home .hero-content h1 {
	font-size: clamp(32px, 4.4vw, 64px);
	line-height: 1.12;
	margin-bottom: 30px;
	animation: none;
}

.hero-line {
	display: block;
	overflow: hidden;
	padding-bottom: .12em;
	margin-bottom: -.12em;
}

.hero-line-in {
	display: block;
	opacity: var(--t1);
	transform: translate3d(0, calc((1 - var(--t1)) * 110%), 0);
	will-change: transform, opacity;
}

.hero-line:nth-child(2) .hero-line-in {
	opacity: var(--t2);
	transform: translate3d(0, calc((1 - var(--t2)) * 110%), 0);
}

.hero-home .hero-content .btn-pill.hero-cta {
	animation: none;
	opacity: var(--t3);
	transform: translate3d(0, calc((1 - var(--t3)) * 24px), 0);
	pointer-events: auto;
}

/* Scroll cue (only before the user starts scrolling) */
.hero-scroll-cue {
	position: absolute;
	left: 50%;
	bottom: 28px;
	z-index: 3;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: rgba(255, 255, 255, .85);
	font-size: 12px;
	letter-spacing: .24em;
	text-transform: uppercase;
	opacity: var(--cue);
	pointer-events: none;
}

.hero-scroll-cue i {
	position: relative;
	display: block;
	width: 1px;
	height: 46px;
	background: rgba(255, 255, 255, .28);
	overflow: hidden;
}

.hero-scroll-cue i::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 50%;
	background: var(--orange);
	animation: cueDrop 1.8s cubic-bezier(.65, 0, .35, 1) infinite;
}

@keyframes cueDrop {
	0% {
		transform: translateY(-100%);
	}

	100% {
		transform: translateY(200%);
	}
}

/* Header on the home page: hidden over the bare video, fades in with the text */
body.page-home .site-header {
	position: fixed;
	transition: background .3s ease, padding .3s ease, opacity .6s ease, visibility .6s ease;
}

body.page-home.hero-nav-hidden .site-header {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

body.page-home.in-hero .site-header.sticky {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

/* Intro animation of the nav when the page loads (animates children only, so the mobile slide-in panel is untouched) */
@keyframes navIntro {
	from {
		opacity: 0;
		transform: translate3d(0, -18px, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

body.page-home .header-logo,
body.page-home .menu-toggle {
	animation: navIntro .9s .1s cubic-bezier(.22, .61, .36, 1) backwards;
}

@media (min-width: 992px) {
	body.page-home .main-nav>ul>li {
		animation: navIntro .9s cubic-bezier(.22, .61, .36, 1) backwards;
	}

	body.page-home .main-nav>ul>li:nth-child(1) { animation-delay: .25s; }
	body.page-home .main-nav>ul>li:nth-child(2) { animation-delay: .32s; }
	body.page-home .main-nav>ul>li:nth-child(3) { animation-delay: .39s; }
	body.page-home .main-nav>ul>li:nth-child(4) { animation-delay: .46s; }
	body.page-home .main-nav>ul>li:nth-child(5) { animation-delay: .53s; }
	body.page-home .main-nav>ul>li:nth-child(6) { animation-delay: .60s; }
	body.page-home .main-nav>ul>li:nth-child(7) { animation-delay: .67s; }

	body.page-home .main-nav .btn-connect {
		animation: navIntro .9s .75s cubic-bezier(.22, .61, .36, 1) backwards;
	}
}

@media (prefers-reduced-motion: reduce) {

	body.page-home .header-logo,
	body.page-home .menu-toggle,
	body.page-home .main-nav>ul>li,
	body.page-home .main-nav .btn-connect {
		animation: none;
	}
}

body.page-home.menu-open .site-header {
	opacity: 1;
	visibility: visible;
}

/* Scroll runway only when JS drives the animation (no-JS / reduced motion = static finished hero) */
.hero-home.hero-js {
	height: 230vh;
}

@media (max-width: 991px) {
	.hero-home {
		--cover: 62%;
	}

	.hero-home.hero-js {
		height: 220vh;
	}
}

@media (max-width: 767px) {
	.hero-home {
		--cover: 66%;
	}

	.hero-home.hero-js {
		height: 210vh;
	}

	.hero-home .hero-content {
		padding-bottom: 56px;
	}

	.hero-home .hero-content h1 {
		margin-bottom: 22px;
	}
}

@media (max-height: 500px) and (orientation: landscape) {
	.hero-home {
		--cover: 80%;
	}

	.hero-home .hero-content {
		padding-bottom: 28px;
	}

	.hero-home .hero-content h1 {
		font-size: 28px;
		margin-bottom: 14px;
	}
}

/* Legacy slider styles - kept for other pages if needed */
.hero-slider,
.hero-slide {
	position: absolute;
	inset: 0;
}

.hero-slide {
	display: flex;
	align-items: flex-end;
	padding-bottom: 60px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s ease, visibility .8s ease;
}

.hero-slide.active {
	opacity: 1;
	visibility: visible;
}

.hero-slide::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .35) 100%);
	pointer-events: none;
}

.hero-slide .hero-bg {
	transform: scale(1.06);
	transition: transform 6s ease;
}

.hero-slide.active .hero-bg {
	transform: scale(1);
}

.hero-home .hero-dots {
	top: 406px;
}

/* ---------- Stats ---------- */
.stats-section {
	padding: 136px 0 110px;
}

.stats-section .section-title {
	margin-bottom: 72px;
}

.stats-grid {
	display: grid;
	grid-template-columns: 293fr 323fr 323fr 307fr;
}

.stat-item {
	padding: 0 32px;
	border-left: 1px solid var(--line);
}

.stat-item:first-child {
	padding-left: 0;
	border-left: 0;
}

.stat-number {
	font-size: 80px;
	font-weight: 300;
	line-height: 1;
	color: var(--text);
	letter-spacing: -2px;
	margin-bottom: 42px;
}

.stat-number em {
	font-style: normal;
	color: var(--orange);
}

.stat-item p {
	font-size: 32px;
	font-weight: 400;
	color: var(--text);
	line-height: 1;
}

/* ---------- Integrated solutions ---------- */
.solutions-section {
	padding: 96px 0 90px;
}

.solutions-section .section-title {
	line-height: 68px;
	padding-bottom: 32px;
	margin-bottom: 60px;
}

.solutions-list {
	max-width: 877px;
	margin: 0 auto 60px;
}

.solution-row {
	display: grid;
	grid-template-columns: 1fr 544px;
	align-items: center;
	gap: 40px;
}

.solution-row + .solution-row {
	margin-top: 52px;
}

.solution-row.reverse {
	grid-template-columns: 544px 1fr;
}

.solution-row.reverse .solution-text {
	order: 2;
	text-align: right;
}

.solution-row.reverse .solution-image {
	order: 1;
}

.solution-text h3 {
	color: var(--white);
	font-size: 36px;
	font-weight: 300;
	line-height: 1.05;
	margin-bottom: 26px;
}

.solution-row.reverse .link-explore {
	margin-right: 14px;
}

.solution-image {
	overflow: hidden;
}

.solution-image img {
	width: 100%;
	height: 390px;
	object-fit: cover;
	object-position: center 25%;
	transition: transform .6s ease;
}

.solution-row:hover .solution-image img {
	transform: scale(1.05);
}

/* ---------- Clients ---------- */
.clients-section {
	padding: 100px 0 90px;
}

.clients-section .section-title {
	margin-bottom: 58px;
}

.clients-grid {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	margin-bottom: 58px;
}

.client-logo img {
	height: 76px;
	width: auto;
	opacity: .95;
	filter: grayscale(1);
	transition: opacity .3s ease;
}

.client-logo:hover img {
	opacity: .6;
}

/* ---------- Practices ---------- */
.practices-section {
	background: var(--cream);
	padding: 100px 0 96px;
}

.practices-list {
	max-width: 990px;
	margin: 0 auto;
}

.practice-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
}

.practice-row.reverse .practice-image {
	order: 2;
}

.practice-row.reverse .practice-text {
	order: 1;
}

.practice-image img {
	width: 100%;
	height: 330px;
	object-fit: cover;
}

.practice-text {
	padding: 0 45px;
}

.practice-label {
	display: block;
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--orange);
	margin-bottom: 10px;
}

.practice-text h3 {
	font-size: 48px;
	font-weight: 500;
	color: var(--black);
	line-height: 1.2;
	margin-bottom: 14px;
}

.practice-text p {
	font-size: 18px;
	line-height: 1.3;
	color: #444;
	margin-bottom: 8px;
}

/* ---------- Certified ---------- */
.certified-section {
	padding: 96px 0 110px;
}

.certified-section .section-title {
	margin-bottom: 94px;
}

.certified-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	max-width: 1140px;
	margin: 0 auto;
}

.certified-item {
	text-align: center;
	border-left: 1px solid var(--line);
}

.certified-item:first-child {
	border-left: 0;
}

.certified-item img {
	width: 110px;
	height: 110px;
	margin: 0 auto 38px;
}

.certified-item p {
	font-size: 22px;
	color: var(--heading);
}

/* ---------- Newsletter slider ---------- */
.newsletter-section {
	padding: 94px 0 0;
}

.newsletter-section .section-title {
	margin-bottom: 58px;
}

.newsletter-slider {
	position: relative;
	padding: 0 76px;
	margin-bottom: 64px;
}

.newsletter-track {
	max-width: 1096px;
	margin: 0 auto;
	position: relative;
}

.newsletter-card {
	display: none;
	grid-template-columns: 495px 1fr;
	border: 1px solid var(--line-dark);
	min-height: 452px;
}

.newsletter-card.active {
	display: grid;
	animation: fadeCard .5s ease;
}

@keyframes fadeCard {
	from { opacity: 0; transform: translateX(20px); }
	to { opacity: 1; transform: translateX(0); }
}

.newsletter-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.newsletter-content {
	padding: 54px 70px 54px 52px;
}

.newsletter-content h3 {
	color: var(--white);
	font-size: 32px;
	font-weight: 400;
	line-height: 40px;
	margin-bottom: 16px;
}

.newsletter-content p {
	color: #a5a5a5;
	font-size: 20px;
	line-height: 26px;
	margin-bottom: 14px;
}

.slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	cursor: pointer;
	transition: opacity .25s ease;
}

.slider-arrow:hover {
	opacity: .6;
}

.slider-arrow img {
	width: 40px;
	height: 40px;
}

.slider-prev {
	left: 0;
}

.slider-next {
	right: 0;
}

/* ---------- Insights ---------- */
.insights-title {
	margin-bottom: 58px;
}

.insights-list {
	border-top: 1px solid var(--line-dark);
	margin-bottom: 160px;
}

.insight-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	height: 92px;
	border-bottom: 1px solid var(--line-dark);
	color: var(--white);
	font-size: 22px;
	font-weight: 500;
}

.insight-btn {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .6);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .25s ease, border-color .25s ease;
}

.insight-btn img {
	width: 18px;
	height: 18px;
	transition: transform .25s ease;
}

.insight-row:hover {
	color: var(--orange);
}

.insight-row:hover .insight-btn {
	background: var(--orange);
	border-color: var(--orange);
}

.insight-row:hover .insight-btn img {
	transform: rotate(45deg);
}

/* Text stat (Pan India) - smaller so it fits the column */
.stat-number.stat-text {
	font-size: 52px;
	line-height: 80px;
	letter-spacing: -1px;
	white-space: nowrap;
}

/* Certificates: badge + name + standard */
.certified-grid {
	display: flex;
	justify-content: center;
}

.certified-item {
	flex: 0 1 285px;
}

.certified-item:only-child {
	border-left: 0;
}

.certified-item img {
	width: 150px;
	height: 150px;
	margin-bottom: 26px;
}

.certified-item span {
	display: block;
	margin-top: 6px;
	color: #888;
	font-size: 15px;
}

@media (max-width: 991px) {
	.stat-number.stat-text {
		font-size: 40px;
		line-height: 64px;
	}
}

@media (max-width: 767px) {
	.stat-number.stat-text {
		font-size: 30px;
		line-height: 48px;
		white-space: normal;
	}

	.certified-item img {
		width: 120px;
		height: 120px;
	}
}

@media (max-width: 767px) {
	.certified-grid {
		flex-wrap: wrap;
		row-gap: 36px;
	}

	.certified-item {
		flex: 0 0 50%;
	}

	.certified-item:nth-child(odd) {
		border-left: 0;
	}

	.certified-item p {
		font-size: 16px;
	}

	.certified-item span {
		font-size: 13px;
	}
}

/* ---------- Clients: auto-scrolling logo strip ---------- */
.clients-marquee {
	overflow: hidden;
	margin-bottom: 58px;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.clients-track {
	display: flex;
	align-items: center;
	width: max-content;
}

.clients-track.is-running {
	animation: clientsScroll 40s linear infinite;
}

.clients-marquee:hover .clients-track {
	animation-play-state: paused;
}

.clients-track .client-logo {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 260px;
	height: 110px;
	padding: 0 30px;
}

.clients-track .client-logo img {
	max-width: 100%;
	max-height: 76px;
	height: auto;
}

.client-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 180px;
	height: 64px;
	border: 1px dashed #cfcfcf;
	color: #aaa;
	font-size: 14px;
	letter-spacing: .5px;
}

@keyframes clientsScroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.clients-track.is-running {
		animation: none;
	}

	.clients-marquee {
		overflow-x: auto;
	}
}

@media (max-width: 767px) {
	.clients-marquee {
		margin-bottom: 36px;
	}

	.clients-track .client-logo {
		width: 170px;
		height: 80px;
		padding: 0 18px;
	}

	.clients-track .client-logo img {
		max-height: 44px;
	}

	.client-placeholder {
		width: 130px;
		height: 48px;
		font-size: 12px;
	}

	.clients-track.is-running {
		animation-duration: 30s;
	}
}

/* Every client logo (and placeholder) sits in the same fixed box */
.clients-track .client-logo {
	width: 250px;
	height: 110px;
	padding: 0 40px;
}

.clients-track .client-logo img,
.clients-track .client-placeholder {
	width: 170px;
	height: 60px;
	max-width: none;
	max-height: none;
}

.clients-track .client-logo img {
	object-fit: contain;
}

@media (max-width: 767px) {
	.clients-track .client-logo {
		width: 160px;
		height: 80px;
		padding: 0 20px;
	}

	.clients-track .client-logo img,
	.clients-track .client-placeholder {
		width: 120px;
		height: 42px;
	}
}

/* Connect With Us Button Width */
.hero-home .hero-content .btn-pill {
    width: 250px;
    max-width: 100%;
    align-self: flex-start;
    justify-content: center;
}
