/* Ascend Resource Gate — overlay shown until a valid email is submitted. */

.ascend-rg[hidden] {
	display: none;
}

.ascend-rg {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.ascend-rg__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 20, 38, 0.78);
	backdrop-filter: blur(3px);
}

.ascend-rg__dialog {
	position: relative;
	width: 100%;
	max-width: 27rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 2rem 1.75rem 1.5rem;
	border-radius: 14px;
	background: #fff;
	color: #14203a;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	font-size: 1rem;
	line-height: 1.5;
}

.ascend-rg__title {
	margin: 0 0 0.5rem;
	font-size: 1.4rem;
	line-height: 1.25;
	color: #14203a;
}

.ascend-rg__intro {
	margin: 0 0 1.25rem;
	color: #47536b;
}

.ascend-rg__label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
}

.ascend-rg__input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.85rem;
	border: 2px solid #c8d0de;
	border-radius: 8px;
	font-size: 1rem;
	color: #14203a;
	background: #fff;
}

.ascend-rg__input:focus {
	outline: none;
	border-color: #1a6ef5;
	box-shadow: 0 0 0 3px rgba(26, 110, 245, 0.22);
}

.ascend-rg__input[aria-invalid="true"] {
	border-color: #c0392b;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.ascend-rg__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ascend-rg__error {
	margin: 0.6rem 0 0;
	color: #c0392b;
	font-size: 0.9rem;
	font-weight: 600;
}

.ascend-rg__error[hidden] {
	display: none;
}

.ascend-rg__submit {
	width: 100%;
	margin-top: 1rem;
	padding: 0.8rem 1rem;
	border: 0;
	border-radius: 8px;
	background: #1a6ef5;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.ascend-rg__submit:hover {
	background: #1259cc;
}

.ascend-rg__submit:focus-visible {
	outline: 3px solid #0b3f9b;
	outline-offset: 2px;
}

.ascend-rg__submit[disabled] {
	opacity: 0.65;
	cursor: progress;
}

.ascend-rg__fine {
	margin: 1rem 0 0;
	font-size: 0.78rem;
	line-height: 1.45;
	color: #6b7689;
}

.ascend-rg__fine a {
	color: #1259cc;
}

/* "We emailed you a link" note, shown for a few seconds after unlocking. */
.ascend-rg-note {
	position: fixed;
	left: 50%;
	bottom: 1.25rem;
	z-index: 999999;
	box-sizing: border-box;
	width: max-content;
	max-width: calc(100vw - 2rem);
	padding: 0.8rem 1.1rem;
	border-radius: 10px;
	background: #14203a;
	color: #fff;
	font-size: 0.95rem;
	line-height: 1.4;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	transform: translateX(-50%);
	cursor: pointer;
}

/* Set on <html> while the gate is up so the page behind cannot be scrolled. */
.ascend-rg-locked,
.ascend-rg-locked body {
	overflow: hidden !important;
}

@media (max-width: 480px) {
	.ascend-rg__dialog {
		padding: 1.5rem 1.25rem 1.25rem;
	}

	.ascend-rg__title {
		font-size: 1.25rem;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ascend-rg__dialog {
		animation: ascend-rg-in 180ms ease-out;
	}

	@keyframes ascend-rg-in {
		from {
			opacity: 0;
			transform: translateY(8px);
		}
	}
}
