/* ── Palmtop docs — dark minimal theme ────────────────────────────── */
/* Brand: bg #0a0a0a, surface #141414, accent #f0c040                  */

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --border: #2a2a2a;
  --border-light: #333;
  --text: #e8e8e8;
  --text-muted: #888;
  --text-dim: #666;
  --accent: #f0c040;
  --accent-dim: #c49a20;
  --accent-glow: rgba(240, 192, 64, 0.15);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  --max-w: 1120px;
  --max-w-narrow: 780px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

img { max-width: 100%; height: auto; }

/* ── Site nav ────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--accent); }

.nav-links { display: flex; gap: 24px; align-items: center; }

.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  padding: 6px 16px;
  border-radius: 6px;
  transition: background 0.2s;
}
.nav-cta:hover { background: #fff; color: var(--bg); }

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(240, 192, 64, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  position: relative;
}

.hero h1 .accent { color: var(--accent); }

.hero .subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

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

.hero-ph-badge {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

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

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── Terminal preview ────────────────────────────────────────────── */

.terminal-preview {
  max-width: 640px;
  margin: 60px auto 0;
  position: relative;
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-light);
}

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

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-body .prompt { color: var(--accent); }
.terminal-body .comment { color: var(--text-dim); }
.terminal-body .output { color: var(--text-muted); }
.terminal-body .cmd { color: var(--text); }

/* ── Showcase section ────────────────────────────────────────────── */

.showcase {
  padding: 80px 24px;
}

.showcase .container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
  line-height: 1.5;
}

/* ── Feature grid ────────────────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Stats bar ───────────────────────────────────────────────────── */

.stats {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats .container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Architecture diagram ────────────────────────────────────────── */

.arch-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-top: 48px;
  overflow-x: auto;
}

.arch-diagram pre {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre;
}

.arch-diagram .highlight { color: var(--accent); }

/* ── CTA section ─────────────────────────────────────────────────── */

.cta-section {
  padding: 100px 24px;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.site-footer p {
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Docs layout ─────────────────────────────────────────────────── */

.docs-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}

.docs-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
}

.docs-sidebar h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 12px;
  margin-top: 24px;
}

.docs-sidebar h4:first-child { margin-top: 0; }

.docs-sidebar a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 5px 0 5px 12px;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.2s;
}

.docs-sidebar a:hover { color: var(--text); }
.docs-sidebar a.active {
  color: var(--accent);
  font-weight: 500;
  border-left-color: var(--accent);
}

.docs-content {
  min-width: 0;
}

.docs-content h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.docs-content .lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.5;
}

.docs-content h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.docs-content h2:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }

.docs-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.docs-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.docs-content ul, .docs-content ol {
  margin: 0 0 16px 20px;
}

.docs-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.docs-content code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.docs-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin: 0 0 24px;
  overflow-x: auto;
}

.docs-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 14px;
}

.docs-content th, .docs-content td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.docs-content th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-content td code { font-size: 0.85em; }

/* callout boxes */
.callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 0 0 24px;
  font-size: 14px;
}

.callout p { margin-bottom: 0; }
.callout strong { color: var(--accent); }

/* step indicators */
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    margin-bottom: 32px;
  }

  .hero { padding: 64px 20px 48px; }
  .showcase { padding: 48px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .terminal-preview { margin-top: 40px; }
  .nav-links { gap: 12px; }
  .nav-link { font-size: 13px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
}
