/* forgeOS website: the desktop's default "Forge" palette (dev_docs/theme.md). */
:root {
	--base: #111013;
	--deep: #0b0a0d;
	--raised: #1c1a1e;
	--line: #3a3336;
	--dim: #7a706a;
	--secondary: #a99d92;
	--text: #c9beb2;
	--heading: #ded2c4;
	--ember: #e84525;
	--flame: #ff6b35;
	--glow: #ffab64;
	--mono: "JetBrains Mono", "JetBrainsMono Nerd Font", ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
	--sans: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Noto Sans", sans-serif;
	color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--base); }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(ellipse 80% 420px at 50% -120px, rgba(232, 69, 37, 0.20), transparent 70%),
		radial-gradient(ellipse 40% 260px at 85% 0, rgba(255, 171, 100, 0.07), transparent 70%),
		var(--base);
	color: var(--text);
	font: 16px/1.65 var(--sans);
}

a { color: var(--flame); text-decoration: none; }
a:hover { color: var(--glow); text-decoration: underline; text-underline-offset: 3px; }

code, pre, .prompt, .brand, nav, table.files, .version, .name { font-family: var(--mono); }

code {
	font-size: 0.88em;
	color: var(--glow);
	background: var(--raised);
	border: 1px solid var(--line);
	border-radius: 5px;
	padding: 0.05em 0.35em;
	overflow-wrap: anywhere;
}

/* --- Header and footer --------------------------------------------------- */

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 24px;
	max-width: 1040px;
	width: 100%;
	margin: 0 auto;
	padding: 20px 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--heading);
	font-size: 20px;
	letter-spacing: 0.02em;
}
.brand:hover { color: var(--heading); text-decoration: none; }
.brand strong { color: var(--flame); font-weight: 700; }
.brand img { filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.35)); }

nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
nav a {
	color: var(--secondary);
	padding: 6px 12px;
	border-radius: 6px;
	border: 1px solid transparent;
}
nav a:hover { color: var(--glow); background: var(--raised); text-decoration: none; }
nav a[aria-current="page"] { color: var(--glow); border-color: var(--line); background: var(--raised); }

main {
	flex: 1;
	width: 100%;
	max-width: 1040px;
	margin: 0 auto;
	padding: 8px 16px 48px;
}

.site-footer {
	border-top: 1px solid var(--line);
	color: var(--dim);
	font-size: 13px;
	text-align: center;
	padding: 20px 16px 28px;
}
.site-footer p { margin: 4px 0; }
.site-footer code { color: var(--secondary); background: none; border: none; padding: 0; }

/* --- Type ----------------------------------------------------------------- */

h1, h2, h3 { color: var(--heading); line-height: 1.25; }
h1 { font-size: clamp(26px, 4.5vw, 38px); margin: 24px 0 12px; }
h2 { font-size: 22px; margin: 44px 0 12px; }
h2::before { content: "## "; color: var(--flame); font-family: var(--mono); font-weight: 400; }
h3 { font-size: 17px; margin: 28px 0 8px; color: var(--glow); }

.prompt { font-weight: 500; letter-spacing: -0.01em; }
.prompt span { color: var(--glow); font-weight: 400; }
.prompt::after {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 1em;
	margin-left: 0.15em;
	vertical-align: -0.12em;
	background: var(--flame);
	animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .prompt::after { animation: none; } }

.lead { font-size: 18px; color: var(--secondary); max-width: 720px; }
.note { color: var(--secondary); border-left: 3px solid var(--ember); padding: 4px 0 4px 14px; margin: 18px 0; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--flame); }

/* Technical terms: dotted underline, short explanation on hover or focus. */
.term {
	position: relative;
	text-decoration: underline dotted var(--secondary);
	text-underline-offset: 3px;
	cursor: help;
}
.term::after {
	content: attr(data-tip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translate(-50%, 4px);
	width: max-content;
	max-width: min(300px, 80vw);
	padding: 8px 12px;
	background: var(--raised);
	border: 1px solid var(--line);
	border-top: 2px solid var(--flame);
	border-radius: 6px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	color: var(--text);
	font: 400 13px/1.5 var(--sans);
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s, transform 0.12s;
	z-index: 20;
}
.term:hover::after, .term:focus::after { opacity: 1; transform: translate(-50%, 0); }
.term:focus { outline: none; }

/* --- Hero ----------------------------------------------------------------- */

.hero {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 32px;
	padding: 28px 0 8px;
}
.hero img {
	width: 220px;
	height: 220px;
	filter: drop-shadow(0 0 40px rgba(232, 69, 37, 0.35));
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.button {
	display: inline-block;
	font-family: var(--mono);
	font-size: 15px;
	padding: 11px 20px;
	border-radius: 8px;
	border: 2px solid var(--flame);
	background: linear-gradient(180deg, rgba(255, 107, 53, 0.22), rgba(232, 69, 37, 0.10));
	color: var(--heading);
	overflow-wrap: anywhere;
}
.button:hover { color: var(--glow); border-color: var(--glow); text-decoration: none; }
.button.quiet { border-color: var(--line); background: var(--raised); }
.button.quiet:hover { border-color: var(--flame); }

.screenshot { margin: 24px 0; }
.screenshot img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(232, 69, 37, 0.12);
}

/* --- Panels, features, steps -------------------------------------------- */

.panel {
	background: rgba(28, 26, 30, 0.85);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 18px 20px;
	margin: 16px 0;
}
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
	margin: 20px 0;
}
.feature {
	background: var(--raised);
	border: 1px solid var(--line);
	border-top: 2px solid var(--flame);
	border-radius: 10px;
	padding: 16px 18px;
}
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; color: var(--secondary); font-size: 15px; }

.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }

ol.steps { list-style: none; counter-reset: step; padding: 0; }
ol.steps > li {
	counter-increment: step;
	position: relative;
	padding: 2px 0 2px 46px;
	margin: 18px 0;
}
ol.steps > li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid var(--flame);
	color: var(--glow);
	font: 600 14px/26px var(--mono);
	text-align: center;
}

.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

.download { margin: 16px 0; }
.download .meta { color: var(--dim); font-size: 14px; margin: 10px 0 0; }
.download .hash code { font-size: 12px; }

/* --- Code blocks ---------------------------------------------------------- */

pre {
	background: var(--deep);
	border: 1px solid var(--line);
	border-left: 3px solid var(--flame);
	border-radius: 8px;
	padding: 14px 16px;
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.6;
	color: var(--text);
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
pre .comment { color: var(--dim); }
pre .section { color: var(--glow); }

/* --- Tables --------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 12px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
	text-align: left;
	color: var(--dim);
	font-weight: 500;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-bottom: 1px solid var(--line);
	padding: 8px 10px;
}
td { border-bottom: 1px solid rgba(58, 51, 54, 0.6); padding: 8px 10px; vertical-align: top; }
tbody tr:hover td { background: rgba(255, 107, 53, 0.05); }
td.name { color: var(--glow); white-space: nowrap; }
td.version { color: var(--heading); white-space: nowrap; }
td.date, th.date { white-space: nowrap; color: var(--dim); }
td.number, th.number { text-align: right; white-space: nowrap; }
table.files td:first-child { overflow-wrap: anywhere; }
table.packages { min-width: 640px; }

/* --- Small screens -------------------------------------------------------- */

@media (max-width: 720px) {
	.hero { grid-template-columns: 1fr; }
	.hero img { width: 140px; height: 140px; order: -1; }
	h2 { margin-top: 36px; }
	.panel { padding: 14px 14px; }
	table.files th.date, table.files td.date { display: none; }
}
