:root {
  --bg: #0d1117;
  --bg-alt: #11161f;
  --panel: #161d29;
  --line: #232d3d;
  --text: #d7dee8;
  --muted: #8b98a9;
  --accent: #3fdc7a;
  --accent-dim: #2aa85c;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { font-family: var(--mono); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 1rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: #fff; }

.kicker {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { color: var(--muted); max-width: 640px; margin-bottom: 2rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--mono); font-weight: 700; color: #fff;
  text-decoration: none; display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--accent); color: #0d1117;
  font-size: 0.72rem; font-weight: 700; font-family: var(--mono);
}
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-family: var(--mono);
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--accent); border-radius: 6px;
  padding: 0.35rem 0.8rem; color: var(--accent) !important;
}
.nav-cta:hover { background: var(--accent); color: #0d1117 !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.2s; }

/* Hero */
.hero {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 30%, rgba(63, 220, 122, 0.08), transparent),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.lead { color: var(--muted); margin: 1.25rem 0 1.75rem; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); text-decoration: none; font-size: 0.95rem;
  padding: 0.7rem 1.3rem; border-radius: 8px; transition: 0.15s;
}
.btn-primary { background: var(--accent); color: #0d1117; font-weight: 700; }
.btn-primary:hover { background: var(--accent-dim); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-badges { list-style: none; display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-badges li {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem;
}
.hero-media img, .mister-media img {
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Cards */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.5rem;
}
.card p { color: var(--muted); font-size: 0.95rem; }

/* Modules */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.module-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.module-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.module-body { padding: 1.4rem; }
.module-body p { color: var(--muted); font-size: 0.95rem; }
.module-card-diy {
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(63, 220, 122, 0.04) 10px, rgba(63, 220, 122, 0.04) 20px),
    var(--panel);
  border-style: dashed; border-color: var(--accent-dim);
}

/* Specs */
.spec-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 1.5rem; }
.spec-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 1rem;
  padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row:nth-child(odd) { background: var(--panel); }
.spec-row span:first-child { font-family: var(--mono); color: var(--accent); font-size: 0.88rem; }
.spec-row span:last-child { color: var(--text); font-size: 0.95rem; }
.spec-note { color: var(--muted); font-size: 0.85rem; margin-top: 1rem; font-family: var(--mono); }

/* MiSTer */
.mister-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.mister p { color: var(--muted); margin-bottom: 1.25rem; }
.check-list { list-style: none; }
.check-list li { padding-left: 1.6rem; position: relative; margin-bottom: 0.6rem; color: var(--text); }
.check-list li::before {
  content: ">"; position: absolute; left: 0; color: var(--accent);
  font-family: var(--mono); font-weight: 700;
}

/* Roadmap */
.roadmap { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; counter-reset: step; }
.roadmap li {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.5rem; position: relative;
}
.roadmap h3 { color: var(--accent); }
.roadmap p { color: var(--muted); font-size: 0.95rem; }

/* Involved */
.involved { text-align: center; }
.involved .section-lead { margin: 0 auto; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.85rem; color: var(--muted);
}
.footer-note { font-size: 0.75rem; }

/* Responsive */
@media (max-width: 880px) {
  .hero-grid, .mister-grid { grid-template-columns: 1fr; gap: 2rem; }
  .why-grid, .module-grid, .roadmap { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .section { padding: 3.5rem 0; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.9rem 1.25rem; width: 100%; }
  .nav-cta { border: 0; border-radius: 0; }
}
