/* === Variables === */
:root {
  --bg: #1e2029;
  --bg-surface: #2d2d33;
  --bg-card: #383840;
  --bg-hover: #3d3d46;
  --text: #f0f0f0;
  --text-muted: #a2b0b4;
  --accent: #cb1b21;
  --accent-dark: #a51519;
  --success: #4ec9b0;
  --border: #3d3d46;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === Layout === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover { color: var(--text); }
.nav-links a.nav-github {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.nav-links a.nav-github:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === Hero === */
.hero {
  padding: 140px 0 80px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
}

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

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.hero-badge.privacy {
  background: rgba(78, 201, 176, 0.1);
  border: 1px solid rgba(78, 201, 176, 0.3);
  color: var(--success);
}

.hero-badge.light {
  background: rgba(162, 176, 180, 0.1);
  border: 1px solid rgba(162, 176, 180, 0.3);
  color: var(--text-muted);
}

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.6;
}

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

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

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* App preview (hero) */
.app-preview {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: 340px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.preview-sidebar {
  width: 50px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.preview-logo {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  margin-bottom: 8px;
}

.preview-nav-item {
  width: 28px;
  height: 28px;
  background: var(--bg-card);
  border-radius: 6px;
}

.preview-nav-item.active {
  background: rgba(203, 27, 33, 0.2);
  border: 1px solid var(--accent);
}

.preview-body {
  flex: 1;
  padding: 12px;
}

.preview-header {
  height: 32px;
  background: var(--bg-card);
  border-radius: 6px;
  margin-bottom: 12px;
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-card {
  height: 60px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.preview-card.small { grid-column: span 1; }
.preview-card.wide { grid-column: span 2; }
.preview-card.full { grid-column: span 3; height: 80px; }

/* === Features === */
.features {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

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

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

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

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

/* === Architecture === */
.architecture {
  padding: 100px 0;
  background: var(--bg-surface);
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

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

.arch-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: monospace;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.arch-badge.capture { background: rgba(78, 201, 176, 0.15); color: var(--success); }
.arch-badge.server { background: rgba(203, 27, 33, 0.15); color: var(--accent); }
.arch-badge.app { background: rgba(86, 156, 214, 0.15); color: #569cd6; }

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

.arch-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.arch-card li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  padding-left: 16px;
  position: relative;
}

.arch-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.tech-stack {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* === Download === */
.download {
  padding: 100px 0;
}

.download-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
}

.download-card {
  flex: 0 1 320px;
}

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 24px;
  text-align: center;
}

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

.download-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.install-steps {
  max-width: 600px;
  margin: 0 auto;
}

.install-steps h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}

.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* === Footer === */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  font-weight: 700;
  font-size: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

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

/* === Server === */
.server-section {
  padding: 100px 0;
  background: var(--bg-surface);
}

.wip-banner {
  text-align: center;
  margin-bottom: 16px;
}

.wip-badge {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(220, 220, 170, 0.1);
  border: 1px solid rgba(220, 220, 170, 0.4);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #dcdcaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.server-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}

.server-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.server-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-features li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.server-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* Server preview mockup */
.server-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  opacity: 0.7;
}

.sp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.sp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-card);
}

.sp-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
}

.sp-body {
  display: flex;
  height: 220px;
}

.sp-sidebar {
  width: 48px;
  border-right: 1px solid var(--border);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.sp-nav-item {
  width: 28px;
  height: 28px;
  background: var(--bg-card);
  border-radius: 5px;
}

.sp-nav-item.active {
  background: rgba(203, 27, 33, 0.2);
  border: 1px solid var(--accent);
}

.sp-content {
  flex: 1;
  padding: 12px;
}

.sp-row {
  height: 14px;
  background: var(--bg-card);
  border-radius: 4px;
  margin-bottom: 8px;
}

.sp-row.short { width: 60%; }

.sp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.sp-card {
  height: 80px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.server-cta {
  text-align: center;
}

.server-cta p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .server-grid { grid-template-columns: 1fr; }
  .server-visual { display: none; }
}

/* === Animations === */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav.scrolled {
  background: rgba(30, 32, 41, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* === Responsive === */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
  .hero-title { font-size: 38px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .arch-grid { grid-template-columns: 1fr; }
  .download-cards { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 30px; }
  .nav-links a:not(.nav-github) { display: none; }
}
