:root {
	--bg: #0f1216;
	--panel: #1a1f26;
	--panel-edge: #2b323d;
	--panel-inset: #141920;
	--text: #e9e6de;
	--muted: #8c96a3;
	--line: #232a33;
	--link: #86afd6;
	--led-online: #56d98b;
	--led-offline: #e06456;
	--led-unknown: #e8b45a;

	--font-display: "Space Grotesk", sans-serif;
	--font-body: "IBM Plex Sans", sans-serif;
	--font-mono: "IBM Plex Mono", monospace;
}

* {
	box-sizing: border-box;
}

html {
	color-scheme: dark;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

main {
	max-width: 46rem;
	margin: 0 auto;
	padding: 4rem 1.25rem 3rem;
}

@keyframes fade-in-up {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.faceplate,
.counters,
.anchor-nav,
.about,
.steps,
.request,
.settings,
footer {
	animation: fade-in-up 0.6s ease-out both;
}
.faceplate {
	animation-delay: 0s;
}
.counters {
	animation-delay: 0.08s;
}
.anchor-nav {
	animation-delay: 0.14s;
}
.about {
	animation-delay: 0.18s;
}
.steps {
	animation-delay: 0.22s;
}
.request {
	animation-delay: 0.26s;
}
.settings {
	animation-delay: 0.3s;
}
footer {
	animation-delay: 0.34s;
}

@media (prefers-reduced-motion: reduce) {
	.faceplate,
	.counters,
	.anchor-nav,
	.about,
	.steps,
	.request,
	.settings,
	footer {
		animation: none;
	}
}

a {
	color: var(--link);
	text-underline-offset: 3px;
}
a:focus-visible,
:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 3px;
}

section[id] {
	scroll-margin-top: 1.5rem;
}

.faceplate {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 2rem;
	padding: 2.25rem 2.5rem;
	background: linear-gradient(
		180deg,
		#1d232b 0%,
		var(--panel) 55%,
		#171c23 100%
	);
	border: 1px solid var(--panel-edge);
	border-radius: 10px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.05),
		0 14px 34px rgba(0, 0, 0, 0.45);
}

.screw {
	position: absolute;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #4a5361, #20252d 70%);
	box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.7);
}
.screw::after {
	content: "";
	position: absolute;
	inset: 4px 1px;
	height: 1.5px;
	background: rgba(0, 0, 0, 0.65);
	transform: rotate(38deg);
}
.screw--tl {
	top: 11px;
	left: 11px;
}
.screw--tr {
	top: 11px;
	right: 11px;
}
.screw--bl {
	bottom: 11px;
	left: 11px;
}
.screw--br {
	bottom: 11px;
	right: 11px;
}

.eyebrow {
	margin: 0 0 0.6rem;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
}

h1 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2.4rem, 6vw, 3.4rem);
	line-height: 1;
	letter-spacing: -0.02em;
}

.tagline {
	margin: 0.7rem 0 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* LED + readout */

.plate-status {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

.led {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.55);
	box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.4);
}
.led--online {
	background: var(--led-online);
	box-shadow:
		0 0 14px 2px rgba(86, 217, 139, 0.55),
		inset 0 -2px 3px rgba(0, 0, 0, 0.25);
	animation: pulse 2.6s ease-in-out infinite;
}
.led--offline {
	background: var(--led-offline);
	box-shadow:
		0 0 12px 1px rgba(224, 100, 86, 0.45),
		inset 0 -2px 3px rgba(0, 0, 0, 0.25);
}
.led--unknown {
	background: var(--led-unknown);
	box-shadow:
		0 0 12px 1px rgba(232, 180, 90, 0.4),
		inset 0 -2px 3px rgba(0, 0, 0, 0.25);
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.55;
	}
}
@media (prefers-reduced-motion: reduce) {
	.led--online {
		animation: none;
	}
}

.readout {
	display: flex;
	flex-direction: column;
}

.readout-label,
.counter-label {
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
}

.readout-value {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.2;
}
.readout-value--online {
	color: var(--led-online);
}
.readout-value--offline {
	color: var(--led-offline);
}
.readout-value--unknown {
	color: var(--led-unknown);
}

.readout-sub,
.counter-sub {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--muted);
}

/* ------------------------------------------------------------- counters */

.counters {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	margin-top: 1rem;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow: hidden;
}

.counter {
	background: var(--panel-inset);
	padding: 1.4rem 1.75rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.counter-value {
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 1.85rem;
	letter-spacing: 0.02em;
}

.counter--wide {
	grid-column: 1 / -1;
	padding: 0.8rem 1.75rem;
	flex-direction: row;
}

/* ----------------------------------------------------------- anchor nav */

.anchor-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.5rem;
}

.anchor-nav a {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-decoration: none;
	color: var(--muted);
	padding: 0.45rem 0.95rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	transition:
		color 120ms ease,
		border-color 120ms ease,
		box-shadow 120ms ease,
		transform 120ms ease;
}
.anchor-nav a:hover {
	color: var(--text);
	border-color: var(--link);
	box-shadow: 0 0 12px -2px rgba(134, 175, 214, 0.45);
	transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
	.anchor-nav a:hover {
		transform: none;
	}
}

/* ---------------------------------------------------------------- prose */

.about {
	margin-top: 3rem;
	color: var(--muted);
}
.about p {
	margin: 0 0 1rem;
}
.about p:last-child {
	margin-bottom: 0;
}

h2 {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.45rem;
	letter-spacing: -0.01em;
	margin: 0 0 1.5rem;
}

.section-intro {
	margin: -0.75rem 0 1.5rem;
	color: var(--muted);
	font-size: 0.97rem;
}

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

.steps {
	margin-top: 3.25rem;
}

.steps ol {
	list-style: none;
	counter-reset: step;
	margin: 0;
	padding: 0;
}

.steps li {
	counter-increment: step;
	position: relative;
	padding: 0 0 1.9rem 3.4rem;
	border-left: 1px solid var(--line);
	margin-left: 1.05rem;
}
.steps li:last-child {
	padding-bottom: 0.25rem;
}

.steps li::before {
	content: counter(step, decimal-leading-zero);
	position: absolute;
	left: -1.1rem;
	top: -0.1rem;
	width: 2.2rem;
	height: 2.2rem;
	display: grid;
	place-items: center;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--text);
	background: var(--panel);
	border: 1px solid var(--panel-edge);
	border-radius: 6px;
}

.steps h3 {
	margin: 0 0 0.35rem;
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 500;
}

.steps p {
	margin: 0;
	color: var(--muted);
	font-size: 0.97rem;
}

/* -------------------------------------------------------------- request */

.request {
	margin-top: 3.25rem;
}

.request-card {
	background: var(--panel-inset);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 1.75rem;
}
.request-card p {
	margin: 0 0 1.4rem;
	color: var(--muted);
	font-size: 0.97rem;
}

.button {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.82rem;
	letter-spacing: 0.05em;
	text-decoration: none;
	color: var(--bg);
	background: var(--link);
	padding: 0.65rem 1.3rem;
	border-radius: 8px;
	transition:
		filter 120ms ease,
		box-shadow 120ms ease,
		transform 120ms ease;
}
.button:hover {
	filter: brightness(1.12);
	box-shadow: 0 0 18px -3px rgba(134, 175, 214, 0.6);
	transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
	.button:hover {
		transform: none;
	}
}

/* -------------------------------------------------------------- devices */

.settings {
	margin-top: 3.25rem;
}

.devices {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.75rem;
}

.device {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	text-decoration: none;
	background: var(--panel-inset);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 1.1rem 1.2rem;
	transition:
		border-color 120ms ease,
		box-shadow 120ms ease,
		transform 120ms ease;
}
.device:hover {
	border-color: var(--link);
	box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5), 0 0 14px -4px rgba(134, 175, 214, 0.4);
	transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
	.device:hover {
		transform: none;
	}
}

.device-name {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 0.98rem;
	color: var(--text);
}

.device-hint {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--muted);
}

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

footer {
	margin-top: 3.5rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--line);
}
footer p {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	line-height: 1.9;
	letter-spacing: 0.04em;
	color: var(--muted);
}

/* --------------------------------------------------------------- mobile */

@media (max-width: 640px) {
	main {
		padding-top: 2.5rem;
	}
	.faceplate {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.75rem;
		padding: 2rem 1.5rem;
	}
	.counters {
		grid-template-columns: 1fr 1fr 1fr;
	}
	.counter {
		padding: 1rem 0.9rem 0.9rem;
	}
	.counter-value {
		font-size: 1.4rem;
	}
	.counter--wide {
		padding: 0.7rem 0.9rem;
	}
	.devices {
		grid-template-columns: 1fr 1fr;
	}
}
