/**
 * Homepage hero — bright cream grid layout (FACTdemo reference).
 * Scoped under .fact-home to avoid bleeding into other templates.
 */

/* Reset GeneratePress content shell on homepage */
body.home .site-content,
body.home #primary,
body.home .content-area {
	padding: 0;
	margin: 0;
	max-width: none;
}

body.home .inside-article,
body.home .entry-content {
	margin: 0;
	padding: 0;
}

body.home .entry-header {
	display: none;
}

.fact-home .hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: min(850px, 100svh);
	padding: 128px 0 72px;
	overflow: hidden;
	color: #242424;
	background: #fafaf8;
}

.fact-home .hero-grid {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 1;
	background-image:
		linear-gradient(rgba(42, 42, 42, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(42, 42, 42, 0.035) 1px, transparent 1px),
		radial-gradient(circle at 76% 46%, rgba(255, 43, 28, 0.075), transparent 31%);
	background-size: 72px 72px, 72px 72px, auto;
	mask-image: linear-gradient(90deg, transparent 0%, black 38%, black 100%);
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, black 38%, black 100%);
}

.fact-home .hero-content {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(460px, 0.9fr) minmax(540px, 1.1fr);
	align-items: center;
	column-gap: clamp(42px, 6.5vw, 106px);
	row-gap: 28px;
	width: 100%;
}

.fact-home .hero-region-banner {
	grid-column: 1 / -1;
	max-width: 820px;
	margin: 18px 0 16px;
}

.fact-home .hero-region-headline {
	margin: 0;
	color: #242424;
	font: 600 clamp(28px, 3.2vw, 42px) / 1.12 var(--font-display);
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.fact-home .hero-region-headline span {
	color: var(--signal);
}

.fact-home .hero-region-sub {
	margin: 8px 0 0;
	max-width: 560px;
	color: #676767;
	font: 400 15px / 1.5 var(--font-sans);
}

.fact-home .hero.has-region-masthead {
	align-items: flex-start;
}

.fact-home .hero.has-region-masthead .hero-content {
	row-gap: 12px;
}

.fact-home .hero.has-region-masthead .product-stage {
	height: clamp(400px, calc(100svh - 400px), 440px);
}

.fact-home .hero-copy-column {
	position: relative;
	z-index: 3;
}

.fact-home .hero-title {
	max-width: 760px;
	margin: 0 0 30px;
	color: #242424;
	font: 600 clamp(40px, 4.4vw, 64px) / 0.98 var(--font-display);
	letter-spacing: -0.015em;
}

.fact-home .hero-title-lead {
	display: inline-block;
	color: #242424;
}

.fact-home .hero-title-emphasis {
	position: relative;
	display: inline-block;
	color: var(--signal) !important;
}

.fact-home .hero-title-emphasis-mask {
	display: block;
	overflow: hidden;
	padding-bottom: 0.12em;
}

.fact-home .hero-title-emphasis-copy {
	position: relative;
	display: inline-block;
}

.fact-home .hero-title-emphasis.is-live .hero-title-emphasis-copy::after {
	content: "";
	position: absolute;
	inset: 10% auto 14% 0;
	width: 22%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
	transform: translateX(-130%) skewX(-16deg);
	animation: hero-emphasis-sheen 5.4s var(--easing) 1.7s infinite;
	pointer-events: none;
	mix-blend-mode: overlay;
}

.fact-home .hero-title-emphasis-rail {
	display: block;
	height: 2px;
	margin-top: 0.04em;
	background: currentColor;
	transform-origin: left center;
	font-style: normal;
	transform: scaleX(0);
}

.fact-home .hero-title-emphasis.is-live .hero-title-emphasis-rail {
	animation: hero-emphasis-rail 0.68s var(--easing) 0.78s both;
}

@keyframes hero-emphasis-sheen {
	0%, 64% { transform: translateX(-130%) skewX(-16deg); opacity: 0; }
	70% { opacity: 1; }
	84% { transform: translateX(560%) skewX(-16deg); opacity: 1; }
	90%, 100% { transform: translateX(560%) skewX(-16deg); opacity: 0; }
}

@keyframes hero-emphasis-rail {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

@keyframes hero-title-lead-in {
	from { opacity: 0; transform: translateY(28px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-title-copy-in {
	from { transform: translateY(108%); }
	to { transform: translateY(0); }
}

.fact-home .hero-title-lead {
	animation: hero-title-lead-in 0.78s var(--easing) 0.1s both;
}

.fact-home .hero-title-emphasis-copy {
	animation: hero-title-copy-in 0.72s var(--easing) 0.42s both;
}

.fact-home.is-reduced-motion .hero-title-lead,
.fact-home.is-reduced-motion .hero-title-emphasis-copy,
.fact-home.is-reduced-motion .hero-title-emphasis.is-live .hero-title-emphasis-rail {
	animation: none;
	transform: none;
	opacity: 1;
}

.fact-home .hero-lower {
	display: block;
}

.fact-home .hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 13px;
	margin-top: 30px;
}

.fact-home .button-dark,
.fact-home .button-soft {
	min-height: 54px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	padding: 0 24px;
	border-radius: 980px;
	font: 400 17px/1.28 var(--font-display);
	letter-spacing: 0.022em;
	transition:
		transform 0.18s var(--easing),
		background 0.18s var(--easing),
		color 0.18s var(--easing),
		border-color 0.18s var(--easing);
}

.fact-home .button-dark {
	color: #fff;
	background: #292929;
	border: 1px solid #292929;
}

.fact-home .button-dark:hover {
	color: #fff;
	background: var(--signal);
	border-color: var(--signal);
	transform: translateY(-2px);
}

.fact-home .button-soft {
	color: #333;
	background: #eeeeeb;
	border: 1px solid #deded9;
}

.fact-home .button-soft:hover {
	color: var(--signal);
	background: #fff;
	border-color: rgba(255, 43, 28, 0.34);
	transform: translateY(-2px);
}

.fact-home .button-dark:active,
.fact-home .button-soft:active {
	transform: scale(0.97);
}

/* Product stage */
.fact-home .product-stage {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 575px;
	perspective: 1200px;
	transition: transform 0.1s linear;
	transform-origin: center center;
}

.fact-home .product-stage::before {
	content: "";
	position: absolute;
	left: 51%;
	top: 49%;
	width: 76%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 43, 28, 0.11), rgba(255, 43, 28, 0.025) 48%, transparent 70%);
	filter: blur(12px);
	pointer-events: none;
}

.fact-home .hero-fallback-image {
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 30px 75px rgba(38, 38, 38, 0.14);
}

/* Offset for GeneratePress header until custom header ships */
.fact-home .hero {
	padding-top: clamp(120px, 12vw, 160px);
}

.fact-home.is-reduced-motion .product-stage {
	transform: none !important;
}

@media (max-width: 1080px) {
	.fact-home .hero-content {
		grid-template-columns: minmax(390px, 0.84fr) minmax(480px, 1fr);
		gap: 30px;
	}

	.fact-home .product-dashboard.magic-box-ui,
	.fact-home .product-dashboard.cxo-tower-ui {
		width: 100%;
	}

	.fact-home .hero-title {
		font-size: clamp(36px, 4.2vw, 50px);
	}
}

@media (max-width: 850px) {
	.fact-home .hero {
		min-height: auto;
		padding: 120px 0 70px;
	}

	.fact-home .hero-content {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.fact-home .hero-copy-column {
		max-width: 680px;
	}

	.fact-home .hero-title {
		max-width: 700px;
		font-size: clamp(53px, 10.4vw, 78px);
	}

	.fact-home .product-stage {
		height: 540px;
		max-width: 720px;
		margin-inline: auto;
	}

	.fact-home .product-dashboard.magic-box-ui {
		width: 100%;
	}

	.fact-home .hero-grid {
		mask-image: linear-gradient(180deg, transparent, black 22%, black 100%);
		-webkit-mask-image: linear-gradient(180deg, transparent, black 22%, black 100%);
	}
}

@media (max-width: 540px) {
	.fact-home .hero {
		min-height: auto;
		padding: 110px 0 52px;
	}

	.fact-home .hero-title {
		margin: 0 0 24px;
		font-size: clamp(45px, 13vw, 58px);
		line-height: 0.98;
	}

	.fact-home .hero-actions {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 9px;
	}

	.fact-home .button-dark,
	.fact-home .button-soft {
		min-height: 49px;
		padding: 0 15px;
		font-size: 10px;
	}

	.fact-home .product-stage {
		height: 300px;
		width: calc(100% + 16px);
		margin-left: -8px;
	}

	.fact-home .product-dashboard.magic-box-ui {
		width: 620px;
		height: 365px;
		transform: scale(0.56);
		transform-origin: center;
	}

	.fact-home .magic-search {
		min-width: 130px;
	}

	.fact-home .magic-cursor {
		top: 129px;
	}

	.fact-home .magic-live-chip {
		right: -4px;
		bottom: 2px;
		min-width: 168px;
		gap: 10px;
		padding: 11px 13px;
		font-size: 9px;
	}

	.fact-home .magic-live-chip > i {
		width: 9px;
		height: 9px;
	}

	.fact-home .magic-live-chip b {
		font-size: 10px;
	}

	.fact-home .magic-performance-chip {
		left: -2px;
		bottom: 0;
		min-width: 176px;
		gap: 10px;
		padding: 11px 13px;
		font-size: 9px;
	}

	.fact-home .magic-performance-chip b {
		font-size: 16px;
	}

	.fact-home .performance-icon {
		width: 32px;
		height: 32px;
	}

	.fact-home .magic-shadow {
		height: 80%;
		width: 95%;
	}

	.fact-home .hero-grid {
		background-size: 42px 42px, 42px 42px, auto;
	}
}
