/* Blockopolis site styles */
:root {
  --bg: #f6f1e7;
  --bg-alt: #ece4d3;
  --card: #fffdf8;
  --ink: #2b2620;
  --ink-soft: #5e5548;
  --line: #d8ccb6;
  --grass: #44702a;
  --grass-dark: #34581f;
  --dirt: #8a5a32;
  --gold: #d9a63a;
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1b17;
    --bg-alt: #26231d;
    --card: #2d2a23;
    --ink: #eee7da;
    --ink-soft: #b8ad9a;
    --line: #443e33;
    --grass: #6a9c44;
    --grass-dark: #578636;
    --dirt: #c48a58;
    --gold: #e6b955;
    --shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 "Figtree", system-ui, sans-serif;
}

img { max-width: 100%; }
img.pixel { image-rendering: pixelated; }

a { color: var(--grass-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--grass); } }

h1, h2, h3, .brand {
  font-family: "Lilita One", "Figtree", sans-serif;
  line-height: 1.2;
  font-weight: 400;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.3rem; margin: 0 0 0.4em; }

code, .mono {
  font-family: ui-monospace, Consolas, monospace;
  background: var(--bg-alt);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  background: var(--card);
  border-bottom: 3px solid var(--grass);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 6px; }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--grass-dark); }

/* buttons */
.btn {
  display: inline-block;
  padding: 0.65em 1.3em;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--grass-dark);
  background: var(--grass);
  color: #fff;
  box-shadow: 0 3px 0 var(--grass-dark);
}
.btn:hover { filter: brightness(1.06); }
.btn.alt { background: transparent; color: var(--grass-dark); box-shadow: none; }
@media (prefers-color-scheme: dark) { .btn.alt { color: var(--grass); border-color: var(--grass); } }
.btn.small { padding: 0.4em 0.9em; font-size: 0.92rem; }
.btn.disabled { opacity: 0.55; pointer-events: none; }
.site-nav .btn { color: #fff; }

/* sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.center .actions { justify-content: center; }

/* hero */
.hero { padding: 56px 0 40px; }
.hero .tagline { font-size: 1.35rem; font-weight: 800; color: var(--dirt); margin: 0 0 12px; }

/* screenshot placeholder: swap the div for an <img> when screenshots exist */
.shot {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(0, 0, 0, 0.03) 14px 28px),
    var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
  padding: 16px;
}
.shot.wide { aspect-ratio: 21 / 9; margin-top: 32px; }
img.shot-img { width: 100%; border-radius: var(--radius); display: block; }

/* feature rows */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 48px 0;
}
.feature:nth-child(even) .feature-text { order: 2; }
.feature p { color: var(--ink-soft); }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 16px; }
  .feature:nth-child(even) .feature-text { order: 0; }
}

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card p { color: var(--ink-soft); margin: 0 0 12px; }
.card > :last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--grass); }

/* icon list (professions, buildings) */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.icon-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.icon-item img { width: 40px; height: 40px; flex: none; image-rendering: pixelated; }
.icon-item h3 { font-size: 1.1rem; margin: 0 0 2px; }
.icon-item p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.1em 0.6em;
  border-radius: 99px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  vertical-align: middle;
  margin-left: 6px;
}

/* download box */
.download {
  background: var(--card);
  border: 2px solid var(--grass);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;
  margin: 0 auto;
}
.req { list-style: none; padding: 0; margin: 16px 0; }
.req li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.req li:last-child { border-bottom: 0; }

/* server address */
.address {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  width: fit-content;
  max-width: 100%;
}
.address span { overflow-wrap: anywhere; }

/* docs pages */
.doc { padding: 48px 0 72px; }
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.doc-side { position: sticky; top: 88px; align-self: start; }
.doc-side h3 { font-size: 1rem; color: var(--ink-soft); }
.doc-side ul { list-style: none; padding: 0; margin: 0 0 20px; }
.doc-side a { display: block; padding: 4px 0; text-decoration: none; color: var(--ink); font-weight: 600; }
.doc-side a[aria-current="page"] { color: var(--grass-dark); }
.doc-body { min-width: 0; }
.doc-body h2 { margin-top: 1.6em; }
.doc-body h2:first-child { margin-top: 0; }
@media (max-width: 760px) {
  .doc-layout { grid-template-columns: 1fr; gap: 16px; }
  .doc-side { position: static; }
}

ol.steps { counter-reset: step; list-style: none; padding: 0; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 52px;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--grass);
  color: #fff;
  font-family: "Lilita One", sans-serif;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
ol.steps h3 { margin-bottom: 4px; }

.note {
  border-left: 4px solid var(--gold);
  background: var(--card);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--ink-soft); font-size: 0.92rem; }
.site-footer .wrap { display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }

/* banner previews on the buildings page are tall, not square */
.icon-item img.banner { width: 33px; height: 63px; }
