/* ==========================================================================
   Client Log-In (Figma 130:923)
   At 1440: two 720 columns, 787 tall, under the global header. Left: navy
   with the office photo behind an overlay, headline (Beausite 30/36) at
   y 368 centred on x 377. Right: white from the header rule down; stacked
   logo 72x112 at 1067,172; title Tinos 30/34 at y 329; fields 350x39 at
   928,430 / 485; Log-in 350x39; "Forgot your password?" centred on x 1103.
   ========================================================================== */

.page--login { --lg-text: #343434; --lg-line: rgba(24, 48, 102, 0.5); --lg-error: #b3261e; --lg-error-bg: #fdeceb; --lg-ok: #11300e; --lg-ok-bg: #e3ffe0; }

.login {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	min-height: calc(787 * var(--u));
	background: var(--navy);
}

/* --- Left: photo under a navy veil ---------------------------------------- */
.login__aside {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: flex;
	justify-content: center;
	padding: calc(368 * var(--u)) 24px 64px calc(34 * var(--u) + 24px);
	color: var(--white);
	text-align: center;
}
.login__photo { position: absolute; inset: 0; z-index: -2; }
.login__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 60% 50%;
	filter: grayscale(0.35) contrast(1.05);
	transform: scale(1.06);
	animation: login-photo 2.4s var(--ease-out) both;
}
@keyframes login-photo { from { transform: scale(1.14); opacity: 0; } }
.login__aside::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(120% 80% at 50% 50%, rgba(24, 48, 102, 0.82) 0%, rgba(24, 48, 102, 0.93) 70%),
		linear-gradient(180deg, rgba(24, 48, 102, 0.6) 0, rgba(24, 48, 102, 0) 120px);
}
.login__aside-copy { width: 100%; max-width: 460px; }
.login__headline {
	font-size: clamp(24px, calc(30 * var(--u)), 30px);
	line-height: 1.2;
	font-weight: 400;
}
.login__tagline { margin-top: calc(18 * var(--u)); font-family: var(--serif); font-size: 18px; line-height: 25px; color: var(--sky); }
.login__sub { margin-top: calc(27 * var(--u)); max-width: 400px; font-size: 12px; line-height: 18px; font-weight: 500; }

/* --- Right: the form, on white from the header rule down ----------------- */
.login__main {
	display: flex;
	justify-content: center;
	padding: max(calc(172 * var(--u)), calc(var(--header-h) + 48px)) 24px calc(138 * var(--u)) calc(46 * var(--u) + 24px);
	background: linear-gradient(var(--navy) 0 var(--header-h), var(--white) var(--header-h));
	color: var(--navy);
	text-align: center;
}
.login-form { width: 100%; max-width: 360px; }
.login-form__logo-link { display: block; width: 72px; margin: 0 auto; color: var(--navy); }
.login-form__logo { display: block; width: 72px; height: 112px; fill: currentColor; }
.login-form__logo path { fill: currentColor; }
.login-form__title {
	margin-top: 45px;
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(26px, calc(30 * var(--u)), 30px);
	line-height: 1.1333;
	color: var(--navy-deep);
	white-space: nowrap;
}
.login-form__lede { margin-top: 10px; font-family: var(--serif); font-size: 16px; line-height: 22px; color: var(--navy); }
.login-form__lede + .login-form__meta { margin-top: 14px; }
.login-form__meta { margin-top: 10px; font-size: 12px; line-height: 18px; font-weight: 500; }
.login-form__meta strong { font-weight: 600; }
.login-form__link {
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	transition: color 0.3s, text-decoration-thickness 0.2s;
}
@media (hover: hover) { .login-form__link:hover { color: var(--navy-deep); text-decoration-thickness: 2px; } }

.login-form__form { width: 350px; max-width: 100%; margin: 39px auto 0; text-align: left; }

/* Alert (server errors, client validation, logged out) */
.login-alert {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-bottom: 16px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 12px;
	line-height: 18px;
	font-weight: 500;
	animation: login-in 0.5s var(--ease-out);
}
.login-alert[hidden] { display: none; }
.login-alert.is-error { background: var(--lg-error-bg); color: #8c1d18; box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.22); }
.login-alert.is-success { background: var(--lg-ok-bg); color: var(--lg-ok); box-shadow: inset 0 0 0 1px rgba(17, 48, 14, 0.14); }
.login-alert__icon {
	flex: none;
	width: 14px;
	height: 14px;
	margin-top: 2px;
	background: currentColor;
	-webkit-mask: var(--lg-icon) center / contain no-repeat;
	mask: var(--lg-icon) center / contain no-repeat;
}
.login-alert.is-error { --lg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill-rule='evenodd' d='M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm-.75-9.4a.75.75 0 0 1 1.5 0v4.1a.75.75 0 0 1-1.5 0V2.6ZM6 9.85a.85.85 0 1 0 0-1.7.85.85 0 0 0 0 1.7Z'/%3E%3C/svg%3E"); }
.login-alert.is-success { --lg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill-rule='evenodd' d='M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Zm2.9-7.6a.7.7 0 0 0-1-1L5.1 6.3 4.1 5.3a.7.7 0 0 0-1 1l1.5 1.5a.7.7 0 0 0 1 0l3.3-3.4Z'/%3E%3C/svg%3E"); }
@keyframes login-in { from { opacity: 0; transform: translateY(-4px); } }

/* Fields: 350x39, radius 8, 1px navy at 50%, floating label */
.login-field { position: relative; }
.login-field + .login-field { margin-top: 16px; }
.login-field__input {
	display: block;
	width: 100%;
	height: 39px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--lg-line);
	border-radius: 8px;
	background: var(--white);
	color: var(--lg-text);
	font-size: 12px;
	line-height: 18px;
	font-weight: 500;
	transition: border-color 0.3s, box-shadow 0.35s var(--ease-out);
	-webkit-appearance: none;
	appearance: none;
}
.login-field--password .login-field__input { padding-right: 64px; }
@media (hover: hover) { .login-field__input:hover { border-color: rgba(24, 48, 102, 0.8); } }
.login-field__input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(191, 217, 255, 0.75); }
.login-field__label {
	position: absolute;
	left: 13px;
	top: 10px;
	padding: 0 4px;
	font-size: 12px;
	line-height: 18px;
	font-weight: 500;
	color: var(--lg-text);
	background: var(--white);
	pointer-events: none;
	transform-origin: 0 50%;
	transition: transform 0.35s var(--ease-out), color 0.3s;
}
.login-field__input:focus + .login-field__label,
.login-field__input:not(:placeholder-shown) + .login-field__label,
.login-field__input:-webkit-autofill + .login-field__label {
	transform: translateY(-19px) scale(0.84);
	color: var(--navy);
}
.login-field.is-invalid .login-field__input { border-color: var(--lg-error); }
.login-field.is-invalid .login-field__input:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.16); }
.login-field.is-invalid .login-field__label { color: var(--lg-error); }

.login-field__toggle {
	position: absolute;
	right: 6px;
	top: 6px;
	height: 27px;
	padding: 0 10px;
	border-radius: 5px;
	font-size: 11px;
	line-height: 14px;
	font-weight: 500;
	color: var(--navy);
	transition: background-color 0.3s;
}
@media (hover: hover) { .login-field__toggle:hover { background: rgba(191, 217, 255, 0.45); } }
.login-field__toggle:focus-visible { outline: 2px solid var(--navy); outline-offset: 0; }

/* Keep me logged in */
.login-form__row { display: flex; margin-top: 12px; }
.login-check { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--navy); cursor: pointer; }
.login-check input {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	border: 1px solid var(--navy);
	border-radius: 3px;
	background: var(--white) center / 10px 8px no-repeat;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: background-color 0.25s, box-shadow 0.3s var(--ease-out);
}
.login-check input:checked {
	background-color: var(--navy);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2l3.3 3.3L11 1.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.login-check input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(191, 217, 255, 0.9); }

/* Log-in: 350x39 navy, radius 8, Beausite 600 12/18 */
.login-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 39px;
	border: 1px solid var(--navy);
	border-radius: 8px;
	background: var(--navy);
	color: var(--white);
	font-size: 12px;
	line-height: 18px;
	font-weight: 600;
	overflow: hidden;
	isolation: isolate;
	transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), transform 0.2s;
}
.login-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(100deg, transparent 30%, rgba(191, 217, 255, 0.22) 50%, transparent 70%);
	transform: translateX(-100%);
	transition: transform 0.9s var(--ease-out);
}
@media (hover: hover) {
	.login-btn:hover { background: var(--navy-deep); box-shadow: 0 10px 24px rgba(20, 39, 73, 0.22); }
	.login-btn:hover::before { transform: translateX(100%); }
}
.login-btn:active { transform: translateY(1px); }
.login-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.login-form__submit { margin-top: 12px; }
.login-form__submit.is-busy { pointer-events: none; }
.login-form__submit.is-busy span { opacity: 0; }
.login-form__submit.is-busy::after {
	content: "";
	position: absolute;
	left: calc(50% - 8px);
	top: calc(50% - 8px);
	width: 16px;
	height: 16px;
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	border-top-color: var(--white);
	border-radius: 50%;
	animation: login-spin 0.8s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-btn--ghost { background: transparent; color: var(--navy); border-color: var(--lg-line); }
@media (hover: hover) { .login-btn--ghost:hover { background: rgba(191, 217, 255, 0.35); border-color: var(--navy); box-shadow: none; } }

.login-form__forgot { margin-top: 24px; font-size: 12px; line-height: 18px; font-weight: 500; }

/* Logged-in state */
.login-form__welcome { display: grid; gap: 12px; width: 350px; max-width: 100%; margin: 39px auto 0; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1180px) {
	.login-form__title { white-space: normal; }
}

@media (max-width: 1023px) {
	.login { grid-template-columns: minmax(0, 1fr); min-height: 0; }
	.login__aside { padding: calc(var(--header-h) + 64px) var(--gutter) 64px; }
	.login__aside-copy { max-width: 520px; }
	.login__tagline { margin-top: 12px; }
	.login__sub { margin-top: 16px; }
	.login__main { padding: 56px var(--gutter) 80px; background: var(--white); }
	.login-form__logo-link { display: none; }
	.login-form__title { margin-top: 0; }
}

@media (max-width: 599px) {
	.login__aside { padding: calc(var(--header-h) + 44px) var(--gutter) 44px; }
	.login__headline { font-size: 24px; line-height: 30px; }
	.login__main { padding: 44px var(--gutter) 64px; }
	.login-form__title { font-size: 26px; line-height: 30px; }
	.login-field__input, .login-btn { height: 48px; font-size: 16px; }
	.login-btn { font-size: 14px; }
	.login-field__label { top: 13px; font-size: 14px; }
	.login-field__input:focus + .login-field__label,
	.login-field__input:not(:placeholder-shown) + .login-field__label,
	.login-field__input:-webkit-autofill + .login-field__label { transform: translateY(-23px) scale(0.78); }
	.login-field__toggle { top: 8px; height: 32px; font-size: 12px; }
	.login-check { font-size: 14px; }
	.login-check input { width: 20px; height: 20px; }
	.login-form__forgot, .login-form__meta { font-size: 14px; line-height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.login__photo img { animation: none; transform: none; }
}

/* "Forgot your password?" is plain in the design; the underline draws on hover. */
.login-form__forgot .login-form__link { text-decoration-color: transparent; }
@media (hover: hover) { .login-form__forgot .login-form__link:hover { text-decoration-color: currentColor; text-decoration-thickness: 1px; } }
.login-form__forgot .login-form__link:focus-visible { text-decoration-color: currentColor; }
