/**
 * Preluence Genesis — custom login screen (structure and motion).
 *
 * The colours, sizes and radii come from the generated tokens; this file is the
 * layout, the entrance motion and the preset "extras" (glass, aurora, split).
 * It only loads when the custom login is active.
 */

body.login {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 48px 16px;
	background-color: #eef1f5;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

#login {
	position: relative;
	z-index: 1;
	width: auto;
	max-width: 100%;
	padding: 0;
	margin: 0;
}

.login h1 {
	margin: 0 0 22px;
	text-align: center;
	line-height: 0;
}

.login h1 a {
	display: block;
	margin: 0 auto;
}

/* The card + logo drift in together. */
.login h1,
.login form,
.login .pn-login-welcome,
.login .pn-login-foot {
	animation: pn-login-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login form {
	animation-delay: 0.06s;
	margin-top: 0;
	float: none;
	box-sizing: border-box;
}

.login form .forgetmenot {
	display: flex;
	align-items: center;
	gap: 6px;
	float: none;
	margin: 4px 0 0;
}

.login form .submit {
	margin: 16px 0 0;
}

.login .button.wp-hide-pw {
	color: inherit;
}

.login #nav,
.login #backtoblog {
	margin: 18px 0 0;
	padding: 0;
	text-align: center;
	font-size: 13px;
}

.login #nav a,
.login #backtoblog a {
	text-decoration: none;
}

.login #nav a:hover,
.login #backtoblog a:hover {
	text-decoration: underline;
}

.login .pn-login-welcome {
	margin: 0 0 16px;
	padding: 11px 14px;
	border: 0;
	border-inline-start: 4px solid var(--pn-login-accent, #1b4ddb);
	border-radius: 8px;
	font-size: 14px;
	box-shadow: none;
}

.login .pn-login-foot {
	margin: 20px 0 0;
	text-align: center;
	font-size: 13px;
	opacity: 0.72;
}

.login .message,
.login #login_error,
.login .success {
	border-radius: 8px;
	box-shadow: none;
}

@keyframes pn-login-in {

	from {
		opacity: 0;
		transform: translateY(14px) scale(0.99);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Glass presets ---------- */

body.pn-login--blur .login form {
	background-clip: padding-box;
}

body.pn-login--blur .login input[type="text"],
body.pn-login--blur .login input[type="password"],
body.pn-login--blur .login input[type="email"] {
	backdrop-filter: blur(4px);
}

/* ---------- Aurora preset: a slowly drifting gradient ---------- */

body.pn-login--aurora {
	background-size: 200% 200% !important;
	animation: pn-login-aurora 20s ease-in-out infinite;
}

@keyframes pn-login-aurora {

	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}

/* ---------- Split layouts ---------- */

body.pn-login--layout-split-left,
body.pn-login--layout-split-right {
	justify-content: flex-start;
}

body.pn-login--layout-split-right {
	justify-content: flex-end;
}

body.pn-login--layout-split-left #login {
	margin-inline-start: clamp(16px, 7vw, 120px);
	margin-inline-end: auto;
}

body.pn-login--layout-split-right #login {
	margin-inline-start: auto;
	margin-inline-end: clamp(16px, 7vw, 120px);
}

@media (max-width: 782px) {

	body.login {
		padding: 28px 16px;
	}

	body.pn-login--layout-split-left #login,
	body.pn-login--layout-split-right #login {
		margin: 0 auto;
	}
}

@media (prefers-reduced-motion: reduce) {

	.login h1,
	.login form,
	.login .pn-login-welcome,
	.login .pn-login-foot,
	body.pn-login--aurora {
		animation: none !important;
	}
}
