/* =========================================================================
 * Contact Us page.
 *
 * Loaded only on the page with the slug "contact-us" (see
 * zouma_enqueue_assets). Section numbering matches page-contact-us.php.
 * ====================================================================== */

/* =========================================================================
 * 01 · Hero + enquiry form.
 *
 *   Section  #FFF · cyan wash top-left, copy left, the form on a card right
 *   Copy     eyebrow, 40px head, intro, the email line, then the prompt box
 *   Card     bordered, 8px radius, the enquiry-type tabs across the top
 * ====================================================================== */

.zouma-cthero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	/* Full screen on any device. Unlike the dark heroes this one sits below
	 * the sticky header rather than under it, so the header's height comes
	 * off the 100 — otherwise the page would be a header taller than the
	 * screen and open already scrolled. min-height, and svh after vh, for
	 * the same reasons as the homepage hero. */
	min-height: calc(100vh - var(--zouma-header-h));
	min-height: calc(100svh - var(--zouma-header-h));
	padding-top: calc(var(--zouma-header-h) + clamp(1.5rem, calc(3 * var(--zouma-vw)), 2.75rem));
	padding-bottom: clamp(3rem, calc(6 * var(--zouma-vw)), 5.5rem);
	background: #fff;
	overflow: hidden;
}

/* Anchored top-left and reaching across the head, which is where the design
 * puts the colour — the form side stays clean so the card reads as white. */
.zouma-cthero__glow {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 38% 40% at 8% 6%, rgba(43, 174, 228, 0.2) 0%, rgba(43, 174, 228, 0) 72%),
		radial-gradient(ellipse 30% 34% at 40% 0%, rgba(173, 219, 243, 0.28) 0%, rgba(173, 219, 243, 0) 76%);
	pointer-events: none;
}

.zouma-cthero__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
	gap: clamp(2rem, calc(5 * var(--zouma-vw)), 4.5rem);
	align-items: start;
}

.zouma-cthero .zouma-eyebrow,
.zouma-ctoff .zouma-eyebrow,
.zouma-ctcert .zouma-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 1.125rem;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-body);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.333;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.zouma-cthero .zouma-eyebrow .zouma-icon--spark,
.zouma-ctoff .zouma-eyebrow .zouma-icon--spark,
.zouma-ctcert .zouma-eyebrow .zouma-icon--spark {
	color: var(--zouma-cyan);
}

/* 18ch, not 16.
 *
 * The heading carries its own <br> and is meant to break once, after
 * "Automation". At 16ch the cap resolved to 413px while that first line
 * measures 434px, so it wrapped early and the heading came out in three lines
 * with "Upscaling &" stranded on its own.
 *
 * ch scales with the font, and so does the line it has to hold — the line is
 * 16.8ch wide at every size the clamp produces — so one number fixes it at all
 * of them. 18 leaves a little room for the font to load at a slightly
 * different metric, and still sits well inside the 526px column, so nothing
 * else in the hero moves. */
.zouma-cthero__title {
	max-width: 18ch;
	margin: 0 0 1rem;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-heading);
	font-size: clamp(1.625rem, 1rem + calc(1.8 * var(--zouma-vw)), 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.zouma-cthero__text {
	max-width: 40ch;
	margin: 0 0 1.5rem;
	color: var(--zouma-color-muted);
	font-family: var(--zouma-font-body);
	font-size: 0.8125rem;
	line-height: 1.7;
}

.zouma-cthero__email {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 1.5rem;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-body);
	font-size: 0.8125rem;
}

.zouma-cthero__email .zouma-icon {
	color: var(--zouma-color-muted);
}

.zouma-cthero__email a {
	color: inherit;
	text-decoration: none;
}

.zouma-cthero__email a:hover {
	color: var(--zouma-blue);
}

.zouma-cthero__note {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 30rem;
	margin: 0;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid var(--zouma-color-border);
	border-radius: 6px;
	color: var(--zouma-color-muted);
	font-family: var(--zouma-font-body);
	font-size: 0.75rem;
	line-height: 1.55;
}

.zouma-cthero__note-icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	background: var(--zouma-blue-pale);
	border-radius: 50%;
	color: var(--zouma-blue);
}

/* The form card ----------------------------------------------------------- */

.zouma-ctform {
	padding: clamp(1.25rem, calc(2.2 * var(--zouma-vw)), 1.75rem);
	background: #fff;
	border: 1px solid var(--zouma-color-border);
	border-radius: 8px;
	box-shadow: 0 14px 40px rgba(6, 42, 66, 0.06);
}

/* Off-screen rather than display:none — a hidden input is not submitted by
 * some browsers, and the trap only works if it posts. */
.zouma-ctform__pot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.zouma-ctform__notice {
	margin: 0 0 1rem;
	padding: 10px 14px;
	border-radius: 6px;
	font-family: var(--zouma-font-body);
	font-size: 0.75rem;
	line-height: 1.55;
}

.zouma-ctform__notice.is-ok {
	background: var(--zouma-blue-pale);
	color: var(--zouma-blue);
}

.zouma-ctform__notice.is-bad {
	background: #fdecec;
	color: #a4302c;
}

.zouma-ctform__legend {
	margin: 0 0 10px;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-heading);
	font-size: 0.9375rem;
	font-weight: 600;
}

.zouma-ctform__tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 1.25rem;
}

/* The radio itself is hidden, and its label is the tab. Keeping the input in
 * the flow rather than removing it is what preserves keyboard arrow-key
 * navigation across the group. */
.zouma-ctform__tab {
	position: relative;
	display: block;
}

.zouma-ctform__tab input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.zouma-ctform__tab span {
	display: block;
	padding: 9px 12px;
	background: #fff;
	border: 1px solid var(--zouma-color-border);
	border-radius: 4px;
	color: var(--zouma-color-muted);
	font-family: var(--zouma-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	text-align: center;
	transition: border-color var(--zouma-transition), color var(--zouma-transition),
		background var(--zouma-transition);
}

.zouma-ctform__tab input:checked + span {
	background: var(--zouma-blue-pale);
	border-color: var(--zouma-blue);
	color: var(--zouma-blue);
}

.zouma-ctform__tab input:focus-visible + span {
	outline: 2px solid var(--zouma-blue);
	outline-offset: 2px;
}

.zouma-ctform__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.zouma-ctform__field {
	margin: 0 0 14px;
}

.zouma-ctform__field label {
	display: block;
	margin-bottom: 6px;
	color: var(--zouma-color-muted);
	font-family: var(--zouma-font-body);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.zouma-ctform__field input,
.zouma-ctform__field textarea,
.zouma-ctform__field select {
	width: 100%;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--zouma-color-border);
	border-radius: 4px;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-body);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.zouma-ctform__field textarea {
	min-height: 92px;
	resize: vertical;
}

.zouma-ctform__field input::placeholder,
.zouma-ctform__field textarea::placeholder {
	color: rgba(91, 103, 112, 0.6);
}

.zouma-ctform__field input:focus-visible,
.zouma-ctform__field textarea:focus-visible,
.zouma-ctform__field select:focus-visible {
	outline: 2px solid var(--zouma-blue);
	outline-offset: 1px;
}

/* The caret is drawn over a native select rather than replacing it, so the
 * menu stays the platform's — the one that behaves on a phone. */
.zouma-ctform__select {
	position: relative;
	display: block;
}

.zouma-ctform__select select {
	appearance: none;
	padding-right: 34px;
	cursor: pointer;
}

.zouma-ctform__select .zouma-icon {
	position: absolute;
	top: 50%;
	right: 12px;
	color: var(--zouma-color-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.zouma-ctform__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 6px;
	padding: 12px 16px;
	background: var(--zouma-dark);
	border: 1px solid var(--zouma-dark);
	border-radius: 4px;
	color: #fff;
	font-family: var(--zouma-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5;
	cursor: pointer;
	transition: background var(--zouma-transition), border-color var(--zouma-transition);
}

.zouma-ctform__submit:hover {
	background: var(--zouma-teal);
	border-color: var(--zouma-teal);
	color: #fff;
}

/* =========================================================================
 * 02 · Global offices.
 *
 *   Section  #E1EDF9 · copy left, offices grouped by country on the right
 *   Group    country label over a rule, then cards two across
 *   Card     map crop, office name, address
 * ====================================================================== */

.zouma-ctoff {
	padding-block: clamp(3rem, calc(6 * var(--zouma-vw)), 5.5rem);
	background: var(--zouma-blue-pale);
}

.zouma-ctoff__inner {
	display: grid;
	grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
	gap: clamp(2rem, calc(5 * var(--zouma-vw)), 4.5rem);
	/* start, not stretch — a sticky child needs a column taller than itself to
	 * travel in, and stretching it to the row's full height would leave it
	 * nothing to move against. */
	align-items: start;
}

/* The copy travels with the offices instead of scrolling away above them.
 *
 * The column is roughly 500px against a list several times that, so it reaches
 * its offset early and then holds while the whole list passes it — which is
 * the point: the heading, the call and the contact details stay on screen for
 * every office rather than only the first two.
 *
 * Offset by the header, which floats over the page and would otherwise cover
 * the heading once it stuck. Same measure the homepage figures head uses, so
 * the two sticky columns come to rest at the same height. */
.zouma-ctoff__copy {
	position: sticky;
	top: calc(var(--zouma-header-h) + clamp(1.5rem, calc(3 * var(--zouma-vw)), 3rem));
}

.zouma-ctoff__title {
	margin: 0 0 0.875rem;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-heading);
	font-size: clamp(1.5rem, 1rem + calc(1.5 * var(--zouma-vw)), 2.25rem);
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.02em;
}

.zouma-ctoff__lede {
	max-width: 34ch;
	margin: 0 0 1.5rem;
	color: var(--zouma-color-muted);
	font-family: var(--zouma-font-body);
	font-size: 0.8125rem;
	line-height: 1.7;
}

.zouma-ctoff__cta {
	margin-bottom: 2rem;
}

.zouma-ctoff__hours {
	margin: 0 0 0.5rem;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
}

.zouma-ctoff__email {
	margin: 0 0 1.75rem;
	font-family: var(--zouma-font-body);
	font-size: 0.8125rem;
}

.zouma-ctoff__email a {
	color: var(--zouma-color-muted);
	text-decoration: none;
}

.zouma-ctoff__email a:hover {
	color: var(--zouma-blue);
}

/* The footer's socials are white-on-dark; on this panel they are dark-on-pale,
 * so only the colours are restated. */
.zouma-ctoff__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zouma-ctoff__socials a {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	background: var(--zouma-dark);
	/* The footer's variant carries a teal-deep hairline, which has nothing to
	 * sit against on a solid dark square. */
	border: 0;
	border-radius: 4px;
	color: #fff;
	transition: background var(--zouma-transition);
}

.zouma-ctoff__socials a:hover {
	background: var(--zouma-blue);
}

.zouma-ctoff__list {
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, calc(2.6 * var(--zouma-vw)), 2rem);
}

/* The rule runs from the label to the far edge, so the country reads as a
 * divider across the column rather than as a heading sitting on top of it. */
/* The rule sits above the country, not beside it.
 *
 * It used to run from the label to the right edge on the same line, which read
 * as a heading with a trailing rule. The design has a full-width hairline
 * across the column with the country underneath it, so each group opens with a
 * divider rather than a decorated title.
 *
 * border-top rather than the old ::after: the rule is the full width of the
 * heading box now, so it needs no pseudo-element to stretch into the space a
 * flex row left over. block, for the same reason — nothing sits beside the
 * label any more. */
.zouma-ctoff__country {
	display: block;
	margin: 0 0 1rem;
	padding-top: 14px;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-heading);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	border-top: 1px solid rgba(18, 18, 18, 0.14);
}

.zouma-ctoff__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1rem, calc(2 * var(--zouma-vw)), 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.zouma-ctoff__map {
	display: block;
	aspect-ratio: 300 / 160;
	margin-bottom: 12px;
	/* A flat dark block until a crop is set, rather than a broken frame — the
	 * card still reads correctly with the map missing. */
	background: #1c2530;
	border-radius: 4px;
	overflow: hidden;
}

.zouma-ctoff__map img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Live map ---------------------------------------------------------------
 *
 * Google serves this frame as a light map and gives no way to style it: the
 * dark themes are a Maps JavaScript API feature, and that needs an API key
 * this site does not carry. Inverting the frame is what is left, and it is the
 * usual way of doing it — invert flips light to dark, and the hue rotation
 * puts the colours back the right way round afterwards, so water reads blue
 * again rather than orange. The saturate/contrast trim stops the result
 * looking radioactive against the pale card.
 *
 * If a key is ever added, this should be replaced by a real styled map rather
 * than extended — a filter cannot know a road from a label, so the type inside
 * the map is inverted too. */
.zouma-ctoff__map--live {
	position: relative;
	background: #1c2530;
}

.zouma-ctoff__map--live iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	filter: invert(91%) hue-rotate(180deg) saturate(0.8) contrast(0.92);
}

.zouma-ctoff__name {
	margin: 0 0 6px;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-heading);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
}

.zouma-ctoff__address {
	margin: 0;
	color: var(--zouma-color-muted);
	font-family: var(--zouma-font-body);
	font-size: 0.6875rem;
	line-height: 1.6;
}

/* =========================================================================
 * 03 · Certified by.
 *
 *   Section  #FFF · centred head over the badges, each in its own outline
 * ====================================================================== */

/* Opted out of the site-wide full-screen floor (see `main > section` in
 * main.css). This band is a heading and a row of badges; a viewport-height
 * floor was stretching it to a full screen and leaving most of that empty on
 * a tall monitor. Its own padding sets the height instead.
 *
 * Both properties are needed: min-height undoes the floor, display undoes the
 * centring grid that came with it and puts the section back to block flow. */
.zouma-ctcert {
	min-height: auto;
	display: block;
	padding-block: clamp(3rem, calc(6 * var(--zouma-vw)), 5.5rem);
	background: #fff;
	text-align: center;
}

.zouma-ctcert__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-bottom: clamp(1.5rem, calc(3 * var(--zouma-vw)), 2.25rem);
}

.zouma-ctcert .zouma-eyebrow {
	margin-bottom: 0;
}

.zouma-ctcert__title {
	margin: 0;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-heading);
	font-size: clamp(1.5rem, 1rem + calc(1.6 * var(--zouma-vw)), 2.25rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.zouma-ctcert__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zouma-ctcert__item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	background: #fff;
	border: 1px solid var(--zouma-color-border);
	border-radius: 4px;
	color: var(--zouma-color-text);
	font-family: var(--zouma-font-body);
	font-size: 0.875rem;
	font-weight: 500;
}

.zouma-ctcert__item img {
	display: block;
	width: auto;
	max-width: 40px;
	height: 26px;
	object-fit: contain;
}

.zouma-ctcert__item .zouma-icon {
	color: var(--zouma-blue);
}

/* =========================================================================
 * Responsive.
 * ====================================================================== */

@media (max-width: 1024px) {
	.zouma-cthero__inner,
	.zouma-ctoff__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	/* One column now: the copy sits above the list rather than beside it, so
	 * sticking it would park it over the offices as they scroll under it. */
	.zouma-ctoff__copy {
		position: static;
	}

	.zouma-cthero__title,
	.zouma-cthero__text,
	.zouma-ctoff__lede {
		max-width: 46ch;
	}
}

@media (max-width: 620px) {
	.zouma-ctform__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

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

	.zouma-ctcert__list {
		flex-direction: column;
		align-items: stretch;
	}

	.zouma-ctcert__item {
		justify-content: center;
	}
}

/* =========================================================================
 * The two mailto links on a phone — hit area only.
 *
 * Both sit alone on their own line rather than inside a sentence, so the
 * WCAG 2.2 exception for a target in a block of text does not cover them,
 * and at 13px over the default leading they measured 19px and 22px. The
 * minimum is 24.
 *
 * Padding on the anchor rather than a taller line-height, so only the hit
 * box grows and the type stays where the design put it. Each line already
 * carries a 1.5rem+ bottom margin, so the 6px absorbs into space that was
 * there anyway.
 * ====================================================================== */

@media (max-width: 640px) {
	.zouma-cthero__email a,
	.zouma-ctoff__email a {
		display: inline-block;
		padding-block: 6px;
	}
}
