:root {
	--padaste-ink: #2a1f1b;
	--padaste-gold: #cfab4a;
	--padaste-wine: #78252f;
	--padaste-cream: #f7f1e8;
	--padaste-mist: rgba(244, 238, 227, 0.9);
	--padaste-line: rgba(120, 37, 47, 0.18);
	--padaste-shadow: 0 30px 90px rgba(26, 18, 16, 0.28);
	--padaste-radius: 28px;
	--padaste-ease: 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.padaste-modal-open {
	overflow: hidden;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.padaste-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--padaste-ease);
	font-family: Georgia, "Times New Roman", serif;
	color: var(--padaste-ink);
}

.padaste-modal.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.padaste-modal__backdrop {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at top, rgba(207, 171, 74, 0.24), transparent 35%),
		linear-gradient(135deg, rgba(30, 20, 18, 0.72), rgba(74, 28, 37, 0.82));
	backdrop-filter: blur(7px);
}

.padaste-modal__dialog {
	position: relative;
	width: min(100%, 680px);
	padding: 46px 42px 40px;
	border-radius: var(--padaste-radius);
	background:
		linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(247, 241, 232, 0.98) 52%, rgba(238, 228, 211, 0.96)),
		linear-gradient(135deg, rgba(120, 37, 47, 0.1), rgba(207, 171, 74, 0.08));
	box-shadow: var(--padaste-shadow);
	border: 1px solid rgba(255, 255, 255, 0.55);
	overflow: hidden;
	transform: translateY(32px) scale(0.97);
	opacity: 0;
	transition:
		transform var(--padaste-ease),
		opacity var(--padaste-ease);
}

.padaste-modal.is-visible .padaste-modal__dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.padaste-modal__dialog::before,
.padaste-modal__dialog::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.padaste-modal__dialog::before {
	width: 240px;
	height: 240px;
	top: -110px;
	right: -70px;
	background: radial-gradient(circle, rgba(207, 171, 74, 0.24), rgba(207, 171, 74, 0));
}

.padaste-modal__dialog::after {
	width: 180px;
	height: 180px;
	bottom: -110px;
	left: -90px;
	background: radial-gradient(circle, rgba(120, 37, 47, 0.14), rgba(120, 37, 47, 0));
}

.padaste-modal__close {
	position: absolute;
	top: 18px;
	right: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(120, 37, 47, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.64);
	color: var(--padaste-wine);
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	transition:
		transform 160ms ease,
		background 160ms ease,
		border-color 160ms ease;
}

.padaste-modal__close:hover,
.padaste-modal__close:focus {
	transform: rotate(90deg);
	background: rgba(255, 255, 255, 0.94);
	border-color: rgba(120, 37, 47, 0.34);
	outline: none;
}

.padaste-modal__crest {
	width: 62px;
	height: 62px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 18px;
	margin-bottom: 18px;
	background: linear-gradient(145deg, var(--padaste-wine), #592028);
	color: #f5ebdd;
	font-size: 30px;
	letter-spacing: 0.08em;
	box-shadow: 0 16px 32px rgba(120, 37, 47, 0.24);
}

.padaste-modal__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: rgba(42, 31, 27, 0.64);
}

.padaste-modal__title {
	margin: 0;
	font-size: clamp(36px, 6vw, 54px);
	line-height: 0.96;
	font-weight: 400;
	letter-spacing: -0.02em;
}

.padaste-modal__copy {
	margin: 20px 0 0;
	max-width: 540px;
	font-size: 19px;
	line-height: 1.7;
	color: rgba(42, 31, 27, 0.84);
}

.padaste-modal__form,
.padaste-modal__success {
	margin-top: 32px;
	transition:
		opacity 280ms ease,
		transform 280ms ease,
		max-height 280ms ease,
		margin-top 280ms ease;
}

.padaste-modal__field-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	padding: 14px;
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.68);
	border: 1px solid var(--padaste-line);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.padaste-modal__input {
	width: 100%;
	min-width: 0;
	padding: 16px 18px;
	border: 1px solid transparent;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.88);
	color: var(--padaste-ink);
	font: inherit;
	font-size: 17px;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		background 180ms ease;
}

.padaste-modal__input::placeholder {
	color: rgba(42, 31, 27, 0.48);
}

.padaste-modal__input:focus {
	outline: none;
	border-color: rgba(120, 37, 47, 0.28);
	box-shadow: 0 0 0 4px rgba(207, 171, 74, 0.18);
	background: #fff;
}

.padaste-modal__submit {
	padding: 16px 24px;
	border: 0;
	border-radius: 16px;
	background: linear-gradient(145deg, var(--padaste-wine), #511922);
	color: #f8f1e6;
	font: inherit;
	font-size: 15px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 18px 30px rgba(120, 37, 47, 0.18);
	transition:
		transform 180ms ease,
		box-shadow 180ms ease,
		filter 180ms ease;
}

.padaste-modal__submit:hover,
.padaste-modal__submit:focus {
	transform: translateY(-1px);
	box-shadow: 0 22px 38px rgba(120, 37, 47, 0.24);
	filter: saturate(1.05);
	outline: none;
}

.padaste-modal__submit:disabled {
	cursor: wait;
	opacity: 0.8;
	transform: none;
}

.padaste-modal__message {
	min-height: 24px;
	margin: 14px 4px 0;
	font-size: 14px;
	letter-spacing: 0.02em;
	color: var(--padaste-wine);
}

.padaste-modal__success {
	display: flex;
	align-items: center;
	gap: 16px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transform: translateY(10px);
	margin-top: 0;
	padding: 0 4px;
}

.padaste-modal__success-mark {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: linear-gradient(145deg, rgba(207, 171, 74, 0.2), rgba(207, 171, 74, 0.38));
	color: #715310;
	font-size: 24px;
	transform: scale(0.9);
	transition: transform 320ms ease 80ms;
}

.padaste-modal__success-copy {
	margin: 0;
	font-size: 18px;
	line-height: 1.6;
	color: rgba(42, 31, 27, 0.88);
}

.padaste-modal.is-success .padaste-modal__form {
	opacity: 0;
	transform: translateY(-8px);
	max-height: 0;
	overflow: hidden;
	margin-top: 0;
	pointer-events: none;
}

.padaste-modal.is-success .padaste-modal__success {
	max-height: 160px;
	opacity: 1;
	transform: translateY(0);
	margin-top: 28px;
}

.padaste-modal.is-success .padaste-modal__success-mark {
	transform: scale(1);
}

@media (max-width: 700px) {
	.padaste-modal {
		padding: 14px;
	}

	.padaste-modal__dialog {
		padding: 36px 22px 26px;
		border-radius: 24px;
	}

	.padaste-modal__copy {
		font-size: 17px;
	}

	.padaste-modal__field-row {
		grid-template-columns: 1fr;
	}

	.padaste-modal__submit {
		width: 100%;
	}

	.padaste-modal__success {
		align-items: flex-start;
	}

	.padaste-modal__success-copy {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.padaste-modal,
	.padaste-modal__dialog,
	.padaste-modal__form,
	.padaste-modal__success,
	.padaste-modal__success-mark,
	.padaste-modal__submit,
	.padaste-modal__close {
		transition: none;
	}

	.padaste-modal__backdrop {
		backdrop-filter: none;
	}
}