/* Ink Metro Tycoon site: the game's paper, ink and line colours; headings in Rubik, hand notes in Neucha. */
:root {
	--paper: #f4ecd8;
	--paper-2: #ece0c4;
	--card: #fbf6ea;
	--ink: #2a211c;
	--ink-soft: #5b4d42;
	--red: #d8413a;
	--blue: #2f6fb8;
	--green: #4f9a4a;
	--gold: #e8b33a;
	--pink: #e26b9c;
	--radius: 22px;
	--edge: 3px solid var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 17px/1.55 "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-weight: 500;
	background-image:
		radial-gradient(rgba(42, 33, 28, 0.05) 1px, transparent 1.2px),
		radial-gradient(rgba(42, 33, 28, 0.035) 1px, transparent 1.2px);
	background-size: 22px 22px, 31px 31px;
	background-position: 0 0, 11px 7px;
	overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.boil { filter: url(#boil); }
.hand { font-family: "Neucha", "Rubik", cursive; font-weight: 400; }

/* top bar */
.top {
	position: sticky; top: 0; z-index: 10;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px max(16px, calc(50% - 560px));
	background: rgba(244, 236, 216, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 2px solid rgba(42, 33, 28, 0.12);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: 0.02em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--ink); }
.top nav { display: flex; align-items: center; gap: 18px; font-weight: 600; }
.top nav > a { text-decoration: none; }
.top nav > a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.lang { display: flex; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; }
.lang button {
	font: inherit; font-size: 14px; font-weight: 700; padding: 4px 10px; border: 0; background: transparent;
	color: var(--ink); cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* hero */
.hero { position: relative; padding: 48px 0 24px; overflow: hidden; }
.hero .lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.9; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.wordmark { width: min(460px, 100%); margin: 0 0 26px; }
h1.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tag { font-size: clamp(19px, 2.3vw, 24px); line-height: 1.45; margin: 0 0 24px; max-width: 34em; }
.tag b { background: linear-gradient(transparent 58%, rgba(232, 179, 58, 0.55) 58%); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
	position: relative; display: inline-flex; align-items: center; gap: 12px;
	padding: 10px 20px 10px 14px; border-radius: 16px; border: var(--edge);
	background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 5px 0 rgba(42, 33, 28, 0.35);
}
.btn svg { width: 28px; height: 28px; flex: none; }
.btn span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 700; font-size: 19px; }
.btn small { font-size: 11px; letter-spacing: 0.08em; opacity: 0.8; font-weight: 600; }
.btn.soon { background: #6c625a; cursor: default; }
.sticker {
	position: absolute; top: -12px; right: -10px; transform: rotate(6deg);
	background: var(--gold); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px;
	font-size: 11px; font-weight: 800; padding: 2px 7px; letter-spacing: 0.05em;
}
.facts { margin: 18px 0 0; color: var(--ink-soft); font-size: 15px; }

/* the phone */
.phone {
	position: relative; width: min(300px, 78vw); margin: 0 auto; aspect-ratio: 9 / 16;
	border: 5px solid var(--ink); border-radius: 34px; overflow: hidden; background: var(--paper-2);
	box-shadow: 10px 12px 0 rgba(42, 33, 28, 0.18); transform: rotate(2.5deg);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.coin-pop {
	position: absolute; right: -18px; top: 18%; z-index: 2;
	background: var(--card); border: var(--edge); border-radius: 14px; padding: 6px 12px; font-weight: 800;
	transform: rotate(-5deg); box-shadow: 0 4px 0 rgba(42, 33, 28, 0.25);
	animation: bob 2.6s ease-in-out infinite;
}
.coin-pop i {
	display: inline-block; width: 20px; height: 20px; border-radius: 50%; vertical-align: -4px; margin-right: 6px;
	background: var(--gold); border: 2px solid var(--ink);
}
@keyframes bob { 50% { transform: rotate(-5deg) translateY(-8px); } }

/* torn paper edge between sections */
.torn {
	height: 26px; background: var(--paper-2);
	-webkit-mask: radial-gradient(14px 12px at 50% 0, transparent 96%, #000) 0 0 / 28px 26px repeat-x;
	mask: radial-gradient(14px 12px at 50% 0, transparent 96%, #000) 0 0 / 28px 26px repeat-x;
}
.band { background: var(--paper-2); }

/* sections */
section { padding: 64px 0; scroll-margin-top: 56px; }
.kicker { font-family: "Neucha", cursive; font-size: 22px; color: var(--red); display: block; margin-bottom: 4px; }
h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; margin: 0 0 14px; font-weight: 800; }
h2 em { font-style: normal; color: var(--blue); }
.lead { font-size: 19px; max-width: 40em; margin: 0 0 32px; color: var(--ink-soft); }

.loop { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center; }
.card { background: var(--card); border: var(--edge); border-radius: var(--radius); padding: 22px; height: 100%; box-shadow: 0 6px 0 rgba(42, 33, 28, 0.15); }
.card h3 { margin: 12px 0 6px; font-size: 21px; line-height: 1.2; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.ico { width: 64px; height: 64px; border-radius: 18px; border: var(--edge); display: grid; place-items: center; background: var(--paper-2); }
.ico svg { width: 44px; height: 44px; }
.arrow { width: 44px; }

/* screens */
.screens { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 20px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x mandatory; }
.screens figure { margin: 0; scroll-snap-align: start; }
.screens .shot { aspect-ratio: 9 / 16; border: 4px solid var(--ink); border-radius: 24px; overflow: hidden; background: var(--paper-2); }
.screens .shot img { width: 100%; height: 100%; object-fit: cover; }
.screens figcaption { margin-top: 10px; font-family: "Neucha", cursive; font-size: 19px; text-align: center; }

/* cities */
.cities { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cities li {
	display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px;
	background: var(--card); border: 2.5px solid var(--ink); border-radius: 999px; font-weight: 700;
	transform: rotate(var(--t, 0deg));
}
.cities li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; box-shadow: inset 0 0 0 3px var(--c, var(--red)); }
.cities small { font-weight: 500; color: var(--ink-soft); }
.note { margin-top: 18px; color: var(--ink-soft); font-size: 15px; }

/* collect */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.big { font-size: 44px; font-weight: 800; line-height: 1; display: block; margin-top: 6px; }

/* fair */
.fair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.fair .card { display: flex; gap: 16px; align-items: flex-start; }
.fair .ico { flex: none; }
.fair h3 { margin-top: 0; }

/* text pages */
.doc { padding: 40px 0 64px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(26px, 7.4vw, 46px); margin: 0 0 6px; line-height: 1.1; overflow-wrap: break-word; hyphens: auto; }
.doc .date { color: var(--ink-soft); margin: 0 0 24px; }
.doc h2 { font-size: 24px; margin: 34px 0 10px; }
.doc p, .doc li { color: #3b2f27; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .short { background: var(--card); border: var(--edge); border-radius: var(--radius); padding: 18px 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 2px solid rgba(42, 33, 28, 0.15); }
.doc th { font-weight: 800; }
.doc .table { overflow-x: auto; }
.faq details { background: var(--card); border: var(--edge); border-radius: 16px; padding: 14px 18px; margin: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.mail { display: inline-block; margin: 8px 0 0; padding: 10px 18px; border: var(--edge); border-radius: 14px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; }

/* footer */
footer { border-top: 2px solid rgba(42, 33, 28, 0.15); padding: 26px 0 40px; font-size: 15px; color: var(--ink-soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	.coin-pop { animation: none; }
}

@media (max-width: 860px) {
	.hero .wrap { grid-template-columns: 1fr; gap: 28px; }
	.loop { grid-template-columns: 1fr; }
	.arrow { transform: rotate(90deg); margin: 0 auto; width: 36px; }
	.grid3, .fair { grid-template-columns: 1fr; }
	.hide-sm { display: none; }
	section { padding: 48px 0; }
	.coin-pop { right: -6px; }
	.hero .lines { display: none; }
	.wordmark { width: min(320px, 100%); }
}
