/* ------------------------------------------------------------
   17b. CONTACT DEVELOPER MODAL (bw-contact-developer)
   ------------------------------------------------------------ */
.ord-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ord-modal.is-open {
	visibility: visible;
	opacity: 1;
}

.ord-modal-backdrop {
	position: absolute;
	inset: 0;
	/* Flat dim instead of backdrop-filter: a full-viewport blur has to be
	   re-computed on every frame the page behind it animates, which is what
	   made an open modal feel heavy. */
	background: rgba(7, 11, 23, 0.78);
}

.ord-modal-card {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: var(--paper);
	color: var(--ink);
	border: 2.5px solid var(--ink);
	border-radius: 18px;
	box-shadow: 8px 8px 0 0 var(--ink);
	padding: 18px 18px 16px;
	max-height: 88vh;
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateY(14px) scale(0.98);
	transition: transform 0.22s ease;
}

.ord-modal.is-open .ord-modal-card {
	transform: translateY(0) scale(1);
}

.ord-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	background: var(--mist);
	color: var(--ink);
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 3px 3px 0 0 var(--ink);
	transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.ord-modal-close:hover {
	background: var(--violet);
	color: var(--paper);
	transform: translate(-1px, -1px);
}

/* Modal eyebrow doubles as the visible dialog heading. */
.ord-modal-card .ord-eyebrow {
	max-width: calc(100% - 40px);
	margin-bottom: 12px;
}

.ord-modal-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ord-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ord-field-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: rgba(36, 16, 70, 0.75);
}

.ord-input {
	width: 100%;
	font-family: var(--ord-font-body);
	font-size: 0.92rem;
	color: var(--ink);
	background: var(--mist);
	border: 2.5px solid var(--ink);
	border-radius: 10px;
	padding: 8px 11px;
	box-shadow: 3px 3px 0 0 rgba(36, 16, 70, 0.85);
	transition: box-shadow 0.15s ease, background 0.15s ease;
}

.ord-input:focus {
	outline: none;
	background: #fff;
	box-shadow: 5px 5px 0 0 var(--violet);
}

.ord-select {
	cursor: pointer;
}

/* assets/css/main/31-forms.css styles `input[type=...]` (0,1,1), which beats
   the class-only skin above. Re-state it with an element+class selector so the
   fields keep the paper/mist palette instead of the legacy glass fill. */
input.ord-input,
select.ord-input,
textarea.ord-input {
	color: var(--ink);
	background: var(--mist);
	border: 2.5px solid var(--ink);
	border-radius: 10px;
	box-shadow: 3px 3px 0 0 var(--ink);
}

input.ord-input:focus,
select.ord-input:focus,
textarea.ord-input:focus {
	background: #fff;
	border-color: var(--ink);
	box-shadow: 5px 5px 0 0 var(--violet);
}

input.ord-input::placeholder,
textarea.ord-input::placeholder {
	color: var(--ink-soft);
}

/* Project description field — optional, so it stays compact but resizable. */
.ord-textarea {
	min-height: 76px;
	line-height: 1.5;
	resize: vertical;
}

.ord-field-hint {
	font-size: 0.68rem;
	line-height: 1.4;
	color: rgba(36, 16, 70, 0.6);
}

.ord-modal-submit {
	width: 100%;
	margin-top: 0;
	padding: 11px 18px;
}

.ord-modal-submit:disabled {
	background: var(--mist);
	color: rgba(36, 16, 70, 0.6);
	box-shadow: 3px 3px 0 0 rgba(36, 16, 70, 0.35);
	cursor: not-allowed;
	transform: none;
}

.ord-modal-submit:disabled:hover {
	transform: none;
	box-shadow: 3px 3px 0 0 rgba(36, 16, 70, 0.35);
}

.ord-modal-foot {
	font-size: 0.75rem;
	line-height: 1.45;
	text-align: center;
	color: rgba(36, 16, 70, 0.65);
	margin: 0;
}

/* The form/panel classes set `display`, which outranks the UA `[hidden]` rule,
   so hiding either one from JS needs an explicit declaration. */
.ord-modal-form[hidden],
.ord-modal-success[hidden] {
	display: none;
}

/* Thank-you panel — replaces the form once the lead is saved. */
.ord-modal-success {
	display: grid;
	justify-items: center;
	gap: 9px;
	padding: 12px 4px 8px;
	text-align: center;
}

.ord-modal-success-icon {
	box-sizing: content-box;
	width: 26px;
	height: 26px;
	padding: 8px;
	color: var(--ink);
	background: var(--mint);
	border: 2.5px solid var(--ink);
	border-radius: 50%;
	box-shadow: 4px 4px 0 0 var(--ink);
}

.ord-modal-success-title {
	font-family: var(--ord-font-heading);
	font-size: 1.05rem;
	line-height: 1.35;
}

.ord-modal-success-text {
	font-size: 0.85rem;
	line-height: 1.55;
	color: rgba(36, 16, 70, 0.75);
	margin: 0;
}

body.ord-modal-open {
	overflow: hidden;
}

/* Everything behind an open dialog is covered and unreachable, so its
   animations are paused instead of being repainted under the overlay (the
   homepage runs ~150 case cards plus six blurred decorative layers). Nothing
   inside the card is animation-driven, so this is invisible to the visitor. */
body.ord-modal-open .ord-page *,
body.ord-modal-open .ord-page *::before,
body.ord-modal-open .ord-page *::after,
body.ord-modal-open .site-footer * {
	animation-play-state: paused;
}

/* Mobile — centered sheet that shrinks with the on-screen keyboard.
   (ord.js pins the overlay to window.visualViewport so the card stays
   scrollable while the keyboard is open.) */
@media (max-width: 640px) {
	.ord-modal {
		align-items: center;
		padding: 12px;
	}

	/* The inline #ord-cta form stacks here too. */
	.ord-cta-form {
		padding: 18px 14px;
		gap: 12px;
		border-radius: 16px;
		box-shadow: 6px 6px 0 0 var(--ink);
	}

	.ord-cta-form .ord-field-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.ord-form-progress-text,
	.ord-budget-summary-note {
		font-size: 0.72rem;
	}

	.ord-budget-summary-row {
		flex-wrap: wrap;
	}

	.ord-modal-card {
		max-width: 100%;
		border-radius: 16px;
		box-shadow: 5px 5px 0 0 var(--ink);
		padding: 16px 14px 14px;
		/* Percentage of the visual-viewport-sized overlay, not of the
		   layout viewport, so the keyboard can never cover the fields. */
		max-height: 100%;
	}

	.ord-modal-card .ord-eyebrow {
		font-size: 0.72rem;
		padding: 6px 13px;
		margin-bottom: 10px;
	}

	.ord-modal-close {
		width: 28px;
		height: 28px;
		top: 9px;
		right: 9px;
		font-size: 1rem;
	}

	.ord-modal-form {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.ord-input {
		font-size: 1rem;
		padding: 9px 11px;
	}

	.ord-field-label {
		font-size: 0.7rem;
	}

	.ord-textarea {
		min-height: 68px;
	}

	.ord-modal-submit {
		padding: 10px 16px;
	}
}

