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

:root {
  --bg: #0d0f14;
  --bg-card: #161920;
  --bg-card-hover: #1e2230;
  --border: #252a38;
  --text: #e8eaf0;
  --text-muted: #7a8099;
  --accent: #5b8af7;
  --accent-glow: rgba(91,138,247,0.15);
  --green: #3ecf8e;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
}

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;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.nav-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none !important;
}

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

.btn-primary:hover { background: #4a79e8; }

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

.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-card); }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(91,138,247,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(91,138,247,0.3);
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

.hero h1 span {
  background: linear-gradient(135deg, #7eb3ff 0%, #5b8af7 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn-primary.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-secondary.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ── Screenshot ── */
.screenshot-wrap {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.screenshot-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(91,138,247,0.3), rgba(167,139,250,0.2), transparent 60%);
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.screenshot-wrap img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  display: block;
}

/* ── Section common ── */
section { padding: 90px 0; }

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

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

.section-desc {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 540px;
  line-height: 1.7;
}

/* ── Features ── */
.features-header { margin-bottom: 56px; }

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(91,138,247,0.3);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border: 1px solid rgba(91,138,247,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
}

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

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

/* ── Install section ── */
.install { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

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

@media (max-width: 720px) {
  .install-inner { grid-template-columns: 1fr; gap: 32px; }
}

.install-desc .section-desc { margin-bottom: 28px; }

.platform-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
  text-decoration: none !important;
}

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

.code-block {
  background: #0a0c12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), #a78bfa);
}

.code-line { color: var(--text-muted); margin-bottom: 6px; }
.code-line:last-child { margin-bottom: 0; }
.code-comment { color: #4a5568; }
.code-cmd { color: var(--text); }
.code-highlight { color: var(--accent); }
.code-string { color: var(--green); }

/* ── Upstream section ── */
.upstream-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.upstream-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 0.2s;
  text-decoration: none !important;
  color: var(--text);
}

.upstream-card:hover { border-color: rgba(91,138,247,0.4); }

.upstream-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.upstream-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.upstream-card p { font-size: 13px; color: var(--text-muted); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
}

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

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* ── Fade-in animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero { padding: 70px 0 60px; }
  .nav-links .btn { display: none; }
  .hero-cta { flex-direction: column; align-items: center; }
  section { padding: 64px 0; }
}
