/* ZLCandle landing page — task B sections: capabilities (partner.php), evaluation (evaluate.php)
   and the closing block with the project inquiry form and the alternative engagement paths
   (action.php).

   Colour, type, spacing, radii and transitions come from assets/css/tokens.css. The layout and
   type primitives (.zl-container, .zl-section, .zl-h2, .zl-h3, .zl-lead, .zl-body, .zl-btn,
   .zl-media, .zl-caption) come from style.css and are never redefined here. Only section-specific
   rules live in this file, and each section declares the few values it needs beyond the tokens as
   a local --zl-part-*/--zl-eval-*/--zl-act-* variable in its own selector.

   The in-page anchors of these sections keep the shared offset style.css gives every [id]; no
   scroll-margin-top is set here. */

/* --- capabilities (partner.php) --- */
.zl-part {
	--zl-part-measure: 44ch;
	--zl-part-gap: clamp(1.75rem, 3.5vw, 3rem);
	background: var(--zl-ivory);
	color: var(--zl-fg);
}

.zl-part__head {
	max-width: var(--zl-container-narrow);
	margin-bottom: var(--zl-space-lg);
}

.zl-part__heading {
	margin: 0 0 var(--zl-space-sm);
}

.zl-part .zl-part__intro {
	margin: 0;
}

.zl-part__list {
	display: grid;
	gap: var(--zl-space-xl);
}

/* One editorial row: a hairline above it, and image and text stacked in a single column until
   there is width for two. */
.zl-part__row {
	display: grid;
	gap: var(--zl-space-md);
	min-width: 0;
	padding-top: var(--zl-space-md);
	border-top: 1px solid var(--zl-line-strong);
}

/* A row without a photograph becomes its own sand panel with an accent edge, so the section keeps
   its rhythm instead of leaving an empty half. */
.zl-part__row--text {
	padding: var(--zl-space-md);
	background: var(--zl-sand-soft);
	border-top: 0;
	border-left: 3px solid var(--zl-accent);
	border-radius: var(--zl-radius);
}

.zl-part__row--text .zl-part__body {
	max-width: var(--zl-part-measure);
}

.zl-part__figure {
	min-width: 0;
	margin: 0;
}

.zl-part__media {
	margin: 0;
}

.zl-part__img {
	display: block;
	width: 100%;
	height: auto;
}

.zl-part__caption {
	margin: var(--zl-space-2xs) 0 0;
}

.zl-part__body {
	min-width: 0;
}

.zl-part__title {
	margin: 0;
}

.zl-part__copy {
	margin: var(--zl-space-2xs) 0 0;
	overflow-wrap: break-word;
}

@media (min-width: 640px) {
	.zl-part__row--text {
		padding: var(--zl-space-lg);
	}
}

@media (min-width: 960px) {
	.zl-part__row--text {
		padding: var(--zl-space-xl);
	}

	/* Photograph beside its text, vertically centred; --flip puts the image on the other side. */
	.zl-part__row--media {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: var(--zl-part-gap);
		align-items: center;
	}

	.zl-part__row--media .zl-part__figure {
		grid-area: 1 / 1;
	}

	.zl-part__row--media .zl-part__body {
		grid-area: 1 / 2;
	}

	.zl-part__row--flip .zl-part__figure {
		grid-area: 1 / 2;
	}

	.zl-part__row--flip .zl-part__body {
		grid-area: 1 / 1;
	}

	/* A photograph whose row carries no text keeps the full width instead of half of it. */
	.zl-part__row--media .zl-part__figure:only-child {
		grid-column: 1 / -1;
	}
}

/* --- evaluation (evaluate.php) --- */
.zl-eval {
	--zl-eval-num-col: 2.75rem;
	--zl-eval-measure: 56ch;
	background: var(--zl-warm-white);
	color: var(--zl-fg);
}

.zl-eval__head {
	max-width: var(--zl-container-narrow);
	margin-bottom: var(--zl-space-lg);
}

.zl-eval__heading {
	margin: 0 0 var(--zl-space-sm);
}

.zl-eval__intro {
	margin: 0;
}

/* A ruled numbered list: the numeral keeps its own column, so every title starts on the same
   line, and each item is closed by a hairline rather than boxed. */
.zl-eval__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--zl-line-strong);
}

.zl-eval__item {
	display: grid;
	grid-template-columns: var(--zl-eval-num-col) minmax(0, 1fr);
	column-gap: var(--zl-space-sm);
	padding-block: var(--zl-space-md);
	border-bottom: var(--zl-border);
}

.zl-eval__num {
	padding-top: .3em;
	font-family: var(--zl-font-body);
	font-size: var(--zl-fs-eyebrow);
	font-weight: var(--zl-weight-medium);
	font-variant-numeric: tabular-nums;
	letter-spacing: var(--zl-track-eyebrow);
	line-height: var(--zl-lh-heading);
	color: var(--zl-clay-dark);
}

.zl-eval__body {
	min-width: 0;
}

.zl-eval__title {
	margin: 0;
}

.zl-eval__copy {
	max-width: var(--zl-eval-measure);
	margin: var(--zl-space-2xs) 0 0;
	overflow-wrap: break-word;
}

.zl-eval__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--zl-space-sm) var(--zl-space-md);
	margin-top: var(--zl-space-xl);
	padding-top: var(--zl-space-lg);
	border-top: 1px solid var(--zl-line-strong);
}

.zl-eval__btn {
	flex: none;
}

.zl-eval__btn:focus-visible {
	outline: 2px solid var(--zl-accent);
	outline-offset: 3px;
}

.zl-eval__micro {
	max-width: var(--zl-eval-measure);
	margin: 0;
	color: var(--zl-ink-3);
	font-size: var(--zl-fs-small);
	line-height: var(--zl-lh-body);
	overflow-wrap: break-word;
}

@media (min-width: 640px) {
	.zl-eval {
		--zl-eval-num-col: 3.5rem;
	}
}

@media (min-width: 960px) {
	.zl-eval__item {
		column-gap: var(--zl-space-lg);
		padding-block: var(--zl-space-lg);
	}
}

/* --- closing, inquiry form and alternative paths (action.php) --- */
.zl-act {
	--zl-act-measure: 50ch;
	--zl-act-panel-pad: clamp(1.25rem, 3vw, 2.75rem);
	background: var(--zl-ivory);
	color: var(--zl-fg);
}

.zl-act__closing {
	display: grid;
	gap: var(--zl-space-lg);
}

.zl-act__closing-body {
	min-width: 0;
}

.zl-act__closing-title {
	margin: 0 0 var(--zl-space-sm);
}

.zl-act__closing-copy {
	max-width: var(--zl-act-measure);
	margin: 0;
	font-family: var(--zl-font-display);
	font-size: var(--zl-fs-lead);
	line-height: 1.5;
	color: var(--zl-ink-2);
}

/* No photograph: the statement stays a single reading column instead of a column beside a gap. */
.zl-act__closing--type .zl-act__closing-body {
	max-width: var(--zl-container-narrow);
}

.zl-act__figure {
	min-width: 0;
	margin: 0;
}

.zl-act__media {
	margin: 0;
}

.zl-act__img {
	display: block;
	width: 100%;
	height: auto;
}

.zl-act__caption {
	margin: var(--zl-space-2xs) 0 0;
}

/* The form panel: the one solid white surface on this ivory section. */
.zl-act__panel {
	padding: var(--zl-act-panel-pad);
	background: var(--zl-white);
	border: var(--zl-border);
	border-radius: var(--zl-radius-lg);
}

/* The panel only needs space above it when the closing statement precedes it. */
.zl-act__closing + .zl-act__panel {
	margin-top: var(--zl-space-2xl);
}

.zl-act__form-title {
	max-width: 26ch;
	margin: 0 0 var(--zl-space-lg);
}

/* One field per row on a phone; a --wide field, the submit row and the status line take the full
   width at any size. */
.zl-act__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--zl-space-md);
}

.zl-act__field--wide,
.zl-act__actions,
.zl-act__status {
	grid-column: 1 / -1;
}

@media (min-width: 960px) {
	/* Three short fields to a row: the partial carries exactly three before each full-width field
	   (name, email, company / quantity, launch date, budget), so no cell is left empty. */
	.zl-act__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: var(--zl-space-lg);
	}

	.zl-act__closing--media {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
		column-gap: var(--zl-space-xl);
		align-items: center;
	}

	.zl-act__closing--media .zl-act__closing-body {
		grid-area: 1 / 1;
	}

	.zl-act__closing--media .zl-act__figure {
		grid-area: 1 / 2;
	}

	/* A closing block with neither heading nor copy gives the photograph the full width. */
	.zl-act__closing--media:not(:has(.zl-act__closing-body > *)) .zl-act__figure {
		grid-column: 1 / -1;
	}
}

/* --- controls --- */
.zl-act__field {
	display: flex;
	flex-direction: column;
	gap: var(--zl-space-3xs);
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* A choice group stacks as a block fieldset: its legend sits outside the fieldset's content box in
   some engines, so the space under it is a margin rather than the field's flex gap. */
.zl-act__field--choice {
	display: block;
}

.zl-act__field--choice .zl-act__label {
	margin: 0 0 var(--zl-space-xs);
	padding: 0;
}

.zl-act__label {
	color: var(--zl-ink-2);
	font-size: var(--zl-fs-small);
	font-weight: var(--zl-weight-medium);
	line-height: var(--zl-lh-heading);
}

.zl-act__input,
.zl-act__textarea {
	width: 100%;
	max-width: 100%;
	padding: var(--zl-space-2xs) var(--zl-space-xs);
	border: var(--zl-border);
	border-radius: var(--zl-radius);
	background: var(--zl-white);
	color: var(--zl-ink);
	font-family: var(--zl-font-body);
	font-size: var(--zl-fs-body);
	line-height: var(--zl-lh-body);
	transition: border-color var(--zl-transition);
}

.zl-act__textarea {
	min-height: 9rem;
	resize: vertical;
}

.zl-act__input:focus-visible,
.zl-act__textarea:focus-visible,
.zl-act__file:focus-visible {
	border-color: var(--zl-accent);
	outline: 2px solid var(--zl-accent);
	outline-offset: 1px;
}

/* The radio list holds one option per row on a phone and spreads over the field once there is
   width; min(100%, …) keeps a narrow container at a single column. */
.zl-act__choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	row-gap: var(--zl-space-2xs);
	column-gap: var(--zl-space-md);
}

.zl-act__choice {
	display: flex;
	align-items: flex-start;
	gap: var(--zl-space-2xs);
	color: var(--zl-ink-2);
	font-size: var(--zl-fs-small);
	line-height: var(--zl-lh-body);
	cursor: pointer;
}

.zl-act__choice input {
	flex: none;
	margin: 0.35em 0 0;
	accent-color: var(--zl-accent);
}

.zl-act__choice-text {
	min-width: 0;
	overflow-wrap: break-word;
}

.zl-act__file {
	max-width: 100%;
	color: var(--zl-ink-2);
	font-family: var(--zl-font-body);
	font-size: var(--zl-fs-small);
}

.zl-act__file::file-selector-button {
	margin-right: var(--zl-space-2xs);
	padding: var(--zl-space-2xs) var(--zl-space-sm);
	border: var(--zl-border);
	border-radius: var(--zl-radius-pill);
	background: var(--zl-sand-soft);
	color: var(--zl-ink);
	font: inherit;
	cursor: pointer;
	transition: background var(--zl-transition);
}

.zl-act__file::file-selector-button:hover {
	background: var(--zl-sand);
}

.zl-act__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--zl-space-sm);
	margin: 0;
}

/* A full-width submit on a phone, sized to its label once the form takes two columns. */
.zl-act__submit {
	width: 100%;
}

@media (min-width: 640px) {
	.zl-act__submit {
		width: auto;
	}
}

.zl-act__status {
	margin: 0;
	min-height: var(--zl-fs-small);
	color: var(--zl-ink-3);
	font-size: var(--zl-fs-small);
	line-height: var(--zl-lh-body);
	overflow-wrap: break-word;
}

.zl-act__micro {
	margin: var(--zl-space-md) 0 0;
	max-width: 70ch;
	color: var(--zl-ink-3);
	font-size: var(--zl-fs-micro);
	line-height: var(--zl-lh-body);
	overflow-wrap: break-word;
}

/* --- alternative engagement paths --- */
.zl-act__paths {
	margin-top: var(--zl-space-2xl);
	padding-top: var(--zl-space-xl);
	border-top: var(--zl-border);
}

.zl-act__paths-heading {
	margin: 0;
}

.zl-act__paths-list {
	display: grid;
	gap: var(--zl-space-lg);
	margin: var(--zl-space-lg) 0 0;
	padding: 0;
	list-style: none;
}

.zl-act__path {
	display: flex;
	flex-direction: column;
	gap: var(--zl-space-2xs);
	min-width: 0;
	padding-top: var(--zl-space-md);
	border-top: var(--zl-border);
}

.zl-act__path-title {
	margin: 0;
	font-family: var(--zl-font-display);
	line-height: var(--zl-lh-heading);
}

.zl-act__path-copy {
	margin: 0;
	color: var(--zl-ink-2);
	font-size: var(--zl-fs-small);
	line-height: var(--zl-lh-body);
	overflow-wrap: break-word;
}

/* The button is pushed to the foot of its column, so the three read as one ruled row. */
.zl-act__path-cta {
	align-self: flex-start;
	margin-top: auto;
	padding-top: var(--zl-space-3xs);
}

@media (min-width: 640px) {
	.zl-act__paths-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 960px) {
	.zl-act__paths-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--zl-space-lg);
	}
}
