/* The top of /pricing: the two Oct 11 concepts (src/front/plans.ts). "sun" is the geometric one, "landscape" the sunset
   banner. Both looks' art is Bootstrap's (issue 300). The cards are shared with the front page's Plans section. */

main.page:has(> .pl-sun),
main.page:has(> .pl-land) {
	max-width: none;
	padding-top: 0;
}
.pl-sun,
.pl-land,
.pl-cards,
.pl-connect {
	--pl-orange: #f36c21;
	--pl-orange-hi: #ff8a45;
	--pl-cream: #ece6da;
	--pl-card: #15171b;
	--pl-card-rule: #2c2f35;
}
.pl-sun,
.pl-land {
	position: relative;
	box-sizing: border-box;
	max-width: 1440px;
	margin: 0 auto;
	color: var(--ink);
}

.pl-icon {
	flex: none;
}
.pl-soon {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: var(--radius-pill);
	font: 600 10.5px/16px var(--font-mono);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: 2px;
	white-space: nowrap;
	color: var(--warn);
	background: color-mix(in srgb, var(--warn) 14%, transparent);
}

/* ---------- cards, shared ---------- */
.pl-cards {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 450px));
	gap: 26px;
}
.pl-cards.is-wide {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}
/* Both cards share three rows (header, features, button), so their rules and buttons line up side by side. */
.pl-cards {
	grid-template-rows: auto 1fr auto;
}
.is-band .pl-card {
	background: var(--paper);
}
.pl-card {
	display: grid;
	grid-row: span 3;
	grid-template-rows: subgrid;
	row-gap: 0;
	padding: 34px 32px 32px;
	background: color-mix(in srgb, var(--pl-card) 88%, transparent);
	border: 1px solid var(--pl-card-rule);
	border-radius: 10px;
	backdrop-filter: blur(6px);
}
.pl-card header {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--pl-card-rule);
}
.pl-card header .pl-icon {
	margin-top: 4px;
	color: var(--ink);
}
.pl-card h2 {
	margin: 0;
	font: 560 30px/36px var(--font-sans);
	letter-spacing: -0.02em;
}
.pl-card p {
	margin: 0;
}
.pl-price {
	margin-top: 6px !important;
	font: 400 20px/28px var(--font-sans);
	color: var(--muted);
}
.pl-req {
	margin-top: 4px !important;
	font: 600 20px/28px var(--font-sans);
	color: var(--pl-orange);
}
.pl-from {
	margin-top: 2px !important;
	text-wrap: balance;
	font: 400 15px/22px var(--font-sans);
	color: var(--muted);
}
.pl-lines {
	display: grid;
	gap: 20px;
	margin: 0;
	padding: 26px 0 32px;
	list-style: none;
	flex: 1;
	align-content: start;
}
.pl-lines li {
	display: flex;
	gap: 26px;
	align-items: flex-start;
	padding-left: 8px;
	font: 400 17px/24px var(--font-sans);
}
.pl-lines .pl-icon {
	color: var(--ink);
	opacity: 0.86;
}
.pl-btn {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 56px;
	padding: 0 18px 0 11px;
	border-radius: 12px;
	font: 650 17px/22px var(--font-sans);
	letter-spacing: -0.005em;
	text-decoration: none !important;
	transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.pl-btn-label {
	flex: 1;
}
.pl-btn-mark {
	display: grid;
	place-items: center;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: #14110f;
	color: var(--pl-cream);
}
.pl-btn-mark svg {
	width: 20px;
	height: 20px;
}
.pl-btn > .pl-icon {
	transition: transform 160ms ease;
}
.pl-btn:hover > .pl-icon {
	transform: translateX(3px);
}
.pl-btn:active {
	transform: translateY(1px);
}
.pl-btn.is-cream {
	background: linear-gradient(180deg, #f4efe5 0%, #e4ddcf 100%);
	color: #141210 !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.7),
		0 1px 0 rgba(0, 0, 0, 0.4),
		0 10px 24px -14px rgba(236, 230, 218, 0.45);
}
.pl-btn.is-cream:hover {
	background: linear-gradient(180deg, #fbf8f2 0%, #ebe5d8 100%);
}
.pl-btn.is-quiet {
	background: var(--raised);
	color: var(--ink) !important;
	box-shadow: inset 0 0 0 1px var(--rule-strong);
}
.pl-btn.is-quiet:hover {
	box-shadow: inset 0 0 0 1px var(--ink);
}
.pl-btn.is-quiet .pl-btn-mark {
	background: var(--paper);
	color: var(--ink);
}
.pl-btn.is-orange {
	background: linear-gradient(180deg, #ff7f35 0%, #ee5e10 100%);
	color: #1a0b02 !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 214, 180, 0.55),
		0 1px 0 rgba(0, 0, 0, 0.45),
		0 14px 36px -12px rgba(243, 108, 33, 0.75);
}
.pl-btn.is-orange:hover {
	background: linear-gradient(180deg, #ff8d48 0%, #f36a1c 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 214, 180, 0.6),
		0 1px 0 rgba(0, 0, 0, 0.45),
		0 18px 44px -12px rgba(243, 108, 33, 0.9);
}
.pl-btn:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	.pl-btn,
	.pl-btn > .pl-icon {
		transition: none;
	}
}

/* On the front page the cards sit inside .mk, whose paragraph and heading rules would win; restate the cards' own. */
.mk .pl-card p {
	margin: 0;
	max-width: none;
}
.mk .pl-card h2 {
	max-width: none;
	font: 560 30px/36px var(--font-sans);
	letter-spacing: -0.02em;
}
.mk .pl-price {
	margin-top: 6px;
	font: 400 20px/28px var(--font-sans);
	color: var(--muted);
}
.mk .pl-req {
	margin-top: 4px;
	font: 600 20px/28px var(--font-sans);
	color: var(--pl-orange);
}
.mk .pl-from {
	margin-top: 2px;
	font: 400 15px/22px var(--font-sans);
	color: var(--muted);
}

.mk .pl-cards {
	margin-top: 40px;
}

/* ---------- sun ---------- */
.pl-sun {
	max-width: none;
	padding: 72px max(56px, calc((100% - 1328px) / 2)) 56px;
	overflow: hidden;
}
.pl-sun-art {
	position: absolute;
	z-index: 0;
	top: 0;
	right: 0;
	width: min(1240px, 92%);
	aspect-ratio: 3 / 2;
	pointer-events: none;
	background: url("plans/sun.webp") right top / cover no-repeat;
	/* The art is drawn on #161616; fading its left and bottom edges lets it sit on the page with no seam. */
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%), linear-gradient(to bottom, #000 62%, transparent 100%);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(to right, transparent 0%, #000 38%), linear-gradient(to bottom, #000 62%, transparent 100%);
	mask-composite: intersect;
}
.pl-sun-copy {
	position: relative;
	z-index: 1;
	max-width: 900px;
}
.pl-sun h1 {
	margin: 0;
	font: 640 clamp(40px, 5.1vw, 78px) / 0.98 var(--font-sans);
	letter-spacing: -0.05em;
}
.pl-sun h1 span {
	display: block;
}
.pl-or {
	color: var(--pl-orange);
}
.pl-kicker {
	margin: 34px 0 44px;
	font: 500 14px/20px var(--font-mono);
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--muted);
}
.pl-steps {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 26px;
	margin: 50px 0 0;
	padding: 0;
	list-style: none;
}
.pl-steps li {
	display: flex;
	align-items: center;
	gap: 26px;
	font: 400 20px/26px var(--font-sans);
	white-space: nowrap;
}
.pl-steps li:not(:last-child)::after {
	content: "";
	width: clamp(40px, 12vw, 176px);
	height: 1px;
	background: var(--muted);
	opacity: 0.6;
}
.pl-step-n {
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	border: 1.5px solid var(--ink);
	border-radius: 50%;
	font: 500 18px/1 var(--font-mono);
}
.pl-sun-foot {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: 40px;
}
.pl-rule-note {
	display: flex;
	align-items: center;
	gap: 22px;
	margin: 0;
	font: 400 15px/22px var(--font-sans);
	color: var(--muted);
}
.pl-rule-note::before {
	content: "";
	width: 50px;
	height: 1px;
	background: var(--muted);
}
/* ---------- landscape ---------- */
.pl-land {
	/* The same column as the sections below it (marketing.css: 1120 wide plus 24 each side). */
	max-width: 1168px;
	padding: 22px 24px 56px;
}
.pl-banner {
	position: relative;
	overflow: clip;
	min-height: 330px;
	padding: 32px 38px 36px;
	border-radius: 8px;
	border: 1px solid #3a2a20;
	color: #fff8f0;
	isolation: isolate;
}
.pl-banner-art {
	position: absolute;
	inset: 0;
	z-index: -2;
	/* Bootstrap's sunset (issue 300, ask 835): calm and dark on the left, where the headline sits. */
	background: #2a0d04 url("plans/sunset.webp") right center / cover no-repeat;
}
.pl-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(30, 8, 2, 0.45) 0%, rgba(30, 8, 2, 0.15) 45%, transparent 65%);
}
.pl-eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: 640px;
	margin: 0 0 30px;
	font: 500 12px/16px var(--font-mono);
	letter-spacing: 0.32em;
	text-transform: uppercase;
}
.pl-eyebrow::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(255, 248, 240, 0.6);
}
.pl-land h1 {
	margin: 0;
	font: 660 clamp(46px, 5.6vw, 82px) / 0.94 var(--font-sans);
	letter-spacing: -0.055em;
	text-shadow: 0 2px 24px rgba(60, 18, 4, 0.35);
}
.pl-banner-sub {
	margin: 22px 0 0;
	font: 450 clamp(17px, 1.6vw, 23px) / 1.35 var(--font-sans);
}
.pl-land .pl-cards {
	margin-top: 18px;
}
.pl-land .pl-card {
	padding: 26px 28px 28px;
	background: #12151a;
}
.pl-land .pl-card header {
	gap: 22px;
	padding-bottom: 20px;
}
.pl-land .pl-card header .pl-icon {
	margin-top: 6px;
	opacity: 0.9;
}
.pl-land .pl-card h2 {
	font-size: 22px;
	line-height: 28px;
}
.pl-land .is-connected h2,
.pl-land .is-connected header .pl-icon {
	color: var(--pl-orange);
}
.pl-price.is-big {
	margin-top: 4px !important;
	font: 650 34px/40px var(--font-sans);
	letter-spacing: -0.03em;
	color: var(--ink);
}
.pl-need {
	margin-top: 8px !important;
	font: 560 16px/22px var(--font-sans);
}
.pl-land .pl-from {
	margin-top: 2px !important;
	font-size: 14px;
	line-height: 20px;
}
.pl-land .pl-lines {
	gap: 12px;
	padding: 20px 0 24px;
}
.pl-land .pl-lines li {
	gap: 18px;
	padding-left: 0;
	font-size: 16px;
	line-height: 22px;
}
.pl-land .pl-lines .pl-icon {
	width: 20px;
	height: 20px;
	margin-left: 8px;
}
.pl-land .pl-btn {
	min-height: 50px;
	font-size: 16px;
}

/* ---------- narrower ---------- */
@media (max-width: 1180px) {
	.pl-sun-art {
		opacity: 0.8;
	}
}
@media (max-width: 860px) {
	.pl-cards {
		grid-template-rows: none;
	}
	.pl-card {
		grid-row: auto;
		grid-template-rows: auto 1fr auto;
	}
	.pl-sun {
		padding: 40px 20px 40px;
	}
	.pl-sun-art {
		width: 640px;
		right: -200px;
		opacity: 0.6;
		background-image: url("plans/sun-small.webp");
	}
	.pl-cards,
	.pl-cards.is-wide {
		grid-template-columns: minmax(0, 1fr);
	}
	.pl-card,
	.pl-land .pl-card {
		padding: 26px 22px 24px;
	}
	.pl-card header,
	.pl-land .pl-card header {
		gap: 22px;
	}
	.pl-lines li,
	.pl-land .pl-lines li {
		gap: 18px;
		padding-left: 0;
	}
	.pl-steps {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}
	.pl-steps li {
		font-size: 18px;
		gap: 18px;
	}
	.pl-steps li:not(:last-child)::after {
		display: none;
	}
	.pl-step-n {
		width: 48px;
		height: 48px;
		font-size: 15px;
	}
	.pl-land {
		padding: 12px 16px 40px;
	}
	.pl-banner-art {
		/* Bootstrap's phone composition: dark upper left for the headline, the sun upper right. */
		background-image: url("plans/sunset-phone.webp");
		background-position: center top;
	}
	.pl-banner::before {
		background: linear-gradient(180deg, rgba(24, 7, 2, 0.45) 0%, rgba(24, 7, 2, 0.2) 50%, transparent 75%);
	}
	.pl-banner {
		min-height: 0;
		padding: 26px 22px 120px;
	}
}

/* Scroll (issue 310): the sun sinks a little and the sunset drifts as the page scrolls. Nothing moves without scroll timelines. */
@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		.pl-sun-art {
			animation: pl-sink linear both;
			animation-timeline: scroll(root);
			animation-range: 0 100vh;
		}
		.pl-banner-art {
			inset: -6% 0;
			animation: pl-drift linear both;
			animation-timeline: view();
			animation-range: cover 0% cover 100%;
		}
	}
}
@keyframes pl-sink {
	to {
		transform: translateY(12%) scale(1.04);
		opacity: 0.55;
	}
}
@keyframes pl-drift {
	from {
		transform: translateY(-5%);
	}
	to {
		transform: translateY(5%);
	}
}

/* ---------- what connecting changes (issue 313): one project's lanes, drawn left to right by the scroll ---------- */
.pl-connect {
	margin: 28px 0 36px;
	view-timeline-name: --pl-connect;
}
.pl-lanes {
	--name: 120px;
	--gap: 16px;
	position: relative;
	display: grid;
	gap: 10px;
}
.pl-lanes::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(var(--name) + var(--gap) + (100% - var(--name) - var(--gap)) * (var(--at) - 1) / var(--n));
	border-left: 1px dashed var(--pl-orange);
	opacity: 0.7;
	pointer-events: none;
}
.pl-lane {
	display: grid;
	grid-template-columns: var(--name) minmax(0, 1fr);
	gap: var(--gap);
	align-items: center;
}
.mk .pl-lane-name {
	font: 500 13px/18px var(--font-sans);
	color: var(--muted);
}
.pl-track {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--n), minmax(0, 1fr));
	align-items: center;
	min-height: 38px;
}
.pl-lane.is-marker .pl-track {
	min-height: 18px;
}
.pl-mark {
	grid-column: var(--at) / -1;
	padding-left: 8px;
	font: 600 11px/16px var(--font-mono);
	letter-spacing: 0.04em;
	color: var(--pl-orange);
	white-space: nowrap;
}
.pl-track.is-history::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 2px;
	margin-top: -1px;
	background: var(--rule-strong);
}
.pl-dot {
	position: relative;
	justify-self: center;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: 0 0 0 3px var(--paper);
}
.pl-seg {
	position: relative;
	display: grid;
	grid-template-columns: subgrid;
	align-items: end;
	height: 38px;
	padding-bottom: 6px;
	box-sizing: border-box;
	border-radius: 6px;
}
.pl-seg.is-yours {
	background: color-mix(in srgb, var(--pl-orange) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--pl-orange) 45%, transparent);
}
.mk .pl-seg-name {
	position: absolute;
	top: 4px;
	left: 10px;
	font: 600 11px/14px var(--font-mono);
	color: var(--ink);
	white-space: nowrap;
}
.pl-tick {
	justify-self: center;
	width: 2px;
	height: 9px;
	border-radius: 1px;
	background: var(--pass);
}
.pl-seg.is-deploy .pl-tick {
	background: var(--pl-cream);
}
.mk .pl-connect figcaption {
	margin-top: 16px;
	max-width: 62ch;
	font: 400 14px/22px var(--font-sans);
	color: var(--faint);
}
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.pl-track {
			animation: pl-draw linear both;
			animation-timeline: --pl-connect;
			animation-range: entry 20% entry 100%;
		}
		.pl-lanes::after,
		.pl-mark {
			animation: pl-connected linear both;
			animation-timeline: --pl-connect;
			animation-range: entry 20% entry 100%;
		}
	}
}
@keyframes pl-draw {
	from {
		clip-path: inset(-4px 100% -4px 0);
	}
	to {
		clip-path: inset(-4px 0 -4px 0);
	}
}
@keyframes pl-connected {
	0%,
	42% {
		opacity: 0;
	}
	50%,
	100% {
		opacity: 0.8;
	}
}
@media (max-width: 560px) {
	.pl-lanes {
		--name: 0px;
		--gap: 0px;
	}
	.pl-lane {
		grid-template-columns: minmax(0, 1fr);
		gap: 4px;
	}
	.pl-lane.is-marker .pl-lane-name {
		display: none;
	}
	.pl-dot {
		width: 9px;
		height: 9px;
		box-shadow: 0 0 0 2px var(--paper);
	}
}
