/*
 * INNER-EXPERIENCE-003: a project's page, on that page only. Name and summary beside the cover, a ruled strip of the facts
 * that exist, the two levels side by side (what was confirmed; what is general), the project's own images, a short
 * line in the margin from the facts down to the request, and three other works. Old project-a rules are neutralised
 * here only where they would fight the new layout.
 */
.project-x { --lx: calc(var(--gutter) / 2); }
@media (min-width: 1200px) { .project-x { --lx: 3.333%; } }
.project-x h1, .project-x h2 { letter-spacing: 0; text-wrap: balance; }
.project-x bdi { unicode-bidi: plaintext; }

/* Name, summary, cover. */
.px-hero { position: relative; background: var(--surface); padding-block-end: 28px; }
.px-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block-start: 4px; }
.px-hero h1 { margin: 0; font-size: 30px; line-height: 1.32; overflow-wrap: anywhere; }
.px-hero .stripe { width: 64px; margin-block-start: 14px; }
.px-hero .lead { margin: 14px 0 0; max-width: 36rem; color: var(--text); font-size: 18px; line-height: 1.85; overflow-wrap: anywhere; }
.px-cover { position: relative; margin: 0; height: 220px; overflow: hidden; background: var(--primary); }
.px-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.px-cover figcaption { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; padding: 3px 10px; background: rgba(17, 16, 68, .84); color: var(--white); font-size: 13px; line-height: 1.6; }
.px-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 24px 0 0; border-block-start: 2px solid var(--primary); }
.px-facts > div { min-width: 0; padding: 14px 0 12px; padding-inline-end: 12px; border-block-end: 1px solid var(--border); }
.px-facts dt { color: var(--muted); font-size: 14px; }
.px-facts dd { margin: 2px 0 0; color: var(--primary); font-weight: 600; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.px-facts > div:only-child { grid-column: 1 / -1; }
@media (min-width: 768px) {
	.px-hero h1 { font-size: 40px; }
	.px-cover { height: 340px; }
	.px-facts { grid-template-columns: repeat(min(var(--n), 3), minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.px-hero { padding-block-end: 40px; }
	.px-hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
	.px-hero-grid.no-cover { grid-template-columns: minmax(0, 1fr); }
	.px-hero h1 { font-size: clamp(38px, 3.4vw, 48px); }
	.px-cover { height: 400px; clip-path: polygon(0 0, 100% 0, 100% 100%, 64px 100%, 0 calc(100% - 64px)); }
	.px-facts { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin-block-start: 36px; }
	.px-facts > div { padding-inline: 0 20px; }
	.px-facts > div + div { padding-inline-start: 20px; border-inline-start: 1px solid var(--border); }
}

/* The two levels, and the images. */
.px-body { position: relative; padding-block: 40px 56px; view-timeline: --px block; }
.px-rail { position: absolute; inset-block: 0; inset-inline-start: var(--lx); width: 2px; background: var(--accent); transform-origin: top; pointer-events: none; }
.px-levels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.px-levels h2 { margin: 0 0 14px; font-size: 26px; }
.px-scope { padding-block-start: 16px; border-block-start: 4px solid var(--primary); }
.px-scope h3 { margin: 0; font-size: 16px; color: var(--muted); font-weight: 600; }
.px-role p { margin: 4px 0 0; font-size: 18px; line-height: 1.8; }
.px-role + .px-qty { margin-block-start: 24px; }
.px-qty h3 { margin-block-end: 8px; }
.px-solution { position: relative; padding: 20px; padding-inline-end: 76px; background: var(--white); border: 1px dashed #9AA6BC; }
.px-solution-icon { position: absolute; inset-block-start: 20px; inset-inline-end: 20px; width: 40px; height: 40px; color: var(--accent); }
.px-solution p { margin: 0; line-height: 1.85; }
.px-solution .project-solution-note { margin-block-start: 12px; color: var(--muted); font-size: 14px; }
.px-levels:not(.has-both) > * { max-width: 46rem; }
.px-gallery-band { margin-block-start: 48px; }
.px-gallery-band h2 { margin: 0 0 16px; font-size: 26px; }
.px-gallery { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 16px; }
.px-gallery li { break-inside: avoid; margin-block-end: 16px; }
.px-gallery a { display: block; background: var(--surface); }
.px-gallery img { display: block; width: 100%; height: auto; }
.px-gallery a:hover img { opacity: .92; }
@media (min-width: 600px) { .px-gallery { columns: 2; } }
@media (min-width: 1024px) {
	.px-body { padding-block: 64px 80px; }
	.px-levels.has-both { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
	.px-gallery { columns: 3; }
}

/* The request: the margin line arrives at its heading. */
.project-x .px-ask { position: relative; display: block; overflow: hidden; overflow: clip; container-type: inline-size; view-timeline: --px-ask block; margin: 0; padding-block: 56px; background: var(--primary); color: #E0E5F7; --line: #7CC0FF; --cx: calc(var(--gutter) / 2); }
.px-ask-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.px-ask-head { position: relative; }
.px-ask-head::before { content: ""; position: absolute; inset-block: -1600px calc(100% - 22px); inset-inline-start: calc(-1 * var(--cx)); width: 2px; background: var(--line); transform-origin: top; pointer-events: none; }
.px-ask-head::after { content: ""; position: absolute; inset-block-start: 21px; inset-inline-start: calc(-1 * var(--cx)); width: calc(var(--cx) - 6px); height: 2px; background: var(--line); transform-origin: right; pointer-events: none; }
.px-ask-node { position: absolute; inset-block-start: 17px; inset-inline-start: calc(-4px - var(--cx)); width: 10px; height: 10px; background: var(--line); transform: rotate(45deg); }
.px-ask h2 { margin: 0; color: var(--white); font-size: 28px; line-height: 1.4; }
.px-ask p { margin: 10px 0 0; max-width: 38rem; color: #E0E5F7; line-height: 1.85; }
.px-ask-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.px-ask .button { background: var(--white); color: var(--primary); }
.px-ask .button:hover { background: #E6EDFC; color: var(--primary); }
.px-ask a:focus-visible { outline-color: var(--white); }
.px-ask-link, .px-ask-call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--white); font-weight: 600; text-underline-offset: 5px; }
.px-ask-link:hover, .px-ask-call:hover { color: var(--white); text-decoration-thickness: 2px; }
.px-ask-call bdi { font: 700 19px/1 var(--font-en); }
@media (max-width: 479px) { .px-ask .button { width: 100%; } }
@media (min-width: 900px) {
	.project-x .px-ask { --edge: calc(var(--gutter) + max(0px, (100cqw - var(--wrap) - 2 * var(--gutter)) / 2)); padding-block: 72px; }
	.px-ask-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
	.px-ask h2 { font-size: 34px; }
	.px-ask-head::before { inset-block-end: calc(100% - 26px); }
	.px-ask-head::after { inset-block-start: 25px; }
	.px-ask-node { inset-block-start: 21px; }
}
@media (min-width: 1200px) { .project-x .px-ask { --cx: calc(var(--edge) - 3.333cqw); } }

/* Other works. */
.px-others { padding-block: 56px 72px; }
.px-others .band-head { margin-block-end: 24px; }
.px-others h2 { margin: 0; font-size: 26px; }
.px-others .band-link { display: inline-flex; align-items: center; min-height: 44px; }
.px-other-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.px-other-list .project-card { position: relative; display: flex; flex-direction: column; background: var(--white); }
.px-other-list .project-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; width: 56px; height: 4px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .2s var(--ease-out); pointer-events: none; }
.px-other-list .project-card:is(:hover, :focus-within)::before { transform: none; }
.px-other-list .project-card:has(:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.px-other-list .card-media { aspect-ratio: 16 / 10; margin: 0; overflow: hidden; }
.px-other-list .card-media img { object-fit: cover; }
.px-other-list .card-media figcaption { inset-block-end: 10px; inset-inline: auto 10px; padding: 3px 10px; }
.px-other-list .card-body { padding: 14px 0 18px; }
.px-other-list .card-title { font-size: 20px; }
.px-other-list .project-card.is-text { background: var(--primary); }
.px-other-list .is-text .card-body { padding: 24px; }
.px-other-list .is-text .card-title a, .px-other-list .is-text .card-text, .px-other-list .is-text .card-scope, .px-other-list .is-text .card-scope .label { color: var(--white); }
.px-other-list .is-text .card-meta, .px-other-list .is-text .card-more { color: #A9D4FF; }
@media (min-width: 768px) { .px-other-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } .px-other-list:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.project-x .back { padding-block: 24px 56px; }

@media (prefers-reduced-motion: no-preference) {
	.px-other-list .project-card:is(:hover, :focus-within) .card-more::after { transform: translateX(-5px); }
	@supports (animation-timeline: view()) {
		.px-rail { animation: px-down linear both; animation-timeline: --px; animation-range: cover 30vh cover calc(100% - 50vh); }
		.px-levels > *, .px-gallery li, .px-other-list > li { animation: px-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
		.px-ask-head::before { animation: px-down linear both; animation-timeline: --px-ask; animation-range: entry 0% entry 40%; }
		.px-ask-head::after { animation: px-across linear both; animation-timeline: --px-ask; animation-range: entry 40% entry 60%; }
		.px-ask-node { animation: px-node linear both; animation-timeline: --px-ask; animation-range: entry 36% entry 46%; }
		@keyframes px-down { from { transform: scaleY(0); } }
		@keyframes px-across { from { transform: scaleX(0); } }
		@keyframes px-node { from { opacity: 0; } }
		@keyframes px-rise { from { opacity: .35; translate: 0 20px; } }
	}
}
