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

:root {
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-tertiary: #999;
  --border: #eaeaea;
  --accent: #1a1a1a;
  --code-bg: #f5f5f5;
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}

.nav-logo {
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 18px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero h1 code {
  background: none;
  font-size: inherit;
  padding: 0;
  color: var(--text-secondary);
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.btn:active { opacity: 0.8; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Terminal demo */
.demo-section {
  padding: 0 0 80px;
}

.terminal {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #2a2a2a;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: #888;
}

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: #e0e0e0;
}

.terminal-body .line {
  min-height: 1.8em;
}

.terminal-body .prompt {
  color: #28c840;
  margin-right: 8px;
}

.terminal-body .user {
  color: #5b9fff;
  margin-right: 8px;
}

.terminal-body .input {
  color: #fff;
}

.terminal-body .ai {
  color: #c084fc;
  margin-right: 8px;
}

.terminal-body .dim {
  color: #888;
}

.terminal-body .link {
  color: #5b9fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
}

/* Steps grid */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.step-card {
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Stack grid */
.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stack-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stack-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
}

.stack-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.stack-item p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Setup */
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.setup-step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.setup-step > p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.setup-note {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.code-block {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: #e0e0e0;
  background: none;
  padding: 0;
}

.code-block .hl-comment { color: #6a737d; }
.code-block .hl-keyword { color: #c084fc; }
.code-block .hl-string { color: #5b9fff; }

/* File cards */
.file-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.file-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-sm:active {
  background: var(--code-bg);
}

.file-preview {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: #1a1a1a;
}

.file-preview pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  color: #d4d4d4;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Requirements */
.req-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.req-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.req-check {
  font-size: 14px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  flex-shrink: 0;
}

.req-item strong {
  font-size: 14px;
  display: block;
}

.req-item a {
  color: var(--text);
  text-decoration: none;
}

.req-item a:hover {
  text-decoration: underline;
}

.req-desc {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 200;
}

.toast.show {
  opacity: 1;
}

/* Footer */
.footer {
  padding: 48px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 14px;
  color: var(--text-tertiary);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 36px; }
  .hero-desc { font-size: 15px; }
  .steps-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}
