/* Design 2, Poster: a wall of posters. Colour blocks, giant condensed capitals, cut-out art. */

:root {
	--red: #C13E2D;
	--indigo: #34299B;
	--butter: #F4EEA2;
	--ink: #1E1E1E;
	--paper: #FFFFF8;
	--display: "Anybody", "Arial Narrow", Arial, sans-serif;
	--serif: "Newsreader", Georgia, serif;
	--slant: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
	--pad: clamp(18px, 5vw, 84px);
}
*,
*::before,
*::after {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.5;
	overflow-x: hidden;
	-webkit-text-size-adjust: 100%;
}
img {
	display: block;
	max-width: 100%;
	height: auto;
}
a {
	color: inherit;
}
:focus-visible {
	outline: 3px solid var(--butter);
	outline-offset: 3px;
}
.defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}
.tiles {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom left, #000, rgb(0 0 0 / 0.45) 28%, transparent 58%);
	mask-image: linear-gradient(to bottom left, #000, rgb(0 0 0 / 0.45) 28%, transparent 58%);
}
.art {
	position: relative;
	isolation: isolate;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	container-type: size;
	background: var(--art-bg);
}
.art .tiles {
	-webkit-mask-image: none;
	mask-image: none;
	opacity: 0.8;
}
.art__label {
	position: absolute;
	bottom: max(10px, 12cqh);
	left: max(10px, 16cqw);
	color: var(--art-text);
	font-family: var(--display);
	font-size: clamp(14px, min(12cqw, 20cqh), 92px);
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.9;
	text-transform: uppercase;
}
.art__marker {
	display: block;
	width: 0.6em;
	height: 0.55em;
	margin-bottom: 0.22em;
	background: var(--art-marker);
	clip-path: polygon(33% 0, 100% 0, 67% 100%, 0 100%);
}
/* A drawn picture for a sample story (compositionArt in redesign/lib/art.mjs). */
.art--drawn svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* The red top: the guide's reversed wordmark, full width */
.ps-top {
	position: relative;
	z-index: 1;
	isolation: isolate;
	display: grid;
	justify-items: center;
	gap: 22px;
	padding: 26px var(--pad) 64px;
	background: var(--red);
	color: var(--paper);
}
.ps-date {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 4px 14px;
	margin: 0;
	font-family: var(--display);
	font-size: 0.8rem;
	font-weight: 600;
	font-stretch: 112%;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.ps-date__dot {
	width: 9px;
	height: 9px;
	background: var(--butter);
	clip-path: polygon(33% 0, 100% 0, 67% 100%, 0 100%);
}
.ps-mark,
.ps-bar__mark,
.ps-foot__mark {
	display: block;
	line-height: 0;
}
.ps-mark {
	width: min(100%, 1180px);
}
.ps-mark svg,
.ps-bar__mark svg,
.ps-foot__mark svg {
	width: 100%;
	height: auto;
}
.ps-mark .wm-polity,
.ps-bar__mark .wm-polity,
.sticky-bar__mark .wm-polity {
	fill: var(--paper);
}
.ps-mark .wm-weekly,
.ps-bar__mark .wm-weekly,
.sticky-bar__mark .wm-weekly {
	fill: var(--butter);
}
.ps-nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ps-nav a {
	position: relative;
	isolation: isolate;
	display: block;
	padding: 8px 20px;
	font-family: var(--display);
	font-size: 0.95rem;
	font-weight: 700;
	font-stretch: 105%;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
}
.ps-nav a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	clip-path: var(--slant);
}
.ps-nav a:hover,
.ps-nav a[aria-current="page"] {
	color: var(--ink);
}
.ps-nav a:hover::before,
.ps-nav a[aria-current="page"]::before {
	background: var(--butter);
}
/* The sticky bar (src/styles/menu.css), in the red of the top */
:root {
	--sticky-bar-bg: var(--red);
	--sticky-bar-fg: var(--paper);
	--sticky-bar-rule: 0;
	--sticky-bar-pad: var(--pad);
}
.ps-sticker {
	position: absolute;
	top: 0;
	left: 50%;
	z-index: 5;
	margin: 0;
	padding: 14px 34px;
	background: var(--butter);
	color: var(--ink);
	clip-path: var(--slant);
	font-family: var(--display);
	font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.25rem);
	font-weight: 900;
	font-stretch: 90%;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	transform: translate(-50%, -50%) rotate(-3deg);
}
#main {
	position: relative;
}
.ps-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	padding: 14px var(--pad);
	background: var(--red);
	color: var(--paper);
}
.ps-bar__mark {
	width: 200px;
}
.ps-bar .ps-nav a {
	padding: 6px 14px;
	font-size: 0.8rem;
}

/* A poster */
.poster {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	align-items: center;
	column-gap: 24px;
	min-height: min(100svh, 960px);
	padding: clamp(56px, 7vw, 110px) var(--pad);
	overflow: hidden;
	background: var(--bg);
	color: var(--fg);
}
.poster__text {
	position: relative;
	z-index: 2;
	grid-row: 1;
	grid-column: 1 / span 7;
}
/* The drift holds the art's place and does the drifting and turning; the art keeps its own angle. */
.poster__drift {
	position: relative;
	z-index: 1;
	grid-row: 1;
	grid-column: 8 / span 5;
}
.poster__art {
	position: relative;
	display: block;
}
.poster--left .poster__text {
	grid-column: 6 / span 7;
}
.poster--left .poster__drift {
	grid-column: 1 / span 5;
}
.poster > .tiles {
	opacity: 0.75;
}
.poster__art img,
.poster__art .art {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.poster--circle .poster__art {
	aspect-ratio: 1;
	clip-path: circle(50%);
}
.poster--slant .poster__art {
	aspect-ratio: 4 / 5;
	clip-path: polygon(24% 0, 100% 0, 76% 100%, 0 100%);
}
.poster--pasted .poster__art {
	aspect-ratio: 4 / 3;
	padding: 12px;
	background: var(--paper);
	box-shadow: 0 22px 44px rgb(0 0 0 / 0.35);
	rotate: 3deg;
}
.poster--pasted.poster--left .poster__art {
	rotate: -3deg;
}
.poster--pasted .poster__art::before,
.poster--pasted .poster__art::after {
	content: "";
	position: absolute;
	z-index: 2;
	width: 120px;
	height: 30px;
	background: rgb(244 238 162 / 0.85);
}
.poster--pasted .poster__art::before {
	top: -12px;
	left: 12%;
	rotate: -6deg;
}
.poster--pasted .poster__art::after {
	right: 10%;
	bottom: -12px;
	rotate: 4deg;
}
.poster__num {
	position: absolute;
	right: -1vw;
	bottom: -7vw;
	z-index: -1;
	color: var(--fg);
	font-family: var(--display);
	font-size: 34vw;
	font-weight: 900;
	font-stretch: 70%;
	line-height: 1;
	opacity: 0.07;
}
.poster--right .poster__num {
	right: auto;
	left: -1vw;
}
.poster__tag {
	display: inline-block;
	margin: 0 0 18px;
	padding: 8px 22px;
	background: var(--accent);
	color: var(--bg);
	clip-path: var(--slant);
	font-family: var(--display);
	font-size: 0.9rem;
	font-weight: 800;
	font-stretch: 110%;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	--rest-rotate: -2deg;
	rotate: var(--rest-rotate);
}
.poster__tag a {
	text-decoration: none;
}
.poster__hl {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(2.5rem, 0.9rem + 5.4vw, 7rem);
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.86;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	text-wrap: balance;
}
.poster__hl a {
	text-decoration: none;
}
.poster__hl a:hover {
	text-decoration: underline;
	text-decoration-thickness: 0.06em;
	text-underline-offset: 0.08em;
}
.poster__stand {
	max-width: 32em;
	margin: 22px 0 0;
	font-size: clamp(1.1rem, 1rem + 0.4vw, 1.4rem);
	line-height: 1.35;
}
.poster__by {
	margin: 14px 0 0;
	font-family: var(--display);
	font-size: 0.82rem;
	font-weight: 700;
	font-stretch: 110%;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* The quote poster: giant marks, the cut-out photo, the quote set big */
.poster--quote {
	align-items: end;
	padding-bottom: 0;
}
.poster__photo {
	grid-row: 1;
	grid-column: 8 / span 5;
	align-self: end;
	width: 100%;
}
.poster__q {
	position: relative;
	grid-row: 1;
	grid-column: 1 / span 8;
	align-self: center;
	margin: 0;
	padding-bottom: clamp(40px, 6vw, 96px);
}
.poster__q::before {
	content: "“";
	position: absolute;
	top: -0.42em;
	left: -0.06em;
	color: var(--accent);
	font-family: var(--serif);
	font-size: clamp(9rem, 16vw, 18rem);
	line-height: 1;
}
.poster__q blockquote {
	position: relative;
	margin: 0;
	padding-top: clamp(40px, 6vw, 110px);
	font-family: var(--serif);
	font-size: clamp(2rem, 1rem + 3.3vw, 4.4rem);
	font-style: italic;
	line-height: 1.08;
}
.poster__q blockquote p {
	margin: 0;
}
.poster__q figcaption {
	margin-top: 24px;
	font-family: var(--display);
	font-size: 1rem;
	font-weight: 600;
	font-stretch: 110%;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.poster__qname {
	color: var(--accent);
	font-size: 1.6em;
	font-weight: 900;
	font-stretch: 80%;
	letter-spacing: 0;
}

/* Series */
.ps-series {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ps-series__item {
	display: grid;
	align-content: end;
	gap: 8px;
	min-height: 360px;
	padding: 48px var(--pad);
	background: var(--series);
	color: var(--ink);
	text-decoration: none;
}
.ps-series__label {
	font-family: var(--display);
	font-size: 0.85rem;
	font-weight: 800;
	font-stretch: 110%;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.ps-series__name {
	font-family: var(--display);
	font-size: clamp(2.4rem, 1.2rem + 3.6vw, 5rem);
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.88;
	text-transform: uppercase;
}
.ps-series__latest {
	max-width: 28em;
	font-size: 1.1rem;
}
.ps-series__item:hover .ps-series__name {
	text-decoration: underline;
	text-decoration-thickness: 0.06em;
}

/* Footer: the guide's butter lockup */
.ps-foot {
	display: grid;
	justify-items: center;
	gap: 18px;
	padding: 56px var(--pad) 110px;
	background: var(--butter);
	text-align: center;
}
.ps-foot__mark {
	width: min(100%, 520px);
}
.ps-foot__tag {
	margin: 0;
	font-size: 1.15rem;
	font-style: italic;
}
.ps-foot a {
	text-decoration: none;
}
.ps-foot a:hover {
	text-decoration: underline;
}
.ps-foot__more {
	margin: 0;
}

/* Article: the story's own poster, then a calm column, then the next poster */
.ps-article-page .poster {
	min-height: min(88svh, 900px);
}
/* The space above and below the text is padding, inside the sheet. The sheet slides up over the
   poster, so the first line never arrives touching its edge; then it is pinned by its bottom while the
   next poster slides over it, so the last line rests well above the bottom of the screen. */
.ps-body {
	width: min(100% - 32px, 680px);
	margin: 0 auto;
	padding: 64px 0 max(96px, 20svh);
	font-size: 1.3rem;
	line-height: 1.55;
}
.ps-body p {
	margin: 0 0 1.1em;
}
/* The sheet's padding is the whole of the space below; a last paragraph or pull quote adds none. */
.ps-body > :last-child {
	margin-bottom: 0;
}
.ps-body .pull-quote {
	position: relative;
	left: 50%;
	width: 100vw;
	margin: 1.6em 0 1.6em -50vw;
	padding: clamp(40px, 6vw, 88px) max(24px, calc((100vw - 1100px) / 2));
	background: var(--butter);
	color: var(--indigo);
	font-family: var(--display);
	font-size: clamp(1.8rem, 1rem + 2.6vw, 3.6rem);
	font-weight: 900;
	font-stretch: 76%;
	line-height: 0.98;
	text-transform: uppercase;
}
.ps-body .pull-quote blockquote,
.ps-body .pull-quote p {
	margin: 0;
}
.ps-next {
	position: relative;
	isolation: isolate;
	display: grid;
	gap: 14px;
	padding: clamp(56px, 8vw, 120px) var(--pad);
	overflow: hidden;
	background: var(--bg);
	color: var(--fg);
	text-decoration: none;
}
.ps-next__label {
	font-family: var(--display);
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.ps-next__hl {
	max-width: 16ch;
	font-family: var(--display);
	font-size: clamp(2.2rem, 1rem + 4vw, 5.6rem);
	font-weight: 900;
	font-stretch: 72%;
	line-height: 0.88;
	text-transform: uppercase;
}
.ps-next:hover .ps-next__hl {
	text-decoration: underline;
	text-decoration-thickness: 0.06em;
}

/* Section and series walls */
.ps-title {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(48px, 8vw, 120px) var(--pad);
	background: var(--bg);
	color: var(--fg);
}
.ps-title h1 {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(3.4rem, 1rem + 9vw, 11rem);
	font-weight: 900;
	font-stretch: 70%;
	line-height: 0.85;
	text-transform: uppercase;
}
.ps-title p {
	margin: 12px 0 0;
	font-family: var(--display);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.ps-title__up {
	margin: 0 0 10px;
}
.ps-title__up a {
	text-decoration: none;
}
.ps-title__up a:hover {
	text-decoration: underline;
}
.ps-title .ps-title__blurb {
	max-width: 40ch;
	margin-top: 18px;
	font-family: var(--serif);
	font-size: 1.25rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}
.ps-tabs ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}
.ps-tabs a {
	position: relative;
	isolation: isolate;
	display: block;
	padding: 8px 20px;
	font-family: var(--display);
	font-size: 0.9rem;
	font-weight: 700;
	font-stretch: 105%;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
}
/* Each tab a slanted tint of the title's text colour; on hover and for the current page, the title's
   colours swapped, so the tab shows on every universe's title (butter included). */
.ps-tabs a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, currentColor 16%, transparent);
	clip-path: var(--slant);
}
.ps-tabs a:hover,
.ps-tabs a[aria-current="page"] {
	color: var(--bg);
}
.ps-tabs a:hover::before,
.ps-tabs a[aria-current="page"]::before {
	background: var(--fg);
}
/* An article's trail sticker, with the series sticker below it. */
.poster__trail + .poster__tag {
	margin-top: 10px;
}
.ps-empty {
	padding: 64px var(--pad);
}

/* Curtains: the header stays put while the posters slide up over it, and each poster stays put while
   the next is pasted over it. The pinning itself is in /motion.css. */
.motion .ps-top {
	z-index: 0;
}
.motion #main,
.motion .ps-foot {
	z-index: 1;
}
.motion .ps-foot {
	position: relative;
}
.motion .ps-body,
.motion .ps-series,
.motion .ps-empty {
	position: relative;
	background: var(--paper);
}
/* The story is a narrow column; its paper spreads the full width so it covers the poster edge to edge. */
.motion .ps-body {
	box-shadow: 0 0 0 100vmax var(--paper);
	clip-path: inset(0 -100vmax);
}

/* Phone and small tablet: text over art, stacked */
@media (max-width: 899px) {
	.poster {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 28px;
		min-height: 0;
	}
	.poster__text,
	.poster--left .poster__text {
		grid-row: 2;
		grid-column: 1;
	}
	.poster__drift,
	.poster--left .poster__drift {
		grid-row: 1;
		grid-column: 1;
		width: min(100%, 520px);
		justify-self: center;
	}
	.poster--quote {
		row-gap: 0;
	}
	.poster__q {
		grid-row: 1;
		grid-column: 1;
		padding-bottom: 24px;
	}
	.poster__photo {
		grid-row: 2;
		grid-column: 1;
		width: 78%;
		justify-self: end;
	}
	.poster__num {
		font-size: 60vw;
		bottom: -14vw;
	}
	.ps-series {
		grid-template-columns: minmax(0, 1fr);
	}
	.ps-series__item {
		min-height: 240px;
	}
	.ps-bar {
		justify-content: center;
	}
}
@media (max-width: 699px) {
	.ps-top {
		gap: 16px;
		padding-bottom: 56px;
	}
	.ps-nav ul {
		display: grid;
		grid-template-columns: repeat(3, auto);
		gap: 2px;
	}
	.ps-nav a {
		padding: 8px 12px;
		font-size: 0.8rem;
		text-align: center;
	}
	.poster__hl {
		font-size: clamp(2.3rem, 12vw, 3.6rem);
	}
	.ps-body {
		font-size: 1.125rem;
	}
	.ps-foot {
		padding-bottom: 96px;
	}
}
