@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg:       #ffffff;
  --bg-muted: #f5f5f7;
  --border:   #e5e7eb;
  --text:     #111827;
  --sub:      #6b7280;
  --dim:      #9ca3af;

  --purple:   #7c3aed;
  --purple-l: #ede9fe;
  --blue:     #2563eb;
  --green:    #16a34a;
  --green-l:  #dcfce7;
  --orange:   #ea580c;
  --teal:     #0d9488;
  --teal-l:   #ccfbf1;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.06);

  --r:  8px;
  --rl: 14px;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
nav {
  height: 58px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
}
.nav-back {
  font-size: .85rem; font-weight: 500; color: var(--sub);
  display: flex; align-items: center; gap: 5px;
  transition: color .15s;
}
.nav-back:hover { color: var(--text); text-decoration: none; }
.nav-back svg { width: 14px; height: 14px; }
.nav-logo {
  font-family: var(--mono); font-weight: 700; font-size: .95rem;
  color: var(--purple);
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-gh {
  font-size: .85rem; font-weight: 500; color: var(--sub);
  display: flex; align-items: center; gap: 5px;
  transition: color .15s;
}
.nav-gh:hover { color: var(--text); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 48px 40px 0;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin-bottom: 10px;
  color: var(--text);
}
.hero h1 em { font-style: normal; color: var(--purple); }
.hero p {
  font-size: 1rem;
  color: var(--sub);
  margin: 0 auto 24px;
}
.hero-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--purple); color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(124,58,237,.35); }
.btn-outline {
  background: #fff; color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover { border-color: #d1d5db; }

/* ── Terminal preview ────────────────────────────────────────────────────── */
.preview-wrap {
  max-width: 800px; margin: 32px auto 0;
  padding: 0 40px;
}

/* ── Local hint ─────────────────────────────────────────────────────────── */
.local-hint {
  max-width: 600px;
  margin: 28px auto 0;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.local-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--sub);
  white-space: nowrap;
}
.local-cmd {
  flex: 1;
  overflow-x: auto;
}
.local-cmd code {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text);
}
.terminal {
  background: #0f0f17;
  border-radius: var(--rl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.06);
}
.terminal-bar {
  background: #1a1a27;
  padding: 12px 18px;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }
.terminal-title {
  font-family: var(--mono); font-size: .75rem; color: #4a4a6a;
  margin: 0 auto;
}
.terminal-body {
  font-family: var(--mono); font-size: .77rem; line-height: 1.6;
  padding: 18px 22px; white-space: pre; overflow-x: auto;
  color: #cdd6f4;
}
.terminal-body .d  { color: #3d3f5e; }
.terminal-body .s  { color: #6272a4; }
.terminal-body .mv { color: #bd93f9; font-weight: 600; }
.terminal-body .sp { color: #8be9fd; font-weight: 600; }
.terminal-body .gn { color: #50fa7b; }
.terminal-body .pc { color: #ffb86c; }
.terminal-body .yl { color: #f1fa8c; font-weight: 600; }
.terminal-body .t  { color: #f8f8f2; }
.terminal-body .b  { font-weight: 700; }

/* ── Section layout ──────────────────────────────────────────────────────── */
.section { padding: 80px 40px; max-width: 1000px; margin: 0 auto; }
.section-sm { max-width: 720px; }
.section-label {
  font-size: .75rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--purple);
  margin-bottom: 10px;
}
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800; letter-spacing: -.5px;
  margin-bottom: 12px;
}
.section-desc {
  color: var(--sub); font-size: 1rem; margin-bottom: 40px;
}

/* ── Features ────────────────────────────────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feat {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
}
.feat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feat-ico {
  width: 38px; height: 38px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.ico-purple { background: var(--purple-l); }
.ico-green  { background: var(--green-l);  }
.ico-teal   { background: var(--teal-l);   }
.ico-orange { background: #fff7ed;          }
.feat h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.feat p  { font-size: .875rem; color: var(--sub); line-height: 1.55; }

/* ── Missions ────────────────────────────────────────────────────────────── */
.missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
}
.ms-card {
  border: 1px solid var(--border);
  border-radius: var(--rl);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.ms-card:hover { box-shadow: var(--shadow); }
.ms-card-head {
  padding: 9px 16px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
}
.mh-a { background: #f5f3ff; color: #6d28d9; border-bottom: 1px solid #ede9fe; }
.mh-b { background: #eff6ff; color: #1d4ed8; border-bottom: 1px solid #dbeafe; }
.mh-c { background: #f0fdf4; color: #15803d; border-bottom: 1px solid #dcfce7; }
.mh-d { background: #fff7ed; color: #c2410c; border-bottom: 1px solid #fed7aa; }
.mh-e { background: #f0fdfa; color: #0f766e; border-bottom: 1px solid #ccfbf1; }
.ms-card ul { list-style: none; padding: 8px 0; }
.ms-card li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 16px;
  font-size: .85rem; color: var(--sub);
  transition: background .1s;
}
.ms-card li:hover { background: var(--bg-muted); color: var(--text); }
.ms-num {
  font-family: var(--mono); font-size: .7rem;
  color: var(--dim); min-width: 18px;
}

/* ── Quick start ─────────────────────────────────────────────────────────── */
.qs-box {
  background: #0f0f17;
  border-radius: var(--rl);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.qs-box-bar {
  background: #1a1a27;
  padding: 9px 18px;
  font-family: var(--mono); font-size: .72rem; color: #4a4a6a;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.qs-code {
  font-family: var(--mono); font-size: .88rem; line-height: 2;
  padding: 18px 22px; color: #f8f8f2;
}
.qs-code .p { color: #50fa7b; user-select: none; margin-right: 10px; }
.qs-code .c { color: #6272a4; }

.req-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .85rem; color: var(--sub);
}
.req-label { font-weight: 600; color: var(--text); }
.req-pill {
  font-family: var(--mono); font-size: .78rem;
  background: var(--bg-muted); border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 20px; color: var(--text);
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0 40px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  padding: 28px 40px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .85rem; color: var(--dim);
  flex-wrap: wrap; gap: 12px;
}
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-logo { font-family: var(--mono); font-weight: 700; color: var(--purple); }
.footer-right { display: flex; gap: 18px; }
.footer-right a { color: var(--sub); font-weight: 500; }
.footer-right a:hover { color: var(--text); text-decoration: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .hero { padding: 56px 20px 0; }
  .preview-wrap { padding: 0 20px; }
  .section { padding: 56px 20px; }
  .divider { margin: 0 20px; }
  footer { padding: 24px 20px; }
  .nav-logo { font-size: .85rem; }
}
