/* Enquiry form — /contact/
   Monochrome, one question at a time. Inherits the page's Plus Jakarta Sans,
   #e9e9e7 ground and black ink; adds no new colour.
   Progress is the blog TOC's 1px track filling black, reused deliberately. */

/* The page is one full-height stage: heading up top, the live question filling
   and vertically centring in whatever height is left. min-height (not height)
   so a long question on a short screen extends rather than gets squeezed. */
.contact-main {
	min-height: 100svh;
	display: flex;
	flex-direction: column;
}
.contact-head { flex: 0 0 auto; }

.enq {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	margin: 2rem 0 0;
	max-width: min(100%, 96rem);
	padding-bottom: 8vh;
}

/* Without JS the steps can't be walked and Turnstile can't render, so the
   markup is hidden and the mailto fallback shown instead. */
.enq[hidden] { display: none; }
.enq-noscript {
	margin: 3rem 0 0;
	max-width: 46rem;
	border-top: 1px solid #000;
	padding-top: 1.25rem;
}
.enq-noscript a { text-decoration: underline; text-underline-offset: .18em; }

/* --- progress -------------------------------------------------------- */

.enq-progress {
	position: relative;
	flex: 0 0 auto;
	height: 1px;
	background: rgba(0, 0, 0, .18);
	margin-bottom: 2.25rem;
}
.enq-progress-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: #000;
	transition: width .4s cubic-bezier(.4, 0, .1, 1);
}

/* --- step ------------------------------------------------------------ */

.enq-step { display: none; }
.enq-step.is-active {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: center;
}

/* Wide screens put the question and its answers beside each other, so the
   seven-option question fits on one screen instead of running past the fold. */
@media (min-width: 1100px) {
	.enq-qa.is-active {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: clamp(3rem, 6vw, 7rem);
		align-items: start;
		align-content: center;
	}
	.enq-qa.is-active .enq-q { max-width: 13ch; }
	.enq-qa.is-active .enq-hint { margin-bottom: 0; }
}

.enq-eyebrow {
	font-size: .7rem;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .35;
	margin: 0 0 1rem;
}

.enq-q {
	font-size: clamp(1.8rem, 4.4vw, 3.9rem);
	font-weight: 300;
	line-height: 1.12;
	letter-spacing: -.02em;
	margin: 0 0 .5rem;
	max-width: 20ch;
}
.enq-q .enq-opt-mark { opacity: .35; font-size: .5em; vertical-align: middle; }

.enq-hint {
	font-size: .95rem;
	opacity: .5;
	margin: 0 0 1.75rem;
}
.enq-q + .enq-hint { margin-top: .35rem; }

/* --- text input ------------------------------------------------------ */

.enq-field {
	display: block;
	width: 100%;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, .3);
	background: none;
	color: inherit;
	font: inherit;
	font-size: clamp(1.3rem, 2.8vw, 2.1rem);
	font-weight: 300;
	padding: .6rem 0;
	max-width: 34rem;
	border-radius: 0;
	transition: border-color .2s;
}
.enq-field::placeholder { color: rgba(0, 0, 0, .25); }
.enq-field:focus { outline: none; border-bottom-color: #000; }

textarea.enq-field {
	resize: vertical;
	min-height: 6.5rem;
	line-height: 1.5;
	font-size: 1.2rem;
	max-width: 44rem;
}

/* --- choice options -------------------------------------------------- */

.enq-answer { min-width: 0; }
.enq-answer > :first-child { margin-top: 0; }

.enq-opts {
	list-style: none;
	margin: 0 0 .5rem;
	padding: 0;
	max-width: 42rem;
	border-top: 1px solid rgba(0, 0, 0, .18);
}

.enq-opt {
	display: flex;
	align-items: center;
	gap: .85rem;
	width: 100%;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, .18);
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	font-size: 1.1rem;
	padding: 1rem .5rem 1rem 0;
	cursor: pointer;
	transition: padding-left .18s, background-color .18s;
}
.enq-opt:hover { padding-left: .5rem; background: rgba(0, 0, 0, .03); }
.enq-opt:focus-visible { outline: 2px solid #000; outline-offset: -2px; }

.enq-key {
	flex: none;
	display: grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	border: 1px solid rgba(0, 0, 0, .35);
	font-size: .72rem;
	font-weight: 500;
	transition: background-color .18s, color .18s, border-color .18s;
}
.enq-opt[aria-pressed="true"] .enq-key,
.enq-opt[aria-checked="true"] .enq-key {
	background: #000;
	border-color: #000;
	color: #e9e9e7;
}
.enq-opt[aria-pressed="true"] .enq-label,
.enq-opt[aria-checked="true"] .enq-label { font-weight: 500; }

/* --- 0–5 scale ------------------------------------------------------- */

.enq-scale {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: .6rem;
	margin: 0 0 .75rem;
	max-width: 32rem;
}
.enq-scale-cell {
	aspect-ratio: 1;
	border: 1px solid rgba(0, 0, 0, .35);
	background: none;
	color: inherit;
	font: inherit;
	font-size: 1.05rem;
	cursor: pointer;
	transition: background-color .18s, color .18s, border-color .18s;
}
.enq-scale-cell:hover { background: rgba(0, 0, 0, .06); }
.enq-scale-cell:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.enq-scale-cell[aria-checked="true"] {
	background: #000;
	border-color: #000;
	color: #e9e9e7;
}

.enq-scale-ends {
	display: flex;
	justify-content: space-between;
	max-width: 32rem;
	font-size: .78rem;
	opacity: .45;
	margin: 0 0 1.5rem;
}

/* --- actions --------------------------------------------------------- */

.enq-actions {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin-top: 1.75rem;
}

.enq-ok {
	border: 1px solid #000;
	background: #000;
	color: #e9e9e7;
	font: inherit;
	font-weight: 500;
	font-size: .95rem;
	padding: .6rem 1.5rem;
	cursor: pointer;
	transition: background-color .18s, color .18s;
}
.enq-ok:hover { background: none; color: #000; }
.enq-ok:disabled { opacity: .35; cursor: default; }
.enq-ok:disabled:hover { background: #000; color: #e9e9e7; }

.enq-back {
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: .85rem;
	opacity: .45;
	padding: .4rem 0;
	cursor: pointer;
}
.enq-back:hover { opacity: 1; }

.enq-enterhint {
	font-size: .78rem;
	opacity: .35;
	margin-left: auto;
}
@media (hover: none) { .enq-enterhint { display: none; } }

.enq-err {
	font-size: .88rem;
	font-weight: 500;
	margin: .75rem 0 0;
	min-height: 1.3em;
}

/* --- review + send --------------------------------------------------- */

.enq-review {
	list-style: none;
	margin: 0 0 1.75rem;
	padding: 0;
	border-top: 1px solid rgba(0, 0, 0, .18);
}
.enq-review li {
	display: grid;
	grid-template-columns: minmax(8rem, 12rem) 1fr auto;
	gap: 1rem;
	align-items: baseline;
	border-bottom: 1px solid rgba(0, 0, 0, .18);
	padding: .7rem 0;
	font-size: .95rem;
}
.enq-review dt, .enq-review .enq-review-k {
	font-size: .7rem;
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
	opacity: .35;
}
.enq-review-edit {
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: .78rem;
	opacity: .45;
	text-decoration: underline;
	text-underline-offset: .18em;
	cursor: pointer;
}
.enq-review-edit:hover { opacity: 1; }

@media (max-width: 560px) {
	.enq-review li { grid-template-columns: 1fr auto; }
	.enq-review .enq-review-k { grid-column: 1 / -1; }
}

.enq-turnstile { margin: 0 0 1.5rem; min-height: 65px; }

/* --- done ------------------------------------------------------------ */

/* Once it's sent there is nothing left to fill in, so the page head and the
   progress track come away and the thank-you has the screen to itself. */
.contact-main.is-complete .contact-head,
.contact-main.is-complete .enq-progress { display: none; }
/* Collapse the full-height stage too, so the footer's Recent work comes up
   under the thank-you instead of a screen of empty grey. */
.contact-main.is-complete { min-height: 0; }
.contact-main.is-complete .enq { padding-bottom: clamp(3rem, 10vh, 7rem); }

.enq-done-h {
	font-size: clamp(2.5rem, 7vw, 5rem);
	font-weight: 300;
	line-height: 1.05;
	letter-spacing: -.02em;
	margin: 0 0 .75rem;
}
.enq-done p { max-width: 40ch; opacity: .6; font-size: 1.1rem; }

/* --- honeypot -------------------------------------------------------- */

.enq-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- motion ---------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	.enq-step.is-active { animation: enq-in .28s cubic-bezier(.2, .6, .2, 1) both; }
	@keyframes enq-in {
		from { opacity: 0; transform: translateY(8px); }
		to { opacity: 1; transform: none; }
	}
}
