:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #222222;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #e94560;
  --accent-dim: #c73e55;
  --border: #333333;
  --max: 1100px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(233, 69, 96, 0.15), transparent),
    linear-gradient(180deg, #000 0%, #050505 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

code, pre { font-family: var(--mono); font-size: 0.9em; }

/* nav */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
}
.brand img { border-radius: 6px; }
.nav nav { display: flex; gap: 28px; font-family: var(--mono); font-size: 14px; color: var(--text-secondary); }
.nav nav a:hover { color: var(--accent); }

/* hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}
.tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.accent { color: var(--accent); }
.lede {
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.6vw, 19px);
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.install-snippet {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 10px 10px 18px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-secondary);
}
.install-snippet code::before { content: '$ '; color: var(--text-muted); }
.install-snippet button {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.install-snippet button:hover { color: var(--accent); border-color: var(--accent); }

/* demo */
.demo {
  max-width: var(--max);
  margin: 40px auto;
  padding: 0 24px;
}
.demo-frame {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: 0 30px 80px -20px rgba(233, 69, 96, 0.2);
}
.demo-frame img,
.demo-frame video { display: block; width: 100%; height: auto; }

/* sections */
section.features, section.install {
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 24px 40px;
}
section h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 16px;
}
.section-lede {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
}

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

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card.has-demo { display: flex; flex-direction: column; align-items: flex-start; }
.demo-play {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.demo-play:hover { color: var(--accent); border-color: var(--accent); }

.video-dialog {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  max-width: min(1100px, 92vw);
  width: 92vw;
  max-height: 90vh;
  margin: auto;
  position: fixed;
  inset: 0;
  overflow: visible;
}
.video-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.video-dialog video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
  border-radius: 12px;
}
.video-dialog-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.video-dialog-close:hover { color: var(--accent); border-color: var(--accent); }
.card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.card p { color: var(--text-secondary); font-size: 14.5px; }
.card code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.85em;
}
.card pre {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-top: 12px;
  overflow-x: auto;
}
.card pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}
.card .link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

/* footer */
footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-inner a { color: var(--accent); }
.footer-inner .muted { color: var(--text-muted); font-size: 13px; }

@media (max-width: 600px) {
  .nav { padding: 20px 18px; }
  .nav nav { gap: 18px; }
  .hero { padding: 60px 18px 40px; }
  section.features, section.install { padding: 70px 18px 20px; }
  .install-snippet { width: 100%; justify-content: space-between; }
}
