/* ==========================================================================
   Home page hero
   The big first section of the home page with the dashboard, plus the 404 page. HTML: template-parts/home/home-hero.php
   ========================================================================== */

.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: calc(var(--header-h) + 40px) 0 90px;
	overflow: hidden;
	isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__video {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	opacity: .38;
	filter: saturate(1.2) hue-rotate(-10deg);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fade { position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(to bottom, transparent, var(--bg)); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; }
.orb--1 { width: 520px; height: 520px; background: var(--c-primary); top: -160px; right: -120px; animation: float-a 18s ease-in-out infinite; }
.orb--2 { width: 420px; height: 420px; background: #c026d3; bottom: -160px; left: -120px; opacity: .35; animation: float-b 22s ease-in-out infinite; }
.orb--3 { width: 300px; height: 300px; background: var(--c-glow); top: 40%; left: 45%; opacity: .16; animation: float-a 26s ease-in-out infinite reverse; }
.grid-lines {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero__inner { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(40px, 5vw, 72px); }
.hero__inner--center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.hero__inner--center .hero__actions { justify-content: center; }
.hero__title {
	font-size: clamp(2.3rem, 4.3vw, 3.8rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -.035em;
	margin-bottom: 24px;
}
/* Rotating word sits on its own line with a glowing underline; fixed height avoids layout jumps. */
.word-rotator { display: block; height: 1.25em; white-space: nowrap; }
.word-rotator__word { position: relative; display: inline-block; padding-bottom: .08em; }
.word-rotator__word::after {
	content: "";
	position: absolute;
	left: 2px;
	right: 2px;
	bottom: -.02em;
	height: .09em;
	border-radius: 999px;
	background: var(--grad);
	box-shadow: 0 0 18px rgba(34, 211, 238, .55);
	transform-origin: left;
	animation: underline-in .8s var(--ease) .15s both;
}
.word-rotator__word.is-in::after { animation: underline-in .8s var(--ease) .2s both; }
.word-rotator__word.is-out { animation: word-out .45s var(--ease) forwards; }
.word-rotator__word.is-in { animation: word-in .6s var(--ease) forwards; }
.hero__text { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 580px; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
/* Social proof row */
.hero__proof { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.avatar-stack { display: flex; }
.avatar-stack span {
	width: 44px; height: 44px;
	display: grid; place-items: center;
	margin-left: -12px;
	border-radius: 50%;
	border: 3px solid var(--bg);
	background: var(--grad-btn);
	color: #fff;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: .78rem;
}
.avatar-stack span:first-child { margin-left: 0; }
.avatar-stack span:nth-child(2) { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.avatar-stack span:nth-child(3) { background: linear-gradient(135deg, #d97706, #f59e0b); }
.avatar-stack .avatar-stack__more { background: #1d1446; border-color: var(--bg); color: var(--c-glow); font-size: .72rem; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .5); }
.hero__proof-text { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; color: var(--muted); line-height: 1.3; }
.hero__proof-text strong { color: #fff; }
.hero__proof-divider { width: 1px; height: 38px; background: var(--border-strong); }
.hero__proof-item { display: flex; align-items: center; gap: 10px; color: #fff; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.hero__proof-item .std-icon { color: var(--success); width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(52, 211, 153, .12); }
.hero__proof-item small { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; }
.hero__visual { position: relative; width: 100%; max-width: 520px; justify-self: end; padding: 34px 0 40px; }
/* Growth dashboard mockup */
.dash {
	position: relative;
	padding: 20px 22px 22px;
	border-radius: 24px;
	text-align: left;
	background: linear-gradient(160deg, rgba(30, 18, 72, .82), rgba(12, 7, 34, .9));
	border-color: rgba(167, 139, 250, .28);
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03), 0 0 120px -30px rgba(124, 58, 237, .7);
	transform: perspective(1400px) rotateY(-9deg) rotateX(4deg);
	transform-style: preserve-3d;
	transition: transform .8s var(--ease);
}
.hero__visual:hover .dash { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.dash::before { /* glowing top edge */
	content: "";
	position: absolute;
	inset: 0 18% auto;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .9), rgba(34, 211, 238, .9), transparent);
}
.dash__top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dash__dots { display: flex; gap: 6px; }
.dash__dots i { width: 9px; height: 9px; border-radius: 50%; background: #f87171; }
.dash__dots i:nth-child(2) { background: #fbbf24; }
.dash__dots i:nth-child(3) { background: #34d399; }
.dash__title { font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: #fff; }
.dash__live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(52, 211, 153, .12); color: #6ee7b7; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dash__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.dash__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.dash__kpi { padding: 12px 12px 10px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.dash__kpi small { display: block; color: var(--muted); font-size: .7rem; margin-bottom: 4px; white-space: nowrap; }
.dash__kpi strong { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: #fff; line-height: 1.1; }
.dash__kpi em { display: inline-flex; align-items: center; gap: 2px; margin-top: 4px; font-style: normal; font-size: .7rem; font-weight: 600; }
.dash__kpi em.is-up { color: var(--success); }
.dash__chart { position: relative; height: 150px; margin-bottom: 8px; border-radius: 14px; background: rgba(0, 0, 0, .18); border: 1px solid var(--border); overflow: hidden; }
.dash__chart svg { position: absolute; inset: 0 0 22px; width: 100%; height: calc(100% - 22px); }
.dash__grid line { stroke: rgba(255, 255, 255, .06); stroke-dasharray: 4 6; }
.dash__line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dash-draw 2.2s var(--ease) .5s forwards; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .6)); }
.dash__area { opacity: 0; animation: dash-fade 1.2s ease 1.6s forwards; }
.dash__pin { position: absolute; right: 6px; top: 6%; width: 12px; height: 12px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .25), 0 0 18px var(--c-accent); opacity: 0; animation: dash-fade .4s ease 2.6s forwards, pulse-accent 2s 3s infinite; }
.dash__months { position: absolute; inset: auto 12px 4px; display: flex; justify-content: space-between; color: var(--muted); font-size: .66rem; }
.dash__channels { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.dash__channels li { display: grid; grid-template-columns: 26px 118px 1fr 38px; align-items: center; gap: 10px; font-size: .78rem; }
.dash__ch-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(124, 58, 237, .25); color: var(--c-primary-2); }
.dash__ch-label { color: #d8d3f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash__bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.dash__bar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--grad); transform: scaleX(0); transform-origin: left; animation: dash-bar 1.4s var(--ease) forwards; animation-delay: calc(1s + var(--i) * .18s); }
.dash__channels b { text-align: right; color: #fff; font-family: var(--font-display); font-weight: 700; }
.float-card {
	position: absolute;
	z-index: 2;
	display: flex; align-items: center; gap: 12px;
	padding: 12px 18px 12px 12px;
	border-radius: 16px;
	background: linear-gradient(160deg, rgba(36, 22, 84, .92), rgba(14, 8, 38, .92));
	box-shadow: var(--shadow);
	animation: bob 6s ease-in-out infinite;
}
.float-card strong { display: block; font-family: var(--font-display); font-size: .98rem; color: #fff; line-height: 1.15; white-space: nowrap; }
.float-card small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.float-card--a { left: -10%; bottom: -14px; }
.float-card--b { right: -6%; top: -2%; animation-delay: -3s; }
/* Sits over the empty upper-left of the chart, clear of the KPI tiles. */
.float-card--c { left: -14%; top: 47%; animation-delay: -1.5s; }
.float-card__icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: rgba(52, 211, 153, .15); color: var(--success); }
.float-card__icon--accent { background: rgba(245, 158, 11, .15); color: var(--c-accent); }
.float-card__icon--glow { background: rgba(34, 211, 238, .15); color: var(--c-glow); }
.hero__scroll {
	position: absolute;
	left: 50%; bottom: 28px;
	width: 26px; height: 42px;
	margin-left: -13px;
	border: 2px solid rgba(255, 255, 255, .3);
	border-radius: 20px;
}
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: #fff; animation: scroll-dot 2s infinite; }
.error-code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 11rem); font-weight: 800; line-height: 1; display: block; }
.hero--404 .hero__text { margin-inline: auto; }
.search-again { max-width: 520px; margin: 0 auto 30px; }
.hero__video { opacity: .5; }

@media (max-width: 1024px) {
	.hero__inner { grid-template-columns: 1fr; text-align: center; }
	.hero__content { display: flex; flex-direction: column; align-items: center; }
	.hero__text { margin-inline: auto; }
	.hero__actions, .hero__proof { justify-content: center; }
	.hero__visual { max-width: 480px; justify-self: center; padding: 10px 0 0; }
	.dash { transform: none; }
	.float-card { display: none; }
}

@media (max-width: 680px) {
	.dash { padding: 16px; }
	.dash__kpi { padding: 10px 8px 8px; }
	.dash__kpi strong { font-size: 1.1rem; }
	.dash__channels li { grid-template-columns: 26px 112px 1fr 34px; gap: 8px; font-size: .74rem; }
	.hero__proof-divider { display: none; }
	.hero__proof { flex-direction: column; gap: 12px; }
	.hero__proof-text { align-items: center; text-align: center; }
	.hero__actions .btn { width: 100%; }
	/* Phone layout: tighter top, one-line pill, glass trust card */
	.hero { min-height: auto; padding: calc(var(--header-h) + 22px) 0 56px; }
	.hero .pill { gap: 8px; max-width: 100%; margin-bottom: 18px; padding: 7px 14px 7px 10px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: linear-gradient(110deg, rgba(124, 58, 237, .28), rgba(34, 211, 238, .14)); border-color: rgba(167, 139, 250, .45); box-shadow: 0 10px 26px -14px rgba(124, 58, 237, .9); }
	.hero__title { margin-bottom: 16px; font-size: clamp(2.05rem, 10vw, 2.6rem); line-height: 1.08; }
	.hero__text { margin-bottom: 24px; font-size: .98rem; line-height: 1.65; }
	.hero__actions { gap: 10px; width: 100%; margin-bottom: 22px; }
	.hero__actions .btn { padding-block: 15px; border-radius: 16px; }
	.hero__proof { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px 14px; width: 100%; padding: 14px 16px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); text-align: left; }
	.hero__proof-text { align-items: flex-start; text-align: left; }
	.hero__proof-item { grid-column: 1 / -1; justify-content: center; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
	.hero__proof-item .std-icon { width: 30px; height: 30px; padding: 6px; }
	.hero__proof-item small { display: inline; margin-left: 4px; }
	.hero__visual { margin-top: 8px; }
}
@media (max-width: 360px) {
	.hero .pill { font-size: .72rem; padding-inline: 9px 12px; }
	.hero__proof { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.hero__proof-text { align-items: center; text-align: center; }
	.dash__channels li { grid-template-columns: 26px 1fr 70px 32px; }
}
