/* herozdev.net - dark, purple, Minecraft. The headings are images in Minecraft's own font (tools/make_site_assets.py) */

:root {
	--bg: #0d0a14;
	--bg2: #141020;
	--line: #2a2140;
	--text: #e6e1ee;
	--muted: #a49cb4;
	--purple: #7c40e6;
	--purple-hi: #b48cff;
	--aqua: #55ffff;
	--pink: #ff55ff;
	--red: #ff5555;
	--gold: #ffaa00;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple-hi); }
.px { image-rendering: pixelated; }
h1, h2 { margin: 0; }

/* ---------- the top bar ---------- */
.bar {
	position: sticky; top: 0; z-index: 10;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 10px 24px;
	background: rgba(13, 10, 20, 0.92);
	border-bottom: 1px solid var(--line);
}
.bar-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.bar-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.bar-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.bar-nav a:hover { color: #fff; }

/* ---------- the hero: the screenshot behind, the copy on the dark side (the banner's slanted purple edge) ---------- */
.hero { position: relative; min-height: 640px; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-shot { position: absolute; inset: 0 0 0 44%; }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: var(--bg);
	clip-path: polygon(0 0, 62% 0, 52% 100%, 0 100%);
}
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: var(--purple);
	clip-path: polygon(62% 0, calc(62% + 6px) 0, calc(52% + 6px) 100%, 52% 100%);
}
.hero-copy { position: relative; z-index: 2; width: min(760px, 58%); padding: 48px 0 48px 6vw; }
.hero-logo { width: 110px; margin-bottom: 14px; }
.hero h1 img { width: min(384px, 100%); }
.lede { font-size: 18px; color: var(--text); margin: 18px 0 24px; max-width: 34em; }

/* the server, as Minecraft's multiplayer list shows it */
.server {
	position: relative;
	display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start;
	padding: 8px; max-width: 656px;
	background: #000; border: 2px solid #8b8b8b;
}
.server-text img { width: 560px; max-width: 100%; }
.server-status { position: absolute; top: 8px; right: 10px; display: flex; align-items: center; gap: 8px; color: var(--muted); font: 600 14px/1 ui-monospace, Consolas, monospace; white-space: nowrap; }
.ping { display: inline-flex; align-items: flex-end; gap: 1px; height: 14px; }
.ping i { width: 3px; background: #00ff21; }
.ping i:nth-child(1) { height: 4px; } .ping i:nth-child(2) { height: 6px; } .ping i:nth-child(3) { height: 8px; }
.ping i:nth-child(4) { height: 11px; } .ping i:nth-child(5) { height: 14px; }
.server.down .ping i { background: #555; }

.ip-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.ip, .btn-discord {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 12px 18px; font: 700 17px/1 system-ui, sans-serif; border-radius: 3px; cursor: pointer; text-decoration: none;
}
.ip { background: var(--purple); color: #fff; border: 0; }
.ip:hover { background: #8d55f0; }
.ip-hint { font-weight: 400; font-size: 13px; opacity: 0.8; }
.ip.copied .ip-hint::after { content: " - copied"; }
.btn-discord { background: transparent; color: #fff; border: 1px solid var(--line); }
.btn-discord:hover { border-color: var(--purple-hi); }

/* ---------- a gamemode ---------- */
.mode { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: start; padding: 88px 6vw; border-bottom: 1px solid var(--line); }
.mode.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.mode.flip .mode-text { order: 2; }
.mode h2 img { width: min(384px, 100%); }
.mode-solo h2 img { width: min(516px, 100%); }
.mode-kart h2 img { width: min(276px, 100%); }
.tag { margin: 8px 0 18px; font-size: 18px; font-weight: 600; }
.mode-azure .tag { color: var(--aqua); }
.mode-solo .tag { color: var(--pink); }
.mode-kart .tag { color: var(--red); }
.mode p { color: var(--text); max-width: 36em; }
.mode ul { padding: 0; margin: 20px 0 0; list-style: none; }
.mode li { padding: 7px 0 7px 22px; position: relative; color: var(--muted); border-top: 1px solid var(--line); }
.mode li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; }
.mode-azure li::before { background: var(--aqua); }
.mode-solo li::before { background: var(--pink); }
.mode-kart li::before { background: var(--red); }

.mode-shots { display: grid; gap: 14px; }
.shot { margin: 0; background: var(--purple); clip-path: polygon(0 0, 100% 0, calc(100% - 34px) 100%, 0 100%); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; clip-path: polygon(0 0, calc(100% - 6px) 0, calc(100% - 40px) 100%, 0 100%); }
.shot:not(.shot-big) { width: 62%; justify-self: end; }
.mode-azure .shot { background: var(--aqua); }
.mode-solo .shot { background: var(--pink); }
.mode-kart .shot { background: var(--red); }

/* the trailers: their own files (preload none: nothing downloads till play), the poster a frame of each */
.video { margin: 26px 0 0; }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.video.tall { max-width: 300px; }
.video.tall video { aspect-ratio: 9 / 16; }
.video figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---------- joining ---------- */
.join, .about { padding: 88px 6vw; border-bottom: 1px solid var(--line); }
.join h2 img { width: min(300px, 100%); }
.join-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.join-card { background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--purple); padding: 22px 24px; }
.join-card h3 { margin: 0 0 12px; font-size: 18px; }
.join-card ol { margin: 0; padding-left: 20px; color: var(--muted); }
.join-card li { margin: 6px 0; }
.join-card b { color: var(--text); }
.join-card p { color: var(--muted); margin: 0 0 12px; }
.copy {
	font: 600 15px/1 ui-monospace, Consolas, monospace; color: #fff;
	background: #000; border: 1px solid #555; padding: 4px 8px; cursor: pointer;
}
.copy:hover { border-color: var(--purple-hi); }
.copy.copied { border-color: #00ff21; }
.regions { list-style: none; padding: 0; margin: 0; }
.regions li { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.regions span { width: 64px; color: var(--muted); }
.add-bedrock { display: inline-block; margin-top: 14px; font-size: 14px; }

/* ---------- about ---------- */
.about h2 img { width: min(390px, 100%); }
.about-body { display: flex; gap: 24px; align-items: flex-start; margin-top: 28px; max-width: 760px; }
.about-pic { width: 120px; height: 120px; object-fit: cover; border: 2px solid var(--purple); flex-shrink: 0; }
.about-body p { margin: 0 0 12px; color: var(--muted); }

/* ---------- footer ---------- */
.foot { padding: 36px 6vw 48px; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.foot .small { font-size: 13px; max-width: 60em; }

/* ---------- phones and narrow screens ---------- */
@media (max-width: 900px) {
	.bar { padding: 10px 16px; }
	.bar-nav a:not(:last-child) { display: none; }
	.hero { min-height: 0; flex-direction: column; align-items: stretch; }
	.hero-shot { position: relative; inset: auto; height: 220px; }
	.hero::before, .hero::after { display: none; }
	.hero-copy { width: 100%; padding: 28px 16px 40px; }
	.server { grid-template-columns: 48px minmax(0, 1fr); }
	.server-icon { width: 48px; height: 48px; }
	.server-status { position: static; grid-column: 2; }
	.mode, .mode.flip { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 56px 16px; }
	.mode.flip .mode-text { order: 0; }
	.shot:not(.shot-big) { width: 100%; }
	.join, .about { padding: 56px 16px; }
	.join-grid { grid-template-columns: minmax(0, 1fr); }
	.about-body { flex-direction: column; }
	.foot { padding: 28px 16px 40px; }
}
