/*
 * The Vybe seed round block, in Vybe's own brand (myvybe.io/invest, components/invest/InvestHero.jsx).
 *
 * A recorded design exception: inside .fortnami-vybe only, Vybe's design replaces Fort Nami's,
 * so its gradients, glows, pill buttons, Lexend and negative letter-spacing apply here and nowhere
 * else. Colours and sizes are Vybe's tokens (lib/creators/theme.js, lib/invest/theme.js), not
 * theme.json presets. Loaded only on pages that render the block (inc/vybe.php).
 *
 * Mobile first. Breakpoints: 768px (tablet), 1024px (desktop), 1440px (wide).
 */

/* Self-hosted: the site makes no request to Google. Latin subset, weights 400 to 800. */
@font-face {
	font-family: Lexend;
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url(../../fonts/lexend-latin-variable.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.fortnami-vybe {
	--fortnami-vybe-ground: #0b0a14;
	--fortnami-vybe-ink: #f6f4ff;
	--fortnami-vybe-muted: rgba(246, 244, 255, 0.62);
	--fortnami-vybe-cta: #7c3aed;
	--fortnami-vybe-cta-hover: #6d28d9;
	--fortnami-vybe-lilac: #c4b5fd;

	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-block: 0;
	padding-block: 56px 64px;
	padding-inline: var(--wp--style--root--padding-left, 1.25rem) var(--wp--style--root--padding-right, 1.25rem);
	background-color: var(--fortnami-vybe-ground);
	color: var(--fortnami-vybe-ink);
	font-family: Lexend, system-ui, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
}

/* ----- Backdrop: two washes and the 60px grid, faded out before the bottom edge ----- */

.fortnami-vybe__backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
	mask-image: linear-gradient(to bottom, #000 55%, rgba(0, 0, 0, 0) 100%);
}

.fortnami-vybe__wash {
	position: absolute;
	border-radius: 50%;
}

.fortnami-vybe__wash--violet {
	top: -150px;
	right: -170px;
	width: 900px;
	height: 900px;
	background: radial-gradient(closest-side, rgba(124, 58, 237, 0.4), rgba(124, 58, 237, 0));
}

.fortnami-vybe__wash--magenta {
	top: 420px;
	left: -300px;
	width: 800px;
	height: 800px;
	background: radial-gradient(closest-side, rgba(217, 70, 239, 0.16), rgba(217, 70, 239, 0));
}

.fortnami-vybe__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 60px 60px;
	mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0) 90%);
}

/* ----- Layout: aligned to the Fort Nami page edges (the theme's wide size) ----- */

.fortnami-vybe__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	max-width: var(--wp--style--global--wide-size, 72rem);
	margin-inline: auto;
}

.fortnami-vybe__text {
	display: flex;
	flex-direction: column;
	max-width: 660px;
}

/* Marks the whole block as an advertisement before anything else in it is read or seen. */
.fortnami-vybe__ad {
	margin: 0 0 16px;
	color: var(--fortnami-vybe-muted);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.fortnami-vybe__brand {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

.fortnami-vybe__logo {
	display: block;
	width: auto;
	height: 35px;
}

.fortnami-vybe__chip {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	height: 30px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.05);
	color: var(--fortnami-vybe-ink);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	white-space: nowrap;
}

.fortnami-vybe__headline {
	margin: 24px 0 0;
	color: var(--fortnami-vybe-ink);
	font-family: inherit;
	font-size: 30px;
	font-style: normal;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.14;
}

.fortnami-vybe__accent {
	background: linear-gradient(135deg, #a78bfa 0%, #f0abfc 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.fortnami-vybe__subhead {
	max-width: 580px;
	margin: 14px 0 0;
	color: var(--fortnami-vybe-muted);
	font-size: 16px;
	line-height: 1.55;
}

/*
 * Call to action: the violet pill with the risk line directly under it, and the beta link.
 * Phones stack all three; from tablet width the beta link moves up beside the button.
 */

.fortnami-vybe__cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: 26px;
	text-align: center;
}

.fortnami-vybe__button {
	display: inline-flex;
	align-items: center;
	align-self: stretch;
	justify-content: center;
	box-sizing: border-box;
	height: 56px;
	padding: 0 34px;
	border-radius: 999px;
	background-color: var(--fortnami-vybe-cta);
	box-shadow: 0 14px 36px rgba(124, 58, 237, 0.38);
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.fortnami-vybe__button:hover {
	background-color: var(--fortnami-vybe-cta-hover);
	color: #fff;
}

.fortnami-vybe__beta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	color: var(--fortnami-vybe-ink);
	font-size: 16px;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(196, 181, 253, 0.6);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.fortnami-vybe__beta:hover {
	color: var(--fortnami-vybe-lilac);
}

.fortnami-vybe__arrow {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
}

.fortnami-vybe__risk {
	margin: 0;
	color: var(--fortnami-vybe-muted);
	font-size: 14px;
	line-height: 1.5;
}

/* The recording's pause button: bottom corner of the phone screen and of the phone-width card. */
.fortnami-vybe__pause {
	position: absolute;
	z-index: 5;
	right: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 50%;
	background: rgba(11, 10, 20, 0.72);
	color: #f6f4ff;
	cursor: pointer;
}

.fortnami-vybe__pause .fortnami-vybe__icon-play,
.fortnami-vybe__pause.is-paused .fortnami-vybe__icon-pause {
	display: none;
}

.fortnami-vybe__pause.is-paused .fortnami-vybe__icon-play {
	display: block;
}

.fortnami-vybe__pause:focus-visible {
	outline: 2px solid #c4b5fd;
	outline-offset: 2px;
}

.fortnami-vybe a:focus-visible {
	outline: 2px solid var(--fortnami-vybe-lilac);
	outline-offset: 2px;
}

/* ----- Phone and tablet: two tilted screens below the call to action ----- */

.fortnami-vybe__cards {
	position: relative;
	width: 100%;
	max-width: 370px;
	height: 350px;
	margin: 40px auto 0;
}

/*
 * Each screenshot sits in an iPhone: a near-black bezel with a titanium edge, the screen rounded
 * inside it, and the Dynamic Island over the top of the screen.
 */
.fortnami-vybe__card {
	position: absolute;
	box-sizing: border-box;
	width: 160px;
	height: 312px;
	padding: 6px;
	overflow: hidden;
	border: 2px solid #3b3b44;
	border-radius: 30px;
	background-color: #0d0d10;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.fortnami-vybe__card::before {
	content: "";
	position: absolute;
	z-index: 2;
	top: 12px;
	left: 50%;
	width: 30%;
	height: 13px;
	border-radius: 999px;
	background-color: #000;
	transform: translateX(-50%);
}

.fortnami-vybe__card > .fortnami-vybe__shot {
	border-radius: 22px;
	background-color: #fff;
}

.fortnami-vybe__card--screen {
	top: 0;
	left: 10px;
	transform: rotate(-3deg);
}

.fortnami-vybe__card--studio {
	top: 30px;
	right: 10px;
	transform: rotate(3deg);
}

.fortnami-vybe__shot {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.fortnami-vybe__floater {
	position: absolute;
	z-index: 4;
	display: block;
	height: auto;
	filter: drop-shadow(0 24px 48px rgba(88, 28, 135, 0.18));
	pointer-events: none;
}

.fortnami-vybe__cards .fortnami-vybe__floater--star {
	top: -18px;
	right: 6px;
	width: 54px;
}

/* ----- Desktop: the phone chassis, the screen inside it, the studio card over its edge ----- */

.fortnami-vybe__stage-frame {
	display: none;
}

.fortnami-vybe__stage {
	position: relative;
	width: 440px;
	height: 660px;
	transform-origin: 0 0;
}

.fortnami-vybe__stage .fortnami-vybe__floater--star {
	top: 24px;
	right: -30px;
	width: 86px;
}

.fortnami-vybe__stage .fortnami-vybe__floater--heart {
	top: 450px;
	right: -44px;
	width: 72px;
}

.fortnami-vybe__phone {
	position: absolute;
	top: 8px;
	left: 10px;
	width: 420px;
	height: 638px;
}

.fortnami-vybe__chassis {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}

/* InvestHero's inset and angle, tuned to phone.webp and to nothing else. */
.fortnami-vybe__screen {
	position: absolute;
	z-index: 1;
	top: 57px;
	left: 74px;
	width: 215px;
	height: 492px;
	overflow: hidden;
	border-radius: 26px / 30px;
	background-color: #000;
	transform: perspective(1200px) rotateX(10deg) rotateY(347deg) rotateZ(11deg);
	transform-origin: center center;
}

.fortnami-vybe__card--overlap {
	z-index: 3;
	top: 300px;
	left: -34px;
	width: 176px;
	height: 360px;
	padding: 7px;
	border-radius: 34px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
	transform: rotate(-7deg);
}

@media (min-width: 768px) {

	.fortnami-vybe {
		padding-block: 80px;
	}

	.fortnami-vybe__headline {
		font-size: 44px;
		line-height: 1.08;
	}

	.fortnami-vybe__subhead {
		margin-top: 18px;
		font-size: 17px;
	}

	.fortnami-vybe__cta {
		display: grid;
		grid-template-columns: auto auto;
		justify-content: start;
		align-items: center;
		gap: 14px 28px;
		text-align: left;
	}

	.fortnami-vybe__button {
		grid-row: 1;
		grid-column: 1;
		align-self: auto;
	}

	.fortnami-vybe__beta {
		grid-row: 1;
		grid-column: 2;
	}

	.fortnami-vybe__risk {
		grid-row: 2;
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {

	.fortnami-vybe__layout {
		grid-template-columns: minmax(0, 1fr) 360px;
		align-items: center;
		justify-content: space-between;
		column-gap: 40px;
	}

	.fortnami-vybe__cards {
		display: none;
	}

	/* The stage keeps its 440px geometry and is scaled to the 360px column. */
	.fortnami-vybe__stage-frame {
		display: block;
		width: 360px;
		height: 540px;
	}

	.fortnami-vybe__stage {
		transform: scale(0.8182);
	}

	.fortnami-vybe__accent {
		white-space: nowrap;
	}
}

@media (min-width: 1440px) {

	.fortnami-vybe {
		padding-block: 96px;
	}

	.fortnami-vybe__layout {
		grid-template-columns: minmax(0, 1fr) 440px;
	}

	.fortnami-vybe__stage-frame {
		width: 440px;
		height: 660px;
	}

	.fortnami-vybe__stage {
		transform: none;
	}

	.fortnami-vybe__logo {
		height: 41px;
	}

	.fortnami-vybe__chip {
		height: 32px;
		padding: 0 14px;
		font-size: 13px;
	}

	.fortnami-vybe__headline {
		margin-top: 28px;
		font-size: 56px;
		letter-spacing: -0.035em;
		line-height: 1.07;
	}

	.fortnami-vybe__subhead {
		margin-top: 24px;
		font-size: 18px;
		line-height: 1.6;
	}

	.fortnami-vybe__cta {
		margin-top: 38px;
	}

	.fortnami-vybe__button {
		height: 58px;
	}

	.fortnami-vybe__beta {
		font-size: 17px;
		text-underline-offset: 6px;
	}
}

@media screen and (prefers-reduced-motion: no-preference) {

	.fortnami-vybe__button {
		transition: background-color 0.2s ease, transform 0.2s ease;
	}

	.fortnami-vybe__button:hover {
		transform: translateY(-1px);
	}

	.fortnami-vybe__beta {
		transition: color 0.2s ease;
	}
}
