:root {
  --sky-top: #6fa3ff;
  --sky-bottom: #bcd9ff;
  --grass: #5d9b3a;
  --grass-dark: #447a27;
  --dirt: #866043;
  --stone: #7d7d7d;
  --ink: #1a1a1a;
  --panel: #c6c6c6;
  --panel-light: #ffffff;
  --panel-dark: #555555;
  --green: #3fae3f;
  --green-dark: #2a7a2a;
  --text: #ffffff;
  --pixel: "Press Start 2P", "Courier New", monospace;
  --body: "VT323", "Courier New", monospace;
  --max: 1060px;

  --dirt-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' fill='%23866043'/%3E%3Crect x='1' y='2' width='3' height='2' fill='%236f4e35'/%3E%3Crect x='8' y='1' width='2' height='2' fill='%239a7350'/%3E%3Crect x='12' y='4' width='3' height='2' fill='%235a3f2a'/%3E%3Crect x='4' y='7' width='2' height='3' fill='%239a7350'/%3E%3Crect x='10' y='9' width='3' height='2' fill='%236f4e35'/%3E%3Crect x='0' y='12' width='3' height='2' fill='%235a3f2a'/%3E%3Crect x='7' y='13' width='3' height='2' fill='%239a7350'/%3E%3Crect x='13' y='12' width='2' height='3' fill='%236f4e35'/%3E%3C/svg%3E");
  --stone-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' fill='%237d7d7d'/%3E%3Crect x='2' y='1' width='3' height='2' fill='%236b6b6b'/%3E%3Crect x='9' y='2' width='3' height='3' fill='%238e8e8e'/%3E%3Crect x='0' y='6' width='2' height='3' fill='%238e8e8e'/%3E%3Crect x='5' y='8' width='4' height='2' fill='%23696969'/%3E%3Crect x='12' y='8' width='3' height='3' fill='%236b6b6b'/%3E%3Crect x='3' y='12' width='3' height='2' fill='%238e8e8e'/%3E%3Crect x='10' y='13' width='4' height='2' fill='%23696969'/%3E%3C/svg%3E");
  --grass-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' fill='%235d9b3a'/%3E%3Crect x='1' y='1' width='2' height='2' fill='%2351882f'/%3E%3Crect x='7' y='2' width='3' height='2' fill='%236cae45'/%3E%3Crect x='12' y='5' width='2' height='3' fill='%2351882f'/%3E%3Crect x='3' y='8' width='3' height='2' fill='%236cae45'/%3E%3Crect x='9' y='11' width='3' height='2' fill='%2351882f'/%3E%3Crect x='0' y='13' width='2' height='2' fill='%236cae45'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #2b2b2b;
  color: var(--text);
  font-family: var(--body);
  font-size: 22px;
  line-height: 1.35;
}

a { color: inherit; }
code { font-family: var(--pixel); font-size: .7em; }
img, canvas { image-rendering: pixelated; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 50;
  background: var(--green); color: #fff; padding: .5rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding: .7rem 1.25rem;
  background: var(--stone-tex) #7d7d7d;
  background-size: 64px;
  border-bottom: 4px solid #3a3a3a;
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-block {
  width: 28px; height: 28px; flex: none;
  background:
    linear-gradient(var(--grass) 0 38%, transparent 38%),
    var(--dirt-tex) #866043;
  background-size: 100% 100%, 14px;
  border: 3px solid #1a1a1a;
}
.brand-text { font-family: var(--pixel); font-size: .62rem; text-shadow: 2px 2px 0 #000; }
.brand-text .g { color: #7be37b; }
nav ul { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav a {
  display: block; padding: .4rem .8rem; text-decoration: none;
  font-family: var(--pixel); font-size: .55rem; text-shadow: 2px 2px 0 #000;
  background: #6b6b6b; border: 3px solid #1a1a1a;
  box-shadow: inset 3px 3px 0 #9d9d9d, inset -3px -3px 0 #4a4a4a;
}
nav a:hover, nav a:focus-visible { background: #5a8a5a; box-shadow: inset 3px 3px 0 #8fd18f, inset -3px -3px 0 #3a6a3a; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  padding: 4rem 1.25rem 0;
  min-height: 560px;
}
.clouds i {
  position: absolute; display: block; height: 40px; background: #fff; opacity: .92;
  box-shadow: 40px -20px 0 #fff, 80px 0 0 #fff;
  animation: drift 70s linear infinite;
}
.clouds i:nth-child(1) { top: 70px; left: -200px; width: 120px; }
.clouds i:nth-child(2) { top: 150px; left: -200px; width: 90px; animation-duration: 95s; animation-delay: -40s; }
.clouds i:nth-child(3) { top: 40px; left: -200px; width: 140px; animation-duration: 120s; animation-delay: -80s; }
@keyframes drift { to { transform: translateX(calc(100vw + 500px)); } }

.hero-inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto 7rem; }
.eyebrow {
  display: inline-block; margin: 0 0 1rem; padding: .35rem .7rem;
  font-family: var(--pixel); font-size: .6rem; color: #fff; background: rgba(0,0,0,.45);
}
h1 {
  margin: 0 0 1.75rem; font-family: var(--pixel);
  font-size: clamp(1.7rem, 6.2vw, 3.6rem); line-height: 1.25; color: #fff;
  text-shadow: 4px 4px 0 #3b3b3b, 8px 8px 0 rgba(0,0,0,.18);
}

.address-bar {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  padding: .6rem .75rem; background: rgba(0,0,0,.6); border: 4px solid #1a1a1a;
}
.address-bar code { font-size: clamp(.6rem, 2.4vw, .95rem); color: #8dff8d; word-break: break-all; }
.copy-note { min-height: 1.4rem; margin: .5rem 0 0; color: #1a3a1a; font-size: 1.05rem; }

.status {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: .75rem;
  padding: .45rem .9rem; background: rgba(0,0,0,.6); border: 3px solid #1a1a1a;
}
.dot { width: 14px; height: 14px; background: #aaa; box-shadow: 0 0 0 3px #000; }
.status[data-state="online"] .dot { background: #4cff4c; }
.status[data-state="offline"] .dot { background: #ff4c4c; }
.status[data-state="loading"] .dot { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 1;
  background:
    linear-gradient(var(--grass-dark) 0 6px, transparent 6px),
    var(--grass-tex) #5d9b3a;
  background-size: 100% 100%, 64px;
  border-top: 6px solid #3f7a22;
}
.ground::after {
  content: ""; position: absolute; left: 0; right: 0; top: 36px; bottom: 0;
  background: var(--dirt-tex) #866043; background-size: 64px;
}

/* ---------- shared sections ---------- */
.panel-section { padding: 4rem 1.25rem; border-top: 4px solid #1a1a1a; }
.panel-section.dirt { background: var(--dirt-tex) #866043; background-size: 96px; }
.panel-section.stone { background: var(--stone-tex) #7d7d7d; background-size: 96px; }
.panel-section.grass-bg { background: var(--grass-tex) #5d9b3a; background-size: 96px; }
.wrap { max-width: var(--max); margin: 0 auto; }

.section-title {
  margin: 0 0 1.5rem; font-family: var(--pixel); font-size: clamp(1rem, 3.2vw, 1.6rem);
  line-height: 1.3; text-shadow: 3px 3px 0 #000;
}
.fine { margin: .75rem 0 0; font-size: 1rem; color: rgba(255,255,255,.85); text-shadow: 1px 1px 0 #000; }
.fine.lock::before { content: "\1F512  "; }

/* inventory-style slots */
.slots { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.slot, .inv {
  background: var(--panel); color: #222;
  border: 4px solid #1a1a1a;
  box-shadow: inset 4px 4px 0 var(--panel-light), inset -4px -4px 0 var(--panel-dark);
  padding: 1rem 1.1rem;
}
.slot { display: flex; flex-direction: column; gap: .35rem; }
.slot.wide { grid-column: 1 / -1; }
.slot-label { font-size: 1.05rem; color: #444; text-transform: uppercase; letter-spacing: .05em; }
.slot strong { font-family: var(--pixel); font-size: .8rem; line-height: 1.5; font-weight: 400; word-break: break-word; }
.inv { margin-top: .9rem; }
.inv h3 { margin: 0 0 .6rem; font-family: var(--pixel); font-size: .7rem; font-weight: 400; }
.players { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.players li {
  padding: .25rem .6rem; background: #8b8b8b; border: 3px solid #373737;
  box-shadow: inset 2px 2px 0 #b9b9b9, inset -2px -2px 0 #5c5c5c; color: #fff; text-shadow: 1px 1px 0 #000;
}

/* ---------- buttons ---------- */
.mc-btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  padding: .7rem 1.1rem; color: #fff; text-shadow: 2px 2px 0 #3c3c3c;
  font-family: var(--pixel); font-size: .6rem; line-height: 1.4;
  background: #707070; border: 4px solid #1a1a1a;
  box-shadow: inset 4px 4px 0 #a8a8a8, inset -4px -4px 0 #4b4b4b;
}
.mc-btn:hover, .mc-btn:focus-visible {
  background: #6f8fd1; box-shadow: inset 4px 4px 0 #a8c0f0, inset -4px -4px 0 #455f99;
}
.mc-btn:active { transform: translateY(2px); }
.mc-btn.big { padding: 1rem 1.5rem; font-size: .75rem; }
.mc-btn.green { background: var(--green); box-shadow: inset 4px 4px 0 #86e086, inset -4px -4px 0 var(--green-dark); }
.mc-btn.green:hover, .mc-btn.green:focus-visible { background: #4fc84f; box-shadow: inset 4px 4px 0 #a6f0a6, inset -4px -4px 0 #2f8f2f; }

/* ---------- feature rows ---------- */
.feature { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr 1fr; }
.feature p { margin: 0 0 1rem; text-shadow: 1px 1px 0 #000; font-size: 1.3rem; }
.ticks { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.7rem; margin-bottom: .35rem; text-shadow: 1px 1px 0 #000; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .35rem; width: 14px; height: 14px;
  background: #4cff4c; box-shadow: 0 0 0 3px #000;
}
.preview { margin: 0; }
.preview figcaption { margin-top: .6rem; text-align: center; font-size: 1rem; text-shadow: 1px 1px 0 #000; color: #eee; }
.frame {
  position: relative; background: #1a1a1a; padding: 8px;
  border: 4px solid #000; box-shadow: 8px 8px 0 rgba(0,0,0,.4);
}
.frame canvas { display: block; width: 100%; height: auto; aspect-ratio: 96 / 60; }
.pin {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  transform: translate(-50%, -50%); background: #ff3b3b; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #000;
  animation: blink 1.4s steps(2) infinite;
}

/* panel mock */
.console { padding: 0; background: #222; }
.console-bar {
  display: flex; align-items: center; gap: 6px; padding: .5rem .75rem;
  background: #3c3c3c; border-bottom: 4px solid #000;
}
.console-bar span { width: 12px; height: 12px; background: #888; }
.console-bar span:nth-child(1) { background: #ff5f56; }
.console-bar span:nth-child(2) { background: #ffbd2e; }
.console-bar span:nth-child(3) { background: #27c93f; }
.console-bar b { margin-left: .6rem; font-family: var(--pixel); font-size: .55rem; font-weight: 400; }
.console-body { padding: 1rem; }
.meters { display: grid; gap: .6rem; margin-bottom: 1rem; }
.meter { display: grid; grid-template-columns: 3rem 1fr; align-items: center; gap: .75rem; }
.meter label { font-family: var(--pixel); font-size: .55rem; color: #bbb; }
.bar { height: 18px; background: #111; border: 3px solid #555; padding: 2px; }
.bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #4cff4c 0 8px, #3dd63d 8px 10px); }
.meter:nth-child(2) .bar i { background: repeating-linear-gradient(90deg, #ffd84c 0 8px, #d6b53d 8px 10px); }
.log {
  margin: 0; padding: .75rem; min-height: 118px; overflow: hidden;
  background: #000; color: #8dff8d; font-family: var(--body); font-size: 1.1rem; line-height: 1.3; white-space: pre-wrap;
}
.caret { display: inline-block; width: 10px; height: 18px; background: #8dff8d; vertical-align: -3px; animation: blink 1s steps(2) infinite; }

/* flip layout for panel */
.feature.flip .preview { order: 0; }

/* ---------- join steps ---------- */
.steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li {
  display: flex; gap: 1rem; align-items: flex-start; color: #222;
  background: var(--panel); border: 4px solid #1a1a1a; padding: 1rem;
  box-shadow: inset 4px 4px 0 var(--panel-light), inset -4px -4px 0 var(--panel-dark);
}
.steps p { margin: .25rem 0 0; font-size: 1.15rem; }
.steps strong { font-family: var(--pixel); font-size: .62rem; line-height: 1.5; font-weight: 400; }
.num {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  font-family: var(--pixel); font-size: .8rem; color: #fff; background: var(--green);
  border: 3px solid #1a1a1a; box-shadow: inset 3px 3px 0 #86e086, inset -3px -3px 0 var(--green-dark); text-shadow: 2px 2px 0 #1a4a1a;
}

/* ---------- footer ---------- */
.footer { padding: 2rem 1.25rem 2.5rem; text-align: center; background: #1f1f1f; border-top: 4px solid #000; }
.footer p { margin: 0 0 .3rem; }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  body { font-size: 20px; }
  .feature { grid-template-columns: 1fr; gap: 2rem; }
  .feature.flip .preview { order: 2; }
  .hero { min-height: 520px; padding-top: 3rem; }
  .hero-inner { margin-bottom: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .clouds i, .dot, .pin, .caret { animation: none; }
}
