/* =====================================================================
   MW HERO
   Sizes are Figma px from the 2359px-wide frame × --mw-u,
   so the hero keeps the exact Figma proportions on every screen.
   ===================================================================== */

@property --mw-hero-a {
	syntax: '<angle>';
	inherits: true;
	initial-value: 250deg;
}

/* --- Edit values here ------------------------------------------------ */
.mw-hero {
	--mw-u:      calc(100vw / 2359);   /* 1 Figma px */
	--mw-g:      var(--mw-u);          /* unit for the light layers */

	--mw-bg:     #101010;
	--mw-ink:    #E4E4E4;
	--mw-blue:   #0061FF;
	--mw-blue-0: rgba(0, 97, 255, 0);  /* the gap in the button's blue strip */
	--mw-btn-bg: #101010;
	--mw-title-top: #C6D3E8;           /* heading picks up the blue light */
}

/* --- Section --------------------------------------------------------- */
.mw-hero {
	position: relative;
	width: 100vw;
	margin-inline: calc(50% - 50vw);   /* full-bleed even inside a boxed container */
	min-height: max(calc(1117 * var(--mw-u)), 100svh);  /* Figma height, never shorter than the screen */
	background: var(--mw-bg);
	color: var(--mw-ink);
	overflow: hidden;
	isolation: isolate;
}

body:has(.mw-hero) {
	overflow-x: clip;                  /* no sideways scroll from the full-bleed */
}

/* Remove the Elementor container's padding/gap around the hero (the white strips) */
.e-con:has(> .elementor-widget-mw-hero),
.e-con:has(> .e-con-inner > .elementor-widget-mw-hero),
.e-con:has(> .e-con-inner > .elementor-widget-mw-hero) > .e-con-inner {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--gap: 0px;
	padding: 0 !important;
	gap: 0 !important;
}

/* --- Light: smoky light hanging from the top edge ------------------ */
/* The smoke is drawn by assets/js/hero.js (WebGL). Colours and speed
   are read from these variables. Without WebGL the Figma glow + line
   still show.                                                          */
.mw-hero {
	--mw-smoke-1:     #0061FF;   /* main light colour */
	--mw-smoke-2:     #7B61FF;   /* second colour, used in smaller patches */
	--mw-smoke-3:     #9CD1FF;   /* bright highlights near the edge */
	--mw-smoke-speed: 1;         /* 2 = twice as fast, 0.5 = half */
	--mw-rim:         200, 225, 255;
}

.mw-hero__light {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
	background: var(--mw-bg);         /* the smoke blends onto this */
}

/* Ambient light from the Figma design (top-left) */
.mw-hero__glow {
	position: absolute;
	left:   calc(-608  * var(--mw-g));
	top:    calc(-1265 * var(--mw-g));
	width:  calc(2020  * var(--mw-g));
	height: calc(2020  * var(--mw-g));
	border-radius: 50%;
	background: radial-gradient(closest-side,
		rgba(0, 97, 255, .49) 0%,
		rgba(0, 97, 255, .46) 15%,
		rgba(0, 97, 255, .40) 30%,
		rgba(0, 97, 255, .29) 45%,
		rgba(0, 97, 255, .15) 60%,
		rgba(0, 97, 255, .053) 75%,
		rgba(0, 97, 255, .005) 90%,
		rgba(0, 97, 255, 0) 100%);
	transition: opacity 1.2s ease;
}

.mw-hero--gl .mw-hero__glow {
	opacity: .55;                     /* the smoke takes over most of the light */
}

/* The smoke canvas: top part of the hero, fades out downwards */
.mw-hero__smoke {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 80%;
	display: block;
	opacity: 0;
	mix-blend-mode: screen;
	transition: opacity 1.6s ease;
	-webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.mw-hero--gl .mw-hero__smoke {
	opacity: 1;
}

/* The bright edge the light hangs from */
.mw-hero__line {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: max(1px, calc(2 * var(--mw-g)));
	background: linear-gradient(90deg,
		rgba(var(--mw-rim), 0) 0%,
		rgba(var(--mw-rim), .55) 18%,
		rgba(255, 255, 255, .95) 40%,
		rgba(var(--mw-rim), .6) 62%,
		rgba(255, 255, 255, .9) 78%,
		rgba(var(--mw-rim), 0) 100%);
	background-size: 200% 100%;
	box-shadow: 0 0 calc(18 * var(--mw-g)) calc(2 * var(--mw-g)) rgba(0, 97, 255, .55);
}

.mw-hero--animate .mw-hero__line {
	animation: mw-hero-line calc(14s / var(--mw-smoke-speed)) ease-in-out infinite alternate;
}

@keyframes mw-hero-line {
	from { background-position: 0% 0; }
	to   { background-position: 100% 0; }
}

/* --- Content --------------------------------------------------------- */
.mw-hero__content {
	position: relative;
	z-index: 1;
	padding: calc(320.5 * var(--mw-u)) calc(221 * var(--mw-u)) calc(120 * var(--mw-u));
}

.mw-hero .mw-hero__title {
	margin: 0;
	font-family: 'Antonio', sans-serif;
	font-weight: 100;
	font-size: calc(128 * var(--mw-u));
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--mw-ink);
	background: linear-gradient(180deg, var(--mw-title-top) 0%, var(--mw-ink) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.mw-hero .mw-hero__text {
	margin: calc(58.7 * var(--mw-u)) 0 0;
	max-width: calc(900 * var(--mw-u));
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: calc(20 * var(--mw-u));
	line-height: 1.5;
	color: var(--mw-ink);
}

/* --- Button ---------------------------------------------------------- */
.mw-hero .mw-hero__btn,
.mw-hero .mw-hero__btn:hover,
.mw-hero .mw-hero__btn:focus,
.mw-hero .mw-hero__btn:visited {
	color: var(--mw-ink);
	text-decoration: none;
}

.mw-hero .mw-hero__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: calc(84 * var(--mw-u));
	margin-top: calc(48.8 * var(--mw-u));
	padding: 0 calc(40 * var(--mw-u));
	border: 1px solid transparent;
	border-radius: 999px;
	background:
		linear-gradient(var(--mw-btn-bg), var(--mw-btn-bg)) padding-box,
		conic-gradient(from var(--mw-hero-a), var(--mw-blue-0) 0%, var(--mw-blue) 45%, var(--mw-blue) 60%, var(--mw-blue-0) 100%) border-box;
	font-family: 'Antonio', sans-serif;
	font-weight: 300;
	font-size: calc(20 * var(--mw-u));
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Glow halo behind the border */
.mw-hero .mw-hero__btn::before {
	content: '';
	position: absolute;
	inset: -1px;
	z-index: -1;
	border-radius: inherit;
	background: conic-gradient(from var(--mw-hero-a), var(--mw-blue-0) 0%, var(--mw-blue) 45%, var(--mw-blue) 60%, var(--mw-blue-0) 100%);
	filter: blur(max(8px, calc(14 * var(--mw-u))));
	opacity: 0;
	transition: opacity .45s ease;
}

.mw-hero .mw-hero__btn:hover,
.mw-hero .mw-hero__btn:focus-visible {
	animation: mw-hero-spin 2.4s linear infinite;
}

.mw-hero .mw-hero__btn:hover::before,
.mw-hero .mw-hero__btn:focus-visible::before {
	opacity: .85;
}

.mw-hero .mw-hero__btn:focus-visible {
	outline: 2px solid var(--mw-ink);
	outline-offset: 6px;
}

@keyframes mw-hero-spin {
	from { --mw-hero-a: 250deg; }
	to   { --mw-hero-a: 610deg; }
}

/* Touch screens can't hover — keep the button glow moving all the time */
@media (hover: none) {
	.mw-hero .mw-hero__btn {
		animation: mw-hero-spin 2.4s linear infinite;
	}

	.mw-hero .mw-hero__btn::before {
		opacity: .7;
	}
}

/* --- Tablet + mobile ------------------------------------------------- */
@media (max-width: 1024px) {
	.mw-hero {
		--mw-g: calc(100svh / 1117);   /* light sized to the screen height */
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		min-height: 100svh;
	}

	.mw-hero__content {
		padding: 120px 20px 14svh;
	}

	.mw-hero .mw-hero__title {
		font-size: clamp(48px, 13.5vw, 110px);
	}

	.mw-hero .mw-hero__text {
		margin-top: 24px;
		max-width: 34em;
		font-size: 16px;
	}

	.mw-hero .mw-hero__btn {
		height: 56px;
		margin-top: 32px;
		padding: 0 30px;
		font-size: 16px;
	}
}

/* --- Reduced motion -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.mw-hero .mw-hero__line,
	.mw-hero .mw-hero__btn,
	.mw-hero .mw-hero__btn:hover {
		animation: none;
	}
}