/* ---- Contact modal / wizard — shared pitch-site component -------------------
   Progressive enhancement (contact + careers modals): without JS each form renders as one
   visible page opened by its native :target rule. With JS, a
   stepped wizard + modal chrome layer on top of the SAME form. The wizard JS
   never touches form submission — the platform's injected capture.js owns it.
---------------------------------------------------------------------------- */

.modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

/* :target is the no-JS path. Scoped to :not(.has-js): once the wizard script
   boots it takes full ownership of open/close via .is-open, so a cross-page
   deep link to "#contact-modal" cannot leave the modal stuck open (Chromium
   keeps :target matching even after JS clears the hash). */
html:not(.has-js) #contact-modal:target,
html:not(.has-js) #careers-modal:target {
	display: flex;
}

.modal.is-open {
	display: flex;
}

body.modal-open {
	overflow: hidden;
}

.modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(16, 18, 17, 0.66);
	backdrop-filter: blur(2px);
}

.modal__dialog {
	position: relative;
	width: 100%;
	max-width: 34rem;
	max-height: calc(100vh - 3rem);
	overflow-y: auto;
	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(16, 18, 17, 0.35);
	padding: 2.4rem 2rem 2rem;
}

@media (prefers-reduced-motion: no-preference) {
	.modal.is-open .modal__dialog,
	html:not(.has-js) #contact-modal:target .modal__dialog,
	html:not(.has-js) #careers-modal:target .modal__dialog {
		animation: modal-pop-in 0.22s ease;
	}
	.modal.is-open .modal__backdrop,
	html:not(.has-js) #contact-modal:target .modal__backdrop,
	html:not(.has-js) #careers-modal:target .modal__backdrop {
		animation: modal-fade-in 0.22s ease;
	}
}

@keyframes modal-pop-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

@keyframes modal-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	border: 0;
	color: #3D3F40;
	background: rgba(61, 63, 64, 0.06);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.modal__close:hover {
	background: rgba(72, 137, 123, 0.10);
	color: #48897B;
}

.modal .modal__dialog > h2 {
	margin: 0 0 0.3rem;
	padding-right: 2.5rem;
	font-family: 'Vollkorn', Georgia, serif;
	font-size: 28px;
	line-height: 36px;
	letter-spacing: -0.5px;
	color: #000000;
}

.wizard-progress {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.6rem;
	font-family: 'Kumbh Sans', 'Helvetica Neue', Arial, sans-serif;
	font-size: 0.82rem;
	color: #6C7070;
}

.wizard-dots {
	display: flex;
	gap: 0.4rem;
}

.wizard-dots .dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #E0E3E2;
}

.wizard-dots .dot.is-active {
	background: #48897B;
}

/* Progress + Back/Next are JS-enhanced affordances. Without JS the whole form
   renders as one visible page and does not need them. */
.wizard-progress,
.wizard-back,
.wizard-next {
	display: none;
}

.has-js .wizard-progress {
	display: flex;
}

.has-js .wizard-back,
.has-js .wizard-next {
	display: inline-flex;
}

/* Inactive steps hide with CSS ONLY — never `disabled`. capture.js reads
   new FormData(form), which DOES include display:none fields but does NOT
   include disabled ones. */
.has-js .wizard-step:not(.is-active) {
	display: none;
}

.is-hidden {
	display: none !important;
}

.wizard-step {
	border: 0;
	margin: 0;
	padding: 0;
}

.wizard-step__legend {
	font-family: 'Kumbh Sans', 'Helvetica Neue', Arial, sans-serif;
	font-weight: 700;
	font-size: 0.95rem;
	color: #000000;
	margin-bottom: 1rem;
}

.wizard-intent-grid {
	display: grid;
	gap: 0.85rem;
	margin-bottom: 0.5rem;
}

.wizard-intent-card {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 1rem 1.2rem;
	border: 1px solid #E0E3E2;
	border-radius: 12px;
	cursor: pointer;
	font-family: 'Kumbh Sans', 'Helvetica Neue', Arial, sans-serif;
	font-weight: 600;
	font-size: 16px;
	color: #000000;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.wizard-intent-card input[type="radio"] {
	appearance: radio;
	-webkit-appearance: radio;
	display: block;
	margin: 0;
	width: 1.1rem;
	height: 1.1rem;
	accent-color: #48897B;
	flex-shrink: 0;
}

.wizard-intent-card:hover {
	border-color: #48897B;
}

.wizard-intent-card:has(input:checked) {
	border-color: #48897B;
	background: rgba(72, 137, 123, 0.06);
}

.wizard-error {
	color: #B3362E;
	font-family: 'Kumbh Sans', 'Helvetica Neue', Arial, sans-serif;
	font-size: 0.85rem;
	min-height: 1.2em;
	margin: 0.2rem 0 0.6rem;
}

.field {
	margin-bottom: 1.1rem;
}

.field label {
	display: block;
	margin: 0 0 0.5rem;
	font-family: 'Kumbh Sans', 'Helvetica Neue', Arial, sans-serif;
	font-weight: 600;
	font-size: 0.9rem;
	color: #000000;
}

.field input,
.field textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.85rem;
	border: 1px solid #E0E3E2;
	border-radius: 10px;
	font-family: 'Kumbh Sans', 'Helvetica Neue', Arial, sans-serif;
	font-size: 0.95rem;
	color: #000000;
	background: #FFFFFF;
}

.field textarea {
	resize: vertical;
	min-height: 6rem;
}

.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: #48897B;
}

.wizard-nav {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.wizard-nav .wizard-back {
	margin-right: auto;
}

/* The honeypot must be visually gone but still in the DOM and still
   serializable — offscreen, never display:none, never disabled. */
form .field.honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.modal :focus-visible {
	outline: 2px solid #48897B;
	outline-offset: 2px;
}

@media screen and (max-width: 480px) {
	.modal__dialog {
		padding: 2rem 1.4rem 1.6rem;
		max-height: calc(100vh - 2rem);
	}
	.wizard-nav {
		flex-wrap: wrap;
	}
	.wizard-nav .wizard-back {
		margin-right: 0;
		order: 2;
	}
	.wizard-nav .wizard-next,
	.wizard-nav .wizard-submit {
		width: 100%;
	}
}
