/*
 * Matus Leads form styles.
 * Uses the theme tokens when present, with safe fallbacks.
 * The hero variant is a dark navy card; the section variant is light.
 */

.matus-lead-form {
	--ml-navy: var(--navy, #0E2036);
	--ml-gold-cta: var(--gold-cta, #D0A24A);
	--ml-line: var(--line, #ECE6DA);
	--ml-ink: var(--ink, #12263D);
	--ml-muted: var(--muted, #5C6B7A);
	--ml-dark-secondary: var(--dark-secondary, #C3CEDA);
	--ml-field-dark: #0B1A2C;

	border-radius: 14px;
	padding: 30px 28px;
	font-family: var(--font-sans, "Public Sans", system-ui, sans-serif);
}

/* Honeypot: visually removed but still in the DOM for bots. */
.ml-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.matus-lead-form__title {
	font-family: var(--font-serif, "Source Serif 4", Georgia, serif);
	font-weight: 600;
	font-size: 1.5rem;
	text-align: center;
	margin: 0 0 8px;
}

.matus-lead-form__sub {
	font-size: 0.875rem;
	text-align: center;
	margin: 0 0 20px;
}

.matus-lead-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.matus-lead-form__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.matus-lead-form__field--email,
.matus-lead-form__field--matter {
	grid-column: auto;
}

.matus-lead-form__field--message,
.matus-lead-form__field--extra {
	grid-column: 1 / -1;
}

.matus-lead-form__field label {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.matus-lead-form__optional {
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

.matus-lead-form__field input,
.matus-lead-form__field select,
.matus-lead-form__field textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.matus-lead-form__field textarea {
	resize: vertical;
}

.matus-lead-form__submit {
	display: block;
	width: 100%;
	min-height: 48px;
	margin-top: 18px;
	padding: 12px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--ml-gold-cta);
	color: var(--ml-navy);
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}

.matus-lead-form__submit:hover {
	background: #DBB260;
}

.matus-lead-form__submit[disabled] {
	opacity: 0.7;
	cursor: wait;
}

.matus-lead-form__note {
	font-size: 0.75rem;
	line-height: 1.5;
	margin: 14px 0 0;
	text-align: center;
}

.matus-lead-form__errors {
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 0.875rem;
}

.matus-lead-form__errors[hidden],
.matus-lead-form__error[hidden],
.matus-lead-form__status[hidden] {
	display: none;
}

.matus-lead-form__errors ul {
	margin: 8px 0 0;
	padding-left: 18px;
}

.matus-lead-form__error {
	font-size: 0.8125rem;
	margin: 0;
	font-weight: 600;
}

.matus-lead-form__status {
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 4px;
	font-size: 0.9375rem;
	font-weight: 500;
}

.matus-lead-form__recaptcha-note {
	font-size: 0.6875rem;
	line-height: 1.5;
	margin: 8px 0 0;
	text-align: center;
	opacity: 0.85;
}

.matus-lead-form__recaptcha-note a {
	color: inherit;
	text-decoration: underline;
}

/* The reCAPTCHA v3 badge is hidden; Google's terms are met by the note above. */
.grecaptcha-badge {
	visibility: hidden;
}

/* ---------- Hero (dark) variant ---------- */
.matus-lead-form--hero {
	/* Elevated glass-navy card. The gradient is opaque enough to guarantee
	 * label/field contrast over the hero photo; backdrop-filter adds the glass
	 * feel where supported and degrades cleanly to the gradient where not. */
	background:
		linear-gradient( 160deg, rgba(16, 32, 54, 0.93), rgba(9, 18, 30, 0.96) );
	-webkit-backdrop-filter: blur(10px) saturate(115%);
	backdrop-filter: blur(10px) saturate(115%);
	border: 1px solid rgba(208, 162, 74, 0.38);
	border-radius: 16px;
	padding: 34px 30px;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.05) inset,
		0 24px 60px -20px rgba(0, 0, 0, 0.55);
	color: #FFFFFF;
}

.matus-lead-form--hero .matus-lead-form__title {
	color: var(--ml-gold-cta);
}

.matus-lead-form--hero .matus-lead-form__sub,
.matus-lead-form--hero .matus-lead-form__note {
	color: var(--ml-dark-secondary);
}

.matus-lead-form--hero .matus-lead-form__field label {
	color: var(--ml-dark-secondary);
}

.matus-lead-form--hero .matus-lead-form__field input,
.matus-lead-form--hero .matus-lead-form__field select,
.matus-lead-form--hero .matus-lead-form__field textarea {
	background: var(--ml-field-dark);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #FFFFFF;
}

.matus-lead-form--hero .matus-lead-form__field select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23C3CEDA'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

.matus-lead-form--hero .matus-lead-form__field input:focus-visible,
.matus-lead-form--hero .matus-lead-form__field select:focus-visible,
.matus-lead-form--hero .matus-lead-form__field textarea:focus-visible {
	outline: 3px solid var(--ml-gold-cta);
	outline-offset: 1px;
}

.matus-lead-form--hero .matus-lead-form__field [aria-invalid="true"] {
	border-color: #F3B7B0;
}

.matus-lead-form--hero .matus-lead-form__error {
	color: #F3B7B0;
}

.matus-lead-form--hero .matus-lead-form__errors {
	background: rgba(150, 40, 30, 0.35);
	border: 1px solid #F3B7B0;
	color: #FFFFFF;
}

.matus-lead-form--hero .matus-lead-form__errors a {
	color: #FFFFFF;
}

.matus-lead-form--hero .matus-lead-form__status {
	background: rgba(38, 105, 66, 0.4);
	border: 1px solid #9FD8B4;
	color: #FFFFFF;
}

/* ---------- Section (light) variant ---------- */
.matus-lead-form--section {
	background: var(--card, #FFFFFF);
	border: 1px solid var(--ml-line);
	color: var(--ml-ink);
	max-width: 640px;
}

.matus-lead-form--section .matus-lead-form__title {
	color: var(--ml-ink);
}

.matus-lead-form--section .matus-lead-form__sub,
.matus-lead-form--section .matus-lead-form__note {
	color: var(--ml-muted);
}

.matus-lead-form--section .matus-lead-form__field label {
	color: var(--ml-ink);
}

.matus-lead-form--section .matus-lead-form__field input,
.matus-lead-form--section .matus-lead-form__field select,
.matus-lead-form--section .matus-lead-form__field textarea {
	background: #FFFFFF;
	border: 1px solid #C9CFD6;
	color: var(--ml-ink);
}

.matus-lead-form--section .matus-lead-form__field input:focus-visible,
.matus-lead-form--section .matus-lead-form__field select:focus-visible,
.matus-lead-form--section .matus-lead-form__field textarea:focus-visible {
	outline: 3px solid var(--ml-navy);
	outline-offset: 1px;
}

.matus-lead-form--section .matus-lead-form__field [aria-invalid="true"] {
	border-color: #B3261E;
}

.matus-lead-form--section .matus-lead-form__error {
	color: #B3261E;
}

.matus-lead-form--section .matus-lead-form__errors {
	background: #FBEAE8;
	border: 1px solid #B3261E;
	color: #7A1A14;
}

.matus-lead-form--section .matus-lead-form__status {
	background: #EAF5EE;
	border: 1px solid #2E7D4F;
	color: #1E5236;
}

@media (max-width: 640px) {
	.matus-lead-form {
		padding: 24px 18px;
	}

	.matus-lead-form__grid {
		grid-template-columns: 1fr;
	}
}
