/* ==================================================================
   Email signup pop-up (2.3.0)
   ================================================================== */

/* ------------------------------------------------------------------ */
/* Form                                                                 */
/* ------------------------------------------------------------------ */

.nl-form { margin: 0; }
.nl-form__row { display: flex; gap: 8px; }
.nl-form__input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 14px;
	font: 400 16px/20px var(--font-display);
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}
.nl-form__input::placeholder { color: var(--muted); }
.nl-form__input:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.nl-form.is-error .nl-form__input { border-color: var(--accent); }
.nl-form__btn { height: 48px; white-space: nowrap; }
.nl-form.is-busy .nl-form__btn { opacity: .7; cursor: progress; }
.nl-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-form__fine {
	margin: 8px 0 0;
	font-family: var(--font-display);
	font-size: var(--type-meta-size);
	line-height: var(--type-meta-lh);
	color: var(--muted);
}
.nl-form__status {
	margin: 6px 0 0;
	font-family: var(--font-display);
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: var(--ink);
}
.nl-form__status:empty { display: none; }
.nl-form.is-error .nl-form__status { color: var(--accent-dark); }
.nl-form.is-done .nl-form__row,
.nl-form.is-done .nl-form__fine { display: none; }
.nl-form.is-done .nl-form__status {
	margin: 0;
	padding: 12px 14px;
	background: var(--verified-bg);
	color: var(--verified-fg);
	border-radius: var(--radius-sm);
}

.nl-form--stack .nl-form__row { flex-direction: column; }
.nl-form--stack .nl-form__input { flex: none; width: 100%; }
.nl-form--stack .nl-form__btn { width: 100%; }

/* ------------------------------------------------------------------ */
/* Pop-up: centred dialog on desktop, bottom card on phones             */
/* ------------------------------------------------------------------ */

.nl-pop {
	width: min(480px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 32px;
	margin: auto;
	color: var(--text);
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 24px 48px rgb(23 21 15 / .18);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .16s ease, transform .16s ease;
}
.nl-pop.is-in { opacity: 1; transform: none; }
.nl-pop::backdrop { background: rgb(23 21 15 / .45); }
.nl-pop__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 26px;
	line-height: 1;
	color: var(--muted);
	background: none;
	border: 0;
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.nl-pop__close:hover { color: var(--ink); background: var(--surface-2); }
.nl-pop__close:focus-visible { outline: none; box-shadow: var(--ring); }
.nl-pop__eyebrow { color: var(--accent-dark); }
.nl-pop__title {
	margin: 8px 0 0;
	padding-right: 24px;
	font-size: 28px;
	line-height: 32px;
	letter-spacing: -.02em;
	color: var(--ink);
}
.nl-pop__text {
	margin: 12px 0 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 25px;
}
.nl-pop__points {
	margin: 14px 0 20px;
	padding: 0;
	list-style: none;
	font-family: var(--font-display);
	font-size: 15px;
	line-height: 20px;
	color: var(--ink-2);
}
.nl-pop__points li { position: relative; padding-left: 24px; margin-top: 8px; }
.nl-pop__points li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 4px;
	width: 10px;
	height: 6px;
	border-left: 2px solid var(--verified-fg);
	border-bottom: 2px solid var(--verified-fg);
	transform: rotate(-45deg);
}

/* Phones: a card pinned to the bottom, page still usable behind it. */
.nl-pop--sheet {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 90;
	width: auto;
	max-width: none;
	max-height: 85vh;
	margin: 0;
	padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
	border-width: 1px 0 0;
	border-radius: 12px 12px 0 0;
	box-shadow: 0 -12px 32px rgb(23 21 15 / .16);
	transform: translateY(24px);
}
.nl-pop--sheet .nl-pop__title { font-size: 22px; line-height: 27px; }
.nl-pop--sheet .nl-pop__text { font-size: 16px; line-height: 23px; margin-top: 8px; }
.nl-pop--sheet .nl-pop__points { display: none; }
.nl-pop--sheet .nl-form { margin-top: 16px; }

/* ------------------------------------------------------------------ */
/* Breakpoints                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	.nl-pop { padding: 28px 20px 20px; }
	.nl-form__row { flex-direction: column; }
	.nl-form__input { flex: none; width: 100%; }
	.nl-form__btn { width: 100%; }
}
