/* Phoenix Decompiler download site: 80s retro, in the logo's colours (night-sky purple, sunset orange and pink,
   neon magenta and cyan), pixel headings and a CRT's scanlines. */

:root {
	--ink: #0d0716;
	--ink-2: #160c26;
	--ink-3: #1f1235;
	--line: #3a2560;
	--text: #f3ecff;
	--muted: #b6a6d2;
	--faint: #7a6a98;
	--accent: #ff9a1f;
	--accent-2: #ff3fa4;
	--accent-ink: #1a0b02;
	--neon: #e040fb;
	--cyan: #3ee6ff;
	--green: #4dff9a;
	--yellow: #ffd84a;
	--red: #ff5d7a;
	--blue: #7fb2ff;
	--sunset: linear-gradient(180deg, #ffd84a 0%, #ff9a1f 38%, #ff3fa4 72%, #b23bff 100%);
	--radius: 4px;
	--wrap: 1140px;
	--pixel: "Press Start 2P", "VT323", ui-monospace, monospace;
	--sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "VT323", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--ink);
	color: var(--text);
	font: 17px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
}

/* a CRT's scanlines over the whole page */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
	z-index: 50;
}

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #9cf4ff; }

img, svg { display: block; max-width: 100%; }

code, pre, kbd { font-family: var(--mono); font-size: 1.12em; }

:not(pre) > code {
	background: var(--ink-3);
	border: 1px solid var(--line);
	border-radius: 3px;
	padding: 0 0.35em;
	white-space: nowrap;
	color: var(--yellow);
}

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 6px 12px; }

/* ---------- header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(13, 7, 22, 0.88);
	backdrop-filter: blur(8px);
	border-bottom: 2px solid var(--neon);
	box-shadow: 0 2px 18px -6px var(--neon);
}

.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--text);
	text-decoration: none;
	white-space: nowrap;
	font: 12px/1 var(--pixel);
}
.brand img { image-rendering: pixelated; border-radius: 3px; box-shadow: 0 0 12px -2px var(--accent-2); }
.brand span {
	background: var(--sunset);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.brand:hover { color: var(--text); }
.brand small { font: 18px/1 var(--mono); color: var(--cyan); }

.site-nav { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.site-nav a {
	white-space: nowrap;
	color: var(--muted);
	text-decoration: none;
	padding: 6px 11px;
	font-size: 15px;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); text-shadow: 0 0 8px var(--neon); }
.site-nav .button { margin-left: 8px; }
.site-nav a.button, .site-nav a.button:hover { color: var(--accent-ink); padding: 8px 12px; text-shadow: none; }

/* ---------- buttons ---------- */

.button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 20px;
	border-radius: 2px;
	background: var(--sunset);
	color: var(--accent-ink);
	font: 11px/1.2 var(--pixel);
	text-decoration: none;
	border: 2px solid #ffd84a;
	box-shadow: 4px 4px 0 var(--neon);
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.button:hover { color: var(--accent-ink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--cyan); }
.button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--neon); }
.button svg { width: 16px; height: 16px; }
.button.small { padding: 8px 12px; font-size: 9px; box-shadow: 3px 3px 0 var(--neon); }
.button.ghost { background: transparent; color: var(--cyan); border-color: var(--cyan); box-shadow: 4px 4px 0 var(--line); }
.button.ghost:hover { background: rgba(62, 230, 255, 0.08); color: var(--cyan); }

/* ---------- hero: a sunset over a neon grid ---------- */

.hero { padding: 72px 0 96px; position: relative; overflow: hidden; isolation: isolate; }

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 70% 55% at 70% 30%, rgba(255, 63, 164, 0.22), transparent 70%),
		radial-gradient(ellipse 50% 40% at 20% 10%, rgba(178, 59, 255, 0.18), transparent 70%);
	z-index: -2;
}

/* the grid floor, in perspective, to the horizon */
.horizon {
	position: absolute;
	left: -50%;
	right: -50%;
	bottom: -40%;
	height: 75%;
	background-image:
		linear-gradient(to right, rgba(224, 64, 251, 0.55) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(224, 64, 251, 0.55) 1px, transparent 1px);
	background-size: 64px 40px;
	transform: perspective(420px) rotateX(62deg);
	transform-origin: top;
	mask-image: linear-gradient(to bottom, transparent, #000 35%);
	z-index: -1;
	animation: grid 3.5s linear infinite;
}
@keyframes grid { to { background-position: 0 40px; } }

.hero .wrap {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 56px;
	align-items: center;
}

.hero-art img {
	width: 100%;
	max-width: 480px;
	margin-left: auto;
	border: 3px solid var(--neon);
	border-radius: 18px;
	box-shadow: 0 0 0 3px #1a0b2e, 0 0 40px -4px var(--neon), 0 0 90px -20px var(--accent-2);
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font: 20px/1.1 var(--mono);
	color: var(--yellow);
	border: 1px solid rgba(255, 216, 74, 0.45);
	background: rgba(255, 216, 74, 0.07);
	padding: 6px 12px;
	margin-bottom: 26px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 10px var(--green); }

h1, h2, h3 { line-height: 1.35; margin: 0 0 0.6em; font-weight: 400; }
h1, h2 { font-family: var(--pixel); letter-spacing: 0; }

.hero h1 { font-size: clamp(26px, 3.6vw, 42px); line-height: 1.3; text-shadow: 3px 3px 0 #3a1460; }
.hero h1 em {
	font-style: normal;
	background: var(--sunset);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-shadow: none;
	filter: drop-shadow(0 0 12px rgba(255, 63, 164, 0.6));
}

.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 34px; }
.lead strong { color: var(--text); font-weight: 500; }

.cta { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }

.meta { margin-top: 24px; font: 19px/1.4 var(--mono); color: var(--faint); }
.meta span + span::before { content: "·"; margin: 0 8px; color: var(--neon); }

/* ---------- demo: the terminal and the page ---------- */

.demo-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: center; }
.demo .section-head { margin-bottom: 0; }

.screenshot { margin: 48px 0 0; }
.screenshot img {
	width: 100%;
	border: 2px solid var(--line);
	border-radius: 8px;
	box-shadow: 0 0 0 2px #0a0512, 0 24px 70px -20px rgba(224, 64, 251, 0.55);
}
.screenshot figcaption { margin-top: 12px; color: var(--faint); font-size: 14.5px; text-align: center; }

/* ---------- GEM window, in neon ---------- */

.gem {
	background: #08040f;
	border: 2px solid var(--cyan);
	box-shadow: 0 0 24px -6px var(--cyan), 6px 6px 0 var(--neon);
	overflow: hidden;
}

.gem-title {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 30px;
	padding: 0 8px;
	background: var(--ink-3);
	border-bottom: 2px solid var(--cyan);
	font: 18px/1 var(--mono);
	color: var(--cyan);
}

/* the striped title bar of a GEM window */
.gem-title .stripes {
	flex: 1;
	height: 12px;
	background: repeating-linear-gradient(to bottom, rgba(62, 230, 255, 0.45) 0 2px, transparent 2px 4px);
}

.gem-title .box { width: 14px; height: 14px; border: 2px solid var(--cyan); flex: none; }

.gem pre {
	margin: 0;
	padding: 18px 20px;
	overflow-x: auto;
	font-size: 19px;
	line-height: 1.25;
	text-shadow: 0 0 6px rgba(77, 255, 154, 0.25);
}

.t-prompt { color: var(--faint); }
.t-cmd { color: var(--text); }
.t-dim { color: var(--muted); }
.t-ok { color: var(--green); }
.t-warn { color: var(--yellow); }
.t-bad { color: var(--red); }
.t-acc { color: var(--accent); }
.t-blue { color: var(--cyan); }

.cursor { display: inline-block; width: 0.55em; height: 1em; vertical-align: -0.15em; background: var(--green); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- sections ---------- */

section { padding: 84px 0; position: relative; }
section.band {
	background: linear-gradient(180deg, rgba(178, 59, 255, 0.07), transparent 40%), var(--ink-2);
	border-block: 2px solid var(--line);
}

.section-head { max-width: 660px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.4; text-shadow: 2px 2px 0 #3a1460; }
.section-head p { color: var(--muted); margin: 0; }
.kicker { font: 20px/1 var(--mono); color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 16px; display: block; text-shadow: 0 0 10px rgba(255, 63, 164, 0.6); }

.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
	position: relative;
	background: var(--ink-2);
	border: 2px solid var(--line);
	border-radius: var(--radius);
	padding: 26px;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { border-color: var(--neon); box-shadow: 0 0 22px -8px var(--neon); }
.band .card { background: var(--ink); }
.card h3 { font: 500 19px/1.3 var(--sans); margin-bottom: 10px; color: var(--yellow); }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card p + p { margin-top: 12px; }

.icon {
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	background: rgba(255, 63, 164, 0.12);
	border: 1px solid rgba(255, 63, 164, 0.4);
	color: var(--accent-2);
	margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }

.basics .card h3 img { height: 30px; width: auto; image-rendering: pixelated; }
.new-tag {
	position: absolute;
	top: -12px;
	right: 16px;
	font: 9px/1 var(--pixel);
	padding: 6px 8px;
	background: var(--sunset);
	color: var(--accent-ink);
	box-shadow: 3px 3px 0 var(--neon);
}

/* ---------- steps ---------- */

.steps { counter-reset: step; display: grid; gap: 10px; }

.step {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 28px;
	align-items: start;
	padding: 22px 0;
	border-top: 1px dashed var(--line);
}
.step:first-child { border-top: 0; }

.step h3 { font: 500 18px/1.3 var(--sans); display: flex; gap: 12px; align-items: baseline; }
.step h3::before {
	counter-increment: step;
	content: counter(step, decimal-leading-zero);
	font: 11px/1 var(--pixel);
	color: var(--accent-2);
}
.step p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* ---------- code blocks ---------- */

pre.code {
	position: relative;
	margin: 0;
	background: #08040f;
	border: 1px solid var(--line);
	border-left: 3px solid var(--green);
	padding: 12px 18px;
	padding-right: 84px;
	overflow-x: auto;
	line-height: 1.3;
	font-size: 15px;
	color: var(--green);
}
.band pre.code { background: #08040f; }

pre.code .c { color: var(--faint); }

.copy {
	position: absolute;
	top: 8px;
	right: 8px;
	font: 16px/1 var(--mono);
	color: var(--muted);
	background: var(--ink-3);
	border: 1px solid var(--line);
	padding: 5px 9px;
	cursor: pointer;
}
.copy:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- download ---------- */

.download { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: start; }

.release-card {
	background: linear-gradient(160deg, rgba(255, 63, 164, 0.14), transparent 55%), var(--ink);
	border: 2px solid var(--neon);
	box-shadow: 0 0 30px -10px var(--neon), 8px 8px 0 #2a1248;
	padding: 32px;
}
.release-card .version {
	font: 30px/1.2 var(--pixel);
	margin: 14px 0 24px;
	background: var(--sunset);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.release-card .date { color: var(--muted); font-size: 15px; margin: -14px 0 24px; }
.release-card ul { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.release-card li { display: flex; gap: 10px; align-items: baseline; }
.release-card li::before { content: "▸"; color: var(--accent-2); }
.badge { display: inline-block; font: 9px/1 var(--pixel); text-transform: uppercase; padding: 6px 8px; background: rgba(77, 255, 154, 0.14); color: var(--green); border: 1px solid rgba(77, 255, 154, 0.5); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.tabs button {
	font: 10px/1 var(--pixel);
	color: var(--muted);
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	padding: 14px 16px;
	margin-bottom: -2px;
	cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--yellow); border-bottom-color: var(--accent-2); }

[role=tabpanel] p { color: var(--muted); font-size: 15.5px; }
[role=tabpanel] pre.code { margin: 12px 0 18px; }

.older { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line); }
.older[hidden] { display: none; }
.older strong { display: block; font: 18px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 12px; font-weight: 400; }
.older ul { margin: 0; }
.older li::before { content: "↓"; }
.older li span { color: var(--faint); font-size: 14px; }

/* ---------- lists ---------- */

.ticks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: "▸"; color: var(--accent-2); }

/* ---------- results legend ---------- */

.results { display: grid; gap: 10px; }
.result {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 16px;
	align-items: baseline;
	padding: 14px 18px;
	border: 1px solid var(--line);
	background: var(--ink);
	font-size: 15px;
	color: var(--muted);
}
.result b { font: 22px/1 var(--mono); font-weight: 400; }

/* ---------- links ---------- */

.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.link-card {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 20px 22px;
	border: 2px solid var(--line);
	background: var(--ink-2);
	color: var(--text);
	text-decoration: none;
	transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.link-card:hover { border-color: var(--cyan); color: var(--text); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--cyan); }
.link-card svg { width: 24px; height: 24px; flex: none; color: var(--cyan); margin-top: 2px; }
.link-card strong { display: block; font-size: 16px; color: var(--yellow); font-weight: 500; }
.link-card span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }

/* ---------- documentation page ---------- */

.doc-hero { padding: 64px 0 24px; }
.doc-hero h1 { font-size: clamp(22px, 3vw, 34px); text-shadow: 3px 3px 0 #3a1460; }

.doc {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	gap: 56px;
	padding: 24px 0 96px;
}

.toc { position: sticky; top: 92px; align-self: start; font-size: 14.5px; }
.toc strong { display: block; font: 18px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-2); margin-bottom: 12px; font-weight: 400; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); }
.toc a.current { color: var(--yellow); border-left-color: var(--accent-2); }

.prose h2 { font-size: 20px; line-height: 1.4; margin-top: 64px; padding-top: 8px; text-shadow: 2px 2px 0 #3a1460; }
.prose > section:first-child h2 { margin-top: 0; }
.prose section { padding: 0; }
.prose h3 { font: 500 19px/1.3 var(--sans); margin-top: 32px; color: var(--yellow); }
.prose h2.with-logo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.prose h2.with-logo img { height: 30px; width: auto; image-rendering: pixelated; }
.prose p, .prose li { color: #d6cbea; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose pre.code { margin: 16px 0 22px; }

.options { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; }
.options th, .options td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.options th { font: 18px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-2); font-weight: 400; }
.options td:first-child { white-space: nowrap; }
.options td { color: #d6cbea; }

.note {
	border: 1px solid var(--line);
	border-left: 4px solid var(--accent-2);
	background: var(--ink-2);
	padding: 14px 18px;
	margin: 18px 0;
	color: var(--muted);
	font-size: 15.5px;
}

/* ---------- footer ---------- */

.site-footer { border-top: 2px solid var(--neon); box-shadow: 0 -2px 18px -8px var(--neon); padding: 40px 0 56px; color: var(--faint); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer p { margin: 0 0 8px; max-width: 48em; }
.site-footer .dedication { font-style: italic; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

/* ---------- small screens ---------- */

@media (max-width: 920px) {
	.hero .wrap, .download, .doc, .demo-grid { grid-template-columns: minmax(0, 1fr); }
	.hero-art img { margin: 0 auto; max-width: 380px; }
	.brand small { display: none; }
	.site-nav a { padding: 6px 8px; }
	.site-nav a[href$="#start"], .site-nav a[href*="atari-forum"], .site-nav a[href$="#basics"] { display: none; }
	.hero { padding-top: 48px; }
	.grid.three { grid-template-columns: 1fr 1fr; }
	.step { grid-template-columns: 1fr; gap: 12px; }
	.toc { position: static; }
	.toc ol { display: flex; flex-wrap: wrap; border: 0; gap: 4px; }
	.toc a { border: 1px solid var(--line); padding: 5px 10px; margin: 0; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.grid.three, .grid.two, .links { grid-template-columns: 1fr; }
	.site-nav a:not(.button) { display: none; }
	.brand { font-size: 10px; }
	.site-header .wrap { gap: 12px; }
	section { padding: 60px 0; }
	.release-card { padding: 24px; }
	.release-card .version { font-size: 22px; }
	.result { grid-template-columns: 1fr; gap: 6px; }
	.options td:first-child { white-space: normal; }
	.options th, .options td { padding: 10px 8px; }
	.options code { white-space: normal; overflow-wrap: anywhere; }
	.gem pre { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.cursor, .horizon { animation: none; }
	.button, .link-card, .card { transition: none; }
}

/* ---------- release notes ---------- */

.releases { display: grid; gap: 16px; max-width: 840px; }
.release {
	padding: 22px 26px;
	border: 2px solid var(--line);
	background: var(--ink-2);
}
.release:first-child { border-color: var(--neon); box-shadow: 0 0 22px -10px var(--neon); }
.release h3 { font: 12px/1.4 var(--pixel); margin: 0 0 14px; color: var(--yellow); }
.release h3 span { margin-left: 10px; font: 18px var(--mono); color: var(--muted); }
.release p { margin: 0 0 10px; color: var(--muted); }
.release ul { margin: 0; padding-left: 20px; color: var(--muted); }
.release li + li { margin-top: 6px; }
.release li strong { color: var(--text); font-weight: 500; }
.release[hidden] { display: none; }

.release-card .guide { margin-top: 16px; }
.release-card .guide[hidden], .guide-by[hidden] { display: none; }
.guide-by { color: var(--muted); font-size: 13px; margin-top: 6px; }
