/*
 * Engage360 pages (page-engage360.php, page-engage360-anonymous.php): the
 * hero, its background animation and the Engage sign-up only. Every other
 * section is a shared component (inc/components.php, assets/components.css)
 * styled by the site's own section rules. Sign-up hooks are the data-e3-*
 * attributes used by assets/engage360.js.
 */

.page-template-page-engage360-php,
.page-template-page-engage360-anonymous-php {
	background: #050407;
}

.e3 {
	--e3-muted: #b9b6c2;
	--e3-line: #ffffff1f;
	--e3-accent: linear-gradient(115deg, #fff 0%, #dccbff 30%, #a76dff 85%);
	--e3-accent-solid: #c8acff;
	--e3-display: "Bricolage Grotesque", "Bricolage Grotesque Fallback", Arial, Helvetica, sans-serif;
	--e3-gutter: max(6%, 50vw - 750px);
	position: relative;
	overflow-x: clip;
	color: #f7f6f8;
}

.e3-wrap {
	margin: 0 var(--e3-gutter);
}

/* ---- Hero ---- */

.e3-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 150px 0 110px;
	text-align: center;
}

.e3 .e3-hero h1 {
	margin: 0;
	font-family: var(--e3-display);
	font-size: clamp(40px, 5vw, 70px);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -.06em;
	text-wrap: balance;
	color: #efedf4;
	-webkit-text-fill-color: transparent;
	background: linear-gradient(110deg, #77747f 0%, #b9b6c2 14%, #fff 38%, #f5f3f8 55%, #a19eaa 80%, #76737f 100%);
	-webkit-background-clip: text;
	background-clip: text;
}

.e3-lead {
	max-width: 640px;
	margin: 22px auto 0;
	color: var(--e3-muted);
	font-size: 18px;
	line-height: 1.6;
}

/* Proof bar under the sign-up: four equal columns with dividers in a quiet
   glass strip, so the stats support the call to action instead of
   competing with it. */
.e3-hero-stats {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	max-width: 1080px;
	margin: 60px auto 0;
	padding: 30px 12px;
	overflow: hidden;
	border: 1px solid transparent;
	border-radius: 26px;
	background:
		radial-gradient(60% 140% at 50% 120%, #7c3aed33, #7c3aed00 70%) padding-box,
		linear-gradient(180deg, #120e1ad9, #0b0911d9) padding-box,
		linear-gradient(120deg, #a76dff66, #ffffff14 35%, #ffffff0d 65%, #a76dff4d) border-box;
	box-shadow: 0 24px 60px #0007, inset 0 1px #ffffff12;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	list-style: none;
}

.e3-hero-stats li {
	display: grid;
	align-content: start;
	justify-items: center;
	gap: 10px;
	padding: 6px 18px;
	text-align: center;
}

.e3-hero-stats::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 35%, #ffffff12 50%, transparent 65%);
	transform: translateX(-110%);
	pointer-events: none;
}

.e3-hero-stats.is-counted::after {
	animation: e3-stats-sweep 1.6s cubic-bezier(.22, 1, .36, 1) .1s both;
}

@keyframes e3-stats-sweep {
	to { transform: translateX(110%); }
}

.e3-hero-stats li + li {
	border-left: 1px solid #ffffff1a;
}

.e3-hero-stats strong {
	font-family: var(--e3-display);
	font-size: clamp(34px, 3.4vw, 52px);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -.04em;
	font-variant-numeric: tabular-nums;
	color: var(--e3-accent-solid);
	-webkit-text-fill-color: transparent;
	background: var(--e3-accent);
	-webkit-background-clip: text;
	background-clip: text;
}

.e3-hero-stats span {
	color: #cfc9da;
	font-size: 15px;
	line-height: 1.4;
}

/* ---- Hero background: "broadcast" — Engage's own first fold, anchored to
   the bottom edge like the homepage's light field (.cta-light-field).
   Layers, back to front: the site's background bars; a purple glow rising
   from the bottom centre (CSS, breathing); and a canvas drawn by
   assets/engage360.js — a perspective grid floor converging on the glow
   and fine dust rising out of it. Decorative
   (aria-hidden); the canvas pauses off-screen and draws one still frame for
   reduced motion. ---- */

.e3-hero-fx {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
	background: #050407;
}

/* Background bars, as on the other Fastrr heroes. */
.e3-hero-fx::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(90deg, #ffffff07 0 1px, #fff0 1px 64px);
	-webkit-mask-image: linear-gradient(180deg, #000 30%, #0000 85%);
	mask-image: linear-gradient(180deg, #000 30%, #0000 85%);
}

/* Glow rising from the bottom centre: the homepage light field's colours
   (#bc91de → #723698 → #32153f), breathing slowly. */
.fx-aurora {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(60% 75% at 50% 108%, #bc91de 0%, #723698 16%, #32153f 34%, #32153f00 62%),
		radial-gradient(40% 45% at 22% 100%, #7c3aed38, #7c3aed00 70%),
		radial-gradient(40% 45% at 78% 100%, #a76dff2e, #a76dff00 70%);
	transform-origin: 50% 100%;
	animation: e3-aurora 9s ease-in-out infinite alternate;
	will-change: transform, opacity;
}

.fx-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

@keyframes e3-aurora {
	0% { opacity: .85; transform: scale(1); }
	100% { opacity: 1; transform: scale(1.08); }
}

/* ---- Engage lockup under the hero heading ----
   The owner's lockup is dark text on transparent; on the dark hero its
   lightness is flipped and the hue turned back, so the text reads white and
   the marks stay purple. */
.e3-hero-lockup {
	display: block;
	width: min(340px, 82%);
	height: auto;
	margin: 22px auto 0;
	filter: invert(1) hue-rotate(180deg);
}

/* ---- Sign-up (the Checkout hero's pill phone entry) ---- */

.e3-signup {
	width: min(520px, 100%);
	margin: 40px auto 0;
	text-align: left;
}

/* Phone step sits under the centred headline: centre its label and the
   legal line; the OTP card keeps left-aligned text. */
.e3 [data-e3-step="mobile"] .e3-signup-title:not(#_),
.e3 [data-e3-step="email"] .e3-signup-title:not(#_),
.e3 [data-e3-step="mobile"] .e3-legal,
.e3 [data-e3-step] > .e3-error {
	text-align: center;
}

.e3-step {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}

.e3-step[hidden] {
	display: none;
}

.e3 .e3-signup-title:not(#_) {
	margin: 0;
	color: #ece9f1;
	-webkit-text-fill-color: currentColor;
	background: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0;
	text-align: left;
}

.e3-pill {
	display: flex;
	align-items: center;
	min-height: 58px;
	padding: 5px;
	border: 1px solid #fff;
	border-radius: 16px;
	background: #fffffff0;
	box-shadow: 0 8px 28px #0003;
}

.e3-pill:focus-within {
	outline: 2px solid #c4a6ff;
	outline-offset: 4px;
}

.e3-prefix {
	flex: none;
	padding: 0 14px;
	border-right: 1px solid #34313b22;
	color: #34313b;
	font-size: 16px;
	line-height: 26px;
}

.e3-pill input {
	flex: 1;
	min-width: 0;
	height: 46px;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: #17141d;
	font: inherit;
	font-size: 16px;
	outline: none;
}

.e3-pill input::placeholder {
	color: #8a8594;
}

/* The pill's button: the Checkout hero's CTA — fully round, dark, a colour
   glow rising inside its lower edge and a sheen that sweeps across on hover;
   disabled it only dims. Engage's own copy of the look (no shared code). */
.e3-pill-cta {
	position: relative;
	isolation: isolate;
	flex: none;
	overflow: hidden;
	min-height: 46px;
	padding: 11px 21px;
	border: 1px solid #17121f;
	border-radius: 999px;
	background: #17121f;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	cursor: pointer;
	transition: background .2s, box-shadow .3s;
}

.e3-pill-cta::before {
	content: "";
	position: absolute;
	z-index: -1;
	right: -15%;
	bottom: -42px;
	left: -15%;
	height: 58px;
	border-radius: 50%;
	background: linear-gradient(90deg, #f8c98c, #b558fe 30%, #6937ed 55%, #95eafa 80%, #fff);
	filter: blur(8px);
	opacity: .8;
	pointer-events: none;
	transition: bottom .4s, opacity .4s;
}

.e3-pill-cta::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, transparent 30%, #ffffff17 49%, transparent 65%);
	transform: translateX(-120%);
	pointer-events: none;
	transition: transform .65s;
}

.e3-pill-cta:hover:not(:disabled) {
	background: #2d2140;
	box-shadow: 0 0 28px #9454ec40;
}

.e3-pill-cta:hover:not(:disabled)::before {
	bottom: -34px;
	opacity: 1;
}

.e3-pill-cta:hover:not(:disabled)::after {
	transform: translateX(120%);
}

.e3-pill-cta:focus-visible {
	outline: 2px solid #ccb1ff;
	outline-offset: 4px;
}

.e3-pill-cta:disabled {
	opacity: .5;
	cursor: default;
}

/* The pill's travelling outline (Checkout hero). */
.e3-pill {
	position: relative;
	isolation: isolate;
}

.e3-pill-outline {
	position: absolute;
	inset: -2px;
	width: calc(100% + 4px);
	height: calc(100% + 4px);
	overflow: visible;
	pointer-events: none;
}

.e3-pill-edge {
	opacity: .38;
}

.e3-pill-signal {
	filter: drop-shadow(0 0 2px #bcabff88);
	animation: e3-pill-orbit 10s linear infinite;
}

@keyframes e3-pill-orbit {
	from { stroke-dashoffset: 0; }
	to { stroke-dashoffset: -1000; }
}

.e3-legal,
.e3-resend {
	margin: 0;
	color: var(--e3-muted);
	font-size: 12.5px;
	line-height: 1.6;
}

.e3-legal a {
	color: #fff;
}

.e3-error {
	margin: 0;
	color: #fca5a5;
	font-size: 13px;
}

/* OTP step (Checkout's pattern): it takes the number pill's place with the
   same footprint — "OTP sent to … · Change number" where the label was, the
   six light digit boxes inside the white pill with Verify at its end, then the
   resend line; an error or "Verified" line takes the resend line's place. */
.e3-otp-step.is-in {
	animation: e3-otp-in .32s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes e3-otp-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.e3-otp-sub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 10px;
	margin: 0;
	color: #ece9f1;
	font-size: 14px;
	font-weight: 450;
	line-height: 26px;
}

.e3-otp-sub b {
	color: #fff;
	font-weight: 600;
}

.e3-edit,
.e3-resend button {
	padding: 0;
	border: 0;
	background: none;
	color: #c8acff;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.e3-edit:hover,
.e3-resend button:hover:not(:disabled) {
	color: #e2d6ff;
}

.e3-resend button:disabled {
	color: #8a8594;
	text-decoration: none;
	cursor: default;
}

.e3-otp-entry {
	gap: 6px;
}

.e3-otp {
	display: flex;
	flex: 1;
	justify-content: space-between;
	gap: 6px;
	min-width: 0;
	padding: 0 4px;
}

.e3-otp input {
	flex: 1 1 0;
	width: 100%;
	min-width: 0;
	max-width: 48px;
	height: 46px;
	padding: 0;
	border: 1px solid #24223026;
	border-radius: 11px;
	background: #f4f4f2;
	color: #24222b;
	caret-color: #24222b;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	outline: none;
	transition: border-color .2s, box-shadow .2s, background .2s;
}

.e3-otp input:focus {
	border-color: #7b4dff;
	background: #fff;
	box-shadow: 0 0 0 3px #7b4dff26;
}

/* The pill's own focus ring would sit around the digits too: one ring only. */
.e3-otp-entry:focus-within {
	outline: 0;
}

.e3-otp-step .e3-resend {
	text-align: center;
}

/* A status line takes the resend line's place, so the step keeps its height. */
.e3-otp-step:has(.e3-error:not([hidden])) .e3-resend {
	display: none;
}

.e3-error.is-success {
	color: #b7f7c8;
}

/* Verified: the pill turns green for the beat before the next step. */
.e3-otp-step.is-verified .e3-otp-entry {
	border-color: #b7f7c8;
	background: #eaffd9;
}

.e3-otp-step.is-verified .e3-otp input {
	border-color: #b7f7c8;
	background: #f3ffe9;
}

/* The legal line sits under the number and OTP steps, not the email step. */
.e3-signup > .e3-legal {
	margin-top: 12px;
	text-align: center;
}

.e3-signup:has([data-e3-step="email"]:not([hidden])) > .e3-legal {
	display: none;
}

/* ---- Mobile ---- */

@media (width <= 680px) {
	.e3-hero-lockup {
		width: min(260px, 78%);
		margin-top: 18px;
	}

	.e3-hero {
		padding: 112px 0 64px;
	}

	.e3-hero h1 br,
	.e3-lead br {
		display: none;
	}

	.e3-lead {
		font-size: 16px;
	}

	/* 2 × 2 proof bar with a cross of dividers. */
	.e3-hero-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-top: 36px;
		padding: 6px 0;
	}

	.e3-hero-stats li {
		padding: 18px 8px;
	}

	.e3-hero-stats strong {
		font-size: 34px;
	}

	.e3-hero-stats li:nth-child(odd) {
		border-left: 0;
	}

	.e3-hero-stats li:nth-child(n + 3) {
		border-top: 1px solid #ffffff1a;
	}

	.e3-hero-stats span {
		font-size: 13px;
	}

	.e3-signup {
		margin-top: 30px;
	}

	.e3-pill {
		min-height: 54px;
	}

	.e3-pill-cta {
		padding: 10px 16px;
	}

	/* Phone: the pill holds the digits; Verify is the full-width button
	   beneath, as on the Checkout phone card. */
	.e3-otp-entry {
		flex-wrap: wrap;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
	}

	.e3-otp {
		flex-basis: 100%;
		gap: 5px;
		padding: 5px;
		border: 1px solid #fff;
		border-radius: 16px;
		background: #fffffff0;
		box-shadow: 0 8px 28px #0003;
	}

	.e3-otp input {
		max-width: none;
		height: 44px;
	}

	/* Verify under the pill: the same CTA, full width (Checkout's phone card). */
	.e3-otp-verify {
		flex-basis: 100%;
		min-height: 50px;
		margin-top: 6px;
		font-size: 15px;
	}

	/* The outline follows the white pill, which on phones is the digits box. */
	.e3-otp-entry > .e3-pill-outline {
		display: none;
	}

	.e3-otp-step.is-verified .e3-otp-entry {
		background: none;
	}

	.e3-otp-step.is-verified .e3-otp {
		border-color: #b7f7c8;
		background: #eaffd9;
	}

}

@media (prefers-reduced-motion: reduce) {
	.fx-aurora,
	.e3-otp-step.is-in,
	.e3-pill-signal,
	.e3-hero-stats.is-counted::after {
		animation: none;
	}

	.e3-pill-cta,
	.e3-pill-cta::before,
	.e3-pill-cta::after {
		transition: none;
	}
}
