/* Contact page. Ported from the prototype's /contact. */
.contact :is(h1, h2, h3, p) {
	margin: 0;
}

.contact {
	padding: calc(var(--header-height) + 100px) var(--spacing-page) 150px;
	background: var(--color-white);
	flex-direction: column;
	align-items: stretch;
	gap: 150px;
	display: flex;
}

.contact-top {
	justify-content: space-between;
	align-items: flex-start;
	gap: 64px;
	display: flex;
}

.contact-left {
	flex-direction: column;
	flex-shrink: 0;
	gap: 72px;
	width: 473px;
	display: flex;
}

.contact-left .sec-head > h1 {
	max-width: 387px;
}

.contact-left .sec-head > p:last-child {
	max-width: 387px;
}

.contact-info {
	justify-content: space-between;
	gap: 32px;
	width: 413px;
	max-width: 100%;
	display: flex;
}

.contact-details {
	flex-direction: column;
	gap: 40px;
	display: flex;
}

.contact-address {
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	display: flex;
}

.contact-getting {
	flex-direction: column;
	gap: 64px;
	display: flex;
}

.contact-getting-row {
	align-items: flex-end;
	gap: 64px;
	display: flex;
}

.contact-getting-img {
	aspect-ratio: 680 / 700;
	flex-shrink: 0;
	width: 47.2222%;
}

.contact-getting-img .cover {
	object-position: 50% 60%;
}

.contact-getting-text {
	flex-direction: column;
	align-items: flex-start;
	gap: 56px;
	display: flex;
}

.contact-getting-copy {
	flex-direction: column;
	gap: 32px;
	max-width: 468px;
	display: flex;
}

.contact-getting-copy > p {
	max-width: 365px;
}

@media (width<=1279px) {
	.contact {
		padding: calc(var(--header-height) + 96px) var(--spacing-page) 120px;
		gap: 120px;
	}

	.contact-top {
		flex-direction: column;
		gap: 72px;
	}

	.contact-left {
		gap: 48px;
		width: 100%;
	}

	.contact-getting-row {
		flex-direction: column;
		align-items: stretch;
		gap: 40px;
	}

	.contact-getting-img {
		aspect-ratio: 786 / 600;
		width: 100%;
	}

	.contact-getting-text {
		gap: 40px;
	}

	/* The intro text, the form and the details reorder on tablet and phone. */
	.contact-left {
		display: contents;
	}

	.contact-left > .sec-head {
		order: 0;
	}

	.contact-info {
		order: 2;
	}

	/* The prototype's footer rule moves the address below the maps link here too. */
	.contact-address .footer-address {
		order: 1;
	}
}

@media (width<=767px) {
	.contact {
		padding: calc(var(--header-height) + 48px) var(--spacing-page) 96px;
		gap: 100px;
	}

	.contact-info {
		flex-direction: column;
		gap: 32px;
		margin-top: 48px;
	}

	.contact-top {
		gap: 32px;
	}

	.contact-getting,
	.contact-getting-row {
		gap: 32px;
	}

	.contact-getting-img {
		aspect-ratio: 350 / 360;
	}
}

@media (width>=768px) and (width<=1279px) {
	.contact-top {
		gap: 64px;
	}

	.contact-info {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
		width: 100%;
		display: grid;
	}

	.contact-getting {
		gap: 48px;
	}

	.contact-getting-row {
		flex-direction: row;
		align-items: flex-end;
		gap: 24px;
	}

	.contact-getting-img {
		aspect-ratio: 381 / 480;
		width: calc(50% - 12px);
	}

	.contact-getting-text {
		flex: 1 1 0;
		gap: 56px;
		min-width: 0;
	}
}

/* The prototype frames this call to action with the hero's box, like Our Story. */
.contact-cta .media-box {
	left: -.2778%;
	top: -16.1963%;
	width: 100.5556%;
	height: 118.5276%;
}

/*
 * The inquiry form. Fluent Forms renders its own markup, so the prototype's
 * .interest-* rules are mapped onto it:
 * .interest-field = .ff-el-input--content, .interest-row = .ff-t-container.
 */
.contact-form {
	--ct-fields-gap: 48px;
	--ct-button-gap: 48px;
	--ct-row-gap: 32px;
	--ct-message-height: 75px;
	flex: 0 680px;
	flex-direction: column;
	align-items: stretch;
	min-width: 0;
	padding-top: 40px;
	display: flex;
}

.contact-form .brxe-shortcode,
.contact-form .fluentform {
	width: 100%;
}

.contact-form .frm-fluent-form fieldset {
	display: block;
}

/* Rows and fields. */
.contact-form .frm-fluent-form .ff-el-group {
	margin: 0;
	position: relative;
}

.contact-form .frm-fluent-form fieldset > :is(.ff-column-container, .ff-el-group) {
	margin-top: var(--ct-fields-gap);
}

.contact-form .frm-fluent-form fieldset > .ff_submit_btn_wrapper {
	margin-top: var(--ct-button-gap);
}

.contact-form .frm-fluent-form .ff-t-container {
	gap: var(--ct-row-gap);
	width: 100%;
	margin: 0;
	display: flex;
}

.contact-form .frm-fluent-form .ff-t-cell {
	flex: 1 1 0;
	justify-content: flex-start;
	min-width: 0;
	margin: 0;
	padding: 0;
}

/* Every field keeps its label for screen readers; the prototype shows only placeholders. */
.contact-form .frm-fluent-form .ff-el-input--label {
	clip-path: inset(50%);
	white-space: nowrap;
	width: 1px;
	height: 1px;
	margin: 0;
	position: absolute;
	overflow: hidden;
}

.contact-form .frm-fluent-form .ff-el-input--content {
	border-bottom: .5px solid var(--color-ink);
	cursor: text;
	min-width: 0;
	display: flex;
	position: relative;
}

.contact-form .frm-fluent-form .ff-el-input--content:focus-within {
	box-shadow: 0 .5px 0 var(--color-ink);
}

.contact-form .frm-fluent-form .ff-el-form-control {
	width: 100%;
	height: auto;
	min-height: 0;
	color: var(--color-ink);
	font-family: var(--font-body);
	letter-spacing: .01em;
	background: 0 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	outline: 0;
	margin: -15px 0 0;
	padding: 15px 0 12px;
	font-size: var(--fs-14);
	line-height: normal;
}

.contact-form .frm-fluent-form .ff-el-form-control::placeholder {
	color: var(--color-muted);
	opacity: 1;
}

/*
 * The prototype's message field keeps its set height; on phones the three-row textarea
 * rises above it. The rise is a fixed negative margin (1px extra covers the line), so a resized
 * textarea grows the field downward instead of up into the field above.
 */
.contact-form .frm-fluent-form .contact-message .ff-el-input--content {
	align-items: flex-end;
	min-height: var(--ct-message-height);
}

.contact-form .frm-fluent-form .contact-message textarea.ff-el-form-control {
	--ct-textarea-height: calc(4.2em + 12px);
	resize: vertical;
	min-height: var(--ct-textarea-height);
	margin: min(0px, var(--ct-message-height) - 1px - var(--ct-textarea-height)) 0 0;
	padding: 0 0 12px;
	line-height: 1.4;
}

@media (width<=767px) {
	.contact-form .frm-fluent-form .contact-message textarea.ff-el-form-control {
		--ct-textarea-height: calc(4.2em + 0);
	}
}

/* Field errors: the footer newsletter's error style, placed under the line so the layout does not move. */
.contact-form .frm-fluent-form .ff-el-group .error {
	pointer-events: none;
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 12px;
	line-height: 1.4;
	margin: 0;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
}

.contact-form .frm-fluent-form .ff-el-is-error .ff-el-form-control {
	border-color: transparent;
}

/* The submit button is a text link. */
/* A flex row, so the inline button adds no line-height strut above it. */
.contact-form .frm-fluent-form .ff_submit_btn_wrapper {
	align-items: flex-start;
	display: flex;
	position: relative;
}

.contact-form .frm-fluent-form .ff-btn-submit {
	color: var(--color-ink);
	font-family: var(--font-display);
	letter-spacing: .01em;
	cursor: pointer;
	background: 0 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	min-width: 0;
	min-height: 0;
	padding: 0;
	font-size: 14px;
	font-weight: inherit;
	line-height: normal;
}

.contact-form .frm-fluent-form .ff-btn-submit:disabled {
	cursor: default;
	color: var(--color-muted);
	opacity: 1;
}

.contact-form .frm-fluent-form .ff-btn-submit.ff-working:after {
	display: none;
}

/* contact.js fills this when a request fails without a usable answer. */
.contact-form-status {
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 12px;
	line-height: 1.4;
	white-space: normal;
	margin: 0;
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0;
	right: 0;
}

/* On phones the alert wraps to two lines, so it takes its own row above the button. */
@media (width<=767px) {
	.contact-form .frm-fluent-form .ff_submit_btn_wrapper {
		flex-wrap: wrap;
	}

	.contact-form-status {
		flex: 0 0 100%;
		position: static;
	}

	.contact-form-status:not(:empty) {
		margin-bottom: 8px;
	}
}

.contact-form .ff-errors-in-stack {
	margin-top: 16px;
}

.contact-form .ff-errors-in-stack .error {
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 12px;
	line-height: 1.4;
}

/* Sent state, styled as the prototype's .interest-form[role=status]. */
.contact-form .ff-message-success {
	box-shadow: none;
	background: 0 0;
	border: 0;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
	padding: 0;
	display: flex;
}

.contact-form .ff-message-success:focus {
	outline: 0;
}

.contact-form .ff-message-success p {
	margin: 0;
}

.contact-form .ff-message-success .t28 {
	font-family: var(--font-display);
	letter-spacing: -.005em;
	font-size: var(--fs-28);
	line-height: 1.1;
}

.contact-form .ff-message-success .ts14 {
	max-width: 334px;
}

@media (width<=1279px) {
	.contact-form {
		--ct-fields-gap: 33px;
		--ct-button-gap: 64px;
		flex: none;
		order: 1;
		width: 100%;
	}
}

@media (width<=767px) {
	.contact-form {
		--ct-fields-gap: 24px;
		--ct-button-gap: 32px;
		--ct-row-gap: 24px;
		--ct-message-height: 45px;
		padding-top: 0;
	}

	.contact-form .frm-fluent-form .ff-t-container {
		flex-direction: column;
	}
}
