@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;600&display=swap');

/*! reset */

p, input, button {
	border: 0;
	margin: 0;
	padding: 0;
	line-height: 1;
}

:root {
	--font-family: 'Barlow';
	--font-size: calc(1.5rem + 0.2vw);
	--font-size-footer: calc( var(--font-size) * 0.8 );
	--content-width: 500px;
	--color-red: #c51244;
}

/*! general */

* {
 box-sizing: border-box;
}

html, body {
	height: 100%;
	width: 100%;
}

body {
	background-color: rgb(245, 245, 245);
	display: flex;
	font-family: var(--font-family);
	flex-direction: column;
	font-size: var(--font-size);
	margin: 0;
	padding: 20px;
}

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

p {
	line-height: calc( var(--font-size) * 1.5 );
}

p.error {
	color: var(--color-red);
	font-weight: 600;
}

/*! page content */

main {
	align-items: center;
	display: flex;
	flex-direction: column;
	flex: 1;
	justify-content: center;
	text-align: center;
	margin: 0 auto;
	max-width: var(--content-width);
	width: 100%;
	gap: 40px;
}

footer {
	display: flex;
	font-weight: 600;
	flex-shrink: 0;
	font-size: var(--font-size-footer);
	gap: 20px;
	justify-content: center;
	opacity: 0.5;
}

form {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 40px;
	width: 100%;
}

.form--group {
	position: relative;
	width: 100%;
}

label {
	display: block;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	left: 0;
	color: rgba(0, 0, 0, 0.5);
	transform-origin: left top;
	user-select: none;
	transition: all 150ms;
}

input {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.45);
	color: rgba(0, 0, 0, 0.85);
	transition: all 500ms;
	padding: 10px 0;
	font-size: var(--font-size);
}

input:focus {
	outline: none;
}

input:not(:placeholder-shown) + label,
input:focus + label {
	transform: translateY(-150%) scale(0.75);
}

button {
	background-color: transparent;
	border: 1px solid rgba(0, 0, 0, 0.45);
	border-radius: 2px;
	font-weight: 300;
	padding: 10px 20px;
	color: rgba(0, 0, 0, 0.5);
	cursor: pointer;
	font-size: var(--font-size);
	outline: none;
}

button:hover,
button:focus {
	color: rgba(0, 0, 0, 0.85);
	border-color: rgba(0, 0, 0, 0.85);
	transition: 1s;
}