/* Two quiet colors set the mood; the one loud color marks what to click and what you earn. */
:root {
	--ink: #0f0f1a;
	--bone: #ece7d9;
	--loud: #7cfc00;
	--ink-soft: #b9b5a9;
	--bone-soft: #4d4b47;
	--pixel: "Press Start 2P", ui-monospace, monospace;
	--body: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
}

@font-face {
	font-family: "Press Start 2P";
	src: url("/fonts/PressStart2P-Regular.ttf") format("truetype");
	font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
	margin: 0;
	background: var(--ink);
	color: var(--bone);
	font: 400 1.0625rem/1.65 var(--body);
}

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

h1, h2, h3 { font-family: var(--pixel); font-weight: 400; margin: 0; }
h1 { font-size: clamp(1.75rem, 5.2vw, 3.25rem); line-height: 1.3; }
/* The 7vw cap keeps the longest heading word on screen at large text sizes on phones. */
h2 { font-size: min(clamp(1.25rem, 3vw, 1.875rem), 7vw); line-height: 1.4; margin-bottom: 24px; }
h3 { font-size: 1rem; line-height: 1.5; }
p { margin: 0; }

a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
section { padding-block: clamp(64px, 9vw, 112px); }
.ink { background: var(--ink); color: var(--bone); }
.bone { background: var(--bone); color: var(--ink); }
.section-lead { max-width: 60ch; margin-bottom: 32px; }

.skip { position: absolute; left: -9999px; background: var(--loud); color: var(--ink); padding: 12px; z-index: 2; }
.skip:focus { left: 12px; top: 12px; }

/* Buttons: square corners and a hard offset shadow instead of a soft one. */
.btn {
	display: inline-block;
	padding: 16px 22px;
	background: var(--loud);
	color: var(--ink);
	border: 3px solid var(--ink);
	box-shadow: 5px 5px 0 var(--ink);
	font: 400 0.8125rem/1.4 var(--pixel);
	text-decoration: none;
	text-align: center;
}
.ink .btn, .nav .btn { box-shadow: 5px 5px 0 var(--bone); }
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.ink .btn:hover, .nav .btn:hover { box-shadow: 3px 3px 0 var(--bone); }
.btn:active { transform: translate(5px, 5px); box-shadow: none; }
.btn-small { padding: 9px 12px; font-size: 0.6875rem; box-shadow: 3px 3px 0 var(--bone) !important; }
.btn-quiet { background: transparent; }
.btn-back { margin-bottom: 32px; }

.nav { position: sticky; top: 0; z-index: 1; background: var(--ink); }
.nav-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; min-height: 64px; padding-block: 8px; }
/* Holds the menu button's space so the nav doesn't shift when the script loads. */
.a11y-root { flex: none; width: 2.5rem; height: 2.5rem; margin-left: auto; }
.nav nav ~ .a11y-root { margin-left: 0; }
.logo { display: flex; align-items: center; gap: 10px; font: 400 0.8125rem var(--pixel); text-decoration: none; }
.logo img { image-rendering: pixelated; }
.nav nav { display: flex; gap: 24px; margin-left: auto; font-size: 0.9375rem; }
.nav nav a { text-decoration: none; }
.nav nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(56px, 8vw, 104px); }
.hero-scene { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; image-rendering: pixelated; }
.hero-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; }
.lead { max-width: 56ch; margin-top: 24px; font-size: 1.125rem; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 36px; }
.link { text-underline-offset: 5px; }
.knight { width: clamp(180px, 25vw, 320px); image-rendering: pixelated; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps span { display: inline-block; margin-right: 6px; padding: 5px 7px 3px 9px; background: var(--ink); color: var(--bone); }
.steps p { margin-top: 14px; color: var(--bone-soft); }

.diff { margin: 56px 0 0; background: var(--ink); color: var(--bone); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--bone-soft); }
.diff figcaption { padding: 10px 18px; border-bottom: 1px solid var(--bone-soft); font-size: 0.875rem; color: var(--ink-soft); }
.diff pre { margin: 0; padding: 20px 18px 8px; overflow-x: auto; font: inherit; }
.diff .del { color: var(--ink-soft); text-decoration: line-through; }
.reward { padding: 12px 18px 22px; font: 400 1.125rem var(--pixel); color: var(--loud); }
.reward span { display: block; margin-top: 12px; font-size: 0.6875rem; color: var(--bone); }

.shots { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.shots figure { margin: 0; }
.shots img { border: 3px solid var(--bone); width: 100%; }
.shots figcaption { margin-top: 12px; color: var(--ink-soft); font-size: 0.9375rem; }
.shot-wide { grid-column: 1 / -1; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 32px; border: 3px solid var(--ink); }
.plan-pro { background: var(--ink); color: var(--bone); box-shadow: 8px 8px 0 var(--bone-soft); }
.plan-pro .btn { box-shadow: 5px 5px 0 var(--bone); }
.plan-pro .btn:hover { box-shadow: 3px 3px 0 var(--bone); }
.price { margin-top: 18px; font: 400 2.25rem var(--pixel); }
.price small { font-size: 0.875rem; }
.plan-note { margin-top: 14px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 32px; flex: 1; }
.plan li { position: relative; padding-left: 22px; margin-bottom: 10px; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 9px; height: 9px; background: currentColor; }
.plan .btn { align-self: flex-start; }
.notes { margin: 32px 0 0; padding-left: 22px; font-size: 0.875rem; color: var(--bone-soft); max-width: 90ch; }
.notes li { margin-bottom: 6px; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { margin: 0; padding: 24px; border: 3px dashed var(--ink-soft); }
.tag { display: inline-block; padding: 7px 8px 5px; background: var(--bone); color: var(--ink); font: 400 0.625rem var(--pixel); }
.quote blockquote { margin: 18px 0; }
.quote figcaption { color: var(--ink-soft); font-size: 0.9375rem; }

.install-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; }
.command { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding: 12px 16px; background: var(--ink); color: var(--bone); max-width: 640px; }
.install-row > div { min-width: 0; }
.command code { min-width: 0; overflow-x: auto; white-space: nowrap; }
.copy { flex: none; padding: 6px 10px; background: none; color: inherit; border: 2px solid currentColor; font: inherit; font-size: 0.875rem; cursor: pointer; }
.fine { margin-top: 14px; font-size: 0.875rem; color: var(--bone-soft); }
.chest { width: clamp(160px, 20vw, 256px); image-rendering: pixelated; }

footer { padding-block: 28px; font-size: 0.875rem; border-top: 3px solid var(--bone); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--ink-soft); }
.footer-links { display: flex; gap: 20px; }
/* The default glyph is a tiny blob at footer size, so it gets its own size. */
.copyright-mark { font-size: 1.35em; line-height: 1; vertical-align: -0.1em; }

.legal h1 { font-size: clamp(1.25rem, 3.4vw, 2rem); }
.legal h2 { font-size: 1rem; margin: 40px 0 12px; }
.legal p, .legal ul { max-width: 70ch; margin-block: 0 12px; }
.legal li { margin-bottom: 6px; }
.legal .updated { margin-top: 16px; color: var(--bone-soft); font-size: 0.9375rem; }
.legal mark { padding-inline: 4px; background: var(--ink); color: var(--loud); }

@media (max-width: 860px) {
	.nav nav { display: none; }
	.nav nav ~ .a11y-root { margin-left: auto; }
	.hero-row { grid-template-columns: 1fr; }
	.knight { order: -1; width: 160px; }
	.steps, .plans, .quotes { grid-template-columns: 1fr; }
	.steps { gap: 28px; }
	.shots { grid-template-columns: 1fr; }
	.shots figure:last-child img { max-width: 320px; }
	.install-row { grid-template-columns: 1fr; }
	.chest { display: none; }
}

@media (max-width: 480px) {
	.nav-row { column-gap: 10px; }
	.logo { font-size: 0.6875rem; }
	.btn-small { padding-inline: 8px; }
}

/* Accessibility options. /a11y-init.js sets these attributes on the html element. */
html[data-text="115"] { font-size: 115%; }
html[data-text="130"] { font-size: 130%; }
html[data-text="150"] { font-size: 150%; }

html[data-font="readable"] {
	--pixel: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
	--body: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}
html[data-font="readable"] :is(h1, h2, h3) { font-weight: 700; }

html[data-contrast="high"] {
	--ink: #000;
	--bone: #fff;
	--ink-soft: #fff;
	--bone-soft: #000;
}

html[data-links="underline"] a:not(.btn, .logo) { text-decoration: underline; text-underline-offset: 0.2em; }

html[data-motion="reduce"] { scroll-behavior: auto; }
html[data-motion="reduce"] .btn:hover,
html[data-motion="reduce"] .btn:active { transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn:hover, .btn:active { transform: none; }
}
