@font-face {
	font-family: "Pricedown";
	src:
		local("Pricedown Bl"),
		local("Pricedown"),
		url("fonts/pricedown.woff2") format("woff2");
	font-weight: 900;
	font-display: swap;
}

:root {
	--bg-page: #000912;
	--bg-sheet: #030d17;
	--bg-field: #121b2b;
	--border-field: rgba(255, 255, 255, 0.05);
	--text-heading: #ffffff;
	--text-body: #d6dfee;
	--text-placeholder: #4e6278;
	--text-caption: #6b7d92;
	--text-link: #fe738d;
	--handle: #405266;
	--glow: #091935;
	--error: #ff4d5e;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	background: var(--bg-page);
	font-family: "Onest", sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* Background screen */
.backdrop {
	position: fixed;
	inset: 0;
	overflow: hidden;
}

.backdrop__screen {
	position: relative;
	width: 100%;
	max-width: 360px;
	height: 100%;
	margin: 0 auto;
	background: var(--bg-page);
}

.backdrop__screen img {
	position: absolute;
	display: block;
	height: auto;
}

.backdrop__header {
	top: 0;
	left: 0;
	width: 100%;
}

.backdrop__content {
	top: 64px;
	left: 2.222%;
	width: 95.556%;
}

.backdrop__navbar {
	bottom: 0;
	left: 0;
	width: 100%;
}

.backdrop__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.page {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
}

/* Bottom sheet */
.promo {
	width: 100%;
	max-width: 360px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 0 16px 16px;
	background: var(--bg-sheet);
	border-radius: 24px 24px 0 0;
	filter: drop-shadow(0 0 32px var(--glow));
}

.promo__handle {
	width: 60px;
	height: 4px;
	background: var(--handle);
	border-radius: 0 0 8px 8px;
}

.promo__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	text-align: center;
}

.promo__title {
	margin: 0;
	font-family: "Pricedown", "Onest", sans-serif;
	font-weight: 900;
	font-size: 24px;
	line-height: 24px;
	color: var(--text-heading);
	font-feature-settings:
		"salt" 1,
		"liga" 0;
}

.promo__subtitle {
	margin: 0;
	font-size: 16px;
	line-height: 20px;
	color: var(--text-body);
}

/* Form */
.promo__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.field {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 48px;
	padding: 0 12px;
	background: var(--bg-field);
	border: 1px solid var(--border-field);
	border-radius: 8px;
	cursor: text;
	transition: border-color 0.15s;
}

.field:focus-within {
	border-color: rgba(255, 255, 255, 0.2);
}

.field.is-invalid {
	border-color: var(--error);
}

.form-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.form-error {
	margin: 0;
	font-size: 12px;
	line-height: 16px;
	color: var(--error);
}

.form-error:empty {
	display: none;
}

.field__icon {
	flex-shrink: 0;
	display: block;
}

.field__input {
	flex: 1 0 0;
	min-width: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font:
		400 16px / 20px "Onest",
		sans-serif;
	color: var(--text-heading);
}

.field__input::placeholder {
	color: var(--text-placeholder);
	opacity: 1;
}

/* Button */
.submit {
	position: relative;
	width: 100%;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	overflow: clip;
}

.submit__bg {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0.53%;
	right: 0.53%;
	width: calc(100% - 1.06%);
	height: 40px;
	display: block;
	transition: filter 0.15s;
}

.submit:hover .submit__bg {
	filter: brightness(1.08);
}

.submit:active .submit__bg {
	filter: brightness(0.95);
}

.submit__label {
	position: relative;
	font:
		700 14px / normal "Onest",
		sans-serif;
	color: #fff;
	text-shadow: 0.5px 0.5px 0 rgba(0, 0, 0, 0.5);
}

.submit__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	opacity: 0;
	animation: spin 0.7s linear infinite;
}

.submit.is-loading {
	cursor: progress;
}

.submit.is-loading .submit__label {
	opacity: 0;
}

.submit.is-loading .submit__spinner {
	opacity: 1;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Checkboxes */
.checks {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.check {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.check--top {
	align-items: flex-start;
}

.check--top .check__box {
	margin-top: 2px;
}

.check__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.check__box {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: var(--bg-field);
	border: 1px solid transparent;
	border-radius: 4px;
}

.check.is-invalid .check__box {
	border-color: var(--error);
}

.check__box img {
	display: block;
	visibility: hidden;
}

.check__input:checked + .check__box img {
	visibility: visible;
}

.check__input:focus-visible + .check__box {
	outline: 1px solid rgba(255, 255, 255, 0.3);
}

.check__text {
	padding: 4px 0;
	font-size: 12px;
	line-height: 16px;
	color: var(--text-caption);
}

.check__link {
	color: var(--text-link);
	text-decoration: underline;
}
