/*--------------------------------------------------------------
# Contact
# Hero in the FAQ hero's shape, then two columns: direct details
# and quick routes on the left, the message form on the right.
#
# The form is Contact Form 7, dropped into the page editor. Its
# default markup is styled below (.contact-form) so it matches the
# theme the moment the shortcode goes in — no CF7 settings needed.
--------------------------------------------------------------*/

.site-main--contact {
	/* Form feedback colours, scoped here rather than added to the token set:
	   this page is their only use. Both clear AA as text on white —
	   #B42318 at 6.57:1, #067647 at 5.69:1 (5.48:1 on its pale fill). */
	--contact-error: #B42318;
	--contact-success: #067647;
}


/* ──────────────────────────────────────────────
   Hero
   ────────────────────────────────────────────── */

.contact-hero {
	background: var(--tpp-white);
	padding: 88px 0 56px;
}

.contact-hero__container {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
	text-align: center;
}

.contact-hero__eyebrow {
	display: inline-block;
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tpp-text-light);
	margin-bottom: 18px;
}

.contact-hero__heading {
	font-family: var(--tpp-font-heading);
	font-size: clamp(2.1rem, 4.5vw + 0.5rem, 3.5rem);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: var(--tpp-black);
	margin: 0;
	text-wrap: balance;
}

.contact-hero__heading-accent {
	display: block;
	color: var(--tpp-text-light);
}

.contact-hero__desc {
	font-family: var(--tpp-font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--tpp-text);
	max-width: 560px;
	margin: 22px auto 0;
}


/* ──────────────────────────────────────────────
   Body
   ────────────────────────────────────────────── */

.contact {
	background: var(--tpp-white);
	padding: 0 0 100px;
}

.contact__container {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 32px;
	align-items: start;
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}

.contact__details,
.contact__form {
	border: 1px solid var(--tpp-border-light);
	border-radius: 24px;
	padding: 36px;
}

.contact__form {
	background: var(--tpp-off-white);
	border-color: transparent;
}

.contact__title {
	font-family: var(--tpp-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--tpp-black);
	margin: 0 0 22px;
}

.contact__response-time {
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	color: var(--tpp-text-light);
	margin: -14px 0 22px;
}


/* ── Direct details ── */

.contact__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	margin: 0 -12px;
	border-radius: 14px;
	text-decoration: none;
	color: var(--tpp-black);
	transition: background var(--tpp-transition);
}

a.contact__item:hover {
	background: var(--tpp-off-white);
}

a.contact__item:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 2px;
}

.contact__item:visited {
	color: var(--tpp-black);
}

.contact__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--tpp-off-white);
	color: var(--tpp-black);
}

a.contact__item:hover .contact__icon {
	background: var(--tpp-white);
}

.contact__item-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.contact__item-label {
	font-family: var(--tpp-font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tpp-text-light);
}

/* The email address is long; let it break rather than overflow a phone. */
.contact__item-value {
	font-family: var(--tpp-font-body);
	font-size: 1rem;
	font-weight: 500;
	color: var(--tpp-black);
	overflow-wrap: anywhere;
}


/* ── Quick routes ── */

.contact__routes {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--tpp-border-light);
}

.contact__routes-title {
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--tpp-black);
	margin: 0 0 12px;
}

.contact__routes-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact__route {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--tpp-border);
	border-radius: var(--tpp-radius-pill);
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--tpp-black);
	transition:
		border-color var(--tpp-transition),
		background var(--tpp-transition);
}

.contact__route:visited {
	color: var(--tpp-black);
}

.contact__route:hover {
	border-color: var(--tpp-black);
}

.contact__route:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 2px;
}

.contact__route svg {
	transition: transform var(--tpp-transition);
}

.contact__route:hover svg {
	transform: translateX(2px);
}


/* ── Fallback while there is no form yet ── */

.contact__fallback-text {
	font-family: var(--tpp-font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--tpp-text);
	margin: 0 0 22px;
}

.btn.contact__fallback-cta {
	padding: 14px 28px;
	font-size: 0.9375rem;
}


/* ──────────────────────────────────────────────
   Contact Form 7

   Styled against CF7's default template: each field is a <label>
   wrapping its control, inside a <p> that CF7 adds itself. Scoped to
   .contact-form so a CF7 form placed anywhere else is left alone.
   The selectors out-rank CF7's own stylesheet without !important.
   ────────────────────────────────────────────── */

.contact-form .wpcf7 p {
	margin: 0 0 18px;
}

.contact-form .wpcf7 label {
	display: block;
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--tpp-black);
}

.contact-form .wpcf7 input[type="text"],
.contact-form .wpcf7 input[type="email"],
.contact-form .wpcf7 input[type="tel"],
.contact-form .wpcf7 input[type="url"],
.contact-form .wpcf7 input[type="number"],
.contact-form .wpcf7 select,
.contact-form .wpcf7 textarea {
	display: block;
	width: 100%;
	margin-top: 8px;
	padding: 13px 16px;
	border: 1px solid var(--tpp-border);
	border-radius: 12px;
	background: var(--tpp-white);
	font-family: var(--tpp-font-body);
	font-size: 1rem; /* 16px: below this, iOS zooms the page on focus */
	font-weight: 400;
	line-height: 1.5;
	color: var(--tpp-text);
	transition:
		border-color var(--tpp-transition),
		box-shadow var(--tpp-transition);
}

.contact-form .wpcf7 textarea {
	/* CF7 prints rows="10", which made the box 268px tall and stretched the
	   form panel far past the column beside it. A fixed height overrides the
	   attribute; people who want more room can still drag it taller. */
	height: 170px;
	min-height: 120px;
	resize: vertical;
}

.contact-form .wpcf7 input:focus,
.contact-form .wpcf7 select:focus,
.contact-form .wpcf7 textarea:focus {
	outline: none;
	border-color: var(--tpp-black);
	box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.12);
}

/* Submit — the theme's .btn-primary, restated because CF7 renders a plain
   <input type="submit"> that cannot carry the theme's classes. */
.contact-form .wpcf7 input[type="submit"],
.contact-form .wpcf7 button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 30px;
	border: 1.5px solid var(--tpp-accent); /* orange key button, black until 29 Nov 2026 */
	border-radius: var(--tpp-radius-pill);
	background: var(--tpp-accent);
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1;
	color: var(--tpp-black);
	cursor: pointer;
	transition:
		box-shadow var(--tpp-transition),
		background var(--tpp-transition),
		opacity var(--tpp-transition);
}

.contact-form .wpcf7 input[type="submit"]:hover,
.contact-form .wpcf7 button[type="submit"]:hover {
	background: var(--tpp-accent-dark);
	border-color: var(--tpp-accent-dark);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-form .wpcf7 input[type="submit"]:focus-visible,
.contact-form .wpcf7 button[type="submit"]:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 3px;
}

.contact-form .wpcf7 input[type="submit"]:disabled {
	opacity: 0.6;
	cursor: default;
}

.contact-form .wpcf7-spinner {
	vertical-align: middle;
	margin: 0 0 0 12px;
}

/* Validation */
/* Two classes on the control itself (0,4,0), so it outranks the field rules
   above (0,3,1). With a single class it lost to them and the border stayed
   grey on an invalid field. #B42318 is 6.57:1 against white, well past the
   3:1 a field boundary needs. */
.contact-form .wpcf7 .wpcf7-form-control.wpcf7-not-valid {
	border-color: var(--contact-error);
}

.contact-form .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--contact-error);
}

/* The message CF7 shows after a send attempt. */
.contact-form .wpcf7 form .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 12px 16px;
	border: 1px solid var(--tpp-border);
	border-radius: 12px;
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--tpp-text);
}

.contact-form .wpcf7 form.sent .wpcf7-response-output {
	border-color: #ABEFC6;
	background: #ECFDF3;
	color: var(--contact-success);
}

.contact-form .wpcf7 form.invalid .wpcf7-response-output,
.contact-form .wpcf7 form.unaccepted .wpcf7-response-output,
.contact-form .wpcf7 form.failed .wpcf7-response-output,
.contact-form .wpcf7 form.aborted .wpcf7-response-output,
.contact-form .wpcf7 form.spam .wpcf7-response-output {
	border-color: #FECDCA;
	background: #FEF3F2;
	color: var(--contact-error);
}


/* ──────────────────────────────────────────────
   Entrance — CSS only, as on the 404: everything here is on
   screen at load, so there is nothing for a script to wait for.
   "backwards" rather than "both" so nothing is held after it ends.
   ────────────────────────────────────────────── */

@keyframes contact-rise {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.contact-hero__container,
.contact__details,
.contact__form {
	animation: contact-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.contact__details {
	animation-delay: 0.15s;
}

.contact__form {
	animation-delay: 0.25s;
}


/* ──────────────────────────────────────────────
   Tablet (≤991px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 991px) {
	.contact-hero {
		padding: 72px 0 48px;
	}

	.contact {
		padding: 0 0 80px;
	}

	.contact__container {
		grid-template-columns: 1fr;
		max-width: 680px;
		gap: 20px;
	}

	/* The form is what people come here for, so it leads once the columns
	   stack. */
	.contact__form {
		order: -1;
	}
}


/* ──────────────────────────────────────────────
   Mobile (≤767px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 767px) {
	.contact-hero {
		padding: 56px 0 36px;
	}

	.contact-hero__heading {
		font-size: clamp(1.85rem, 8vw, 2.6rem);
	}

	.contact-hero__desc {
		font-size: 0.9375rem;
		margin-top: 18px;
	}

	.contact {
		padding: 0 0 72px;
	}

	.contact__details,
	.contact__form {
		padding: 26px 22px;
		border-radius: 20px;
	}

	.btn.contact__fallback-cta {
		width: 100%;
	}

	.contact-form .wpcf7 input[type="submit"],
	.contact-form .wpcf7 button[type="submit"] {
		width: 100%;
	}
}


/* ──────────────────────────────────────────────
   Small mobile (≤480px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 480px) {
	.contact-hero {
		padding: 44px 0 28px;
	}

	.contact-hero__eyebrow {
		font-size: 0.75rem;
		margin-bottom: 14px;
	}

	.contact {
		padding: 0 0 56px;
	}

	.contact__details,
	.contact__form {
		padding: 22px 18px;
	}
}


/* ──────────────────────────────────────────────
   Reduced motion — last, so it outranks everything above.
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.contact-hero__container,
	.contact__details,
	.contact__form {
		animation: none;
	}

	.contact__item,
	.contact__route,
	.contact__route svg,
	.contact-form .wpcf7 input,
	.contact-form .wpcf7 textarea,
	.contact-form .wpcf7 select {
		transition: none;
	}

	.contact__route:hover svg {
		transform: none;
	}
}

/* Tap targets at least 44px tall on phones (Owen's request). */
@media screen and (max-width: 767px) {
	.contact__route {
		min-height: 44px;
	}
}
