/* SputCo: a mid-80s vector display in a mainframe terminal */

:root {
	--p: rgb(130, 255, 90);			/* P1 phosphor, as in VectorBricks */
	--p-dim: rgba(130, 255, 90, 0.62);
	--p-faint: rgba(130, 255, 90, 0.22);
	--hot: #eaffdc;					/* beam core */
	--bg: #000;
	--glow: 0 0 2px rgba(130, 255, 90, 0.9), 0 0 8px rgba(130, 255, 90, 0.45), 0 0 18px rgba(130, 255, 90, 0.2);
	--box-glow: 0 0 6px rgba(130, 255, 90, 0.35), inset 0 0 6px rgba(130, 255, 90, 0.18);
	--mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "Lucida Console", "DejaVu Sans Mono", "Courier New", monospace;
	--max: 1080px;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	min-height: 100vh;
	background: transparent;
	color: var(--p);
	font: 16px/1.65 var(--mono);
	text-shadow: var(--glow);
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--p); color: #000; text-shadow: none; }

a { color: var(--p); }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--p); outline-offset: 4px; }

.sr-only {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip { position: absolute; left: -9999px; top: 0; z-index: 10; background: var(--p); color: #000; padding: 8px 12px; text-shadow: none; }
.skip:focus { left: 8px; top: 8px; }

/* --- the tube ----------------------------------------------------------- */

#attract {
	position: fixed; inset: 0;
	width: 100%; height: 100%;
	z-index: -2;
	display: block;
}

/* scanlines and a vignette over everything; never catches clicks */
.crt {
	position: fixed; inset: 0;
	pointer-events: none;
	z-index: 5;
	background:
		repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.22) 3px),
		radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.65) 100%);
}

/* --- vector lettering ------------------------------------------------- */

svg.vec { display: block; height: 1em; width: auto; overflow: visible; filter: drop-shadow(0 0 1.5px rgba(130,255,90,0.9)) drop-shadow(0 0 7px rgba(130,255,90,0.55)) drop-shadow(0 0 18px rgba(130,255,90,0.25)); }
svg.vec path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg.vec .beam { stroke: var(--p); stroke-width: 0.42; }
svg.vec .core { stroke: var(--hot); stroke-width: 0.13; opacity: 0.85; }
svg.vec .glyph { opacity: 0; transition: opacity 60ms linear; }
svg.vec .glyph.on { opacity: 1; }

/* --- top bar -------------------------------------------------------------- */

.topbar {
	position: sticky; top: 0; z-index: 4;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px max(20px, calc((100% - var(--max)) / 2 + 20px));
	background: rgba(0, 0, 0, 0.94);
	border-bottom: 1px solid var(--p-faint);
}
.brand { font-size: 22px; text-decoration: none; }
.topbar ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.topbar nav a { text-decoration: none; font-size: 14px; letter-spacing: 0.12em; }
.topbar nav a:hover { color: var(--hot); }
.key { display: inline-block; padding: 0 5px; margin-right: 4px; border: 1px solid var(--p-dim); box-shadow: var(--box-glow); }

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

main { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.hero {
	min-height: calc(100vh - 62px);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 32px 0 56px;
	text-align: center;
}

.boot {
	align-self: stretch;
	min-height: 7.5em;
	margin: 0 0 24px;
	font: 13px/1.25 var(--mono);
	color: var(--p-dim);
	text-align: left;
	white-space: pre-wrap;
}

.monitor {
	width: min(560px, 100%);
	padding: 10px;
	border: 1.5px solid var(--p);
	border-radius: 14px;
	box-shadow: var(--box-glow);
	background: #000;
}
.monitor video {
	display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 42vh; object-fit: contain;
	border-radius: 8px;
	background: #000;
	filter: saturate(1.1) contrast(1.05);
}
.monitor-controls { display: flex; justify-content: space-between; margin-top: 8px; }

button {
	font: 13px var(--mono); letter-spacing: 0.08em;
	color: var(--p-dim); text-shadow: var(--glow);
	background: none; border: 0; padding: 4px 2px; cursor: pointer;
}
button:hover { color: var(--hot); }

.hero-title { margin: 36px 0 0; font-size: clamp(56px, 13vw, 120px); line-height: 1; }
.hero-title svg.vec { margin: 0 auto; }

.hero-sub {
	display: flex; align-items: center; justify-content: center; gap: 18px;
	width: min(100%, 640px);
	margin: 26px 0 0;
	font-size: clamp(14px, 2.6vw, 24px);
	opacity: 0; transition: opacity 500ms linear;
}
.hero-sub.on { opacity: 1; }
.hero-sub.on svg .glyph { opacity: 1; }
.hero-sub svg.vec .beam { stroke-width: 0.36; }
.rule { flex: 1; height: 0; border-top: 1.5px solid var(--p-dim); box-shadow: 0 0 6px rgba(130,255,90,0.5); }

/* --- panels ------------------------------------------------------------- */

.panel {
	position: relative;
	margin: 0 0 56px;
	padding: 34px clamp(18px, 4vw, 44px) 38px;
	border: 1.5px solid var(--p-dim);
	box-shadow: var(--box-glow);
	background: rgba(0, 0, 0, 0.86);
	scroll-margin-top: 80px;
}
/* corner ticks, like a plotted frame */
.panel::before, .panel::after {
	content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
	border: 0 solid var(--p);
	filter: drop-shadow(0 0 4px rgba(130,255,90,0.8));
}
.panel::before { top: -7px; left: -7px; border-top-width: 3px; border-left-width: 3px; }
.panel::after { bottom: -7px; right: -7px; border-bottom-width: 3px; border-right-width: 3px; }

h2 { margin: 0 0 26px; font-size: 34px; line-height: 1; }
h3 { margin: 0 0 14px; font-size: 30px; line-height: 1; }

.lead { font-size: 18px; }
p { margin: 0 0 1em; max-width: 72ch; }

/* --- games ------------------------------------------------------------- */

.game { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
@media (max-width: 760px) { .game { grid-template-columns: 1fr; } }

.screen {
	margin: 0;
	padding: 8px;
	border: 1.5px solid var(--p-dim);
	border-radius: 10px;
	box-shadow: var(--box-glow);
	background: #000;
}
.screen img { display: block; width: 100%; height: auto; border-radius: 6px; }

.status { color: var(--hot); letter-spacing: 0.1em; font-size: 14px; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.features { margin: 0 0 22px; padding: 0; list-style: none; }
.features li { position: relative; padding-left: 26px; margin: 0 0 6px; }
.features li::before { content: ">"; position: absolute; left: 4px; color: var(--p-dim); }
.features b { color: var(--hot); }

.button {
	display: inline-block;
	padding: 10px 18px;
	border: 1.5px solid var(--p);
	box-shadow: var(--box-glow);
	text-decoration: none; letter-spacing: 0.12em;
}
.button:hover { background: var(--p); color: #000; text-shadow: none; }

/* --- transmissions ------------------------------------------------------ */

.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 22px 0 0; padding: 0; list-style: none; }
.channel {
	display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center;
	padding: 18px 20px;
	border: 1.5px solid var(--p-dim);
	box-shadow: var(--box-glow);
	text-decoration: none;
	transition: border-color 120ms;
}
.channel svg { grid-row: span 2; width: 56px; height: 42px; overflow: visible; fill: none; stroke: var(--p); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(130,255,90,0.9)) drop-shadow(0 0 7px rgba(130,255,90,0.5)); }
.channel-name { font-size: 20px; letter-spacing: 0.14em; }
.channel-desc { font-size: 13px; color: var(--p-dim); }
.channel:hover { border-color: var(--hot); }
.channel:hover .channel-name { color: var(--hot); }

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

.footer {
	max-width: var(--max); margin: 0 auto; padding: 12px 20px 48px;
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
	font-size: 13px; color: var(--p-dim); letter-spacing: 0.08em;
}
.footer p { margin: 0; }
.cursor { display: inline-block; width: 0.6em; height: 1em; margin-left: 4px; vertical-align: -2px; background: var(--p); box-shadow: 0 0 8px rgba(130,255,90,0.7); animation: blink 1s steps(1) infinite; }

@media (prefers-reduced-motion: reduce) {
	.blink, .cursor { animation: none; }
}

/* --- 404 ------------------------------------------------------------------ */

.lost { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 24px; }
.lost h1 { margin: 0; font-size: clamp(48px, 12vw, 110px); }
.lost h1 svg.vec { margin: 0 auto; }

@media (max-width: 520px) {
	.topbar { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
	.brand { font-size: 16px; }
	.topbar ul { gap: 4px 12px; }
	.topbar nav a { font-size: 11px; letter-spacing: 0.06em; }
	.key { display: none; }
}
