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

:root {
  --bg: #0a0a0f;
  --bg-card: #14141d;
  --bg-elev: #1c1c28;
  --border: #2a2a3a;
  --text: #ffffff;
  --text-muted: #a0a0b0;
  --text-dim: #6a6a7a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --success: #10b981;
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

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

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }

.nav-mobile-btn {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav-mobile-btn { display: block; }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 0;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-elev); border-color: var(--text-dim); }
.btn-large { padding: 16px 32px; font-size: 16px; border-radius: 12px; }

/* === Hero === */
.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}
.hero h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero h1 .gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .hero { padding: 50px 0 70px; }
  .hero h1 { font-size: 40px; letter-spacing: -1px; }
  .hero p { font-size: 16px; }
}

/* === Stats === */
.stats {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-num {
  font-size: 40px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* === Section === */
.section {
  padding: 100px 0;
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}
.section-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 12px;
}
.section h2 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section h2 { font-size: 30px; letter-spacing: -1px; }
}

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === How It Works === */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  position: relative;
}
.step {
  position: relative;
  padding-top: 16px;
}
.step-num {
  font-size: 56px;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 14px;
}
.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === Code Sample === */
.code-section {
  background: var(--bg-card);
}
.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .code-grid { grid-template-columns: 1fr; gap: 40px; }
}
.code-content h2 {
  font-size: 36px;
  margin-bottom: 16px;
  text-align: left;
  letter-spacing: -1px;
}
.code-content p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.code-list { list-style: none; }
.code-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.code-list li svg {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}
.code-block {
  background: #0a0a14;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-family: ui-monospace, 'SF Mono', Monaco, monospace;
  font-size: 13px;
  line-height: 1.6;
}
.code-header {
  background: var(--bg-elev);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.code-dots { display: flex; gap: 5px; }
.code-dots span { width: 11px; height: 11px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #28c941; }
.code-body {
  padding: 18px 20px;
  overflow-x: auto;
}
.code-body pre { margin: 0; color: #e0e0e8; }
.code-body .kw { color: #c084fc; }
.code-body .str { color: #86efac; }
.code-body .num { color: #fcd34d; }
.code-body .com { color: #6a6a7a; }
.code-body .fn { color: #93c5fd; }
.code-body .key { color: #f472b6; }

/* === Trust === */
.trust {
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.trust-icons {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0.7;
}
.trust-icons div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
}

/* === CTA === */
.cta {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 60%);
}
.cta-inner {
  position: relative;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px 40px;
  max-width: 800px;
  margin: 0 auto;
}
.cta h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.cta p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  .cta { padding: 60px 0; }
  .cta-inner { padding: 40px 24px; }
  .cta h2 { font-size: 28px; }
}

/* === Page header (sub-pages) === */
.page-hero {
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .page-hero { padding: 60px 0 40px; }
  .page-hero h1 { font-size: 36px; }
}

/* === About / Content === */
.content-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 0 100px;
}
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; gap: 30px; } }
.content-aside h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.content-aside ul { list-style: none; }
.content-aside li a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  padding-left: 14px;
  transition: 0.15s;
}
.content-aside li a:hover, .content-aside li a.active {
  color: var(--text);
  border-left-color: var(--accent);
}
.content-main h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 32px 0 16px;
}
.content-main h2:first-child { margin-top: 0; }
.content-main p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 15px;
}
.content-main ul {
  margin: 0 0 16px 24px;
  color: var(--text-muted);
}
.content-main ul li { margin-bottom: 8px; }
.content-main strong { color: var(--text); font-weight: 600; }

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0 100px;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}
.contact-card .icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
}
.contact-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.contact-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.contact-card a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-hover);
}

/* === Footer === */
.site-footer {
  padding: 60px 0 30px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-brand .logo { display: inline-block; margin-bottom: 12px; }
.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 300px;
}
.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 16px;
}
