/* The support form's Custom Development card: it opens the custom development app.
   Full width under the topic tiles, in a look of its own, like the seasonal sale bands:
   a violet workshop at night, the kind of code we write scrolling faintly behind the steps,
   the kinds of work (code, braces, a plugin, a puzzle piece, a terminal) drifting up, and a
   lit </> emblem. Motion is transform-only and stops for reduced motion. */

/* The theme keeps the steps after the topic at a reading width; this card spans the row. */
body.page-template-support .xt-support-pre-form li.gfield.xt-cdev-cta-field {
	max-width: none;
	margin-right: 0 !important;
}

.xt-cdev-cta {
	--cd-bg: #0d0b1f;
	--cd-accent: #a993ff;
	--cd-glow: #6a4dff;
	--cd-cyan: #5ee3d0;
	--cd-text: #c9c3ec;
	--cd-muted: #9690c0;

	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: center;
	gap: clamp(32px, 5vw, 72px);
	overflow: hidden;
	isolation: isolate;
	margin-top: 8px;
	padding: clamp(28px, 4.4vw, 60px);
	border: 1px solid color-mix(in srgb, var(--cd-accent) 28%, transparent);
	border-radius: var(--radius-xl, 28px);
	background:
		radial-gradient(60% 90% at 100% 0%, color-mix(in srgb, var(--cd-glow) 42%, transparent), transparent 70%),
		radial-gradient(45% 70% at 0% 105%, color-mix(in srgb, var(--cd-cyan) 16%, transparent), transparent 70%),
		var(--cd-bg);
	box-shadow: 0 40px 100px color-mix(in srgb, var(--cd-glow) 16%, transparent);
	color: #fff;
	text-align: left;
}

/* Code, scrolling up behind the steps, fading out toward the copy. */
.xt-cdev-cta__code {
	position: absolute;
	inset: 0 0 0 30%;
	z-index: -2;
	overflow: hidden;
	pointer-events: none;
	opacity: 0.5;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 35%), linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(90deg, transparent, #000 35%), linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
	mask-composite: intersect;
}

.xt-cdev-cta__code > div {
	animation: xt-cdev-scroll 70s linear infinite;
}

.xt-cdev-cta__code pre {
	margin: 0;
	padding: 0 0 28px 28px;
	background: none;
	border: 0;
	color: color-mix(in srgb, var(--cd-text) 55%, transparent);
	font: 400 13px/1.85 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	tab-size: 4;
	white-space: pre;
	overflow: visible;
}

.xt-cdev-cta__code .c { color: color-mix(in srgb, var(--cd-muted) 70%, transparent); font-style: italic; }
.xt-cdev-cta__code .k { color: var(--cd-accent); }
.xt-cdev-cta__code .f { color: #8fb8ff; }
.xt-cdev-cta__code .s { color: var(--cd-cyan); }
.xt-cdev-cta__code .v { color: #f0a6d8; }
.xt-cdev-cta__code .n { color: #ffcf8a; }

@keyframes xt-cdev-scroll {
	from { transform: translateY(0); }
	to { transform: translateY(-50%); }
}

/* The kinds of work, drifting up. */
.xt-cdev-cta__sky {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}

.xt-cdev-cta__defs {
	position: absolute;
}

.xt-cdev-cta__p {
	position: absolute;
	bottom: -40px;
	left: var(--x);
	width: var(--s);
	height: var(--s);
	color: var(--cd-accent);
	opacity: var(--o);
	animation: xt-cdev-rise var(--d) linear var(--delay) infinite;
}

.xt-cdev-cta__p:nth-child(3n) {
	color: var(--cd-cyan);
}

@keyframes xt-cdev-rise {
	from { transform: translateY(0) rotate(-12deg); }
	50% { transform: translate(16px, -280px) rotate(6deg); }
	to { transform: translate(-8px, -600px) rotate(-8deg); }
}

/* The emblem: </>, large and lit, low behind the copy. */
.xt-cdev-cta__emblem {
	position: absolute;
	left: clamp(-90px, -4vw, -40px);
	bottom: clamp(-110px, -6vw, -60px);
	z-index: -1;
	width: clamp(240px, 28vw, 380px);
	height: clamp(240px, 28vw, 380px);
	color: var(--cd-accent);
	opacity: 0.14;
	filter: drop-shadow(0 0 36px var(--cd-glow));
	transform: rotate(-14deg);
	pointer-events: none;
}

.xt-cdev-cta__emblem svg {
	width: 100%;
	height: 100%;
	stroke-width: 1.2;
}

/* Copy */
.xt-cdev-cta__copy {
	position: relative;
}

.xt-cdev-cta__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 6px 13px 6px 10px;
	border: 1px solid color-mix(in srgb, var(--cd-accent) 35%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--cd-accent) 12%, transparent);
	color: #fff;
	font-size: 13px;
	font-weight: 560;
	letter-spacing: 0.02em;
}

.xt-cdev-cta__eyebrow svg {
	width: 16px;
	height: 16px;
	color: var(--cd-accent);
}

.xt-cdev-cta__title {
	margin: 0 0 16px;
	max-width: 18ch;
	color: #fff;
	font-size: clamp(28px, 3vw, 42px);
	font-weight: 580;
	font-variation-settings: "wdth" 104;
	letter-spacing: -0.035em;
	line-height: 1.04;
}

/* Two tones, like every heading on the site, in the card's own palette. */
.xt-cdev-cta__title em {
	font-style: normal;
	color: var(--cd-accent);
}

.xt-cdev-cta__text {
	margin: 0;
	max-width: 46ch;
	color: var(--cd-text);
	font-size: 16.5px;
	line-height: 1.6;
}

.xt-cdev-cta__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 18px;
	margin-top: 30px;
}

.xt-cdev-cta__note {
	color: var(--cd-muted);
	font-size: 14px;
}

/* A white pill: the one bright thing on the card. */
.xt-cdev-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 50px;
	padding: 0 24px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 32px -8px color-mix(in srgb, var(--cd-glow) 80%, transparent);
	color: var(--cd-bg) !important;
	font-size: 16px;
	font-weight: 640;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s;
}

.xt-cdev-cta__button svg {
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.xt-cdev-cta__button:hover {
	background: #f1edff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 40px -8px var(--cd-glow);
}

.xt-cdev-cta__button:hover svg {
	transform: translateX(3px);
}

.xt-cdev-cta__button:active {
	transform: scale(0.98);
}

.xt-cdev-cta__button:focus-visible {
	outline: 2px solid var(--cd-accent);
	outline-offset: 3px;
}

/* The four steps: glass panels over the code, numbered in reading order. */
.xt-cdev-cta__steps {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.xt-cdev-cta__steps li {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-content: start;
	gap: 6px 14px;
	margin: 0;
	padding: 20px 20px 22px;
	border: 1px solid color-mix(in srgb, var(--cd-accent) 18%, transparent);
	border-radius: var(--radius-md, 14px);
	background: color-mix(in srgb, var(--cd-bg) 72%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.xt-cdev-cta__steps li:hover {
	border-color: color-mix(in srgb, var(--cd-accent) 45%, transparent);
	transform: translateY(-2px);
}

.xt-cdev-cta__num {
	grid-row: span 2;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: linear-gradient(140deg, var(--cd-accent), var(--cd-glow));
	box-shadow: 0 0 18px -2px color-mix(in srgb, var(--cd-glow) 70%, transparent);
	color: #fff;
	font-size: 13px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.xt-cdev-cta__steps b {
	align-self: center;
	color: #fff;
	font-size: 16px;
	font-weight: 560;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.xt-cdev-cta__step-text {
	color: var(--cd-muted);
	font-size: 14.5px;
	line-height: 1.5;
}

@media (max-width: 960px) {
	.xt-cdev-cta {
		grid-template-columns: 1fr;
	}

	.xt-cdev-cta__title {
		max-width: 24ch;
	}

	/* Stacked, the code sits behind the steps below the copy. */
	.xt-cdev-cta__code {
		inset: 40% 0 0 0;
		-webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 85%, transparent);
		mask-image: linear-gradient(180deg, transparent, #000 20%, #000 85%, transparent);
	}

	.xt-cdev-cta__emblem {
		left: auto;
		right: -60px;
		top: -60px;
		bottom: auto;
		width: 220px;
		height: 220px;
	}
}

@media (max-width: 600px) {
	.xt-cdev-cta__steps {
		grid-template-columns: 1fr;
	}

	.xt-cdev-cta__actions {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.xt-cdev-cta__button {
		width: 100%;
	}

	.xt-cdev-cta__code pre {
		font-size: 11.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.xt-cdev-cta__code > div,
	.xt-cdev-cta__p {
		animation: none;
	}

	.xt-cdev-cta__p {
		display: none;
	}
}
