/* zurbax.com: one dark page in the colours of Hive's themes */

:root,
[data-theme="carbon"] {
	--deep: #0b0b0b; --bg: #121212; --surface: #1a1a1a; --surface-2: #222222; --border: #222222; --border-2: #3a3a3a;
	--text: #e6e6e6; --text-2: #bebebe; --muted: #8a8a8a; --brand: #e68e0d; --brand-2: #d35f5f; --ink: #0b0b0b;
	/* the wordmark's bands, top to bottom, and its shadow */
	--b1: #ffd98a; --b2: #f7b443; --b3: #e68e0d; --b4: #d9652a; --b5: #b5402f; --shade: #2a1608;
}
[data-theme="midnight"] {
	--deep: #13141c; --bg: #1a1b26; --surface: #1f2230; --surface-2: #24283b; --border: #2a2e45; --border-2: #414868;
	--text: #c0caf5; --text-2: #a9b1d6; --muted: #8b93b8; --brand: #7aa2f7; --brand-2: #bb9af7; --ink: #0c0e14;
	--b1: #dfe5ff; --b2: #b4c3fb; --b3: #7aa2f7; --b4: #6e7fe0; --b5: #8d6fd6; --shade: #0b0d18;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 16px/1.6 "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
	transition: background-color .5s, color .5s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 700; }
p { margin: 0; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.kicker, .fine, kbd, .brand span, .strip, .picker-name, .nav { font-family: "JetBrains Mono", ui-monospace, monospace; }
.kicker { font-size: 13px; letter-spacing: .04em; text-transform: lowercase; color: var(--brand); margin-bottom: 14px; }
.fine { font-size: 13px; color: var(--muted); }
section { padding: 96px 0; }
.head { max-width: 720px; margin-bottom: 40px; }
.head p { color: var(--text-2); margin-top: 14px; font-size: 18px; }

/* ---- the bar ---- */
.bar {
	position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
	background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border-2) 40%, transparent);
}
.bar-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--text); text-decoration: none; }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px;
	background: var(--brand); color: var(--ink); font-weight: 650; font-size: 15px; border: 1px solid transparent;
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 40%, transparent); transition: transform .15s, box-shadow .25s, background .5s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn.big { padding: 16px 28px; font-size: 17px; border-radius: 14px; }
.btn.ghost { background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--text); border-color: var(--border-2); }
.btn.ghost:hover { box-shadow: none; border-color: var(--brand); }

/* the theme picker */
.picker { position: relative; }
.picker-btn {
	display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; cursor: pointer;
	background: var(--surface); color: var(--text-2); border: 1px solid var(--border-2); font-size: 13px;
}
.picker-btn:hover { color: var(--text); border-color: var(--brand); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; display: block; }
.dots i:nth-child(1) { background: var(--brand); }
.dots i:nth-child(2) { background: var(--brand-2); }
.dots i:nth-child(3) { background: var(--text); }
.picker-list {
	position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 210px;
	background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 24px 60px -20px #000c;
}
.picker-list button {
	width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; cursor: pointer;
	background: none; color: var(--text-2); font: 14px "JetBrains Mono", monospace; text-align: left;
}
.picker-list button:hover, .picker-list button[aria-checked="true"] { background: var(--surface-2); color: var(--text); }
.picker-list .sw { display: inline-flex; gap: 2px; }
.picker-list .sw i { width: 9px; height: 9px; display: block; }

.strip {
	display: block; text-align: center; padding: 10px 16px; font-size: 13px; color: var(--text-2);
	background: var(--deep); border-bottom: 1px solid var(--border);
}
.strip:hover { color: var(--text); text-decoration: none; }
.strip .tag { color: var(--ink); background: var(--brand); padding: 1px 6px; margin-right: 8px; }

/* ---- the hero ---- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; isolation: isolate; }
.hero-bg {
	position: absolute; inset: 0; z-index: -1; background: var(--deep) var(--wall, url("/images/hive/bit-carbon.png")) center 30% / cover no-repeat;
	image-rendering: pixelated; transition: background-image .6s;
	/* it fades into the water below */
	-webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.hero-bg::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent) 0%, color-mix(in srgb, var(--bg) 80%, transparent) 45%, var(--bg) 78%);
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; image-rendering: pixelated; }
/* the black water behind every page (pixels.js) */
.px-waves { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; image-rendering: pixelated; pointer-events: none; }
.hero-in { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; }
.mark { margin: 14px 0 34px; line-height: 0; width: min(940px, 100%); }
.mark-text { font-size: clamp(72px, 15vw, 196px); font-weight: 800; letter-spacing: -0.06em; line-height: .9; color: var(--text); }
/* drawn in pixels once the script is in: the text stays for readers and search */
.js .mark-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pixel-mark { display: none; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 18px 40px color-mix(in srgb, var(--brand) 28%, transparent)); }
.js .pixel-mark { display: block; }
.pixel-mark .b1 { fill: var(--b1); } .pixel-mark .b2 { fill: var(--b2); } .pixel-mark .b3 { fill: var(--b3); }
.pixel-mark .b4 { fill: var(--b4); } .pixel-mark .b5 { fill: var(--b5); } .pixel-mark .sh { fill: var(--shade); }
.pixel-mark .hl { fill: #fff; fill-opacity: .3; }
.pixel-mark .dk { fill: #000; fill-opacity: .22; }
.pixel-mark rect { transition: fill .5s; }
.pixel-mark.build rect.px { animation: pop 1ms steps(1) both; animation-delay: var(--d); }
.pixel-mark.build rect.sh { animation: pop 1ms steps(1) both; animation-delay: calc(var(--d) + .05s); }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }
.tag-line { font-size: clamp(18px, 2.2vw, 23px); color: var(--text-2); max-width: 660px; }
.tag-line em { font-style: normal; color: var(--text); background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 650; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 32px 0 18px; }
.screen {
	position: relative; z-index: 2; margin: 56px 0 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border-2);
	box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--brand) 55%, #000), 0 0 0 6px color-mix(in srgb, var(--surface) 60%, transparent);
}
.screen .shot { width: 100%; transition: opacity .35s; }
.screen .shot.fading { opacity: .25; }

/* ---- about ---- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: start; }
.about-copy p { color: var(--text-2); font-size: 18px; margin-top: 18px; }
.tenets { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tenets li { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text-2); }
.tenets b { color: var(--text); margin-right: 6px; }

/* ---- cards and the gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
	margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
	transition: transform .25s, border-color .25s, background .5s;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.card img { width: 100%; border-bottom: 1px solid var(--border); }
.card figcaption { padding: 16px 18px 18px; display: grid; gap: 4px; }
.card figcaption span, .card.text p { color: var(--text-2); font-size: 15px; }
.card.text { padding: 24px; display: grid; gap: 10px; align-content: start; }
.card b { font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trio { padding: 72px 0; }

/* ---- Hive ---- */
.hive { background: color-mix(in srgb, var(--deep) 45%, transparent); border-block: 1px solid var(--border); }
.hive-in { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hive-copy p { color: var(--text-2); font-size: 17px; margin-top: 16px; }
.setup { background: transparent; }
.setup .hive-in { grid-template-columns: 1.25fr 1fr; }
.setup .screen { margin: 0; border-radius: 0; box-shadow: 8px 8px 0 color-mix(in srgb, var(--brand) 70%, #000), 0 30px 90px -40px color-mix(in srgb, var(--brand) 55%, #000); }
.keys { margin: 0; display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; padding: 22px; }
.keys div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.keys dt { display: flex; gap: 6px; }
.keys dd { margin: 0; color: var(--text-2); font-size: 15px; text-align: right; }
kbd {
	display: inline-block; min-width: 30px; text-align: center; padding: 3px 9px; font-size: 13px; color: var(--text);
	background: var(--surface-2); border: 1px solid var(--border-2); border-bottom-width: 3px; border-radius: 7px;
}

/* ---- themes ---- */
.theme-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 900px; }
.theme-grid button {
	width: 100%; padding: 0; cursor: pointer; text-align: left; background: var(--surface); color: var(--text);
	border: 1px solid var(--border); border-radius: 14px; overflow: hidden; font: inherit; transition: transform .2s, border-color .2s;
}
.theme-grid button:hover { transform: translateY(-3px); border-color: var(--border-2); }
.theme-grid button[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.theme-grid img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; image-rendering: pixelated; }
.theme-grid .meta { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font: 14px "JetBrains Mono", monospace; }
.theme-grid .sw { display: inline-flex; gap: 3px; }
.theme-grid .sw i { width: 10px; height: 10px; display: block; }

/* ---- pixels ---- */
.pixels-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.pix-copy p { color: var(--text-2); font-size: 17px; margin-top: 16px; }
.pix-copy .fine { font-size: 13px; }
.pix-demo {
	position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; border: 1px solid var(--border-2);
	background: var(--deep) var(--wall, url("/images/hive/bit-carbon.png")) center / cover; image-rendering: pixelated;
}
.pix-grid { position: absolute; inset: 14% 12%; display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(10, 1fr); }
.pix-grid i { background: var(--surface-2); opacity: 0; }
.pix-grid i.top { background: color-mix(in srgb, var(--surface-2) 70%, var(--text)); }
.pix-grid i.edge { background: var(--brand); }
.pix-demo.play .pix-grid i { animation: pix 4.2s steps(1) infinite; animation-delay: var(--d); }
@keyframes pix { 0% { opacity: 0; } 8% { opacity: 1; } 70% { opacity: 1; } 78% { opacity: 0; } 100% { opacity: 0; } }
.pix-label { position: absolute; left: 14px; bottom: 12px; font: 12px "JetBrains Mono", monospace; color: var(--text-2); background: color-mix(in srgb, var(--deep) 70%, transparent); padding: 3px 8px; border-radius: 6px; }

/* ---- install ---- */
.install { background: var(--deep); border-block: 1px solid var(--border); }
.install-in { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; }
.get, .try { background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px; padding: 36px; }
.get { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface) 60%); }
.get p, .try p { color: var(--text-2); margin-top: 14px; }
.get-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 26px; }
.note { margin-top: 18px !important; }
.try h3 { font-size: 22px; }
.try .btn { margin: 20px 8px 0 0; }

/* ---- the foot ---- */
.foot { border-top: 1px solid var(--border); padding: 56px 0 64px; background: var(--deep); }
.foot-in { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.foot-brand p { color: var(--muted); margin-top: 10px; font-size: 14px; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.foot-cols div { display: grid; gap: 8px; align-content: start; }
.foot-cols h4 { font: 600 13px "JetBrains Mono", monospace; color: var(--text); margin-bottom: 4px; }
.foot-cols a { color: var(--text-2); font-size: 14px; }

/* ---- after the download starts ---- */
.next { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: #0009; backdrop-filter: blur(6px); }
.next[hidden] { display: none; }
.next-card { position: relative; width: min(560px, 100%); background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px; padding: 32px; }
.next-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: var(--muted); font-size: 26px; cursor: pointer; }
.next-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.next-steps li { display: flex; gap: 14px; }
.next-steps li > b { flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: var(--brand); color: var(--ink); border-radius: 8px; font-family: "JetBrains Mono", monospace; }
.next-steps h3 { font-size: 16px; }
.next-steps p { color: var(--text-2); font-size: 14px; margin-top: 4px; }

/* rising into place */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .rise.in { opacity: 1; transform: none; }

@media (max-width: 920px) {
	.nav { display: none; }
	.about, .hive-in, .pixels-in, .install-in { grid-template-columns: 1fr; gap: 36px; }
	.setup .hive-in { grid-template-columns: 1fr; }
	.cards { grid-template-columns: 1fr; }
	section { padding: 72px 0; }
}
@media (max-width: 600px) {
	.gallery { grid-template-columns: 1fr; }
	.picker-name { display: none; }
	.hero { padding-top: 64px; }
	.get, .try { padding: 24px; }
	.keys dd { font-size: 14px; }
}
/* ---- the pixel style on the page (pixels.js) ---- */
.px-cursor body { cursor: var(--cur-arrow); }
.px-cursor a, .px-cursor button, .px-cursor summary, .px-cursor .btn { cursor: var(--cur-hand); }
.px-host { position: relative; display: block; }
.px-veil { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.px-progress {
	position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; pointer-events: none;
	background: repeating-linear-gradient(90deg, var(--brand) 0 10px, transparent 10px 14px);
}
.px-progress::after { content: ""; position: absolute; right: -14px; top: 0; width: 10px; height: 3px; background: var(--b1); animation: blink .6s steps(1) infinite; }
.px-sparks, .px-wipe { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; pointer-events: none; z-index: 60; }
.px-wipe { z-index: 70; }
@keyframes blink { 50% { opacity: 0; } }
/* the sight's corners round a button you point at */
.btn { position: relative; }
.btn::after {
	content: ""; position: absolute; inset: -9px; pointer-events: none; opacity: 0; transition: opacity .12s steps(2), inset .18s steps(3);
	--c: var(--brand);
	background:
		linear-gradient(var(--c), var(--c)) left top / 10px 2px, linear-gradient(var(--c), var(--c)) left top / 2px 10px,
		linear-gradient(var(--c), var(--c)) right top / 10px 2px, linear-gradient(var(--c), var(--c)) right top / 2px 10px,
		linear-gradient(var(--c), var(--c)) left bottom / 10px 2px, linear-gradient(var(--c), var(--c)) left bottom / 2px 10px,
		linear-gradient(var(--c), var(--c)) right bottom / 10px 2px, linear-gradient(var(--c), var(--c)) right bottom / 2px 10px;
	background-repeat: no-repeat;
}
.btn:hover::after, .btn:focus-visible::after { opacity: 1; inset: -5px; }
/* typing, with a block for a cursor */
.tw { position: relative; }
.tw-ready .tw:not(.on) { visibility: hidden; }
.typing .tw-last::after {
	content: ""; position: absolute; left: 100%; top: .12em; width: .62em; height: 1.05em; margin-left: 1px;
	background: var(--brand); animation: blink .5s steps(1) infinite;
}
/* the light across the name */
.pixel-mark .sw { fill: #fff; opacity: 0; animation: sweep 6s steps(1, end) infinite; animation-delay: calc(2.4s + var(--s) * .9s); }
@keyframes sweep { 0% { opacity: .6; } 2% { opacity: .28; } 4%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.pixel-mark.build rect { animation: none; }
	.js .rise { opacity: 1; transform: none; transition: none; }
	.pix-demo.play .pix-grid i { animation: none; opacity: 1; }
	.px-progress::after { animation: none; }
	.btn::after { transition: none; }
}
