.modal-form {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 2rem;
	border: 0;
	background: transparent;
	color: var(--color-white);
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.modal-form[open] {
	display: grid;
	place-items: center;
}

.modal-form.modal-form--visible {
	opacity: 1;
}

.modal-form::backdrop {
	background-color: rgba(10, 10, 10, 0.7);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.modal-form.modal-form--visible::backdrop {
	opacity: 1;
}

.modal-form__panel {
	position: relative;
	width: min(40rem, 100%);
	height: auto;
	max-height: calc(100dvh - 4rem);
	padding: 3rem;
	background-color: var(--color-black);
	overflow-y: auto;
	transform: translateY(1.6rem) scale(0.97);
	opacity: 0;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal-form--visible .modal-form__panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.modal-form,
	.modal-form::backdrop,
	.modal-form__panel {
		transition: none;
	}
}

.modal-form__close {
	position: absolute;
	top: 3rem;
	right: 3rem;
	width: 2.2rem;
	height: 2.2rem;
	color: var(--color-white);
}

.modal-form__close::before,
.modal-form__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 0.2rem;
	background-color: currentColor;
}

.modal-form__close::before {
	transform: rotate(45deg);
}

.modal-form__close::after {
	transform: rotate(-45deg);
}

.modal-form__title {
	max-width: 31rem;
	margin-bottom: 2.1rem;
	font-size: 4rem;
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: 0;
}

.modal-form__form {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	width: 100%;
}

.modal-form__field {
	position: relative;
	padding-bottom: 1.2rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-form__input {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	color: var(--color-white);
	font-family: inherit;
	font-size: 1.6rem;
	line-height: 1.4;
}

.modal-form__input::placeholder {
	color: var(--color-white);
	opacity: 0.3;
}

.modal-form__required {
	position: absolute;
	top: 0;
	color: var(--color-accent);
	font-size: 1.6rem;
	line-height: 1.4;
}

.modal-form__field--name .modal-form__required {
	left: 11rem;
}

.modal-form__field--email .modal-form__required {
	left: 16rem;
}

.modal-form__submit {
	width: 100%;
	margin-top: 1rem;
}

body.modal-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.modal-form {
		padding: 1rem;
	}

	.modal-form[open] {
		place-items: center;
	}

	.modal-form__panel {
		width: min(36rem, 100%);
		height: auto;
		max-height: calc(100dvh - 2rem);
		padding: min(3rem, 3dvh) 3rem;
	}

	.modal-form__close {
		top: min(3rem, 3dvh);
		right: 3rem;
		width: min(2.2rem, 3.3dvh);
		height: min(2.2rem, 3.3dvh);
	}

	.modal-form__title {
		margin-bottom: min(2.1rem, 2.5dvh);
		padding-right: 4rem;
		font-size: min(4rem, 5.8dvh);
		line-height: 1.05;
	}

	.modal-form__form {
		gap: min(2rem, 2.2dvh);
	}

	.modal-form__field {
		padding-bottom: min(1.2rem, 1.2dvh);
	}

	.modal-form__input,
	.modal-form__required {
		font-size: min(1.6rem, 2.4dvh);
	}

	.modal-form__field--name .modal-form__required {
		left: min(11rem, 16.5dvh);
	}

	.modal-form__field--email .modal-form__required {
		left: min(16rem, 24dvh);
	}

	.modal-form__submit {
		height: min(5rem, 7.5dvh);
		margin-top: min(1rem, 1dvh);
		padding: 0 3rem;
		font-size: min(1.2rem, 1.8dvh);
	}
}
