/**
 * Styles /character-development/ — "The Character Floor" (plans/05).
 *
 * Page-scoped: every class carries the `cdev` prefix so nothing leaks. The one
 * new architecture on the whole site is the vertical development rail (a centred
 * timeline with hollow-ring dots and plates alternating left/right of the line);
 * the one new aesthetic device is the clay->final compare slider on stage 06.
 * Everything else references the shared tokens — no raw values.
 *
 * Built by Zinuxtech (ZX · Zinux) to the ZinuxTech Development Guide.
 */

/* ------------------------------------------------------------------ *
 * Intro — dark ink, clears the fixed header, sets the tone.
 * ------------------------------------------------------------------ */
.cdev-intro {
	position: relative;
	overflow: hidden;
	padding-block: calc(var(--inv-header-height) + var(--inv-space-2xl)) var(--inv-sect);
	background: var(--inv-ink) var(--inv-backdrop) center / cover no-repeat;
	color: var(--inv-text-inv);
}

/* No overlays over the backdrop photograph — the hairline grid and grain wash
   that used to sit here belonged to the old flat-ink band (Direction §2a). */

.cdev-intro__inner {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: start;
	gap: var(--inv-space-md);
}

.cdev-intro__title {
	max-width: 20ch;
}

.cdev-intro__title::after {
	display: inline-block;
	width: 0.12em;
	height: 0.12em;
	margin-left: 0.06em;
	border-radius: 50%;
	background: var(--inv-signal);
	content: "";
}

.cdev-intro__lead {
	max-width: 48rem;
	color: var(--inv-muted-inv);
	font-size: clamp(1rem, 1.25vw, 1.25rem);
	line-height: 1.55;
}

/* ------------------------------------------------------------------ *
 * Character rail — the page's signature vertical production line.
 * Bands alternate paper / paper-deep so consecutive characters differ.
 * ------------------------------------------------------------------ */
.cdev-rail {
	padding-block: var(--inv-sect);
}

.cdev-rail--a {
	background: var(--inv-paper);
}

.cdev-rail--b {
	background: var(--inv-paper-deep);
}

.cdev-rail__inner {
	display: grid;
	gap: var(--inv-space-xl);
}

.cdev-rail__tag {
	color: var(--inv-signal-deep);
	font-family: var(--inv-font-mono);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.cdev-rail__name {
	margin-top: var(--inv-space-xs);
	font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.cdev-rail__desc {
	margin-top: var(--inv-space-sm);
	max-width: 34rem;
	color: var(--inv-muted);
	font-size: 1.0625rem;
	line-height: 1.6;
}

/* The timeline: a hairline rule with hollow-ring dots, plates hung off it. */
.cdev-timeline {
	position: relative;
	display: grid;
	gap: var(--inv-space-2xl);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cdev-timeline::before {
	position: absolute;
	top: 0.75rem;
	bottom: 0.75rem;
	left: 0;
	width: 1px;
	background: var(--inv-line-strong);
	content: "";
}

.cdev-stage {
	position: relative;
	padding-left: var(--inv-space-xl);
}

.cdev-stage__dot {
	position: absolute;
	top: 0.75rem;
	left: 0;
	width: 0.9rem;
	height: 0.9rem;
	border: 1px solid var(--inv-line-strong);
	border-radius: 50%;
	transform: translateX(-50%);
}

.cdev-rail--a .cdev-stage__dot {
	background: var(--inv-paper);
}

.cdev-rail--b .cdev-stage__dot {
	background: var(--inv-paper-deep);
}

.cdev-plate {
	display: grid;
	gap: var(--inv-space-sm);
	margin: 0;
}

.cdev-plate__frame {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: var(--inv-radius-md);
	background: var(--inv-ink-3);
	box-shadow: var(--inv-shadow);
}

.cdev-plate__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cdev-plate__meta {
	display: grid;
	gap: var(--inv-space-2xs);
}

.cdev-plate__slate {
	color: var(--inv-muted);
	font-family: var(--inv-font-mono);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cdev-plate__note {
	max-width: 44rem;
	color: var(--inv-text);
	font-size: 0.95rem;
	line-height: 1.55;
}

/* Desktop: sticky character slate + a centred timeline whose plates
   alternate left and right of the line. */
@media (min-width: 58rem) {
	.cdev-rail__inner {
		grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
		gap: var(--inv-space-2xl);
		align-items: start;
	}

	.cdev-rail__slate {
		position: sticky;
		top: calc(var(--inv-header-height) + var(--inv-space-lg));
	}

	.cdev-timeline::before {
		left: 50%;
		transform: translateX(-50%);
	}

	.cdev-stage {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: var(--inv-space-2xl);
		align-items: center;
		padding-left: 0;
	}

	.cdev-stage__dot {
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.cdev-stage:nth-child(odd) .cdev-plate {
		grid-column: 2;
	}

	.cdev-stage:nth-child(even) .cdev-plate {
		grid-column: 1;
		text-align: right;
	}

	.cdev-stage:nth-child(even) .cdev-plate__meta {
		justify-items: end;
	}

	.cdev-stage:nth-child(even) .cdev-plate__note {
		margin-left: auto;
	}
}

/* ------------------------------------------------------------------ *
 * Clay -> final compare slider (stage 06). The ONE new aesthetic device.
 * Ships as stacked captioned images; .inv-js re-lays it as an overlay.
 * ------------------------------------------------------------------ */
.cdev-plate__frame--compare {
	overflow: visible;
	aspect-ratio: auto;
	background: transparent;
	box-shadow: none;
}

.inv-js .cdev-plate__frame--compare {
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--inv-ink-3);
	box-shadow: var(--inv-shadow);
}

.cdev-compare {
	display: grid;
	gap: var(--inv-space-2xs);
}

.cdev-compare__pane {
	position: relative;
	overflow: hidden;
	border-radius: var(--inv-radius-md);
	box-shadow: var(--inv-shadow);
}

.cdev-compare__img {
	display: block;
	width: 100%;
	height: auto;
}

.cdev-compare__tag {
	position: absolute;
	bottom: var(--inv-space-xs);
	padding: 0.25rem 0.55rem;
	border-radius: var(--inv-radius-pill);
	background: var(--inv-ink-overlay-strong);
	color: var(--inv-text-inv);
	font-family: var(--inv-font-mono);
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cdev-compare__tag--before {
	left: var(--inv-space-xs);
}

.cdev-compare__tag--after {
	right: var(--inv-space-xs);
}

.cdev-compare__range,
.cdev-compare__divider {
	display: none;
}

/* Enhanced overlay slider (JS present). */
.inv-js .cdev-compare {
	position: absolute;
	inset: 0;
	display: block;
}

.inv-js .cdev-compare__pane {
	position: absolute;
	inset: 0;
	border-radius: 0;
	box-shadow: none;
}

.inv-js .cdev-compare__pane--after {
	clip-path: inset(0 calc(100% - var(--cdev-pos, 50%)) 0 0);
}

.inv-js .cdev-compare__img {
	height: 100%;
	object-fit: cover;
}

.inv-js .cdev-compare__range {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	opacity: 0;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
}

.inv-js .cdev-compare__divider {
	display: block;
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--cdev-pos, 50%);
	z-index: 2;
	width: 2px;
	background: var(--inv-signal);
	transform: translateX(-1px);
	pointer-events: none;
}

.cdev-compare__handle {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	background: var(--inv-signal);
	box-shadow: var(--inv-shadow);
	transform: translate(-50%, -50%);
}

.cdev-compare__handle::before,
.cdev-compare__handle::after {
	position: absolute;
	top: 50%;
	width: 0.42rem;
	height: 0.42rem;
	border-top: 2px solid var(--inv-ink);
	border-right: 2px solid var(--inv-ink);
	content: "";
}

.cdev-compare__handle::before {
	left: 0.42rem;
	transform: translateY(-50%) rotate(-135deg);
}

.cdev-compare__handle::after {
	right: 0.42rem;
	transform: translateY(-50%) rotate(45deg);
}

.cdev-compare__range:focus-visible ~ .cdev-compare__divider .cdev-compare__handle {
	outline: 3px solid var(--inv-ink);
	outline-offset: 2px;
}

/* On desktop the even (right-aligned) plate keeps captions/text on the right,
   but the compare frame itself must stay full-bleed inside the plate. */
@media (min-width: 58rem) {
	.cdev-stage:nth-child(even) .cdev-plate__frame {
		text-align: left;
	}
}

/* ------------------------------------------------------------------ *
 * Empty state — porcelain, intentional (never looks broken).
 * ------------------------------------------------------------------ */
.cdev-empty {
	padding-block: var(--inv-sect);
	background: var(--inv-paper);
}

.cdev-empty__inner {
	display: grid;
	justify-items: center;
	gap: var(--inv-space-md);
	max-width: 46rem;
	margin-inline: auto;
	text-align: center;
}

.cdev-empty__slate {
	color: var(--inv-signal-deep);
	font-family: var(--inv-font-mono);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.cdev-empty__line {
	max-width: 24ch;
	font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.cdev-empty__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--inv-space-md);
	margin-top: var(--inv-space-xs);
}

.cdev-empty .button--primary {
	color: var(--inv-ink);
}

.cdev-empty .button--outline {
	border-color: var(--inv-line-strong);
	background: transparent;
	color: var(--inv-text);
}

.cdev-empty .button--outline:hover {
	border-color: var(--inv-ink);
	background: var(--inv-ink);
	color: var(--inv-text-inv);
}

/* ------------------------------------------------------------------ *
 * Conversion CTA — gold signal band (reuses the contact-cta treatment).
 * ------------------------------------------------------------------ */
.cdev-cta {
	position: relative;
	overflow: hidden;
	padding-block: var(--inv-sect);
	background: var(--inv-signal);
	color: var(--inv-ink);
}

.cdev-cta__grain {
	position: absolute;
	inset: 0;
	background-image: var(--inv-grain);
	opacity: 0.13;
	pointer-events: none;
}

.cdev-cta__inner {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	gap: var(--inv-space-md);
	text-align: center;
}

.cdev-cta .eyebrow {
	color: var(--inv-ink-2);
}

.cdev-cta .eyebrow::before {
	background: var(--inv-ink);
}

.cdev-cta__inner h2 {
	max-width: 20ch;
}

.cdev-cta__body {
	max-width: 40rem;
	font-size: clamp(1rem, 1.25vw, 1.2rem);
	line-height: 1.5;
}

.cdev-cta__actions {
	margin-top: var(--inv-space-xs);
}

.cdev-cta .button--primary {
	background: var(--inv-ink);
	color: var(--inv-text-inv);
}

.cdev-cta .button--primary:hover {
	background: var(--inv-ink-2);
}
