:root {
	--cream: #f3f1ea;
	--grid: #a9c4bb;
	--ink: #1e2a44;
	--fresh: #3d6fb6;
	--graphite: #6b6f78;
	--margin-red: #c8504a;
	--mono: "IBM Plex Mono", ui-monospace, monospace;
	--hand: "Caveat", "Bradley Hand", cursive;
	--chrome-font: var(--mono);
    10|	--chrome-fg: var(--ink);
	--chrome-bg: rgba(243, 241, 234, 0.82);
	--chrome-line: rgba(30, 42, 68, 0.35);
	--lx: 0.68;
	--ly: 0.55;
	--night: 0;
	--sq: 24px;
}

html {
	background: var(--cream);
	color: var(--ink);
}

body {
	font-family: var(--mono);
	font-size: 16px;
	line-height: 1.6;
}

::selection {
	background: rgba(61, 111, 182, 0.25);
}

/* Bond paper, ruled every square with a heavier line every fifth, plus a little tooth. */
.page {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='g' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .42  0 0 0 0 .35  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"),
		linear-gradient(90deg, rgba(126, 168, 155, 0.5) 1px, transparent 1px) 0 0 / calc(var(--sq) * 5) calc(var(--sq) * 5),
		linear-gradient(180deg, rgba(126, 168, 155, 0.5) 1px, transparent 1px) 0 0 / calc(var(--sq) * 5) calc(var(--sq) * 5),
		linear-gradient(90deg, rgba(169, 196, 187, 0.42) 1px, transparent 1px) 0 0 / var(--sq) var(--sq),
		linear-gradient(180deg, rgba(169, 196, 187, 0.42) 1px, transparent 1px) 0 0 / var(--sq) var(--sq),
		var(--cream);
}

.room-world {
	z-index: 0;
}

.margin {
	position: fixed;
	top: 0;
	bottom: 0;
	left: clamp(44px, 7vw, 108px);
	width: 2px;
	z-index: 1;
	pointer-events: none;
	background: var(--margin-red);
	opacity: 0.72;
	box-shadow: 5px 0 0 -0.5px rgba(200, 80, 74, 0.45);
}

/* One desk lamp, lagging behind the hand. Darker room at night, so the pool reads stronger. */
.lamp {
	position: fixed;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	mix-blend-mode: multiply;
	background: radial-gradient(
		circle at calc(var(--lx) * 100%) calc(var(--ly) * 100%),
		rgba(255, 250, 235, 0) 0,
		rgba(255, 250, 235, 0) 14vmax,
		rgba(120, 104, 80, calc(0.1 + var(--night) * 0.22)) 46vmax,
		rgba(60, 52, 44, calc(0.22 + var(--night) * 0.36)) 90vmax
	);
}

.lamp::after {
	content: "";
	position: absolute;
	inset: 0;
	mix-blend-mode: soft-light;
	background: radial-gradient(circle at calc(var(--lx) * 100%) calc(var(--ly) * 100%), rgba(255, 214, 150, 0.55), transparent 32vmax);
}

.pencil {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 1;
	pointer-events: none;
	overflow: visible;
}

.pencil path {
	fill: none;
	stroke: var(--graphite);
	stroke-width: 1.3;
	stroke-linecap: round;
	opacity: 0.85;
}

.pencil text {
	font-family: var(--hand);
	font-size: 26px;
	fill: var(--graphite);
	stroke: rgba(243, 241, 234, 0.92);
	stroke-width: 7px;
	stroke-linejoin: round;
	paint-order: stroke;
}

#seed-note,
#seed-arrow {
	opacity: 0.85;
}

.readout {
	position: fixed;
	right: 20px;
	top: 16px;
	z-index: 4;
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: right;
	color: var(--ink);
	opacity: 0.7;
	white-space: pre;
	font-variant-numeric: tabular-nums;
}

.room-main {
	z-index: 2;
	padding-left: calc(clamp(44px, 7vw, 108px) + clamp(28px, 4vw, 64px));
	padding-right: 4vw;
}

.entry {
	min-height: 100vh;
	padding: 18vh 0 12vh;
	max-width: min(760px, 52vw);
}

.entry-head {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--graphite);
	border-bottom: 1px solid rgba(30, 42, 68, 0.22);
	padding-bottom: 0.6rem;
	margin-bottom: 2rem;
	font-variant-numeric: tabular-nums;
}

.eyebrow {
	margin: 0 0 1.5rem;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--graphite);
}

.hand {
	font-family: var(--hand);
	font-size: 1.75rem;
	line-height: 1.15;
	color: var(--graphite);
	transform: rotate(-1.5deg);
	transform-origin: left center;
}

.hand.inline {
	display: inline-block;
	font-size: 1.45rem;
	margin-left: 0.4rem;
	transform: rotate(-3deg);
}

/* Paper that hides the crystal behind it, feathered so the grid seems to continue. */
.sheet {
	position: relative;
	padding: 2.2rem 2.4rem 2.4rem;
	background: rgba(243, 241, 234, 0.9);
	box-shadow: 0 0 0 1px rgba(243, 241, 234, 0.9), 0 0 40px 30px rgba(243, 241, 234, 0.85);
	border-radius: 2px;
}

.arrival {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 12vh;
}

.arrival h1 {
	margin: 0;
	font-weight: 300;
	font-size: clamp(64px, 10.5vw, 190px);
	line-height: 0.92;
	letter-spacing: -0.055em;
	color: var(--ink);
	text-shadow: 0 0 30px var(--cream), 0 0 60px var(--cream);
	hyphens: manual;
}

.arrival .hand {
	margin-top: 2.5rem;
	font-size: 2.1rem;
	color: var(--fresh);
}

/* Pasted photographs, with masking tape that lands after the paper does. */
.refs {
	max-width: min(820px, 56vw);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem 3rem;
	align-items: start;
}

.pasted {
	position: relative;
	margin: 0;
	padding: 12px 12px 14px;
	background: #fbfaf5;
	box-shadow: 0 1px 2px rgba(30, 42, 68, 0.18), 0 14px 30px -12px rgba(30, 42, 68, 0.35);
	transform: rotate(var(--rot, -1deg));
}

.pasted:not(.in) {
	transform: translateY(2.5rem) rotate(calc(var(--rot, -1deg) * 3));
}

.pasted::before,
.pasted::after {
	content: "";
	position: absolute;
	width: 92px;
	height: 26px;
	background: rgba(236, 224, 190, 0.78);
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
	transition: opacity 0.5s 1.2s, transform 0.6s 1.2s;
}

.pasted::before {
	top: -12px;
	left: -22px;
	transform: rotate(-32deg);
}

.pasted::after {
	top: -10px;
	right: -24px;
	transform: rotate(28deg);
}

.pasted:not(.in)::before,
.pasted:not(.in)::after {
	opacity: 0;
	transform: translateY(-14px) rotate(0deg);
}

.pasted img {
	width: 100%;
	height: auto;
	filter: sepia(0.18) contrast(0.96);
	mix-blend-mode: multiply;
}

.pasted figcaption {
	display: grid;
	gap: 0.4rem;
	margin-top: 0.8rem;
}

.pasted figcaption .hand {
	font-size: 1.5rem;
}

.pasted small {
	font-size: 11px;
	color: var(--graphite);
	letter-spacing: 0.02em;
}

.p1 {
	--rot: -2.2deg;
}

.p2 {
	--rot: 1.6deg;
	margin-top: 6rem;
}

.p3 {
	--rot: 1deg;
	max-width: 78%;
	justify-self: end;
}

.p4 {
	--rot: -1.4deg;
	margin-top: 3rem;
}

.blank {
	min-height: 160vh;
	display: flex;
	align-items: flex-end;
}

.blank .hand {
	font-size: 1.5rem;
	opacity: 0.8;
}

.colophon .sheet {
	opacity: 0.85;
}

.colophon .spec-plex {
	margin: 0;
	font-size: clamp(32px, 3.6vw, 52px);
	font-weight: 300;
	letter-spacing: -0.05em;
	line-height: 1;
}

.colophon .spec-caveat {
	margin: 0.5rem 0 0;
	font-family: var(--hand);
	font-size: clamp(22px, 2.2vw, 32px);
	color: var(--graphite);
	line-height: 1.1;
}

.materials {
	margin: 2rem 0 0;
	max-width: 36em;
	font-size: 15px;
}

.colophon h3 {
	margin: 3rem 0 0.8rem;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--graphite);
}

.credits {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	line-height: 1.7;
	color: var(--graphite);
}

.credits a {
	color: var(--ink);
}

.nav {
	margin-top: 4rem;
	padding-top: 1.4rem;
	border-top: 1px solid rgba(30, 42, 68, 0.22);
	font-size: 14px;
}

@media (max-width: 900px) {
	.entry,
	.refs {
		max-width: none;
	}
	.refs {
		grid-template-columns: 1fr;
	}
	.p2,
	.p4 {
		margin-top: 0;
	}
	.p3 {
		max-width: none;
	}
}
