/*
 * Contact: light section. Header (heading left, intro right), then a graphite panel and a
 * white form card of the same height. The panel holds the contact data and what to include
 * with the enquiry, with the logo mark cropped in the corner.
 */

.mj-contact {
	/* Small top padding: the section follows the FAQ on the same cream background. */
	padding: clamp(2.5rem, 3.5vw, 3rem) 0 clamp(4.5rem, 8vw, 7rem);
	background: var(--mj-cream);
	color: var(--mj-graphite);
	scroll-margin-top: var(--mj-bar-h);
}

/* Header: same as the other sections */
.mj-contact__head {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	align-items: end;
	gap: 1.5rem clamp(2.5rem, 6vw, 6rem);
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.mj-contact__title {
	margin: 0;
	font-size: clamp(2.25rem, 3.8vw, 3.25rem);
	letter-spacing: -0.015em;
}

.mj-contact__accent {
	display: inline-block;
	background: linear-gradient(var(--mj-orange), var(--mj-orange)) 0 100% / 100% 0.12em no-repeat;
}

.mj-contact__intro {
	max-width: 30rem;
	margin: 0;
	padding: 0.125rem 0 0.125rem 1.25rem;
	border-left: 2px solid var(--mj-orange);
	color: rgba(22, 24, 29, 0.68);
	font-size: 1rem;
	line-height: 1.65;
}

/* Panel and card, same height */
.mj-contact__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(1.25rem, 2.5vw, 2rem);
	align-items: stretch;
}

/* Without the panel the form card spans the whole width */
.mj-contact__grid--solo {
	grid-template-columns: minmax(0, 1fr);
}

/* Graphite panel */
.mj-contact__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2.25rem;
	padding: clamp(1.75rem, 3vw, 2.5rem);
	background: var(--mj-graphite);
	color: var(--mj-cream);
	overflow: hidden;
}

.mj-contact__panel > * {
	position: relative;
	z-index: 1;
}

.mj-contact__panel-title {
	margin: 0 0 1.25rem;
	color: var(--mj-orange);
	font-family: var(--mj-font-display);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.mj-contact__list {
	display: grid;
	gap: 1.5rem;
	margin: 0;
}

.mj-contact__item dt {
	margin: 0 0 0.375rem;
	color: rgba(242, 240, 235, 0.55);
	font-size: 0.8125rem;
	font-weight: 600;
}

.mj-contact__item dd {
	display: grid;
	gap: 0.125rem;
	margin: 0;
	font-family: var(--mj-font-display);
	font-size: clamp(1.25rem, 1.9vw, 1.625rem);
	font-weight: 800;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.mj-contact__item a {
	color: var(--mj-cream);
	text-decoration: none;
	transition: color 0.2s;
}

.mj-contact__item a:hover {
	color: var(--mj-orange);
}

.mj-contact__hours {
	font-family: var(--mj-font-text);
	font-size: 1.0625rem;
	font-weight: 600;
}

.mj-contact__ask {
	padding-top: 1.5rem;
	border-top: 1px solid rgba(242, 240, 235, 0.16);
}

.mj-contact__ask .mj-contact__panel-title {
	margin-bottom: 0.875rem;
}

.mj-contact__ask ul {
	display: grid;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mj-contact__ask li {
	position: relative;
	padding-left: 1.125rem;
	color: rgba(242, 240, 235, 0.85);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.mj-contact__ask li::before {
	content: '';
	position: absolute;
	top: 0.5em;
	left: 0;
	width: 0.4375rem;
	height: 0.4375rem;
	border-radius: 50%;
	background: var(--mj-orange);
}

/* Logo mark, cropped in the bottom right corner */
.mj-contact__mark {
	position: absolute;
	right: -5.5rem;
	bottom: -6rem;
	z-index: 0 !important;
	width: 21rem;
	height: 21rem;
	fill: none;
	stroke: rgba(242, 240, 235, 0.08);
	stroke-width: 9;
	stroke-linecap: round;
	pointer-events: none;
}

.mj-contact__mark circle {
	fill: var(--mj-orange);
	stroke: none;
	opacity: 0.9;
}

/* Form card */
.mj-contact__card {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	border-top: 3px solid var(--mj-orange);
	background: #fff;
	box-shadow: 0 30px 60px -34px rgba(22, 24, 29, 0.35);
}

.mj-contact__status {
	margin: 0 0 1.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
}

.mj-contact__status:empty {
	display: none;
}

.mj-contact__status.is-ok {
	padding: 0.875rem 1rem;
	border-left: 3px solid var(--mj-orange);
	background: var(--mj-cream);
}

.mj-contact__status.is-error {
	padding: 0.875rem 1rem;
	border-left: 3px solid #b3261e;
	background: #fbeeed;
	color: #8c1d18;
}

.mj-contact__form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
}

.mj-field {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

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

.mj-field label,
.mj-field legend {
	display: block;
	margin: 0 0 0.375rem;
	padding: 0;
	font-size: 0.8125rem;
	font-weight: 700;
}

.mj-field input[type='text'],
.mj-field input[type='tel'],
.mj-field input[type='email'],
.mj-field select,
.mj-field textarea {
	display: block;
	width: 100%;
	min-height: 3rem;
	padding: 0 0.875rem;
	border: 1px solid rgba(22, 24, 29, 0.28);
	border-radius: var(--mj-radius);
	background: #fff;
	color: var(--mj-graphite);
	font: inherit;
	font-size: 1rem;
	transition: border-color 0.2s;
}

.mj-field textarea {
	min-height: 6.5rem;
	padding: 0.75rem 0.875rem;
	resize: vertical;
}

.mj-field select {
	padding-right: 2.5rem;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1.125rem;
}

.mj-field input:hover,
.mj-field select:hover,
.mj-field textarea:hover {
	border-color: rgba(22, 24, 29, 0.55);
}

.mj-field input:focus,
.mj-field select:focus,
.mj-field textarea:focus {
	border-color: var(--mj-graphite);
	outline: 2px solid var(--mj-orange);
	outline-offset: 1px;
}

.mj-field.is-invalid input,
.mj-field.is-invalid select,
.mj-field.is-invalid textarea {
	border-color: #b3261e;
}

.mj-field__error {
	margin: 0.375rem 0 0;
	color: #b3261e;
	font-size: 0.8125rem;
	font-weight: 600;
}

.mj-field__error:empty {
	display: none;
}

/* Enquiry type chips */
.mj-contact__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mj-chip {
	position: relative;
	display: inline-flex;
	margin: 0 !important;
	cursor: pointer;
}

.mj-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mj-chip span {
	display: inline-block;
	padding: 0.625rem 0.75rem;
	border: 1px solid rgba(22, 24, 29, 0.28);
	border-radius: var(--mj-radius);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.mj-chip:hover span {
	border-color: var(--mj-graphite);
}

.mj-chip input:checked + span {
	border-color: var(--mj-graphite);
	background: var(--mj-graphite);
	color: var(--mj-cream);
}

.mj-chip input:focus-visible + span {
	outline: 2px solid var(--mj-orange);
	outline-offset: 2px;
}

/* Submit row */
.mj-contact__submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
}

.mj-contact__notes {
	display: grid;
	flex: 1 1 14rem;
	gap: 0.25rem;
}

.mj-contact__note {
	margin: 0;
	color: rgba(22, 24, 29, 0.6);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.mj-contact__note a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mj-contact__note a:hover {
	color: var(--mj-graphite);
}

.mj-contact__form.is-sending .mj-btn {
	opacity: 0.6;
	pointer-events: none;
}

/* Honeypot: off screen */
.mj-contact__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 960px) {
	.mj-contact__head {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
	}

	.mj-contact__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.mj-contact__mark {
		width: 11rem;
		height: 11rem;
	}
}

@media (max-width: 600px) {
	.mj-contact__form {
		grid-template-columns: minmax(0, 1fr);
	}

	.mj-contact__submit .mj-btn {
		width: 100%;
	}
}

/* reCAPTCHA v3: Google's badge is hidden, the notice next to the button replaces it (Google allows that) */
.grecaptcha-badge {
	visibility: hidden;
}
