/* Brickverse site — shared design system
   Dark, mono-engineering aesthetic inspired by type-foundry landing pages. */

@font-face {
	font-family: "Brickverse";
	src: url("../downloads/Brickverse[wght].ttf") format("truetype-variations");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Brickverse";
	src: url("../downloads/Brickverse-Italic[wght].ttf") format("truetype-variations");
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
}

:root {
	--bg: #0b0b0f;
	--bg-elev: #141419;
	--bg-elev2: #1b1b22;
	--line: rgba(255, 255, 255, 0.09);
	--line-strong: rgba(255, 255, 255, 0.18);
	--text: #ececf1;
	--text-dim: #9a9aa6;
	--text-faint: #63636e;
	--accent: #ff5c39;
	--accent-soft: rgba(255, 92, 57, 0.12);
	/* Only the project's own font is named; generic families are a last-resort fallback if it fails to load. */
	--mono: "Brickverse", monospace;
	--sans: "Brickverse", sans-serif;
	--maxw: 1180px;
	--nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

.wrap {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 32px;
}

/* ---------- shared nav ---------- */

.site-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	height: var(--nav-h);
	background: rgba(11, 11, 15, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.nav-brand {
	font-family: var(--mono);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.02em;
	display: flex;
	align-items: center;
	gap: 9px;
}

.nav-brand .mark {
	color: var(--accent);
	font-variation-settings: "wght" 700;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 4px;
}

.nav-links a {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--text-dim);
	padding: 7px 12px;
	border-radius: 7px;
	transition: color .15s, background .15s;
	white-space: nowrap;
}

.nav-links a:hover { color: var(--text); background: var(--bg-elev); }
.nav-links a.active { color: var(--text); background: var(--bg-elev); }

.nav-cta {
	font-family: var(--mono) !important;
	font-size: 13px !important;
	color: #fff !important;
	background: var(--accent) !important;
	padding: 8px 16px !important;
	border-radius: 8px !important;
	margin-left: 8px;
}
.nav-cta:hover { filter: brightness(1.08); }

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

.site-footer {
	border-top: 1px solid var(--line);
	padding: 48px 0 40px;
	margin-top: 96px;
	color: var(--text-faint);
	font-family: var(--mono);
	font-size: 13px;
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	align-items: center;
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }

/* ---------- section primitives ---------- */

.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: none; }

.eyebrow {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.eyebrow::before {
	content: "";
	width: 22px;
	height: 1px;
	background: var(--accent);
}

h1, h2, h3 { font-family: var(--mono); letter-spacing: -0.02em; line-height: 1.12; }

.h2 {
	font-size: clamp(28px, 4vw, 44px);
	margin: 0 0 20px;
}

.lead {
	color: var(--text-dim);
	font-size: 18px;
	max-width: 640px;
	margin: 0;
}

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

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 15px;
	font-weight: 400;
	padding: 14px 26px;
	border-radius: 10px;
	border: 1px solid var(--line-strong);
	transition: transform .15s, background .15s, border-color .15s, filter .15s;
	cursor: pointer;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.35); }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-elev); }

/* ---------- cards / grids ---------- */

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

.card {
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 26px;
}

.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

.card-num {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--accent);
	letter-spacing: .12em;
	display: block;
	margin-bottom: 18px;
}

/* ---------- landing: hero ---------- */

.hero {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: calc(var(--nav-h) + 48px) 0 72px;
	position: relative;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 70% 35%, rgba(255, 92, 57, 0.13), transparent 65%),
		linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 64px,
		linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 64px 100%;
	pointer-events: none;
}

.hero .wrap { position: relative; }

.hero-tag {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--text-dim);
	margin: 0 0 26px;
}
.hero-tag b { color: var(--accent); font-weight: 400; }

.hero-word {
	font-family: var(--mono);
	font-weight: 400;
	font-size: clamp(64px, 15vw, 224px);
	line-height: .95;
	letter-spacing: -0.04em;
	margin: 0;
	font-variation-settings: "wght" var(--hero-w, 560);
	animation: hero-weight 2.6s ease-out both;
}

@keyframes hero-weight {
	from { font-variation-settings: "wght" 400; letter-spacing: 0.02em; }
	to   { font-variation-settings: "wght" 700; letter-spacing: -0.04em; }
}

.hero-word em {
	font-style: italic;
	color: var(--accent);
}

.hero-sub {
	margin: 28px 0 0;
	font-size: clamp(18px, 2.2vw, 24px);
	color: var(--text-dim);
	max-width: 620px;
}

.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-meta {
	margin-top: 56px;
	display: flex;
	gap: 40px;
	flex-wrap: wrap;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--text-faint);
}
.hero-meta b { display: block; color: var(--text); font-weight: 400; font-size: 15px; margin-top: 4px; }

/* ---------- type tester ---------- */

.tester {
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 34px;
}

.tester-output {
	font-family: var(--mono);
	font-size: clamp(36px, 7vw, 88px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	word-break: break-word;
	min-height: 1.2em;
	outline: none;
	margin-bottom: 26px;
}
.tester-output[contenteditable]:focus { color: #fff; }

.tester-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 22px 34px;
	align-items: center;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--text-dim);
}

.tester-controls label { display: flex; align-items: center; gap: 12px; }

input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 180px;
	height: 3px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--accent) 0%, var(--accent) var(--pct, 50%), var(--bg-elev2) var(--pct, 50%));
	outline: none;
}
input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px; height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--accent);
	cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
	width: 12px; height: 12px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--accent);
	cursor: pointer;
}

.tester-toggle {
	font-family: var(--mono);
	font-size: 13px;
	padding: 7px 14px;
	border-radius: 7px;
	border: 1px solid var(--line-strong);
	background: transparent;
	color: var(--text-dim);
	cursor: pointer;
}
.tester-toggle.on { color: var(--accent); border-color: var(--accent); }

.specimen-strip {
	margin-top: 30px;
	font-family: var(--mono);
	color: var(--text-dim);
	font-size: 15px;
	letter-spacing: .06em;
	line-height: 2;
	word-break: break-all;
}
.specimen-strip .set { display: block; margin-bottom: 4px; }
.specimen-strip .set-label { color: var(--text-faint); font-size: 11px; letter-spacing: .16em; }

/* ---------- weights strip ---------- */

.weight-row {
	font-family: var(--mono);
	display: flex;
	align-items: baseline;
	gap: 22px;
	padding: 18px 0;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}
.weight-row:last-child { border-bottom: none; }
.weight-row .w-name { font-size: 12px; color: var(--text-faint); width: 92px; flex-shrink: 0; }
.weight-row .w-sample { font-size: clamp(24px, 4vw, 40px); }
.weight-row .w-sample em { color: var(--accent); }

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

.dl-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.dl-card .dl-icon {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--accent);
}
.dl-card .dl-name { font-family: var(--mono); font-size: 19px; }
.dl-card .dl-meta { color: var(--text-faint); font-family: var(--mono); font-size: 12px; }
.dl-card .btn { align-self: flex-start; margin-top: auto; }

/* ---------- install ---------- */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.tab-btn {
	font-family: var(--mono);
	font-size: 13px;
	padding: 9px 18px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--bg-elev);
	color: var(--text-dim);
	cursor: pointer;
}
.tab-btn[aria-selected="true"] {
	color: #fff;
	border-color: var(--accent);
	background: var(--accent-soft);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tab-panel ol { margin: 0; padding-left: 0; list-style: none; counter-reset: step; }
.tab-panel li {
	counter-increment: step;
	position: relative;
	padding: 0 0 22px 52px;
	color: var(--text-dim);
}
.tab-panel li::before {
	content: counter(step);
	position: absolute;
	left: 0; top: 0;
	width: 30px; height: 30px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
}
.tab-panel li strong { color: var(--text); font-weight: 600; }
.tab-panel code {
	font-family: var(--mono);
	font-size: 13px;
	background: var(--bg-elev2);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 2px 7px;
	color: var(--text);
}

pre.code {
	font-family: var(--mono);
	font-size: 13px;
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 18px 20px;
	overflow-x: auto;
	margin: 6px 0 0;
	color: var(--text-dim);
	line-height: 1.7;
}
pre.code .at { color: var(--accent); }
pre.code .sel { color: #7dd3fc; }

/* ---------- qa page ---------- */

.qa-hero { padding: calc(var(--nav-h) + 80px) 0 24px; }
.qa-list { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-top: 36px; }

.qa-card {
	display: block;
	background: var(--bg-elev);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 26px;
	transition: border-color .15s, transform .15s, background .15s;
}
.qa-card:hover { border-color: var(--line-strong); transform: translateY(-2px); background: var(--bg-elev2); }
.qa-card .qa-kind {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent);
}
.qa-card h3 { margin: 10px 0 6px; font-size: 19px; }
.qa-card p { margin: 0 0 14px; color: var(--text-dim); font-size: 14px; }
.qa-card .qa-go { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }
.qa-card:hover .qa-go { color: var(--accent); }

.qa-shots { margin-top: 18px; display: grid; gap: 16px; }
.qa-shots img {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 14px;
	display: block;
	background: #fff;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
	.grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
	.qa-list { grid-template-columns: 1fr; }
	.nav-links a { padding: 6px 8px; font-size: 12px; }
	.wrap { padding: 0 20px; }
}

@media (max-width: 620px) {
	.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
	.nav-links .hide-sm { display: none; }
	.hero-actions .btn { width: 100%; justify-content: center; }
}
