/* GFA Decompiler download site */

:root {
	--ink: #0e1014;
	--ink-2: #151820;
	--ink-3: #1c2029;
	--line: #2a2f3b;
	--text: #e9e4d8;
	--muted: #a19c90;
	--faint: #6d6a63;
	--accent: #f2a03d;
	--accent-ink: #1b1206;
	--green: #5fd18b;
	--yellow: #f2cf5b;
	--red: #ef6b5e;
	--blue: #7fb2ff;
	--gem: #e9e4d8;
	--radius: 10px;
	--wrap: 1120px;
	--sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", 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 faint 1-pixel dot grid, like a low-resolution screen */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
	background-size: 4px 4px;
	z-index: -1;
}

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

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

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

:not(pre) > code {
	background: var(--ink-3);
	border: 1px solid var(--line);
	border-radius: 5px;
	padding: 0.08em 0.4em;
	white-space: nowrap;
}

.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; border-radius: 6px; }

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(14, 16, 20, 0.82);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}

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

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 30px; }
.brand small { font-weight: 500; color: var(--muted); font-family: var(--mono); font-size: 12px; }

.site-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.site-nav a {
	color: var(--muted);
	text-decoration: none;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 15px;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); background: var(--ink-3); }
.site-nav .button { margin-left: 8px; }

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

.button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform 0.12s ease, background 0.12s ease;
}
.button:hover { background: #ffb257; color: var(--accent-ink); transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; }
.button.small { padding: 6px 14px; font-size: 14px; }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button.ghost:hover { background: var(--ink-3); color: var(--text); }

/* ---------- hero ---------- */

.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }

.hero::after {
	content: "";
	position: absolute;
	width: 720px;
	height: 720px;
	right: -220px;
	top: -260px;
	background: radial-gradient(circle, rgba(242, 160, 61, 0.16), transparent 62%);
	z-index: -1;
}

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

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 500 13px/1 var(--mono);
	color: var(--accent);
	border: 1px solid rgba(242, 160, 61, 0.35);
	background: rgba(242, 160, 61, 0.08);
	padding: 7px 12px;
	border-radius: 99px;
	margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; }

.hero h1 { font-size: clamp(40px, 5.4vw, 64px); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent); }

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

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

.meta { margin-top: 18px; font: 13px/1.5 var(--mono); color: var(--faint); }
.meta span + span::before { content: "·"; margin: 0 8px; }

/* ---------- GEM window ---------- */

.gem {
	background: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
	overflow: hidden;
}

.gem-title {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 34px;
	padding: 0 10px;
	background: var(--ink-3);
	border-bottom: 1px solid var(--line);
	font: 500 12px/1 var(--mono);
	color: var(--muted);
}

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

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

.gem pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }

.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(--blue); }

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

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

section { padding: 80px 0; }
section.band { background: var(--ink-2); border-block: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 40px); }
.section-head p { color: var(--muted); margin: 0; }
.kicker { font: 500 13px/1 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 14px; display: block; }

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

.card {
	background: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px;
}
.band .card { background: var(--ink); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

.icon {
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 9px;
	background: rgba(242, 160, 61, 0.1);
	color: var(--accent);
	margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }

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

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

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

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

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

pre.code {
	position: relative;
	margin: 0;
	background: var(--ink-3);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 16px 18px;
	padding-right: 84px;
	overflow-x: auto;
	line-height: 1.65;
	font-size: 14px;
}
.band pre.code { background: var(--ink); }

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

.copy {
	position: absolute;
	top: 10px;
	right: 10px;
	font: 500 12px/1 var(--mono);
	color: var(--muted);
	background: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--faint); }

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

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

.release-card {
	background: linear-gradient(160deg, rgba(242, 160, 61, 0.12), transparent 55%), var(--ink);
	border: 1px solid rgba(242, 160, 61, 0.3);
	border-radius: 14px;
	padding: 32px;
}
.release-card .version { font: 700 40px/1 var(--sans); letter-spacing: -0.02em; margin: 6px 0 4px; }
.release-card .version { margin-bottom: 24px; }
.release-card .date { color: var(--muted); font-size: 15px; margin: -18px 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 code { color: var(--text); }
.release-card li::before { content: "▸"; color: var(--accent); }
.badge { display: inline-block; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; padding: 5px 8px; border-radius: 5px; background: rgba(95, 209, 139, 0.14); color: var(--green); }

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

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

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

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

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

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

.link-card {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--ink-2);
	color: var(--text);
	text-decoration: none;
	transition: border-color 0.12s ease, transform 0.12s ease;
}
.link-card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.link-card svg { width: 24px; height: 24px; flex: none; color: var(--muted); margin-top: 2px; }
.link-card strong { display: block; font-size: 16px; }
.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(36px, 4.4vw, 52px); }

.doc {
	display: grid;
	grid-template-columns: 220px 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: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); }
.toc a.current { color: var(--text); border-left-color: var(--accent); }

.prose h2 { font-size: 30px; margin-top: 56px; padding-top: 8px; }
.prose > section:first-child h2 { margin-top: 0; }
.prose section { padding: 0; }
.prose h3 { font-size: 19px; margin-top: 32px; }
.prose p, .prose li { color: #cfc9bc; }
.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: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.options td:first-child { white-space: nowrap; }
.options td { color: #cfc9bc; }

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

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

.site-footer { border-top: 1px solid var(--line); 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 6px; max-width: 44em; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

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

@media (max-width: 920px) {
	.hero .wrap, .download, .doc { grid-template-columns: minmax(0, 1fr); }
	.hero { padding-top: 56px; }
	.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); border-radius: 6px; 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 { white-space: nowrap; }
	.brand small { display: none; }
	.site-header .wrap { gap: 12px; }
	section { padding: 60px 0; }
	.release-card { padding: 24px; }
	.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; }
}

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

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

.releases { display: grid; gap: 14px; max-width: 820px; }
.release {
	padding: 20px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--ink-2);
}
.release h3 { font-size: 19px; margin: 0 0 10px; }
.release h3 span { margin-left: 10px; font: 500 13px var(--mono); color: var(--muted); letter-spacing: 0; }
.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[hidden] { display: none; }

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