/**
 * Contact section: heading row, then three cards – community photo with
 * contact details, the message form, and the map.
 *
 * Phones: one column. 768–1199px: the form on top, the two smaller cards
 * side by side under it. 1200px+: three columns as designed.
 */

/* Soft circles in three corners and a dot grid at the bottom right. */
.hm-contact {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 0 -40px, #f1f6fd 0 150px, transparent 151px),
		radial-gradient(circle at calc(100% - 100px) -30px, #f1f6fd 0 140px, transparent 141px),
		radial-gradient(circle at 60px calc(100% + 30px), #f1f6fd 0 200px, transparent 201px),
		var(--hm-color-white);
	color: var(--hm-color-text);
}

.hm-contact__inner {
	position: relative;
	padding-block: 56px 64px;
}

/* Heading row ----------------------------------------------------------- */

.hm-contact__head {
	display: grid;
	gap: 18px;
	margin-bottom: 32px;
}

.hm-contact__eyebrow,
.hm-contact__kicker {
	margin: 0;
	font-family: var(--hm-font-heading);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--hm-color-highlight);
}

.hm-contact__title {
	margin: 8px 0 0;
	font-family: var(--hm-font-heading);
	font-size: clamp(28px, 1.4vw + 18px, 38px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--hm-color-primary);
}

.hm-contact__text {
	margin: 10px 0 0;
	font-size: 16px;
	line-height: 1.5;
}

.hm-contact__tagline {
	position: relative;
	justify-self: start;
	margin: 0;
	padding-bottom: 10px;
	font-size: 15px;
	font-style: italic;
	color: var(--hm-color-highlight);
}

.hm-contact__tagline::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 92%;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--hm-color-highlight), rgb(14 102 195 / 0.2));
}

/* Cards ----------------------------------------------------------------- */

.hm-contact__cards {
	display: grid;
	gap: 22px;
}

.hm-contact-card {
	position: relative;
	min-width: 0;
	overflow: hidden;
	border: 1px solid #dfe8f3;
	border-radius: 16px;
	background: var(--hm-color-white);
	box-shadow: 0 18px 40px -30px rgb(10 47 96 / 0.4);
}

/* Community card */

.hm-contact-card__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.hm-contact-card__body {
	padding: 22px 24px 26px;
}

.hm-contact__kicker {
	font-size: 12px;
}

.hm-contact-card__title {
	margin: 8px 0 0;
	font-family: var(--hm-font-heading);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--hm-color-primary);
}

.hm-contact-card__text {
	margin: 8px 0 0;
	font-size: 14px;
	color: #5b6c83;
}

.hm-contact__details {
	display: grid;
	gap: 13px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.hm-contact__detail {
	position: relative;
	padding-left: 15px;
}

.hm-contact__detail::before {
	content: "";
	position: absolute;
	top: 2px;
	bottom: 2px;
	left: 0;
	width: 3px;
	border-radius: 2px;
	background: var(--hm-color-highlight);
}

.hm-contact__detail-label,
.hm-contact__detail-value,
.hm-contact__detail-note {
	display: block;
}

.hm-contact__detail-label {
	font-family: var(--hm-font-heading);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--hm-color-highlight);
}

.hm-contact__detail-value {
	margin-top: 2px;
	font-family: var(--hm-font-heading);
	font-size: 14px;
	font-weight: 700;
	color: #0b2a5e;
	text-decoration: none;
	overflow-wrap: anywhere;
}

a.hm-contact__detail-value:hover {
	color: var(--hm-color-highlight);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hm-contact__detail-note {
	margin-top: 1px;
	font-size: 11.5px;
	color: #6b7c93;
}

/* Form card */

.hm-contact-card--form,
.hm-contact-card--map {
	padding: 28px 24px;
}

.hm-contact-form__title,
.hm-contact-map__title {
	margin: 0;
	font-family: var(--hm-font-heading);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--hm-color-primary);
}

.hm-contact-form__text,
.hm-contact-map__text {
	margin: 6px 0 0;
	font-size: 14px;
	color: #5b6c83;
}

.hm-contact-form__status {
	margin: 18px 0 0;
	padding: 12px 16px;
	border: 1px solid;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
}

.hm-contact-form__status--sent {
	border-color: #bfe3cd;
	background: #ebf7f0;
	color: #11643a;
}

.hm-contact-form__status--error {
	border-color: #f3c5c5;
	background: #fdeeee;
	color: #9b1c1c;
}

/* Hidden from people; bots that fill it in are ignored. */
.hm-contact-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hm-contact-form__grid {
	display: grid;
	gap: 16px 22px;
	margin-top: 24px;
}

.hm-field {
	margin: 0;
}

.hm-field label {
	display: block;
	margin-bottom: 6px;
	font-family: var(--hm-font-heading);
	font-size: 13px;
	line-height: 1.3;
	font-weight: 600;
	color: #0b2a5e;
}

.hm-field input,
.hm-field select,
.hm-field textarea {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid #cfdbe8;
	border-radius: 6px;
	background: var(--hm-color-white);
	font: inherit;
	font-size: 15px;
	color: var(--hm-color-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hm-field select {
	padding-right: 42px;
	appearance: none;
	background: var(--hm-color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23153d68' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") right 16px center / 12px 8px no-repeat;
	cursor: pointer;
}

.hm-field select:invalid {
	color: #8494a9;
}

.hm-field textarea {
	height: 112px;
	min-height: 80px;
	padding: 12px 14px;
	resize: vertical;
}

.hm-field ::placeholder {
	color: #8494a9;
}

.hm-field input:focus,
.hm-field select:focus,
.hm-field textarea:focus {
	border-color: var(--hm-color-highlight);
	outline: none;
	box-shadow: 0 0 0 3px rgb(14 102 195 / 0.15);
}

.hm-contact-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	font-size: 12.5px;
	line-height: 1.4;
	color: #5b6c83;
	cursor: pointer;
}

.hm-contact-form__consent input {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--hm-color-highlight);
}

.hm-contact-form__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 22px;
	margin-top: 22px;
}

.hm-contact-form__submit {
	justify-content: space-between;
	gap: 40px;
	min-width: 206px;
	min-height: 50px;
	border: 0;
	font-size: 16px;
}

.hm-contact-form__note {
	margin: 0;
	font-size: 13px;
	color: #5b6c83;
}

/* Map card */

.hm-contact-card--map {
	display: flex;
	flex-direction: column;
}

.hm-contact-map__frame {
	margin-top: 18px;
	aspect-ratio: 450 / 220;
	overflow: hidden;
	border: 1px solid #dbe6f2;
	border-radius: 12px;
	background: #eef4fb;
}

.hm-contact-map__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.hm-contact-map__info {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid #e3eaf3;
}

.hm-contact-map__info p {
	margin: 0;
}

.hm-contact-map__org {
	font-family: var(--hm-font-heading);
	font-size: 15px;
	font-weight: 700;
	color: var(--hm-color-primary);
}

.hm-contact-map__info .hm-contact-map__address {
	margin-top: 8px;
	font-size: 14px;
}

.hm-contact-map__info .hm-contact-map__note {
	margin-top: 12px;
	font-size: 12.5px;
	color: #5b6c83;
}

.hm-contact-map__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 30px;
	margin-top: auto;
	padding-top: 24px;
}

.hm-contact-map__btn {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	min-width: 196px;
	height: 46px;
	padding: 0 20px 0 24px;
	border: 1px solid #d3e2f5;
	border-radius: var(--hm-radius-pill);
	background: #eef4fc;
	font-family: var(--hm-font-heading);
	font-size: 14.5px;
	font-weight: 700;
	color: var(--hm-color-primary);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hm-contact-map__btn:hover {
	border-color: #b9d1ef;
	background: #e1ecfa;
	color: var(--hm-color-primary);
}

.hm-contact-map__btn:focus-visible {
	outline: none;
	box-shadow: var(--hm-focus-ring);
}

/* The arrow icon turned to point up and right. */
.hm-contact-map__btn-icon {
	flex: none;
	width: 16px;
	height: auto;
	transform: rotate(-45deg);
}

.hm-contact-map__hours {
	margin: 0;
	font-size: 12.5px;
	color: #5b6c83;
}

/* Layouts --------------------------------------------------------------- */

@media (min-width: 576px) {
	.hm-contact-form__grid {
		grid-template-columns: 1fr 1fr;
	}

	.hm-field--wide {
		grid-column: 1 / -1;
	}
}

@media (min-width: 768px) {
	.hm-contact__inner {
		padding-block: 72px 80px;
	}

	.hm-contact__head {
		grid-template-columns: 1fr auto;
		align-items: start;
		margin-bottom: 36px;
	}

	.hm-contact__tagline {
		margin-top: 24px;
	}

	.hm-contact__cards {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"form form"
			"info map";
	}

	.hm-contact-card--info { grid-area: info; }
	.hm-contact-card--form { grid-area: form; }
	.hm-contact-card--map { grid-area: map; }

	.hm-contact-card--form,
	.hm-contact-card--map {
		padding: 32px;
	}
}

@media (min-width: 1200px) {
	.hm-contact__cards {
		grid-template-columns: minmax(0, 358fr) minmax(0, 727fr) minmax(0, 505fr);
		grid-template-areas: "info form map";
		gap: 24px;
	}

	.hm-contact-card--form {
		padding: 32px 34px 30px;
	}

	.hm-contact-card--map {
		padding: 32px 28px 30px;
	}

	/* Dot grid beside the map card. */
	.hm-contact::after {
		content: "";
		position: absolute;
		right: 16px;
		bottom: 48px;
		width: 66px;
		height: 176px;
		background: radial-gradient(circle, #c9dcf2 1.6px, transparent 2px) 0 0 / 22px 22px;
		pointer-events: none;
	}
}
