/**
 * Parallax Portfolio
 *
 * 1.  Tokens
 * 2.  Base
 * 3.  Masthead
 * 4.  Reel and panels
 * 5.  Panel content
 * 6.  Buttons, rail
 * 7.  Single project
 * 8.  Archive, pages, prose
 * 9.  Footer
 * 10. Responsive
 * 11. Motion preferences
 */

/* ---------------------------------------------------------------- 1. Tokens */

:root {
	--pp-bg: #08080a;
	--pp-bg-soft: #101013;
	--pp-ink: #f4f1ea;
	--pp-muted: rgba(244, 241, 234, 0.58);
	--pp-faint: rgba(244, 241, 234, 0.34);
	--pp-line: rgba(244, 241, 234, 0.16);
	--pp-accent: #c9a227;

	--pp-serif: "Playfair Display", "Didot", "Bodoni MT", "Times New Roman", Georgia, serif;
	--pp-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Breathing room down either side of every frame. */
	--pp-gap: clamp(16px, 2.8vw, 52px);
	/* The constant separation between frames, like the space between the
	   frames of a film strip. Overridden by the Customizer. */
	--pp-frame-gap: clamp(14px, 2.2vw, 34px);
	/* Black margin down the right of the reel that the numbered rail sits in,
	   so it never overlaps the hero image. */
	--pp-rail-gutter: clamp(46px, 4.4vw, 82px);
	--pp-radius: clamp(10px, 1.5vw, 24px);
	--pp-pad: clamp(20px, 3.4vw, 56px);
	--pp-page-pad: clamp(20px, 6vw, 96px);
	--pp-masthead-h: 62px;

	/* Overwritten by the Customizer. */
	--pp-scrim: 0.55;

	color-scheme: dark;
}

/* ------------------------------------------------------------------ 2. Base */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--pp-bg);
	color: var(--pp-ink);
	font-family: var(--pp-sans);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

.pp-prose a {
	text-decoration: underline;
	text-decoration-color: var(--pp-accent);
	text-underline-offset: 0.22em;
}

h1,
h2,
h3,
h4 {
	font-family: var(--pp-serif);
	font-weight: 400;
	letter-spacing: -0.01em;
	margin: 0;
}

figure {
	margin: 0;
}

blockquote {
	margin: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	z-index: 999;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 18px;
	background: var(--pp-ink);
	color: var(--pp-bg);
	border-radius: 4px;
}

:focus-visible {
	outline: 1px solid var(--pp-accent);
	outline-offset: 3px;
}

/* -------------------------------------------------------------- 3. Masthead */

.pp-masthead {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 60;
	height: var(--pp-masthead-h);
	display: flex;
	align-items: center;
	pointer-events: none;
	transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* The strip scrolls under the masthead, so get it out of the way on the way
   down and bring it back the moment the reader scrolls up. */
.pp-masthead.is-tucked {
	transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
	.pp-masthead.is-tucked {
		transform: none;
	}
}

/* Content scrolls under the fixed masthead, so give it a soft ground of its
   own. It fades out well before the panel content starts. */
.pp-masthead::after {
	content: "";
	position: absolute;
	inset: 0 0 -38px 0;
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(8, 8, 10, 0.7), rgba(8, 8, 10, 0));
}

.pp-masthead__inner {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	/* Line the masthead up with the panel content inside the inset card. */
	padding-inline: calc(var(--pp-gap) + clamp(12px, 2vw, 30px));
}

.pp-masthead__brand,
.pp-nav,
.pp-masthead__toggle {
	pointer-events: auto;
}

.pp-masthead__title,
.pp-nav__list a {
	font-size: 11px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--pp-ink);
	opacity: 0.85;
	transition: opacity 0.3s ease;
}

.pp-masthead__title:hover,
.pp-nav__list a:hover {
	opacity: 1;
}

.pp-masthead .custom-logo {
	max-height: 34px;
	width: auto;
}

.pp-nav__list {
	display: flex;
	gap: clamp(16px, 2.4vw, 38px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pp-masthead__toggle {
	display: none;
	width: 40px;
	height: 40px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	gap: 6px;
}

.pp-masthead__toggle-bar {
	display: block;
	width: 22px;
	height: 1px;
	background: var(--pp-ink);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.pp-masthead__toggle[aria-expanded="true"] .pp-masthead__toggle-bar:first-child {
	transform: translateY(3.5px) rotate(45deg);
}

.pp-masthead__toggle[aria-expanded="true"] .pp-masthead__toggle-bar:last-child {
	transform: translateY(-3.5px) rotate(-45deg);
}

/* -------------------------------------------------------- 4. Reel and panels */

.pp-main {
	display: block;
}

/*
 * The reel is a film strip. Frames sit in the normal document flow, held a
 * constant distance apart, and the whole strip travels with the scroll. No
 * frame ever covers another; the only thing that moves independently is the
 * media inside each one.
 */
.pp-reel {
	position: relative;
	padding: var(--pp-frame-gap) 0;
}

.pp-panel {
	position: relative;
	height: calc(100vh - (var(--pp-frame-gap) * 2));
	height: calc(100svh - (var(--pp-frame-gap) * 2));
	display: block;
	margin-bottom: var(--pp-frame-gap);
}

.pp-panel:last-child {
	margin-bottom: 0;
}

.pp-panel__card {
	position: relative;
	height: 100%;
	margin: 0 var(--pp-gap);
	border-radius: var(--pp-radius);
	overflow: hidden;
	background: #000;
}

.pp-reel--railed .pp-panel__card {
	margin-right: var(--pp-rail-gutter);
}

/*
 * The media is taller than its frame and drifts inside it as the frame crosses
 * the screen, so the picture appears to travel at a different rate to the strip
 * carrying it. --pp-shift is that drift, in percent.
 */
.pp-panel__media {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(var(--pp-depth, 40) * -1%);
	height: calc(100% + var(--pp-depth, 40) * 2%);
	z-index: 1;
	transform: translate3d(0, calc(var(--pp-shift, 0) * 1%), 0);
	will-change: transform;
}

.pp-panel__img,
.pp-panel__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Added by parallax.js to a hero still downloading, and cleared once it has
   decoded, so a frame shows its picture whole or not at all. */
.pp-panel__img {
	transition: opacity 0.6s ease;
}

.pp-panel__img.is-loading {
	opacity: 0;
}

.pp-panel__video {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.9s ease;
}

.pp-panel__video.is-playing {
	opacity: 1;
}

.pp-panel--no-hero .pp-panel__card {
	background: linear-gradient(150deg, #16161a, #0b0b0d 60%);
}

/*
 * Smoothness.
 *
 * Where the browser supports scroll-driven animations, the drift is handed to
 * the compositor: it is then tied directly to scroll position, runs off the
 * main thread, and cannot be made to stutter by anything JavaScript is doing.
 * This is as smooth as the effect can get, and it keeps working with JS off.
 *
 * Browsers without it fall back to the eased JavaScript loop in parallax.js.
 *
 * Limited to pointer: fine deliberately. A view() timeline measures its range
 * against the viewport, and on a phone the address bar sliding in and out
 * changes the viewport height mid-scroll. That re-scales the range under a
 * frame that has not moved, and the picture lands somewhere new the moment
 * scrolling stops. Touch devices use the JavaScript path instead, which works
 * from a viewport height pinned at load and so ignores the address bar.
 */
@supports (animation-timeline: view()) {
	@media (pointer: fine) {
		.pp-panel,
		.pp-hero {
			view-timeline-name: --pp-frame;
			view-timeline-axis: block;
		}

		.pp-panel .pp-panel__media,
		.pp-hero .pp-panel__media {
			animation-name: pp-drift;
			animation-duration: auto;
			animation-timing-function: linear;
			animation-fill-mode: both;
			animation-timeline: --pp-frame;
			animation-range: cover 0% cover 100%;
		}

		.pp-panel .pp-panel__grid,
		.pp-hero .pp-panel__grid {
			animation-name: pp-drift-text;
			animation-duration: auto;
			animation-timing-function: linear;
			animation-fill-mode: both;
			animation-timeline: --pp-frame;
			animation-range: cover 0% cover 100%;
		}
	}

	/* Entering the screen through to leaving it: -depth to +depth. */
	@keyframes pp-drift {
		from {
			transform: translate3d(0, calc(var(--pp-depth, 40) * -1%), 0);
		}

		to {
			transform: translate3d(0, calc(var(--pp-depth, 40) * 1%), 0);
		}
	}

	/* The text is the near layer, so it runs the other way at a fraction of
	   the rate. 0.14 matches TEXT_RATIO in parallax.js. */
	@keyframes pp-drift-text {
		from {
			transform: translate3d(0, calc(var(--pp-depth, 40) * 0.14%), 0);
		}

		to {
			transform: translate3d(0, calc(var(--pp-depth, 40) * -0.14%), 0);
		}
	}
}

.pp-panel__scrim {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background:
		linear-gradient(
			100deg,
			rgba(0, 0, 0, calc(var(--pp-scrim) + 0.2)) 0%,
			rgba(0, 0, 0, calc(var(--pp-scrim) * 0.7)) 32%,
			rgba(0, 0, 0, 0) 62%
		),
		linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 46%),
		linear-gradient(to left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 26%);
}

/* ------------------------------------------------------- 5. Panel content */

.pp-panel__grid {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	grid-template-rows: auto 1fr auto;
	gap: clamp(14px, 2vw, 30px);
	padding: var(--pp-pad);
	padding-top: calc(var(--pp-masthead-h) + clamp(8px, 1.4vw, 22px));
	/* The text is the near layer. It drifts against the picture, which is what
	   actually reads as depth: two planes moving at different rates rather than
	   one flat photograph sliding about. */
	transform: translate3d(0, calc(var(--pp-text-shift, 0) * 1%), 0);
	will-change: transform;
}

.pp-panel__top {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(8px, 1vw, 14px);
}

.pp-panel__year {
	margin: 0;
	font-family: var(--pp-serif);
	font-style: italic;
	font-size: clamp(15px, 1.2vw, 19px);
	color: var(--pp-muted);
}

.pp-panel__labels {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pp-panel__labels li {
	font-size: 9.5px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-panel__badge img {
	width: clamp(78px, 7vw, 116px);
	height: auto;
	opacity: 0.92;
}

.pp-panel__lead {
	grid-column: 1;
	grid-row: 3;
	align-self: end;
	max-width: 46ch;
}

.pp-panel__eyebrow {
	margin: 0 0 clamp(10px, 1.4vw, 18px);
	font-size: 10px;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--pp-muted);
}

.pp-panel__title {
	font-family: var(--pp-serif);
	font-size: clamp(2.9rem, 6.6vw, 6.4rem);
	line-height: 0.92;
	letter-spacing: -0.015em;
	text-transform: uppercase;
	margin: 0;
	text-wrap: balance;
	text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}

.pp-panel__title a {
	transition: opacity 0.3s ease;
}

.pp-panel__title a:hover {
	opacity: 0.78;
}

.pp-credits {
	margin: clamp(16px, 2vw, 26px) 0 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.pp-credits__row {
	display: flex;
	gap: clamp(10px, 1.2vw, 18px);
	align-items: baseline;
}

.pp-credits dt {
	min-width: 8.5ch;
	font-size: 9.5px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-credits dd {
	margin: 0;
	font-size: 10.5px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--pp-muted);
}

/* Right-hand column. */

.pp-panel__aside {
	grid-column: 2;
	grid-row: 2;
	align-self: center;
	justify-self: end;
	text-align: right;
	max-width: 30ch;
}

.pp-highlights {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: clamp(18px, 2.4vw, 34px);
}

.pp-highlight {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-end;
}

.pp-stars {
	font-size: 11px;
	letter-spacing: 0.4em;
	color: var(--pp-ink);
	opacity: 0.9;
	/* Trailing letter-spacing would push the group off the right edge. */
	margin-right: -0.4em;
}

.pp-highlight__label {
	margin: 0;
	font-size: 9px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-highlight__quote {
	font-family: var(--pp-serif);
	font-style: italic;
	font-size: clamp(15px, 1.5vw, 21px);
	line-height: 1.3;
	color: var(--pp-ink);
	text-wrap: balance;
}

.pp-highlight__quote::before {
	content: "\201C";
}

.pp-highlight__quote::after {
	content: "\201D";
}

/* ------------------------------------------------------- 6. Buttons, rail */

.pp-panel__action {
	grid-column: 2;
	grid-row: 3;
	justify-self: end;
	align-self: end;
}

.pp-button {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: clamp(12px, 1.3vw, 17px) clamp(22px, 2.4vw, 34px);
	border: 1px solid rgba(244, 241, 234, 0.4);
	border-radius: 999px;
	font-size: 10px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--pp-ink);
	background: rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(3px);
	transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.pp-button:hover {
	background: var(--pp-ink);
	border-color: var(--pp-ink);
	color: #0a0a0b;
}

.pp-button__arrow {
	overflow: visible;
	transition: transform 0.35s ease;
}

.pp-button:hover .pp-button__arrow {
	transform: translateX(4px);
}

.pp-button--solid {
	background: var(--pp-ink);
	color: #0a0a0b;
}

.pp-button--solid:hover {
	background: var(--pp-accent);
	border-color: var(--pp-accent);
	color: #0a0a0b;
}

/* The numbered rail. */

/* Sits centred in the black gutter to the right of the panels. */
.pp-rail {
	position: fixed;
	right: 0;
	width: var(--pp-rail-gutter);
	top: 50%;
	transform: translateY(-50%);
	z-index: 55;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	transition: opacity 0.4s ease;
}

.pp-rail.is-hidden {
	opacity: 0;
	pointer-events: none;
}

.pp-rail__num {
	font-family: var(--pp-serif);
	font-size: 10px;
	letter-spacing: 0.16em;
	color: rgba(244, 241, 234, 0.65);
}

.pp-rail__dots {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 11px;
}

.pp-rail__dot {
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: rgba(244, 241, 234, 0.3);
	transition: background-color 0.35s ease, transform 0.35s ease;
}

.pp-rail__dot:hover {
	background: rgba(244, 241, 234, 0.7);
}

.pp-rail__dot.is-active {
	background: var(--pp-ink);
	transform: scale(1.5);
}

/* ------------------------------------------------------- 7. Single project */

.pp-hero {
	position: relative;
	height: 100vh;
	height: 100svh;
}

.pp-project-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 100px);
	padding: clamp(56px, 9vw, 140px) var(--pp-page-pad);
	max-width: 1600px;
	margin: 0 auto;
}

.pp-project-body--single {
	grid-template-columns: minmax(0, 74ch);
	justify-content: center;
}

.pp-project-body__sticky {
	position: sticky;
	top: calc(var(--pp-masthead-h) + clamp(20px, 4vw, 56px));
}

.pp-project__standfirst {
	margin: 0 0 clamp(24px, 3vw, 40px);
	font-family: var(--pp-serif);
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	line-height: 1.35;
	color: var(--pp-ink);
	text-wrap: pretty;
}

.pp-project__terms {
	margin: clamp(28px, 4vw, 48px) 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pp-project__terms a {
	padding: 7px 15px;
	border: 1px solid var(--pp-line);
	border-radius: 999px;
	font-size: 9.5px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--pp-muted);
	transition: color 0.3s ease, border-color 0.3s ease;
}

.pp-project__terms a:hover {
	color: var(--pp-ink);
	border-color: var(--pp-accent);
}

.pp-project-body__media {
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 3vw, 44px);
}

.pp-figure__img {
	width: 100%;
	height: auto;
	border-radius: calc(var(--pp-radius) * 0.55);
}

.pp-figure__caption,
.pp-project-body__media .wp-caption-text {
	margin: 12px 0 0;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-video {
	position: relative;
	border-radius: calc(var(--pp-radius) * 0.55);
	overflow: hidden;
	background: #000;
}

/* A native player. Where the file's size is known its width and height
   attributes reserve the space before anything loads; otherwise assume 16:9
   until the video reports its own shape. */
.pp-video__player {
	display: block;
	width: 100%;
	height: auto;
	background: #000;
}

.pp-video__player:not([width]) {
	aspect-ratio: auto 16 / 9;
}

.pp-video--embed iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

.pp-project-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: var(--pp-line);
	border-top: 1px solid var(--pp-line);
}

.pp-project-nav__link {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: clamp(32px, 5vw, 72px) var(--pp-page-pad);
	background: var(--pp-bg);
	transition: background-color 0.35s ease;
}

.pp-project-nav__link:hover {
	background: var(--pp-bg-soft);
}

.pp-project-nav__link--next {
	text-align: right;
	align-items: flex-end;
}

.pp-project-nav__label {
	font-size: 9.5px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-project-nav__title {
	font-family: var(--pp-serif);
	font-size: clamp(1.3rem, 3vw, 2.4rem);
	line-height: 1.05;
	text-transform: uppercase;
}

/* ------------------------------------------- 8. Archive, pages, prose */

.pp-archive,
.pp-page,
.pp-outro__inner,
.pp-empty__inner {
	max-width: 1500px;
	margin: 0 auto;
	padding: calc(var(--pp-masthead-h) + clamp(48px, 9vw, 140px)) var(--pp-page-pad) clamp(64px, 10vw, 150px);
}

.pp-page {
	max-width: 82ch;
}

.pp-page--center {
	text-align: center;
}

.pp-archive__eyebrow,
.pp-empty__eyebrow {
	margin: 0 0 14px;
	font-size: 10px;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--pp-muted);
}

.pp-archive__title,
.pp-page__title,
.pp-empty__title,
.pp-outro__title {
	font-family: var(--pp-serif);
	font-size: clamp(2.2rem, 5.5vw, 4.6rem);
	line-height: 1;
	text-transform: uppercase;
	margin: 0 0 clamp(20px, 3vw, 36px);
}

.pp-outro__title {
	max-width: 22ch;
}

.pp-outro__text {
	max-width: 62ch;
	color: var(--pp-muted);
	margin-bottom: clamp(24px, 3vw, 40px);
}

.pp-empty__text {
	max-width: 52ch;
	color: var(--pp-muted);
	margin-bottom: clamp(24px, 3vw, 40px);
}

/* Year filter above the grid. */

.pp-years {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(10px, 1.4vw, 20px);
	align-items: baseline;
	margin-top: clamp(28px, 4vw, 44px);
	padding-bottom: clamp(16px, 2vw, 24px);
	border-bottom: 1px solid var(--pp-line);
}

.pp-years__link {
	font-size: 10px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--pp-faint);
	padding-bottom: 3px;
	border-bottom: 1px solid transparent;
	transition: color 0.3s ease, border-color 0.3s ease;
}

.pp-years__link:hover {
	color: var(--pp-ink);
}

.pp-years__link.is-active {
	color: var(--pp-ink);
	border-bottom-color: var(--pp-accent);
}

/* The run of text-only projects at the foot of the index. */

.pp-text-index {
	margin-top: clamp(48px, 7vw, 96px);
	padding-top: clamp(28px, 4vw, 48px);
	border-top: 1px solid var(--pp-line);
}

.pp-text-index__title {
	margin: 0 0 clamp(14px, 2vw, 22px);
	font-size: 10px;
	font-family: var(--pp-sans);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--pp-muted);
}

.pp-text-index__list {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px clamp(10px, 1.4vw, 18px);
	line-height: 1.9;
}

.pp-text-index__link {
	font-family: var(--pp-serif);
	font-size: clamp(1rem, 1.5vw, 1.25rem);
	color: var(--pp-muted);
	border-bottom: 1px solid transparent;
	transition: color 0.3s ease, border-color 0.3s ease;
}

.pp-text-index__link:hover {
	color: var(--pp-ink);
	border-bottom-color: var(--pp-accent);
}

/* A project listed by name only, with nothing to click. */
.pp-text-index__item {
	font-family: var(--pp-serif);
	font-size: clamp(1rem, 1.5vw, 1.25rem);
	color: var(--pp-faint);
}

.pp-text-index__sep {
	color: var(--pp-faint);
	opacity: 0.5;
	user-select: none;
}

.pp-grid-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
	gap: clamp(22px, 3vw, 46px) clamp(18px, 2.2vw, 34px);
	margin-top: clamp(32px, 5vw, 64px);
}

/* The same rounded mask as the reel panels, at a smaller scale. */
.pp-card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: calc(var(--pp-radius) * 0.7);
	background: var(--pp-bg-soft);
}

.pp-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 55%);
	opacity: 0.9;
	transition: opacity 0.5s ease;
}

.pp-card__link:hover .pp-card__media::after {
	opacity: 0.5;
}

.pp-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pp-card__link:hover .pp-card__img {
	transform: scale(1.045);
}

.pp-card__body {
	padding: 18px 2px 0;
}

.pp-card__eyebrow {
	margin: 0 0 8px;
	font-size: 9.5px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-card__title {
	font-family: var(--pp-serif);
	font-size: clamp(1.3rem, 2vw, 1.8rem);
	line-height: 1.1;
	text-transform: uppercase;
}

.pp-card__year {
	margin: 8px 0 0;
	font-family: var(--pp-serif);
	font-style: italic;
	font-size: 14px;
	color: var(--pp-faint);
}

.pp-prose {
	color: rgba(244, 241, 234, 0.82);
	font-size: 1.0625rem;
	line-height: 1.75;
}

.pp-prose > * + * {
	margin-top: 1.3em;
}

.pp-prose h2,
.pp-prose h3 {
	margin-top: 2em;
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	line-height: 1.15;
	color: var(--pp-ink);
}

.pp-prose h3 {
	font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.pp-prose img,
.pp-prose video {
	border-radius: calc(var(--pp-radius) * 0.5);
}

.pp-prose blockquote {
	padding-left: clamp(18px, 2.4vw, 32px);
	border-left: 1px solid var(--pp-accent);
	font-family: var(--pp-serif);
	font-style: italic;
	font-size: 1.3em;
	line-height: 1.4;
	color: var(--pp-ink);
}

.pp-prose figcaption {
	margin-top: 10px;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-list {
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 4vw, 52px);
	margin-top: clamp(32px, 5vw, 56px);
}

.pp-list__title {
	font-size: clamp(1.4rem, 3vw, 2.2rem);
	line-height: 1.1;
}

.pp-list__meta,
.pp-page__meta {
	margin: 8px 0 0;
	font-size: 10px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-list__excerpt {
	color: var(--pp-muted);
	margin-top: 12px;
}

.pp-page__figure {
	margin: clamp(28px, 4vw, 48px) 0;
}

.pp-page__figure img {
	border-radius: calc(var(--pp-radius) * 0.55);
}

.pagination,
.pp-page-links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: clamp(40px, 6vw, 72px);
	font-size: 10px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
}

.pagination .page-numbers {
	padding: 9px 15px;
	border: 1px solid var(--pp-line);
	border-radius: 999px;
	color: var(--pp-muted);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
	color: var(--pp-ink);
	border-color: var(--pp-accent);
}

.pp-empty {
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	place-items: center;
	text-align: center;
}

.pp-outro {
	position: relative;
	z-index: 10;
	background: var(--pp-bg);
	border-top: 1px solid var(--pp-line);
}

.search-form {
	display: flex;
	gap: 10px;
	margin-top: 32px;
	justify-content: center;
}

.search-form input[type="search"] {
	padding: 12px 16px;
	background: transparent;
	border: 1px solid var(--pp-line);
	border-radius: 999px;
	color: var(--pp-ink);
	font-family: inherit;
}

.search-form button {
	padding: 12px 22px;
	border: 1px solid var(--pp-line);
	border-radius: 999px;
	background: transparent;
	color: var(--pp-ink);
	font-size: 10px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	cursor: pointer;
}

/* Comments */

.pp-comments {
	max-width: 74ch;
	margin: clamp(48px, 7vw, 96px) auto 0;
	padding: clamp(32px, 5vw, 56px) 0 0;
	border-top: 1px solid var(--pp-line);
}

.pp-comments__title {
	font-size: clamp(1.2rem, 2.4vw, 1.7rem);
	margin-bottom: 24px;
}

.pp-comments__list {
	list-style: none;
	margin: 0 0 40px;
	padding: 0;
}

.pp-comments__list ol {
	list-style: none;
	padding-left: clamp(16px, 3vw, 34px);
}

.pp-comments__list .comment-body {
	padding: 20px 0;
	border-bottom: 1px solid var(--pp-line);
	color: var(--pp-muted);
}

.pp-comments__list .fn {
	color: var(--pp-ink);
	font-style: normal;
}

.pp-comments__list .comment-metadata {
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-comments input[type="text"],
.pp-comments input[type="email"],
.pp-comments input[type="url"],
.pp-comments textarea {
	width: 100%;
	padding: 12px 14px;
	background: transparent;
	border: 1px solid var(--pp-line);
	border-radius: 8px;
	color: var(--pp-ink);
	font-family: inherit;
	font-size: 15px;
}

.pp-comments .submit {
	padding: 14px 30px;
	background: transparent;
	border: 1px solid rgba(244, 241, 234, 0.4);
	border-radius: 999px;
	color: var(--pp-ink);
	font-size: 10px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.35s ease, color 0.35s ease;
}

.pp-comments .submit:hover {
	background: var(--pp-ink);
	color: #0a0a0b;
}

/* ---------------------------------------------------------------- 9. Footer */

.pp-footer {
	position: relative;
	z-index: 10;
	background: var(--pp-bg);
	border-top: 1px solid var(--pp-line);
}

.pp-footer__inner {
	max-width: 1500px;
	margin: 0 auto;
	padding: clamp(40px, 6vw, 72px) var(--pp-page-pad);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	font-size: 10px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--pp-faint);
}

.pp-footer__brand {
	margin: 0;
	color: var(--pp-muted);
}

.pp-footer__copy {
	margin: 0;
}

.pp-footer__list {
	display: flex;
	gap: clamp(14px, 2vw, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pp-footer__list a:hover {
	color: var(--pp-ink);
}

/* ----------------------------------------------------------- 10. Responsive */

@media (max-width: 1100px) {
	.pp-panel__aside {
		max-width: 24ch;
	}
}

@media (max-width: 900px) {
	:root {
		--pp-masthead-h: 56px;
	}

	/* No rail on small screens, so the gutter goes back to the normal inset. */
	.pp-reel--railed .pp-panel__card {
		margin-right: var(--pp-gap);
	}

	.pp-panel__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto 1fr auto auto auto;
	}

	.pp-panel__top {
		grid-column: 1;
		grid-row: 1;
	}

	.pp-panel__lead {
		grid-column: 1;
		grid-row: 3;
		max-width: none;
	}

	.pp-panel__aside {
		grid-column: 1;
		grid-row: 4;
		justify-self: start;
		text-align: left;
		max-width: none;
		margin-top: clamp(18px, 4vw, 28px);
	}

	.pp-highlights {
		flex-direction: row;
		flex-wrap: wrap;
		gap: clamp(16px, 4vw, 28px);
	}

	.pp-highlight {
		align-items: flex-start;
	}

	.pp-stars {
		margin-right: 0;
	}

	.pp-panel__action {
		grid-column: 1;
		grid-row: 5;
		justify-self: start;
		margin-top: clamp(16px, 3vw, 24px);
	}

	.pp-panel__badge img {
		width: 72px;
	}

	.pp-rail {
		display: none;
	}

	.pp-project-body,
	.pp-project-body--single {
		grid-template-columns: minmax(0, 1fr);
	}

	.pp-project-body__sticky {
		position: static;
	}

	.pp-project-nav {
		grid-template-columns: 1fr;
	}

	.pp-project-nav__link--next {
		text-align: left;
		align-items: flex-start;
	}

	/* Mobile menu. */
	.pp-masthead__toggle {
		display: flex;
	}

	.pp-nav {
		position: fixed;
		inset: 0;
		display: grid;
		place-items: center;
		background: rgba(8, 8, 10, 0.96);
		backdrop-filter: blur(8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.35s ease, visibility 0.35s ease;
	}

	.pp-nav.is-open {
		opacity: 1;
		visibility: visible;
	}

	.pp-nav__list {
		flex-direction: column;
		align-items: center;
		gap: 26px;
	}

	.pp-nav__list a {
		font-size: 13px;
	}
}

@media (max-width: 560px) {
	.pp-panel__title {
		font-size: clamp(2.2rem, 11vw, 3.4rem);
	}

	.pp-credits__row {
		flex-direction: column;
		gap: 2px;
	}

	.pp-footer__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* --------------------------------------------------- 11. Motion preferences */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.pp-panel__media,
	.pp-panel__grid {
		transform: none !important;
		animation: none !important;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
