/* Viewport — page-level layouts: stage, watch, comic, reader. See DESIGN.md. */

/* ---- home stage: the one place with depth ------------------------------------------- */
.vp-stage {
	position: relative;
	overflow: hidden;
	background: var(--floor);
	border-bottom: 1px solid var(--line);
}
/* Grid floor receding to a horizon, like an empty 3D viewport. */
.vp-stage__floor {
	position: absolute;
	inset: 38% -50% -60% -50%;
	background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: var(--s-7) var(--s-7);
	background-position: center top;
	transform: perspective(40rem) rotateX(66deg);
	transform-origin: center top;
	-webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
	mask-image: linear-gradient(to bottom, transparent, #000 35%);
	opacity: 0.7;
}
/* World axes on the floor: X runs across, Z runs into the distance. */
.vp-stage__floor::before,
.vp-stage__floor::after {
	content: "";
	position: absolute;
}
.vp-stage__floor::before {
	inset: calc(var(--s-7) * 2) 0 auto 0;
	height: 2px;
	background: var(--x);
}
.vp-stage__floor::after {
	inset: 0 auto 0 50%;
	width: 2px;
	background: var(--z);
}
.vp-stage__in {
	position: relative;
	display: grid;
	gap: var(--s-6);
	padding-block: var(--s-7);
	align-items: center;
}
@media (min-width: 1024px) {
	.vp-stage__in {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		gap: var(--s-8);
		padding-block: var(--s-8);
	}
}
/* Extruded heading. */
.vp-stage__title {
	font-size: clamp(var(--t-4xl), 13vw, 7.5rem);
	font-stretch: 125%;
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.04em;
	/* Leans forward like the logo's wordmark; the extrusion uses the three pinks of the logo's horns. */
	transform: skewX(-8deg);
	transform-origin: left bottom;
	text-shadow:
		1px 1px 0 var(--brand-hi), 2px 2px 0 var(--brand-hi), 3px 3px 0 var(--brand-hi),
		4px 4px 0 var(--brand), 5px 5px 0 var(--brand), 6px 6px 0 var(--brand),
		7px 7px 0 var(--brand-lo), 8px 8px 0 var(--brand-lo), 9px 9px 0 var(--brand-lo);
	padding-bottom: 9px;
}
.vp-stage__lead {
	margin-top: var(--s-5);
	max-width: 44ch;
	color: var(--ink-2);
	font-size: var(--t-lg);
	line-height: 1.4;
}
.vp-stage__axes {
	display: grid;
	margin-top: var(--s-6);
	border-top: 1px solid var(--line);
}
.vp-stage__axes a {
	display: grid;
	grid-template-columns: 3.5rem 5rem auto 1fr;
	align-items: baseline;
	gap: var(--s-3);
	padding-block: var(--s-3);
	border-bottom: 1px solid var(--line);
}
.vp-stage__axes strong {
	font-size: var(--t-lg);
	font-stretch: 125%;
	font-weight: 800;
}
.vp-stage__axes .vp-data {
	font-size: var(--t-lg);
}
.vp-stage__axes a:hover {
	border-bottom-color: var(--axis);
}
.vp-stage__axes a:hover strong {
	color: var(--axis);
}
/* Featured media plane: stands in the viewport and turns toward the pointer. */
.vp-stage__plane {
	position: relative;
	display: block;
	border-radius: var(--radius);
	outline: 1px solid var(--line);
	transform: perspective(60rem) rotateY(var(--ry, -9deg)) rotateX(var(--rx, 3deg));
	transform-style: preserve-3d;
	transition: transform 0.25s var(--ease);
	will-change: transform;
}
.vp-stage__plane img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius);
	background: var(--panel);
}
.vp-stage__cap {
	position: absolute;
	inset: auto 0 0 0;
	display: grid;
	gap: 2px;
	padding: var(--s-3) var(--s-4);
	background: var(--floor);
	border-top: 2px solid var(--axis);
	border-radius: 0 0 var(--radius) var(--radius);
	font-size: var(--t-sm);
}
.vp-stage__cap strong {
	font-size: var(--t-md);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* Load moment: the plane arrives as a wireframe, then shades in. */
@media (prefers-reduced-motion: no-preference) {
	.vp-stage__plane {
		animation: vp-wire 0.9s var(--ease) both;
	}
	.vp-stage__plane img {
		animation: vp-shade 0.9s 0.35s var(--ease) both;
	}
	.vp-stage__floor {
		animation: vp-floor 1.1s var(--ease) both;
	}
}
@keyframes vp-wire {
	from {
		outline-color: var(--ink);
		transform: perspective(60rem) rotateY(-28deg) rotateX(8deg) translateZ(-4rem);
	}
}
@keyframes vp-shade {
	from {
		opacity: 0;
	}
}
@keyframes vp-floor {
	from {
		opacity: 0;
		background-size: var(--s-8) var(--s-8);
	}
}
@media (max-width: 1023px) {
	.vp-stage__plane {
		--ry: 0deg;
		--rx: 0deg;
	}
}

.vp-cols {
	display: grid;
	gap: var(--s-7);
}
@media (min-width: 1024px) {
	.vp-cols {
		grid-template-columns: 1fr 1fr;
	}
}
.vp-index--half {
	columns: 2;
}
@media (min-width: 600px) {
	.vp-index--half {
		columns: 3;
	}
}
@media (min-width: 1024px) {
	.vp-prose--cols {
		max-width: none;
		columns: 2;
		column-gap: var(--s-7);
	}
	.vp-prose--cols > * {
		break-inside: avoid;
	}
	.vp-prose--cols h3:first-of-type {
		margin-top: 0;
		break-before: column;
	}
}

/* ---- watch / look: single video, loop or render ----------------------------------------- */
.vp-stagebox {
	background: var(--floor);
	border-bottom: 2px solid var(--axis);
}
.vp-player {
	display: grid;
	place-items: center;
	max-width: var(--page);
	margin-inline: auto;
}
.vp-player video,
.vp-player img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(78vh, calc(100vw / var(--r, 1.7778)));
	aspect-ratio: var(--r, 1.7778);
	background: #000;
}
.vp-z .vp-player img {
	max-height: none;
	width: min(100%, calc(92vh * var(--r, 1)));
}
.vp-watch {
	display: grid;
	gap: var(--s-7);
	padding-top: var(--s-5);
}
@media (min-width: 1024px) {
	.vp-watch {
		grid-template-columns: minmax(0, 1fr) 24rem;
		gap: var(--s-6);
	}
	.vp-watch__side .vp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--s-4) var(--s-3);
	}
}
.vp-watch__main > * + * {
	margin-top: var(--s-4);
}
.vp-watch__title {
	font-size: clamp(var(--t-xl), 3.4vw, var(--t-2xl));
	font-stretch: 112%;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin-top: var(--s-2);
}
.vp-watch__h {
	font-size: var(--t-md);
	font-weight: 700;
	margin-top: var(--s-5);
}
.vp-watch .vp-facts {
	padding-block: var(--s-4);
	border-block: 1px solid var(--line);
}
.vp-pager--edge {
	justify-content: flex-start;
	margin-top: var(--s-5);
}
.vp-watch__report {
	font-size: var(--t-sm);
}

/* ---- comic ------------------------------------------------------------------------------------ */
.vp-comic {
	display: grid;
	gap: var(--s-5);
	padding-top: var(--s-5);
}
@media (min-width: 768px) {
	.vp-comic {
		grid-template-columns: 18rem minmax(0, 1fr);
		gap: var(--s-7);
		padding-top: var(--s-6);
	}
}
.vp-comic__cover {
	max-width: 14rem;
}
@media (min-width: 768px) {
	.vp-comic__cover {
		max-width: none;
	}
}
.vp-comic__cover img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	background: var(--panel);
	border-radius: var(--radius);
	border-left: 2px solid var(--y);
}
.vp-comic__body > * + * {
	margin-top: var(--s-4);
}
.vp-comic__title {
	font-size: clamp(var(--t-xl), 4vw, var(--t-3xl));
}
.vp-comic__cta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-3);
}
.vp-chapters {
	border-top: 1px solid var(--line);
}
.vp-chapters a {
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr) auto;
	gap: var(--s-3);
	align-items: baseline;
	padding: var(--s-3) var(--s-2);
	border-bottom: 1px solid var(--line);
}
.vp-chapters a:hover,
.vp-chapters a[aria-current="page"] {
	background: var(--panel);
	box-shadow: inset 2px 0 0 var(--y);
}
.vp-chapters a > .vp-data:first-child {
	color: var(--y);
}

/* ---- reader ------------------------------------------------------------------------------------- */
.vp-reader {
	background: var(--floor);
}
.vp-reader__bar {
	position: sticky;
	top: var(--bar-h);
	z-index: 40;
	height: 3px;
	background: var(--line);
}
.vp-reader__progress {
	display: block;
	height: 100%;
	background: var(--y);
	transform-origin: left;
	transform: scaleX(var(--p, 0));
}
.vp-reader__head {
	padding-block: var(--s-5);
}
.vp-reader__head > * + * {
	margin-top: var(--s-2);
}
.vp-reader__title {
	font-size: var(--t-xl);
	font-stretch: 112%;
	font-weight: 800;
	line-height: 1.2;
}
.vp-reader__picker {
	margin-top: var(--s-4);
	max-width: 40rem;
}
.vp-reader__picker summary {
	cursor: pointer;
	padding: var(--s-2) 0;
	font-weight: 600;
}
.vp-reader__picker .vp-chapters {
	max-height: 50vh;
	overflow: auto;
}
.vp-reader__pages {
	display: grid;
	justify-items: center;
	max-width: 60rem;
	margin-inline: auto;
}
.vp-reader__pages img,
.vp-reader__pages video {
	width: 100%;
	min-height: 12rem;
	background: var(--bg);
}
.vp-reader .vp-pager {
	padding-block: var(--s-7);
	margin-top: 0;
}
