/* STM — formulários (Liquid Glass escuro) */

.stm-form-card,
.stm-form-card *,
.stm-form-card *::before,
.stm-form-card *::after {
	box-sizing: border-box;
}

.stm-form-card {
	position: relative;
	padding: clamp(1.5rem, 3.5vw, 2.75rem);
	border-radius: 28px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
	-webkit-backdrop-filter: blur(24px) saturate(140%);
	backdrop-filter: blur(24px) saturate(140%);
	scroll-margin-top: 110px;
}

.stm-form-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 30%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.stm-form[hidden],
.stm-form__success[hidden],
.stm-form__status[hidden] {
	display: none !important;
}

.stm-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 18px;
}

.stm-field {
	display: flex;
	flex-direction: column;
	gap: 9px;
	min-width: 0;
}

.stm-field--full {
	grid-column: 1 / -1;
}

.stm-field > label {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #c9c9c9;
	line-height: 1.3;
}

.stm-req {
	color: #fff;
}

.stm-opt {
	font-size: 0.625rem;
	letter-spacing: 0.1em;
	text-transform: none;
	color: #8a8b8b;
}

.stm-form input[type="text"],
.stm-form input[type="email"],
.stm-form input[type="tel"],
.stm-form input[type="number"],
.stm-form select,
.stm-form textarea {
	width: 100%;
	min-height: 54px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(5, 6, 6, 0.65);
	color: #f5f5f5;
	font: 400 1rem/1.4 var(--stm-font-body, "Inter", system-ui, sans-serif);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
	transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.stm-form textarea {
	min-height: 140px;
	resize: vertical;
}

.stm-form input::placeholder,
.stm-form textarea::placeholder {
	color: #6f7070;
}

.stm-form input:hover,
.stm-form select:hover,
.stm-form textarea:hover {
	border-color: rgba(255, 255, 255, 0.2);
}

.stm-form input:focus,
.stm-form select:focus,
.stm-form textarea:focus {
	outline: none;
	border-color: rgba(255, 255, 255, 0.55);
	background: rgba(10, 11, 11, 0.85);
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.stm-form input[type="number"]::-webkit-inner-spin-button,
.stm-form input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.stm-form input[type="number"] {
	-moz-appearance: textfield;
}

.stm-select {
	position: relative;
}

.stm-select::after {
	content: "";
	position: absolute;
	right: 16px;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-top: -6px;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7a7a7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.stm-select select {
	padding-right: 42px;
	cursor: pointer;
}

.stm-select option {
	background: #111212;
	color: #f5f5f5;
}

.stm-input {
	position: relative;
}

.stm-input--suffix input {
	padding-right: 96px;
}

.stm-input__suffix {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	color: #8a8b8b;
	pointer-events: none;
}

.stm-field__error {
	margin: 0;
	min-height: 0;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #ff8a8a;
}

.stm-field__error:empty {
	display: none;
}

.stm-field.has-error input,
.stm-field.has-error select,
.stm-field.has-error textarea {
	border-color: rgba(255, 90, 90, 0.75);
	box-shadow: 0 0 0 4px rgba(255, 60, 60, 0.1);
}

/* Consentimento */
.stm-field--check {
	display: grid;
	grid-template-columns: 22px 1fr;
	column-gap: 14px;
	row-gap: 6px;
	align-items: start;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stm-field--check input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	border-radius: 7px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: rgba(5, 6, 6, 0.65);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.stm-field--check input[type="checkbox"]::after {
	content: "";
	width: 12px;
	height: 12px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23070808' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.stm-field--check input[type="checkbox"]:checked {
	background: #f5f5f5;
	border-color: #f5f5f5;
}

.stm-field--check input[type="checkbox"]:checked::after {
	opacity: 1;
	transform: none;
}

.stm-field--check label {
	font-size: 0.875rem;
	line-height: 1.55;
	color: #a7a7a7;
	letter-spacing: 0;
	text-transform: none;
	display: block;
	cursor: pointer;
}

.stm-field--check label a {
	color: #f5f5f5;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.stm-field--check .stm-field__error {
	grid-column: 2;
}

.stm-field--check.has-error input[type="checkbox"] {
	border-color: rgba(255, 90, 90, 0.8);
}

/* Rodapé do formulário */
.stm-form__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 28px;
}

.stm-form__req {
	margin: 0;
	font-size: 0.75rem;
	color: #8a8b8b;
}

.stm-form__submit {
	min-width: 220px;
}

.stm-form__status {
	margin: 0 0 22px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid rgba(255, 90, 90, 0.4);
	background: rgba(255, 60, 60, 0.08);
	color: #ffc2c2;
	font-size: 0.9375rem;
}

/* Honeypot */
.stm-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Sucesso */
.stm-form__success {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	padding: clamp(1rem, 3vw, 2rem) 0;
	outline: none;
	animation: stm-success-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stm-form__success-icon {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	color: #070808;
	background: linear-gradient(180deg, #fff, #cfcfcf);
	box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06), 0 14px 40px -10px rgba(255, 255, 255, 0.4);
	margin-bottom: 8px;
}

.stm-form__success-title {
	margin: 0;
	font-family: var(--stm-font-display, "Space Grotesk", sans-serif);
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	font-weight: 500;
	letter-spacing: -0.02em;
	color: #fff;
}

.stm-form__success-text {
	margin: 0 0 12px;
	max-width: 46ch;
	color: #a7a7a7;
	font-size: 1rem;
	line-height: 1.6;
}

@keyframes stm-success-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
	.stm-form-card {
		padding: 22px 18px;
		border-radius: 22px;
	}

	.stm-form__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.stm-form__footer {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.stm-form__submit {
		width: 100%;
		min-width: 0;
	}

	.stm-form__req {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.stm-form__success {
		animation: none;
	}
}
