/* =========================================================
   Moon Dimension · Creator Guide
   ========================================================= */

:root {
  --bg: #07060f;
  --bg-deep: #040309;
  --panel: #0f0d1f;
  --panel-raised: #14122a;
  --well: #0a0917;
  --line: #2a2547;
  --line-soft: #1b1833;

  --ink: #f1effa;
  --ink-dim: #b4afcb;
  --ink-faint: #7c7797;

  --orange: #f5a623;
  --gold: #f2d23a;
  --cyan: #35e0e0;
  --red: #e8433a;
  --violet: #6d4fb3;
  --moon: #d9d6e6;

  --display: "Space Grotesk", "Segoe UI", sans-serif;
  --body: "Inter", "Segoe UI", sans-serif;
  --pixel: "Silkscreen", "Courier New", monospace;
  --mono: "JetBrains Mono", Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1120px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* starfield */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 32%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 62%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 88%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 60% 8%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 55%, rgba(53,224,224,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 35%, rgba(245,166,35,.35) 50%, transparent 51%);
  background-size: 900px 700px, 1100px 800px, 800px 900px, 1000px 600px, 700px 1000px, 1200px 900px, 900px 500px, 1300px 1100px, 1000px 900px;
  opacity: .8;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.px { image-rendering: pixelated; image-rendering: crisp-edges; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--orange); color: #111; padding: 8px 12px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

.section-lede {
  color: var(--ink-dim);
  max-width: 62ch;
  font-size: 18px;
}

.section-head { margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #14100a; }
.btn-primary:hover { background: #ffb838; }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); background: rgba(255,255,255,.07); }
.btn-small { padding: 9px 16px; font-size: 14px; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7,6,15,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.brand-tag {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--orange);
  border: 1px solid rgba(245,166,35,.45);
  padding: 3px 7px;
  border-radius: 5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.05); text-decoration: none; }
.nav-links a.active { color: var(--ink); background: rgba(245,166,35,.12); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
}
.hero-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 1000px;
  overflow: hidden;
  background: var(--bg-deep);
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7,6,15,.12) 0%, rgba(7,6,15,0) 28%, rgba(7,6,15,.5) 56%, rgba(7,6,15,.92) 76%, var(--bg) 86%),
    linear-gradient(to right, rgba(7,6,15,.55) 0%, rgba(7,6,15,0) 45%);
}
.hero-content {
  position: relative;
  margin-top: max(-19vw, -280px);
  padding-bottom: 56px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  max-width: 14ch;
  margin-bottom: 18px;
  text-shadow: 0 6px 30px rgba(0,0,0,.7);
}
.hero .lede {
  color: var(--ink-dim);
  max-width: 64ch;
  font-size: 18px;
  margin-bottom: 26px;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.release-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-dim);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7,6,15,.6);
}
.release-chip .dot {
  flex-shrink: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53,224,224,.2), 0 0 12px rgba(53,224,224,.8);
}

/* ---------- stats ---------- */
.stats {
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-deep);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-left: 1px solid var(--line-soft);
}
.stat:first-child { border-left: 0; }
.stat-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1;
  color: var(--ink);
}
.stat-label {
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 8px;
}

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-alt {
  background: linear-gradient(to bottom, rgba(15,13,31,.55), rgba(15,13,31,.2));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- journey ---------- */
.journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 72px;
}
.step {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
.step:nth-child(even) .step-media { order: 2; }
.step-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
  aspect-ratio: 16 / 9;
}
.step-media img { width: 100%; height: 100%; object-fit: cover; }
.step-index {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--orange);
  letter-spacing: .1em;
  display: block;
  margin-bottom: 12px;
}
.step h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 12px; }
.step p { color: var(--ink-dim); }

.pixel-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(109,79,179,.25), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(53,224,224,.12), transparent 50%),
    var(--well);
}
.pixel-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.pixel-tile img { width: 56px; height: 56px; }
.pixel-tile span {
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
}

/* ---------- gear ---------- */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gear {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s ease;
}
.gear:hover { border-color: rgba(53,224,224,.4); }
.gear-icon {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--well);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.gear-icon img { width: 44px; height: 44px; object-fit: contain; }
.gear-icon-row {
  width: auto;
  padding: 0 12px;
  gap: 6px;
}
.gear-icon-row img { width: 28px; height: 28px; }
.gear h3 { font-size: 19px; margin-bottom: 8px; }
.gear p { color: var(--ink-dim); font-size: 15px; }

.build-kit {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.build-kit-icons { display: flex; gap: 8px; }
.build-kit-icons img { width: 40px; height: 40px; border-radius: 4px; }
.build-kit h3 { font-size: 19px; margin-bottom: 6px; }
.build-kit p { color: var(--ink-dim); font-size: 15px; }

/* ---------- details ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.detail {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.detail::before {
  content: "";
  position: absolute;
  left: 22px; top: 0;
  width: 36px; height: 2px;
  background: var(--orange);
  border-radius: 0 0 2px 2px;
}
.detail h3 { font-size: 17px; margin-bottom: 8px; }
.detail p { color: var(--ink-dim); font-size: 15px; }

/* ---------- panorama ---------- */
.panorama {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-deep);
}
.panorama img { width: 100%; max-height: 420px; object-fit: cover; }

/* ---------- settings ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.setting {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.setting-wide { grid-column: span 3; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; align-items: center; }
.setting-cmds .cmd:first-child { margin-top: 0; }
.setting h3 { font-size: 19px; margin-bottom: 8px; }
.setting p { color: var(--ink-dim); font-size: 15px; }
.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--well);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 10px 10px 10px 14px;
  margin-top: 10px;
}
.cmd code {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--cyan);
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
}
.copy {
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
}
.copy:hover { border-color: var(--ink-faint); }
.copy.done { color: #0f0d1f; background: var(--cyan); border-color: var(--cyan); }

/* ---------- faq ---------- */
.faq-wrap { max-width: 860px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  color: var(--orange);
  font-size: 20px;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq details p { padding: 16px 20px 20px; color: var(--ink-dim); font-size: 16px; }

/* ---------- thanks ---------- */
.thanks { text-align: center; }
.thanks .container { max-width: 760px; }
.thanks h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; }
.thanks .section-lede { margin: 0 auto 24px; }
.thanks .hero-actions { justify-content: center; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 32px 0 40px;
  background: var(--bg-deep);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-dim);
  font-size: 14px;
}
.footer-brand img { border-radius: 6px; }
.footer-brand a { color: var(--ink); font-weight: 600; }
.footer-legal { color: var(--ink-faint); font-size: 13px; }

/* grid and flex children may shrink below their content width */
.gear-grid > *, .detail-grid > *, .settings-grid > *, .step > *, .stats-grid > *, .build-kit > * { min-width: 0; }
.cmd, .cmd code { min-width: 0; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .gear-grid, .detail-grid, .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .setting-wide { grid-column: span 2; }
  .step { grid-template-columns: 1fr; gap: 24px; }
  .step:nth-child(even) .step-media { order: 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .nav-inner { gap: 12px; }
  .brand-tag { display: none; }
  .nav-links { display: none; }
  .hero-art { aspect-ratio: 4 / 5; }
  .hero-art img { object-position: center 40%; }
  .hero-content { margin-top: -22vw; padding-bottom: 40px; }
  .hero h1 { max-width: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 20px 12px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .gear-grid, .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .setting-wide { grid-column: span 1; grid-template-columns: 1fr; }
  .build-kit { grid-template-columns: 1fr; }
  .cmd code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .journey { gap: 48px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
