/* Paper Trails — site styles: the game's graph-paper-and-sticker look */
@font-face {
	font-family: "Lilita One";
	src: url("/assets/LilitaOne-Regular.ttf") format("truetype");
	font-weight: 400;
	font-display: swap;
}

:root {
	--ink: #2d3242;
	--muted: #6b7185;
	--paper: #f4f6fa;
	--grid: #e2e8f4;
	--surface: #eef1f5;
	--cream: #f3eee2;
	--blue: #5b7ce2;
	--blue-deep: #4262c9;
	--blue-press: #3a55ad;
	--red: #e25a5a;
	--green: #5ebf6a;
	--gold: #e9bd4a;
	--purple: #a06ade;
	--pink: #e676b4;
	--shadow: 45, 50, 66;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

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

body {
	/* the arena: graph paper */
	background-color: var(--paper);
	background-image:
		linear-gradient(var(--grid) 1.5px, transparent 1.5px),
		linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
	background-size: 40px 40px;
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		Helvetica, Arial, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-x: hidden;
}

h1,
h2,
h3 {
	font-family: "Lilita One", -apple-system, sans-serif;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0.01em;
}

a {
	color: var(--blue-deep);
}

img {
	max-width: 100%;
	height: auto;
}

/* a sheet of white paper on the desk: cream deckle, two stacked short
   shadows (layered cardstock) and a soft drop */
.card {
	position: relative;
	background: #fff;
	border-radius: 28px;
	box-shadow:
		0 0 0 6px var(--cream),
		0 5px 0 6px rgba(var(--shadow), 0.07),
		0 10px 0 6px rgba(var(--shadow), 0.035),
		0 16px 36px 4px rgba(var(--shadow), 0.13);
}

/* ---- buttons (the menu's sticker buttons) ------------------------------- */
.btn {
	display: inline-block;
	position: relative;
	font-family: "Lilita One", sans-serif;
	font-size: 1.2rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	background: var(--blue);
	padding: 0.85rem 2rem;
	border-radius: 18px;
	box-shadow: 0 5px 0 var(--blue-press), 0 10px 18px rgba(var(--shadow), 0.16);
	transition: transform 0.08s, box-shadow 0.08s;
}

.btn::after {
	/* the dashed stitch inside every game button */
	content: "";
	position: absolute;
	inset: 5px;
	border: 2px dashed rgba(255, 255, 255, 0.7);
	border-radius: 13px;
	pointer-events: none;
}

a.btn:hover {
	transform: translateY(2px);
	box-shadow: 0 3px 0 var(--blue-press), 0 6px 12px rgba(var(--shadow), 0.16);
}

a.btn:active {
	transform: translateY(5px);
	box-shadow: 0 0 0 var(--blue-press);
}

.btn-muted {
	background: var(--surface);
	color: var(--muted);
	font-size: 1rem;
	box-shadow: 0 5px 0 #d3d9e5, 0 8px 14px rgba(var(--shadow), 0.08);
}

.btn-muted::after {
	border-color: rgba(var(--shadow), 0.22);
}

.btn-store {
	background: var(--ink);
	box-shadow: 0 5px 0 #15131a, 0 10px 18px rgba(var(--shadow), 0.18);
}

/* ---- hero: the main menu ------------------------------------------------ */
.hero {
	position: relative;
	padding: 4rem 1.25rem 4rem;
	overflow: hidden;
}

.menu-card {
	max-width: 560px;
	margin: 0 auto;
	padding: 3rem 2rem 2.5rem;
	text-align: center;
}

.menu-card .wordmark {
	width: min(360px, 82%);
	filter: drop-shadow(0 6px 0 rgba(var(--shadow), 0.1));
}

.menu-card .you {
	display: block;
	width: min(170px, 44%);
	margin: 1.25rem auto 0;
	transform: rotate(-4deg);
}

.tagline {
	font-family: "Lilita One", sans-serif;
	font-size: 1.75rem;
	margin-top: 1.1rem;
}

.sub {
	color: var(--muted);
	max-width: 28rem;
	margin: 0.35rem auto 0;
}

.menu-card .btn {
	margin-top: 1.5rem;
}

.hero-note {
	margin-top: 1rem;
	font-size: 0.9375rem;
	color: var(--muted);
}

/* washi tape holding the card down */
.tape {
	position: absolute;
	width: 150px;
	height: 36px;
	background: rgba(91, 124, 226, 0.6);
	box-shadow: 0 2px 5px rgba(var(--shadow), 0.15);
	pointer-events: none;
}

.tape::after {
	content: "";
	position: absolute;
	inset: 0;
	background: url("/assets/patterns/checker.png") center / 36px repeat;
	opacity: 0.14;
}

.tape-tl {
	top: -14px;
	left: -42px;
	transform: rotate(-12deg);
}

.tape-tr {
	top: -12px;
	right: -46px;
	transform: rotate(8deg);
	background: rgba(94, 191, 106, 0.6);
}

.tape-tr::after {
	background-image: url("/assets/patterns/stripes.png");
}

.tape-bl {
	bottom: -10px;
	left: -50px;
	transform: rotate(9deg);
	background: rgba(160, 106, 222, 0.55);
}

.tape-bl::after {
	background-image: url("/assets/patterns/diagonal.png");
}

.tape-br {
	bottom: -12px;
	right: -48px;
	transform: rotate(-11deg);
	background: rgba(233, 189, 74, 0.6);
}

.tape-br::after {
	background-image: url("/assets/patterns/waves.png");
}

/* the rivals peeking in from the corners */
.peek {
	position: absolute;
	width: 190px;
	pointer-events: none;
}

.peek-tl {
	top: -44px;
	left: -34px;
	transform: rotate(14deg);
}

.peek-tr {
	top: -40px;
	right: -44px;
	transform: rotate(-12deg);
}

.peek-bl {
	bottom: -56px;
	left: -24px;
	transform: rotate(-14deg);
}

.peek-br {
	bottom: -50px;
	right: -34px;
	transform: rotate(16deg);
}

/* confetti squares on the desk */
.confetti {
	position: absolute;
	width: 14px;
	height: 14px;
	border-radius: 3px;
	pointer-events: none;
}

@media (max-width: 900px) {
	.peek {
		width: 130px;
	}
}

@media (max-width: 640px) {
	.hero {
		padding-top: 5rem;
	}

	.peek {
		width: 96px;
	}

	.peek-bl,
	.peek-br {
		display: none;
	}

	.menu-card {
		padding: 2.5rem 1.25rem 2rem;
	}

	.btn {
		font-size: 1.05rem;
		padding: 0.8rem 1.4rem;
	}

	.btn-muted {
		font-size: 0.9rem;
		padding: 0.75rem 1.1rem;
	}
}

/* ---- homepage sections -------------------------------------------------- */
.wrap {
	max-width: 62rem;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.narrow {
	max-width: 40rem;
}

.section-title {
	font-size: 2.1rem;
	text-align: center;
	margin: 3.5rem 0 1.25rem;
}

.section-intro {
	text-align: center;
	color: var(--muted);
	max-width: 36rem;
	margin: -0.5rem auto 1.75rem;
}

/* app icon + pitch */
.app-row {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	padding: 1.75rem 2rem;
	margin-top: 1rem;
}

.app-row .app-icon {
	width: 128px;
	height: 128px;
	flex-shrink: 0;
	border-radius: 28px;
	box-shadow: 0 8px 24px rgba(var(--shadow), 0.22);
}

@media (max-width: 520px) {
	.app-row {
		flex-direction: column;
		text-align: center;
	}
}

/* phone screenshots: a wide strip — four across on a desktop, scrolls
   sideways on a phone */
.shots {
	display: flex;
	gap: 1.1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 0.5rem 0.25rem 1.5rem;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 960px) {
	.shots {
		justify-content: center;
	}
}

.shots img {
	flex: 0 0 auto;
	width: 214px;
	height: auto;
	border-radius: 22px;
	box-shadow:
		0 0 0 5px #fff,
		0 10px 28px 5px rgba(var(--shadow), 0.22);
	scroll-snap-align: center;
}

/* how it plays */
.steps {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	counter-reset: step;
}

.steps li {
	padding: 1.25rem 1.25rem 1.4rem;
	text-align: center;
}

.steps svg {
	display: block;
	width: 100%;
	max-width: 240px;
	height: auto;
	margin: 0 auto 0.5rem;
}

.steps h3 {
	font-size: 1.4rem;
}

.steps h3::before {
	counter-increment: step;
	content: counter(step);
	display: inline-block;
	width: 1.6em;
	height: 1.6em;
	line-height: 1.6em;
	margin-right: 0.45em;
	border-radius: 50%;
	background: var(--blue);
	color: #fff;
	font-size: 0.8em;
	vertical-align: 0.15em;
}

.steps p {
	margin-top: 0.4rem;
	font-size: 0.9375rem;
	color: var(--muted);
	line-height: 1.5;
}

.aside {
	text-align: center;
	color: var(--muted);
	max-width: 36rem;
	margin: 1.5rem auto 0;
}

@media (max-width: 720px) {
	.steps {
		grid-template-columns: 1fr;
	}
}

/* rivals */
.rivals {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1rem;
}

.rival {
	padding: 1.25rem 0.75rem 1.1rem;
	text-align: center;
}

.rival img {
	height: 108px;
	width: auto;
	transition: transform 0.15s;
}

.rival:hover img {
	transform: scale(1.08) rotate(-4deg);
}

.rival h3 {
	font-size: 1.15rem;
	letter-spacing: 0.05em;
	margin-top: 0.5rem;
}

.rival p {
	margin-top: 0.15rem;
	font-size: 0.875rem;
	color: var(--muted);
	line-height: 1.45;
}

@media (max-width: 900px) {
	.rivals {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 560px) {
	.rivals {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* the skins band, in the game's primary blue */
.band {
	background: linear-gradient(#5b7ce2, #4262c9);
	color: #fff;
	padding: 0.5rem 1.5rem 3rem;
	text-align: center;
	margin-top: 3.5rem;
}

.band .section-title {
	color: #fff;
	text-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}

.band-copy {
	max-width: 36rem;
	margin: 0 auto 1.25rem;
	color: rgba(255, 255, 255, 0.9);
}

.shop-label {
	font-family: "Lilita One", sans-serif;
	font-size: 0.95rem;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.75);
	margin: 1.25rem 0 0.5rem;
}

.shop-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	max-width: 46rem;
	margin: 0 auto;
}

/* twelve faces: two rows of six, like the shop */
.shop-row.faces {
	max-width: 25rem;
}

.chip {
	position: relative;
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14);
	transition: transform 0.12s;
}

.chip:hover {
	transform: translateY(-3px) rotate(-4deg);
}

.chip i {
	display: block;
	width: 30px;
	height: 30px;
	border-radius: 9px;
}

.chip img {
	width: 38px;
	height: auto;
}

.chip.pattern::after {
	content: "";
	position: absolute;
	inset: 10px;
	border-radius: 7px;
	background: var(--p) center / 22px repeat;
	opacity: 0.8;
}

@media (max-width: 640px) {
	/* six chips across a phone: colors in one row, faces 6+6, patterns 4+4 */
	.shop-row {
		gap: 0.5rem;
	}

	.shop-row.patterns {
		max-width: 14rem;
	}

	.chip {
		width: 46px;
		height: 46px;
		border-radius: 13px;
	}

	.chip i {
		width: 24px;
		height: 24px;
		border-radius: 7px;
	}

	.chip img {
		width: 32px;
	}

	.chip.pattern::after {
		inset: 8px;
		background-size: 18px;
	}
}

/* rules */
.rules {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.rule {
	padding: 1.5rem 1.25rem;
	text-align: center;
}

.rule h3 {
	display: inline-block;
	font-size: 1.15rem;
	letter-spacing: 0.06em;
	padding: 0.3rem 1.4rem;
	border-radius: 14px;
	background: var(--surface);
	border: 2px dashed rgba(var(--shadow), 0.25);
	color: var(--ink);
}

.rule.selected h3 {
	background: var(--blue);
	border-color: rgba(255, 255, 255, 0.7);
	color: #fff;
	box-shadow: 0 0 0 2px var(--blue);
}

.rule p {
	margin-top: 0.85rem;
	font-size: 0.9375rem;
	color: var(--muted);
	line-height: 1.5;
}

@media (max-width: 720px) {
	.rules {
		grid-template-columns: 1fr;
	}
}

/* the promise list */
.promise {
	list-style: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem 1.5rem;
	padding: 1.75rem 2rem;
}

.promise li {
	padding-left: 1.8rem;
	position: relative;
}

.promise li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: var(--green);
}

@media (max-width: 560px) {
	.promise {
		grid-template-columns: 1fr;
	}
}

/* ---- content pages ------------------------------------------------------ */
header.mini {
	text-align: center;
	padding: 2rem 1.5rem 0.5rem;
}

header.mini img {
	width: 170px;
	height: auto;
	display: inline-block;
	filter: drop-shadow(0 4px 0 rgba(var(--shadow), 0.1));
}

main.page {
	max-width: 42rem;
	margin: 1.5rem auto 0;
	padding: 2.25rem 2.25rem 2.5rem;
}

main.page h1 {
	font-size: 2.25rem;
	margin-bottom: 0.5rem;
}

main.page h2 {
	font-size: 1.4rem;
	margin: 2rem 0 0.5rem;
}

main.page p,
main.page ul {
	margin-top: 0.75rem;
}

main.page ul {
	padding-left: 1.4rem;
}

main.page li {
	margin-top: 0.45rem;
}

p.updated {
	color: var(--muted);
	font-size: 0.9375rem;
}

.lost {
	text-align: center;
}

.lost img {
	width: min(240px, 60%);
	margin: 1rem 0;
	transform: rotate(-8deg);
}

@media (max-width: 560px) {
	main.page {
		margin: 1rem 1rem 0;
		padding: 1.75rem 1.25rem 2rem;
	}
}

/* ---- footer ------------------------------------------------------------- */
footer {
	text-align: center;
	color: var(--muted);
	font-size: 0.9375rem;
	padding: 3rem 1.5rem 3rem;
}

footer a {
	color: var(--muted);
}

footer .links,
footer .credits {
	margin-bottom: 0.5rem;
}
