:root {
	--clr: hsl(220, 10%, 18%);
	--clr-muted: hsl(from var(--clr) h s calc(l + 46));
	--bg: hsl(0, 0%, 100%);
	--bg-account: hsl(220, 10%, 97%);
	--border: hsl(220, 10%, 90%);
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;

		--clr: hsl(220, 10%, 96%);
		--clr-muted: hsl(from var(--clr) h s calc(l - 46));
		--bg: hsl(220, 11%, 7%);
		--bg-account: hsl(220, 11%, 10%);
		--border: hsl(from var(--bg) h s calc(l + 6));
	}
}

@view-transition {
	navigation: auto;
}

html {
	font-size: 16px;
}

html * {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html,
body {
	height: 100%;
	min-height: 100%;
	color: var(--clr);
	background-color: var(--bg);
}

body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	font-family: 'InterVariable', system-ui, sans-serif;
	font-feature-settings:
		'case' 1,
		'ss03' 1,
		'cv03' 1,
		'cv04' 1,
		'cv06' 1;
}

main {
	display: flex;
	flex-direction: column;
	align-items: start;
	padding: 1.5rem;
	gap: 1.5rem;
}

aside {
	display: flex;
	max-height: 100%;
	min-height: 0;
	background-color: #f7f9f8;
}

aside img {
	width: 100%;
	max-height: 100%;
	min-height: 0;
	height: 100%;
	object-fit: contain;
}

@media (max-width: 1000px) {
	html {
		font-size: 15px;
	}

	body {
		grid-template-columns: 1fr;
	}

	aside {
		display: none;
	}
}

@media (min-width: 2000px) {
	main {
		padding: 2.5rem;
	}
}

svg {
	max-width: 2.25rem;
	height: auto;
	color: var(--clr) !important;
}

h1 {
	margin: 3rem 0 0 0;
	max-width: 26rem;
	font-size: 3.4rem;
	font-weight: 750;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--clr) !important;
	text-wrap: balance;
}

@media (max-width: 700px) {
	h1 {
		margin: 2.5rem 0 0 0;
		font-size: 3.1rem;
	}
}

p {
	font-size: 1rem;
	font-weight: 460;
	line-height: 1.55;
	color: var(--clr);
	max-width: 28rem;
	text-wrap: pretty;
}

form {
	display: flex;
	width: 100%;
	justify-content: stretch;
}

input {
	display: none;
}

.button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	padding: 0 2.5rem;
	gap: 0.5rem;
	height: 2.75rem;
	font-family: 'InterVariable';
	font-size: 1rem;
	font-weight: 620;
	color: var(--bg);
	background-color: var(--clr);
	border: none;
	border-radius: 6px;
	appearance: none;
	cursor: pointer;
	opacity: 1;
	transition: all 0.2s;
	text-decoration: none;
}

.button:hover {
	opacity: 0.8;
}

.loading {
	pointer-events: none;
}

.loading:after {
	content: '';
	width: 1rem;
	height: 1rem;
	border-radius: 100%;
	border: 2px solid;
	border-left-color: transparent;
	animation: 0.8s linear 0s infinite spinner;
}

button,
button:focus,
a,
a:focus {
	border: none !important;
	outline: 0 !important;
	text-decoration: none;
	font-family: 'InterVariable';
}

.link {
	color: var(--clr-muted);
	text-underline-offset: 3px;
	line-height: 1.5;
	opacity: 1;
	transition: opacity 0.2s;
}

.link:hover {
	opacity: 0.7;
}

.account {
	margin-top: 2rem;
	color: var(--clr-muted);
}

.account p {
	margin-bottom: 1rem;
	color: inherit;
}

.account__details {
	display: flex;
	justify-content: stretch;
	width: 20rem;
	border: 2px solid var(--border);
	border-radius: 6px;
	background-color: var(--bg-account);
}

.account__details > div {
	display: flex;
	flex-direction: column;
	width: 50%;
	font-size: 1rem;
	font-family: ui-monospace, monospace;
	padding: 0.5rem 0.65rem;
	gap: 0.25rem;
}

.account__username:before,
.account__password:before {
	font-size: 0.7rem;
}

.account__username {
	border-right: 2px solid var(--border);
}

.account__username:before {
	content: 'Username';
}

.account__password:before {
	content: 'Password';
}

footer {
	display: flex;
	flex-direction: column;
	justify-content: end;
	align-items: start;
	align-self: stretch;
	flex-grow: 1;
	font-size: 0.85rem;
}

.badges {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 2px;
	margin: 1rem 0 0 0;
}

.badges a {
	opacity: 1;
	transition: all 0.2s;
}

.badges a:hover {
	opacity: 0.7;
}

.commit {
	display: flex;
	justify-content: end;
	flex-grow: 1;
	font-family: ui-monospace, monospace;
	font-size: 0.8em;
	color: var(--clr-muted);
	opacity: 0.4;
	user-select: none;
}

@keyframes spinner {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}
