/* need2know.ai
 *
 * Two voices, and the argument lives in the gap between them. Halu is a brush hand: it carries the
 * narrative, because the thing being defended is human authorship. Zalando Sans carries the labels,
 * the data and the grids, because that is the machine's register. Never mix them within a phrase.
 *
 * The homepage is a deck of full-bleed panels that snap under the scroll, alternating white and
 * grey, each holding one idea with a great deal of air around it. A dotted thread runs through them
 * and does the pointing.
 */

@font-face {
	font-family:	"Halu";
	src:			url("/assets/fonts/halu.woff2") format("woff2");
	font-weight:	400;
	font-display:	swap;
}

@font-face {
	font-family:	"Zalando Sans";
	src:			url("/assets/fonts/zalando-sans.woff2") format("woff2");
	font-weight:	200 900;
	font-display:	swap;
}

:root {
	--ink:		#0d0d0d;
	--soft:		#5c6066;
	--faint:	#9aa0a6;
	--line:		#d4d8dc;
	--grey:		#f1f3f4;
	--accent:	#1c5f8f;
	--pale:		#b9d6ea;
	--hand:		"Halu", "Segoe Script", cursive;
	--sans:		"Zalando Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--w:		1180px;
}

* { box-sizing: border-box; }

html {
	-webkit-text-size-adjust:	100%;
	scroll-behavior:			smooth;
}

body {
	margin:			0;
	color:			var(--ink);
	background:		#fff;
	font-family:	var(--sans);
	font-size:		17px;
	line-height:	1.5;
}

a { color: var(--accent); }

/* Type ------------------------------------------------------------------- */

.hand {
	font-family:	var(--hand);
	font-weight:	400;
	line-height:	1.15;
	letter-spacing:	.005em;
}

h1.hand, h2.hand { margin: 0; }

.shout	{ font-size: clamp(2.6rem, 8.2vw, 7rem); }
.speak	{ font-size: clamp(1.6rem, 3.4vw, 2.9rem); }
.tell	{ font-size: clamp(1.15rem, 1.8vw, 1.6rem); line-height: 1.35; }

.label {
	font-family:	var(--sans);
	font-weight:	600;
	font-size:		.7rem;
	letter-spacing:	.16em;
	text-transform:	uppercase;
	color:			var(--faint);
}

/* Fixed furniture --------------------------------------------------------- */

.wordmark {
	position:		fixed;
	top:			1.6rem;
	left:			1.9rem;
	z-index:		30;
	font-family:	var(--sans);
	font-weight:	700;
	font-size:		1rem;
	letter-spacing:	-.02em;
	color:			var(--ink);
	text-decoration: none;
}

.ticks {
	position:		fixed;
	right:			1.6rem;
	top:			50%;
	transform:		translateY(-50%);
	z-index:		30;
	display:		flex;
	flex-direction:	column;
	gap:			.75rem;
}
.ticks a {
	width:			7px;
	height:			7px;
	border:			1px solid var(--faint);
	border-radius:	50%;
	display:		block;
}
.ticks a:hover { background: var(--ink); border-color: var(--ink); }

/* The deck ---------------------------------------------------------------- */

.deck { scroll-snap-type: y mandatory; }

.panel {
	position:		relative;
	min-height:		100svh;
	padding:		7rem clamp(1.5rem, 6vw, 6rem) 5rem;
	scroll-snap-align: start;
	display:		grid;
	align-content:	center;
	overflow:		hidden;
}
.panel.grey { background: var(--grey); }

.panel > .frame {
	width:		100%;
	max-width:	var(--w);
	margin:		0 auto;
	position:	relative;
}

/* The dotted thread. Round caps with a zero-length dash give dots rather than dashes, and
 * non-scaling-stroke keeps them the same size however the container is stretched. */
.thread {
	position:		absolute;
	inset:			0;
	width:			100%;
	height:			100%;
	pointer-events:	none;
	z-index:		0;
}
.thread path {
	fill:				none;
	stroke:				var(--faint);
	stroke-width:		2;
	stroke-linecap:		round;
	stroke-dasharray:	0.1 9;
	vector-effect:		non-scaling-stroke;
}

.panel .frame > * { position: relative; z-index: 1; }

/* Panel: the opening ------------------------------------------------------ */

.p-open .frame { min-height: 62svh; }
.p-open h1 { max-width: 12ch; }
.p-open .fortune {
	position:	absolute;
	right:		0;
	bottom:		0;
	text-align:	right;
}
.p-open .scrollcue { position: absolute; left: 0; bottom: -3rem; }

/* Panel: a claim beside a mark -------------------------------------------- */

.p-claim .frame {
	display:				grid;
	grid-template-columns:	1fr 1fr;
	gap:					clamp(2rem, 6vw, 6rem);
	align-items:			center;
}
.p-claim.flip .said { order: 2; }
.p-claim .said { max-width: 34ch; }
.p-claim .shown { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.p-claim .shown img.big { width: clamp(170px, 26vw, 330px); height: auto; }

/* Panel: two marks -------------------------------------------------------- */

.p-pair .frame { text-align: center; }
.p-pair .duo {
	display:				grid;
	grid-template-columns:	1fr 1fr;
	gap:					clamp(2rem, 8vw, 7rem);
	justify-items:			center;
	margin-bottom:			2.5rem;
	align-items:			start;
}
.p-pair .duo img.big { width: clamp(130px, 17vw, 220px); height: auto; margin-bottom: 1.2rem; }
.p-pair .said { max-width: 40ch; margin: 0 auto; }

/* The closing panel carries reference material rather than a poster, and on a short viewport it is
 * taller than the screen. Snapping something taller than the viewport traps the reader, so it
 * flows. */
.p-close { min-height: auto; scroll-snap-align: none; padding-bottom: 2rem; }

/* Panel: the whole grid --------------------------------------------------- */

.p-grid .frame {
	display:				grid;
	grid-template-columns:	minmax(0, 20rem) 1fr;
	gap:					clamp(2rem, 6vw, 5rem);
	align-items:			center;
}

.matrix { display: grid; grid-template-columns: auto repeat(6, minmax(0, 1fr)); gap: .5rem 1rem; }
.matrix .rowname { align-self: center; text-align: right; font-size: .82rem; font-weight: 600; }
.matrix .colname { text-align: center; }
.matrix img { width: 100%; max-width: 62px; height: auto; display: block; margin: 0 auto; }
.matrix a { display: block; }
.matrix a:hover img { transform: scale(1.12); transition: transform .12s; }

/* The medium row under a mark --------------------------------------------- */

.strip { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.strip a { display: block; text-align: center; text-decoration: none; color: var(--faint); }
.strip img { width: 40px; height: 40px; display: block; }
.strip span { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.strip a:hover { color: var(--ink); }

.badge { width: 100%; max-width: 320px; height: auto; }

/* Steps and code ---------------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.step .num { font-family: var(--hand); font-size: 2.4rem; line-height: 1; color: var(--pale); }
.step h3 { font-family: var(--hand); font-weight: 400; font-size: 1.5rem; margin: .2rem 0 .5rem; }
.step p { font-size: .95rem; color: var(--soft); margin: 0; }

pre {
	background:		var(--ink);
	color:			#eef1f3;
	padding:		1rem 1.2rem;
	border-radius:	4px;
	overflow-x:		auto;
	margin:			0;
	font-size:		.82rem;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.cue { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; }
.cue > div { flex: 1 1 20rem; }
.cue p { font-size: .9rem; color: var(--soft); margin: 0 0 .5rem; }

/* Buttons ----------------------------------------------------------------- */

.pill {
	display:			inline-block;
	font-family:		var(--sans);
	font-weight:		600;
	font-size:			.85rem;
	letter-spacing:		.02em;
	text-decoration:	none;
	color:				#fff;
	background:			var(--ink);
	padding:			.65rem 1.4rem;
	border-radius:		999px;
}
.pill.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Reference pages --------------------------------------------------------- */

.doc { max-width: var(--w); margin: 0 auto; padding: 7rem clamp(1.5rem, 6vw, 6rem) 4rem; }
.doc section { margin-bottom: clamp(3rem, 7vw, 6rem); }
.doc .rule { border: 0; border-top: 2px dotted var(--line); margin: 0 0 clamp(2rem, 5vw, 4rem); }

.crumbs { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 2.5rem; }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.decl { display: grid; grid-template-columns: minmax(0, 22rem) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.decl img.big { width: 100%; max-width: 300px; height: auto; }
/* The shout size is for a full-bleed panel; in a column it breaks mid-phrase. */
.decl h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
.decl .fact dt { font-family: var(--sans); font-weight: 600; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 1.2rem; }
.decl .fact dd { margin: .25rem 0 0; }

.take { display: grid; grid-template-columns: minmax(0, 22rem) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.downloads { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.downloads a { font-size: .8rem; font-weight: 600; text-decoration: none; padding: .5rem 1rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--accent); }

.rungs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.rungs a { text-align: center; text-decoration: none; color: var(--soft); padding: 1rem .4rem; border-radius: 6px; }
.rungs a.here { background: var(--grey); color: var(--ink); }
.rungs a:hover { background: var(--grey); }
.rungs img { width: 100%; max-width: 74px; height: auto; }
.rungs .name { display: block; margin-top: .5rem; font-size: .78rem; }

.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.terms h3 { font-family: var(--hand); font-weight: 400; font-size: 1.5rem; margin: 0 0 .4rem; }
.vow { padding-left: 1.1rem; max-width: 46rem; }
.vow li { margin-bottom: .9rem; }

.note { font-size: .88rem; color: var(--soft); }
.lede { color: var(--soft); max-width: 46ch; }

/* Footer ------------------------------------------------------------------ */

.foot {
	border-top:	2px dotted var(--line);
	max-width:	var(--w);
	margin:		0 auto;
	padding:	2rem clamp(1.5rem, 6vw, 6rem) 3rem;
	display:	flex;
	justify-content: space-between;
	gap:		1.5rem;
	flex-wrap:	wrap;
	font-size:	.82rem;
	color:		var(--faint);
}
.foot p { margin: 0; }
.foot a { color: var(--soft); }

/* Narrow ------------------------------------------------------------------ */

@media (max-width: 900px) {
	/* Snapping a panel taller than the viewport traps the reader, so it comes off here. */
	.deck { scroll-snap-type: none; }
	.panel { min-height: auto; padding: 5rem 1.5rem 4rem; }
	.p-claim .frame, .p-grid .frame, .decl, .take { grid-template-columns: minmax(0, 1fr); }
	.p-claim.flip .said { order: 0; }
	.p-open .fortune { position: static; text-align: left; margin-top: 2.5rem; }
	.p-open .scrollcue { display: none; }
	.thread { display: none; }
	.ticks { display: none; }
	.steps, .terms { grid-template-columns: minmax(0, 1fr); }
	.p-pair .duo { gap: 1.5rem; }
	.matrix { gap: .35rem .5rem; }
	.matrix .rowname { font-size: .68rem; }
	.doc { padding-top: 5rem; }
}

@media (max-width: 560px) {
	.rungs { gap: .3rem; }
	.rungs .name { font-size: .6rem; }
	.p-pair .duo { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.deck { scroll-snap-type: none; }
}
