@import url("https://fonts.googleapis.com/css2?family=Alegreya:wght@400;500;600;700;800&display=swap");

:root {
	--ink: #111827;
	--muted: #6b7280;
	--paper: #ffffff;
	--field: #f8fafc;
	--lime: #d8e27d;
	--gold: #ffed6f;
	--blue: #1d4ed8;
	--blue-soft: #dbeafe;
	--danger: #b91c1c;
	--danger-bg: #fff1f2;
	--success: #166534;
	--success-bg: #ecfdf3;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background:
		radial-gradient(circle at 50% 0%, rgba(17, 24, 39, 0.045), transparent 30rem),
		linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
		#fff;
	background-size: 100% 100%, 32px 32px, 32px 32px;
	color: var(--ink);
	min-height: 100vh;
}

button,
a {
	font: inherit;
}

a {
	color: inherit;
	text-decoration: none;
}

.auth-shell::before {
	content: none;
}

.signup-shell {
	background-image:
		radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 30rem),
		linear-gradient(rgba(17, 24, 39, 0.28) 2px, transparent 2px),
		linear-gradient(90deg, rgba(17, 24, 39, 0.28) 2px, transparent 2px),
		linear-gradient(180deg, rgba(16, 21, 9, 0.22) 0%, rgba(16, 21, 9, 0.54) 58%, rgba(16, 21, 9, 0.68) 100%),
		var(--auth-background-image);
	background-position: center, 0 0, 0 0, center, center;
	background-repeat: no-repeat, repeat, repeat, no-repeat, no-repeat;
	background-size: 100% 100%, 32px 32px, 32px 32px, 100% 100%, cover;
	color: #fff;
	font-family: Alegreya, Georgia, serif;
}

.signup-shell .login-card h2 {
	color: #fff;
	text-shadow: 0 8px 34px rgba(0, 0, 0, 0.6);
}

.signup-shell .auth-switch {
	color: rgba(255, 255, 255, 0.76);
	text-shadow: 0 6px 26px rgba(0, 0, 0, 0.55);
}

.signup-shell .auth-switch a {
	color: #fff;
	font-weight: 650;
}

.signup-shell .auth-switch a:hover,
.signup-shell .auth-switch a:focus-visible {
	color: #fff;
}

.skip-link {
	background: var(--gold);
	color: var(--ink);
	font-weight: 800;
	left: 1rem;
	padding: 0.75rem 1rem;
	position: fixed;
	top: 1rem;
	transform: translateY(-180%);
	z-index: 10;
}

.skip-link:focus {
	transform: translateY(0);
}

.login-layout,
.success-layout {
	align-items: center;
	display: grid;
	gap: 1.25rem;
	margin: 0 auto;
	min-height: 100vh;
	padding: clamp(1.5rem, 5vw, 3rem);
	position: relative;
	width: min(100%, 620px);
}

.login-layout {
	justify-items: center;
}

.login-card,
.success-card {
	border: 0;
	position: relative;
}

.eyebrow {
	color: var(--muted);
	font-size: 0.76rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	margin: 0;
	text-transform: uppercase;
}

h1,
h2 {
	letter-spacing: 0;
	line-height: 0.96;
	margin: 0;
}

.local-note {
	background: #f8f7e9;
	border: 1px solid rgba(16, 32, 24, 0.18);
	padding: 0.95rem;
}

.local-note span {
	color: var(--muted);
	display: block;
	font-size: 0.74rem;
	font-weight: 850;
	text-transform: uppercase;
}

.login-card,
.success-card {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

.login-card {
	width: min(100%, 380px);
}

.signup-card {
	overflow: visible;
}

.signup-card::before {
	content: none;
}

.card-heading {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
	margin-bottom: 2rem;
	padding-top: 0;
	text-align: center;
}

.brand-logo {
	aspect-ratio: 1;
	border-radius: clamp(1rem, 2.8vw, 1.45rem);
	box-shadow: 0 18px 54px rgba(255, 216, 61, 0.18), 0 10px 34px rgba(0, 0, 0, 0.16);
	display: block;
	flex: 0 0 auto;
	height: clamp(4.6rem, 12vw, 5.85rem);
	object-fit: contain;
	width: clamp(4.6rem, 12vw, 5.85rem);
}

.login-card h2,
.success-card h1 {
	font-size: clamp(1.75rem, 5vw, 2.22rem);
	font-weight: 650;
	line-height: 1;
	margin-top: 0;
	text-align: center;
}

.login-copy {
	color: var(--muted);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.6;
	margin: 0 0 2rem;
	max-width: 28rem;
}

button,
.auth-option {
	background: #f3f4f6;
	border: 0;
	color: var(--ink);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 650;
	min-height: 3rem;
	padding: 0 1rem;
}

button:hover,
.auth-option:hover,
.auth-field:hover {
	background: #e9eaee;
}

button:focus-visible,
.auth-option:focus-visible,
.auth-field:focus-within {
	box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.14);
	outline: none;
}

.auth-options {
	display: grid;
	gap: 1rem;
}

.auth-option,
.auth-field {
	align-items: center;
	background: #f3f4f6;
	border: 0;
	color: var(--ink);
	border-radius: 0.5rem;
	display: grid;
	font-size: 1.02rem;
	grid-template-columns: 2rem 1fr;
	min-height: 4.05rem;
	padding: 0 1.2rem;
	text-align: center;
	transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.auth-field input {
	background: transparent;
	border: 0;
	color: var(--ink);
	font: inherit;
	font-weight: 650;
	min-width: 0;
	outline: none;
	text-align: center;
}

.auth-field input::placeholder {
	color: var(--muted);
	opacity: 1;
}

.signup-shell .auth-field input,
.signup-shell .auth-field input::placeholder {
	color: #111827;
}

.field-error {
	box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.18);
}

.auth-option:hover,
.auth-field:hover {
	background: #ebecef;
	box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
	color: var(--ink);
	padding-left: 1.2rem;
	transform: translateY(-1px);
}

.auth-submit {
	grid-template-columns: 1fr;
}

.signup-shell .auth-submit {
	background: #111827;
	color: #fff;
}

.signup-shell .auth-submit:hover,
.signup-shell .auth-submit:focus-visible {
	background: #25314a;
	color: #fff;
	box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
}

.auth-back-widget {
	align-items: center;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	background: rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 0.375rem;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
	color: rgba(255, 255, 255, 0.82);
	display: inline-flex;
	font-family: Alegreya, Georgia, serif;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.5rem;
	justify-content: center;
	left: clamp(1rem, 3vw, 2rem);
	line-height: 1.25rem;
	min-height: 2.35rem;
	min-width: 5.9rem;
	padding: 0.5rem 0.75rem;
	position: fixed;
	top: clamp(1rem, 3vw, 2rem);
	transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease, color 300ms ease, transform 300ms ease;
	z-index: 20;
}

.auth-back-widget:hover,
.auth-back-widget:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 240, 163, 0.42);
	box-shadow: 0 16px 46px rgba(246, 232, 166, 0.16);
	color: #fff;
	outline: none;
	transform: translateY(-0.125rem);
}

.auth-back-icon {
	display: block;
	fill: none;
	height: 1rem;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	width: 1rem;
}

.auth-icon {
	align-items: center;
	color: #4b5563;
	display: inline-flex;
	height: 1.35rem;
	justify-content: center;
	width: 1.35rem;
}

.signup-form .auth-field .auth-icon {
	transform: translateY(0.08rem);
}

.auth-icon svg {
	display: block;
	fill: none;
	height: 1.35rem;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.75;
	width: 1.35rem;
}

.google-icon {
	color: #4285f4;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1;
}

.auth-switch {
	color: var(--muted);
	font-size: 0.98rem;
	font-weight: 500;
	line-height: 1.5;
	margin: 2rem 0 0;
	text-align: center;
}

.auth-switch a {
	color: #4b5563;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.auth-switch a:hover,
.auth-switch a:focus-visible {
	color: var(--ink);
}

.sr-only {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.status-message {
	border: 1px solid;
	font-weight: 750;
	line-height: 1.5;
	margin: 0 0 1rem;
	padding: 0.8rem 0.9rem;
}

.status-message.error {
	background: var(--danger-bg);
	border-color: #fecdd3;
	color: var(--danger);
}

.status-message.success {
	background: var(--success-bg);
	border-color: #bbf7d0;
	color: var(--success);
}

.local-note {
	margin-top: 1rem;
}

.local-note code {
	color: var(--blue);
	display: block;
	font-size: 0.92rem;
	font-weight: 850;
	margin-top: 0.35rem;
	white-space: normal;
}

.success-layout {
	place-items: center;
	width: min(100%, 720px);
}

.success-card {
	max-width: 640px;
	width: min(100%, 640px);
}

.success-card p:not(.eyebrow) {
	color: var(--muted);
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.65;
}

@media (max-width: 820px) {
	.login-layout {
		padding: 1rem;
	}
}
