/* One column, 1080px wide. Text runs on a 7-column grid; the hero gives the skin the
   right three columns. The in-game parts (menu, nametags) use the Minecraft font so they
   read as the game, everything else is plain Plex. */

@font-face { font-family: "Minecraft"; src: url("fonts/minecraft.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --raised: #111;
  --panel: #151515;
  --line: #262626;
  --line-2: #333;
  --text: #f2f2f2;
  --muted: #a1a1aa;
  --faint: #71717a;

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --mc: "Minecraft", ui-monospace, monospace;

  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --radius: 6px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em; color: var(--faint); }
.mc { font-family: var(--mc); -webkit-font-smoothing: none; font-synthesis: none; }

/* buttons */
.button {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px;
  border: 1px solid var(--text); border-radius: var(--radius); background: var(--text); color: var(--bg);
  font: 500 15px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s;
}
.button:hover { background: #d4d4d4; border-color: #d4d4d4; }
.button small { font: 400 12px var(--mono); color: #52525b; }
.link { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
.link:hover { color: var(--text); text-decoration-color: var(--muted); }

/* ---------------- header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; height: 56px; gap: 28px; }
.top .name { font-weight: 600; text-decoration: none; margin-right: auto; }
.top nav { display: flex; gap: 24px; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; transition: color .15s; }
.top nav a:hover { color: var(--text); }
.top .get { font-size: 14px; color: var(--text); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); transition: border-color .15s; }
.top .get:hover { border-color: var(--muted); }

/* ---------------- hero */
.hero .wrap { display: grid; grid-template-columns: 4fr 3fr; gap: 48px; align-items: end; padding-top: 96px; }
.hero h1 { font-size: 64px; line-height: 1; letter-spacing: -0.03em; font-weight: 600; }
.hero h1 span { color: var(--faint); }
.hero .intro { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 30em; }
.hero .intro strong { color: var(--text); font-weight: 500; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; padding-bottom: 72px; }

.figure { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.stage { position: relative; height: 380px; display: grid; place-items: end center; }
.stage .flat { height: 320px; width: auto; image-rendering: pixelated; margin-bottom: 0; }
.stage canvas.view3d { cursor: grab; }
.stage canvas.view3d:active { cursor: grabbing; }
.ground { height: 1px; background: var(--line-2); }
.figure figcaption { display: flex; justify-content: space-between; padding: 10px 0 0; }

/* ---------------- shared section bits */
section { border-top: 1px solid var(--line); padding: 72px 0; scroll-margin-top: 16px; }
.lede { display: grid; grid-template-columns: 2fr 5fr; gap: 48px; }
.lede h2 { font-size: 15px; font-weight: 500; color: var(--muted); }
.lede h2 .mono { display: block; margin-top: 4px; }

/* ---------------- about */
.about p { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 34em; }
.about p + p { margin-top: 16px; }
.about p strong { color: var(--text); font-weight: 500; }
.about .facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 32px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }
.about dt { font-size: 15px; color: var(--faint); }
.about dd { display: flex; align-items: center; gap: 8px; }
.about dd img { width: 16px; height: 16px; image-rendering: pixelated; }

/* ---------------- LarpMod */
.mod-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mod-head h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.mod-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.mod-desc { margin-top: 16px; color: var(--muted); max-width: 38em; font-size: 17px; }

/* the actual menu, drawn the way it looks in game with the Mono menu style */
.shot { margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); overflow: hidden; }
.shot-bar { display: flex; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.menu { display: grid; grid-template-columns: 220px 1fr; height: 440px; }
.menu .tabs { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.menu .title { font-size: 32px; line-height: 1; padding: 0 8px 18px; }
.menu .tabs button {
  all: unset; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 8px; border-radius: 4px; font: 16px/1.25 var(--mc); color: var(--faint); transition: color .12s, background .12s;
}
.menu .tabs button:hover { color: var(--muted); }
.menu .tabs button[aria-selected="true"] { color: var(--text); background: var(--panel); }
.menu .tabs button:focus-visible { outline: 2px solid var(--text); outline-offset: 0; }
.menu .tabs .n { color: var(--faint); }
.menu .rows { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.menu .row { display: flex; align-items: center; gap: 16px; padding: 12px 14px; background: var(--panel); border-radius: 4px; font: 16px/1.25 var(--mc); }
.menu .row div { flex: 1; min-width: 0; }
.menu .row small { display: block; font-size: 16px; color: var(--faint); margin-top: 4px; }
.switch { all: unset; flex: none; cursor: pointer; width: 34px; height: 18px; border-radius: 9px; background: var(--line-2); position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] { background: var(--text); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--bg); }
.switch:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* module index: plain columns, no cards */
.index { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; }
.index h3 { font: 600 13px var(--sans); color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.index li { list-style: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.index li b { display: block; font-weight: 500; font-size: 15px; }
.index li span { display: block; font-size: 14px; color: var(--faint); line-height: 1.45; margin-top: 2px; }

/* tier tags */
.tiers { display: grid; grid-template-columns: 2fr 5fr; gap: 48px; margin-top: 72px; }
.tiers h3 { font-size: 15px; font-weight: 500; }
.tiers .note { margin-top: 8px; font-size: 15px; color: var(--muted); }
.tag-tool { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tag-view { height: 140px; display: grid; place-items: center; background: #1d1d1d; border-bottom: 1px solid var(--line); padding: 0 16px; }
.nametag { font: 24px/1.2 var(--mc); background: rgba(0, 0, 0, 0.62); color: #fff; padding: 4px 10px 2px; white-space: nowrap; max-width: 100%; overflow: hidden; }
.nametag img { display: inline-block; width: 24px; height: 24px; image-rendering: pixelated; vertical-align: -3px; margin-right: 9px; }
.tag-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; padding: 16px; background: var(--raised); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font: 500 13px var(--sans); color: var(--faint); }
.field input, .field select {
  height: 38px; padding: 0 10px; min-width: 0; font: 15px var(--sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--muted); }
.seg { display: flex; height: 38px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg button { all: unset; flex: 1; text-align: center; cursor: pointer; font-size: 14px; color: var(--faint); transition: background .12s, color .12s; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.seg button:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.kits { display: grid; grid-template-columns: repeat(8, 1fr); border-top: 1px solid var(--line); background: var(--raised); }
.kits button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 6px; padding: 12px 4px; font: 12px var(--sans); color: var(--faint); transition: background .12s, color .12s; }
.kits button + button { border-left: 1px solid var(--line); }
.kits button img { width: 24px; height: 24px; image-rendering: pixelated; }
.kits button:hover { background: var(--panel); color: var(--muted); }
.kits button[aria-pressed="true"] { background: var(--panel); color: var(--text); }
.kits button:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

/* changelog */
.log { display: grid; grid-template-columns: 2fr 5fr; gap: 48px; }
.log h3 { font-size: 15px; font-weight: 500; }
.log ul { list-style: none; color: var(--muted); font-size: 15px; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.log li:first-child { padding-top: 0; }

/* ---------------- videos */
.videos-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.videos-head h2 { font-size: 32px; letter-spacing: -0.02em; font-weight: 600; }
.channels { display: flex; gap: 24px; font-size: 15px; }
.channels .mono { margin-left: 4px; }
.videos { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; margin-top: 32px; }
.video { margin: 0; min-width: 0; }
.video iframe { display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); }
.video.yt iframe { aspect-ratio: 16 / 9; }
.video.tt iframe { aspect-ratio: 9 / 16; }
.video figcaption { margin-top: 10px; font-size: 14px; }

/* ---------------- install */
.install-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.install-head h2 { font-size: 32px; letter-spacing: -0.02em; font-weight: 600; }
.install > .mono { margin-top: 6px; }
.steps { counter-reset: step; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.steps li { counter-increment: step; padding-top: 14px; border-top: 1px solid var(--line-2); color: var(--muted); }
.steps li::before { content: "Step " counter(step); display: block; font: 13px var(--mono); color: var(--faint); margin-bottom: 6px; }
.steps code, .steps kbd { font: 13px var(--mono); color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }

footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--faint); }

/* lock screen after a blocked name */
.lock { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(10, 10, 10, 0.96); }
.lock div { max-width: 26em; text-align: center; }
.lock h2 { font-size: 24px; font-weight: 600; }
.lock p { margin-top: 10px; color: var(--muted); }
.lock .time { margin-top: 20px; font: 500 32px var(--mono); color: var(--text); }

/* ---------------- smaller screens */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr 260px; gap: 24px; padding-top: 64px; }
  .stage { height: 320px; }
  .stage .flat { height: 260px; }
  .index { grid-template-columns: repeat(2, 1fr); }
  .lede, .tiers, .log { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .videos { grid-template-columns: 1fr 240px; }
}
@media (max-width: 640px) {
  .videos { grid-template-columns: 1fr; }
  .video.tt { max-width: 320px; }
  .videos-head h2 { font-size: 28px; }
  .top nav { display: none; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; }
  .hero h1 { font-size: 48px; }
  .hero .intro { font-size: 17px; }
  .hero .actions { padding-bottom: 8px; }
  .figure { order: -1; }
  .stage { height: 260px; }
  .stage .flat { height: 210px; }
  section { padding: 56px 0; }
  .about p { font-size: 17px; }
  .mod-head h2 { font-size: 32px; }
  .menu { grid-template-columns: 1fr; height: auto; }
  .menu .tabs { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu .title { width: 100%; padding-bottom: 10px; font-size: 24px; }
  .menu .tabs .n { display: none; }
  .menu .rows { height: 360px; }
  .index { display: none; }  /* the menu above already lists every module */
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .tag-form { grid-template-columns: 1fr 1fr; }
  .tag-form .wide { grid-column: 1 / -1; }
  .nametag { font-size: 16px; }
  .nametag img { width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px; }
  .kits { grid-template-columns: repeat(4, 1fr); }
  .kits button:nth-child(5) { border-left: 0; }
  .kits button:nth-child(n+5) { border-top: 1px solid var(--line); }
  footer .wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
