/* =====================================================================
   MW NOTIFY — "The developers are working on this page right now"
   Opens from any link or button that doesn't lead anywhere yet
   (assets/js/notify.js finds them). The page behind blurs; the card grows
   out of the spot that was clicked; the sad face draws itself. NOTIFY ME
   turns into the email field; when the email is saved the face smiles.
   Sizes are Figma px of the 2359 × 1066 frame × --nu (never smaller than
   70%, so it stays readable on laptops and phones).
   ===================================================================== */

.mw-nt {
	--nu:      clamp(.7px, calc(100vw / 2359), 1.2px);
	--nt-ink:  #101010;
	--nt-text: #000000;
	--nt-mute: #6B6B6B;
	--nt-blue: #0061FF;
	--nt-red:  #E5484D;
	--nt-ease: cubic-bezier(.19, 1, .22, 1);
	--nt-pop:  cubic-bezier(.22, 1.25, .36, 1);

	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	padding: 16px;
	visibility: hidden;
	pointer-events: none;
	font-family: 'Roboto', sans-serif;
	-webkit-tap-highlight-color: transparent;
}

.mw-nt.is-open {
	visibility: visible;
	pointer-events: auto;
}

.mw-nt *,
.mw-nt *::before,
.mw-nt *::after {
	box-sizing: border-box;
}

/* the page behind: blurred and dimmed */
.mw-nt__veil {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 12, .5);
	-webkit-backdrop-filter: blur(0);
	backdrop-filter: blur(0);
	opacity: 0;
	transition: opacity .45s ease, -webkit-backdrop-filter .6s ease, backdrop-filter .6s ease;
}

.mw-nt.is-open .mw-nt__veil {
	opacity: 1;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

/* --- The card ------------------------------------------------------------ */
.mw-nt__card {
	position: relative;
	width: min(calc(672 * var(--nu)), 100%);
	height: calc(543 * var(--nu));
	border-radius: calc(46 * var(--nu));
	background: #fff;
	color: var(--nt-text);
	text-align: center;
	box-shadow: 0 calc(40 * var(--nu)) calc(120 * var(--nu)) rgba(0, 0, 0, .45);
	/* grows out of the clicked spot (notify.js sets --ox / --oy) */
	transform: translate3d(var(--ox, 0px), var(--oy, 0px), 0) scale(.3);
	opacity: 0;
	filter: blur(10px);
	transition: transform .7s var(--nt-pop), opacity .35s ease, filter .5s ease;
}

.mw-nt.is-open .mw-nt__card {
	transform: none;
	opacity: 1;
	filter: none;
}

.mw-nt.is-closing .mw-nt__card {
	transform: translate3d(0, calc(30 * var(--nu)), 0) scale(.94);
	opacity: 0;
	filter: blur(8px);
	transition: transform .4s var(--nt-ease), opacity .3s ease, filter .3s ease;
}

.mw-nt.is-closing .mw-nt__veil {
	opacity: 0;
	-webkit-backdrop-filter: blur(0);
	backdrop-filter: blur(0);
	transition: opacity .35s ease .05s, -webkit-backdrop-filter .4s ease, backdrop-filter .4s ease;
}

/* close × */
.mw-nt .mw-nt__x,
.mw-nt .mw-nt__x:hover,
.mw-nt .mw-nt__x:focus {
	position: absolute;
	right: calc(46 * var(--nu));
	top: calc(46 * var(--nu));
	width: calc(40 * var(--nu));
	height: calc(40 * var(--nu));
	min-width: 32px;
	min-height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--nt-text);
	cursor: pointer;
	transition: transform .5s var(--nt-ease), background-color .3s ease;
}

.mw-nt__x svg {
	display: block;
	width: 75%;
	height: 75%;
	margin: auto;
}

@media (hover: hover) {
	.mw-nt .mw-nt__x:hover {
		transform: rotate(90deg);
		background: #F1F1F1;
	}
}

.mw-nt .mw-nt__x:focus-visible {
	outline: 1px solid var(--nt-blue);
	outline-offset: 2px;
}

/* the face */
.mw-nt__face {
	position: absolute;
	left: 50%;
	top: calc(66 * var(--nu));
	width: calc(103 * var(--nu));
	height: calc(103 * var(--nu));
	margin-left: calc(-51.5 * var(--nu));
	color: var(--nt-ink);
	overflow: visible;
}

.mw-nt__face circle,
.mw-nt__face path {
	fill: none;
	stroke: currentColor;
	stroke-width: 3.2;
	stroke-linecap: round;
}

.mw-nt__face circle {
	stroke-dasharray: 302;
	stroke-dashoffset: 302;
	transform-origin: 50% 50%;
	transform: rotate(-90deg);
}

.mw-nt__face path {
	opacity: 0;
	transition: opacity .3s ease;
}

.mw-nt.is-open .mw-nt__face circle {
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 1s var(--nt-ease) .2s;
}

.mw-nt.is-open .mw-nt__face path {
	opacity: 1;
	transition-delay: .55s;
}

.mw-nt__face-g {
	transform-origin: 50% 50%;
	transform-box: fill-box;
}

/* a small sigh now and then while it waits */
.mw-nt.is-open:not(.is-done) .mw-nt__face-g {
	animation: mw-nt-sigh 5s ease-in-out 1.6s infinite;
}

@keyframes mw-nt-sigh {
	0%, 70%, 100% { transform: none; }
	78%           { transform: translateY(2px) rotate(-4deg); }
	88%           { transform: translateY(1px) rotate(3deg); }
}

/* little blue sparks when the email is saved */
.mw-nt__sparks {
	position: absolute;
	left: 50%;
	top: calc(117 * var(--nu));
	width: 0;
	height: 0;
	pointer-events: none;
}

.mw-nt__sparks i {
	position: absolute;
	left: calc(-4 * var(--nu));
	top: calc(-4 * var(--nu));
	width: calc(8 * var(--nu));
	height: calc(8 * var(--nu));
	border-radius: 50%;
	background: var(--nt-blue);
	opacity: 0;
}

.mw-nt.is-done .mw-nt__sparks i {
	animation: mw-nt-spark .9s var(--nt-ease) forwards;
	animation-delay: calc(var(--s) * 18ms);
}

@keyframes mw-nt-spark {
	0%   { opacity: 0; transform: rotate(var(--r)) translateX(calc(40 * var(--nu))) scale(.4); }
	20%  { opacity: 1; }
	100% { opacity: 0; transform: rotate(var(--r)) translateX(calc(var(--d) * var(--nu))) scale(1); }
}

/* texts */
.mw-nt__copy {
	position: absolute;
	left: calc(40 * var(--nu));
	right: calc(40 * var(--nu));
	top: calc(206 * var(--nu));
}

.mw-nt .mw-nt__title {
	max-width: calc(470 * var(--nu));
	margin: 0 auto;
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: calc(32 * var(--nu));
	line-height: calc(36 * var(--nu));
	letter-spacing: 0;
	text-transform: none;
	color: var(--nt-text);
}

.mw-nt .mw-nt__text {
	margin: calc(32 * var(--nu)) 0 0;
	font-weight: 300;
	font-size: calc(20 * var(--nu));
	line-height: calc(26 * var(--nu));
	color: var(--nt-text);
}

.mw-nt__text b {
	font-weight: 500;
}

.mw-nt__swap {
	display: block;
}

.mw-nt__swap.is-swapping {
	animation: mw-nt-swap .6s var(--nt-ease);
}

@keyframes mw-nt-swap { 0% { opacity: 0; filter: blur(8px); transform: translateY(8px); } 100% { opacity: 1; filter: none; transform: none; } }

/* reveal of the texts as the card opens */
.mw-nt__copy > * {
	opacity: 0;
	transform: translate3d(0, calc(14 * var(--nu)), 0);
	filter: blur(6px);
}

.mw-nt.is-open .mw-nt__copy > * {
	opacity: 1;
	transform: none;
	filter: none;
	transition: opacity .6s ease, transform .8s var(--nt-ease), filter .7s ease;
}

.mw-nt.is-open .mw-nt__copy > :nth-child(1) { transition-delay: .3s; }
.mw-nt.is-open .mw-nt__copy > :nth-child(2) { transition-delay: .42s; }

/* --- NOTIFY ME → email field ------------------------------------------- */
.mw-nt__act {
	position: absolute;
	left: 50%;
	top: calc(416 * var(--nu));
	width: calc(375 * var(--nu));
	height: calc(84 * var(--nu));
	min-height: 48px;
	margin-left: calc(-187.5 * var(--nu));
	opacity: 0;
	transform: translate3d(0, calc(16 * var(--nu)), 0);
}

.mw-nt.is-open .mw-nt__act {
	opacity: 1;
	transform: none;
	transition: opacity .6s ease .5s, transform .9s var(--nt-pop) .5s;
}

/* the field (hidden behind the button until it opens) */
.mw-nt__field {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	border: max(1px, calc(1.5 * var(--nu))) solid var(--nt-ink);
	background: #fff;
	clip-path: inset(0 calc(67 * var(--nu)) round 999px);
	opacity: 0;
	transition: clip-path .7s var(--nt-ease), opacity .3s ease, border-color .3s ease;
}

.mw-nt.is-form .mw-nt__field {
	clip-path: inset(0 0 round 999px);
	opacity: 1;
}

.mw-nt .mw-nt__input,
.mw-nt .mw-nt__input:focus {
	position: absolute;
	left: 0;
	top: 0;
	width: calc(100% - 108 * var(--nu));
	height: 100%;
	margin: 0;
	padding: 0 calc(10 * var(--nu)) 0 calc(34 * var(--nu));
	border: 0;
	border-radius: 999px 0 0 999px;
	background: transparent;
	box-shadow: none;
	outline: none;
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: max(16px, calc(20 * var(--nu)));    /* 16px+ stops phones from zooming in */
	line-height: 1;
	color: var(--nt-text);
}

.mw-nt .mw-nt__input::placeholder {
	color: var(--nt-text);
	opacity: .85;
	transition: opacity .3s ease;
}

.mw-nt .mw-nt__input:focus::placeholder {
	opacity: .35;
}

.mw-nt.is-bad .mw-nt__field {
	border-color: var(--nt-red);
	animation: mw-nt-shake .45s ease;
}

@keyframes mw-nt-shake {
	0%, 100% { transform: none; }
	20% { transform: translateX(-8px); }
	40% { transform: translateX(7px); }
	60% { transform: translateX(-5px); }
	80% { transform: translateX(3px); }
}

/* the black pill: "NOTIFY ME", then the round → submit, then "✓ Back to the page" */
.mw-nt .mw-nt__btn,
.mw-nt .mw-nt__btn:hover,
.mw-nt .mw-nt__btn:focus {
	position: absolute;
	top: 0;
	left: calc(67 * var(--nu));
	width: calc(241 * var(--nu));
	height: 100%;
	margin: 0;
	padding: 0;
	border: max(1px, calc(1.5 * var(--nu))) solid transparent;
	border-radius: 999px;
	background: linear-gradient(var(--nt-ink), var(--nt-ink)) padding-box, linear-gradient(90deg, #DCE0E5, var(--nt-blue)) border-box;
	box-shadow: none;
	color: #fff;
	font-family: 'Antonio', sans-serif;
	font-weight: 300;
	font-size: max(14px, calc(20 * var(--nu)));
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	cursor: pointer;
	overflow: hidden;
	transition: left .7s var(--nt-ease), width .7s var(--nt-ease), background .4s ease, transform .4s var(--nt-ease);
}

.mw-nt.is-form .mw-nt__btn {
	left: calc(100% - 108 * var(--nu));
	width: calc(108 * var(--nu));
}

.mw-nt.is-done .mw-nt__btn {
	left: 0;
	width: 100%;
}

.mw-nt .mw-nt__btn:focus-visible {
	outline: 1px solid var(--nt-blue);
	outline-offset: 3px;
}

@media (hover: hover) {
	.mw-nt .mw-nt__btn:hover {
		transform: scale(1.03);
	}
	.mw-nt.is-form .mw-nt__btn:hover .mw-nt__go {
		transform: translateX(4px);
	}
}

.mw-nt .mw-nt__btn:active {
	transform: scale(.97);
}

/* the three faces of the pill, crossfading */
.mw-nt__lbl,
.mw-nt__go,
.mw-nt__spin,
.mw-nt__ok {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: calc(12 * var(--nu));
	white-space: nowrap;
	transition: opacity .35s ease, transform .5s var(--nt-ease);
}

.mw-nt__go,
.mw-nt__spin,
.mw-nt__ok {
	opacity: 0;
}

.mw-nt.is-form .mw-nt__lbl { opacity: 0; transform: translateX(-20px); }
.mw-nt.is-form .mw-nt__go  { opacity: 1; transition-delay: .25s; }
.mw-nt.is-busy .mw-nt__go  { opacity: 0; transition-delay: 0s; }
.mw-nt.is-busy .mw-nt__spin { opacity: 1; }
.mw-nt.is-done .mw-nt__go,
.mw-nt.is-done .mw-nt__spin { opacity: 0; transition-delay: 0s; }
.mw-nt.is-done .mw-nt__lbl { opacity: 0; transform: translateX(-20px); }
.mw-nt.is-done .mw-nt__ok  { opacity: 1; transition-delay: .35s; }
.mw-nt.is-done .mw-nt__field { opacity: 0; }

.mw-nt__go svg {
	width: calc(14 * var(--nu));
	height: calc(26 * var(--nu));
	min-width: 9px;
	min-height: 16px;
}

.mw-nt__spin i {
	width: calc(26 * var(--nu));
	height: calc(26 * var(--nu));
	min-width: 18px;
	min-height: 18px;
	border: 2px solid rgba(255, 255, 255, .25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mw-nt-spin .8s linear infinite;
}

@keyframes mw-nt-spin { to { transform: rotate(360deg); } }

.mw-nt__ok svg {
	width: calc(18 * var(--nu));
	height: calc(18 * var(--nu));
	min-width: 12px;
	min-height: 12px;
	color: var(--nt-blue);
}

/* a quiet line under the field: what we'll use the email for — or what went wrong */
.mw-nt .mw-nt__note {
	position: absolute;
	left: calc(30 * var(--nu));
	right: calc(30 * var(--nu));
	top: calc(512 * var(--nu));
	margin: 0;
	font-weight: 300;
	font-size: max(11px, calc(14 * var(--nu)));
	line-height: 1.2;
	color: var(--nt-mute);
	opacity: 0;
	transition: opacity .4s ease, color .3s ease;
}

.mw-nt.is-form .mw-nt__note {
	opacity: 1;
	transition-delay: .3s;
}

.mw-nt.is-done .mw-nt__note {
	opacity: 0;
	transition-delay: 0s;
}

.mw-nt.is-bad .mw-nt__note,
.mw-nt.is-failed .mw-nt__note {
	color: var(--nt-red);
}

/* spam trap: people never see it */
.mw-nt__trap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* --- Phones ------------------------------------------------------------- */
@media (max-width: 600px) {
	.mw-nt {
		--nu: .78px;
		padding: 12px;
	}

	.mw-nt__card {
		width: 100%;
		max-width: 440px;
		height: auto;
		min-height: calc(560 * var(--nu));
		border-radius: 28px;
	}

	.mw-nt__copy {
		left: 22px;
		right: 22px;
	}

	.mw-nt .mw-nt__title {
		font-size: 24px;
		line-height: 1.2;
	}

	.mw-nt .mw-nt__text {
		margin-top: 18px;
		font-size: 15px;
		line-height: 1.4;
	}

	.mw-nt__act {
		left: 22px;
		right: 22px;
		width: auto;
		top: auto;
		bottom: calc(66 * var(--nu));
		margin: 0;
		height: 54px;
	}

	.mw-nt .mw-nt__btn,
	.mw-nt .mw-nt__btn:hover,
	.mw-nt .mw-nt__btn:focus {
		left: 50%;
		width: 190px;
		margin-left: -95px;
	}

	.mw-nt.is-form .mw-nt__btn {
		left: calc(100% - 64px);
		width: 64px;
		margin-left: 0;
	}

	.mw-nt.is-done .mw-nt__btn {
		left: 0;
		width: 100%;
		margin-left: 0;
	}

	.mw-nt__field {
		clip-path: inset(0 30% round 999px);
	}

	.mw-nt .mw-nt__input,
	.mw-nt .mw-nt__input:focus {
		width: calc(100% - 64px);
		padding-left: 22px;
	}

	.mw-nt .mw-nt__note {
		top: auto;
		bottom: calc(26 * var(--nu));
		left: 22px;
		right: 22px;
	}

	.mw-nt .mw-nt__x,
	.mw-nt .mw-nt__x:hover,
	.mw-nt .mw-nt__x:focus {
		right: 18px;
		top: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mw-nt *,
	.mw-nt *::before,
	.mw-nt *::after {
		animation: none !important;
		transition: none !important;
	}
}