:root {
  --bg: #0a0b14;
  --bg-elev: #11131f;
  --bg-soft: #161827;
  --border: #232539;
  --border-soft: #1c1e2e;
  --text: #e6e8ee;
  --text-dim: #9aa0b4;
  --text-muted: #6b7088;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --accent-soft: rgba(124, 92, 255, 0.15);
  --success: #2ecc71;
  --danger: #ff4d6d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(0, 212, 255, 0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

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

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 11, 20, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: #0a0b14;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.45);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-secondary {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: #1c1f33; border-color: #2c3050; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a3fff);
  color: white;
  box-shadow: 0 6px 22px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.55);
}
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero {
  padding: 110px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.hero h1 {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #fff 0%, #b6bbd1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 540px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta svg { color: var(--accent-2); }

/* Code preview */
.code-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(3deg);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: #0e1020;
}
.code-head .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #2a2e44;
}
.code-head .dot.r { background: #ff5f57; }
.code-head .dot.y { background: #febc2e; }
.code-head .dot.g { background: #28c840; }
.code-head .title {
  margin-left: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.code-body {
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #c8cde0;
  background:
    linear-gradient(180deg, rgba(124,92,255,0.05), transparent 40%),
    var(--bg-elev);
  min-height: 280px;
}
.code-body .ln { color: #4a4f6a; user-select: none; padding-right: 18px; }
.code-body .kw { color: #c084fc; }
.code-body .fn { color: #60a5fa; }
.code-body .str { color: #7dd3fc; }
.code-body .com { color: #6b7088; font-style: italic; }
.code-body .num { color: #fbbf24; }

/* ===== Sections ===== */
.section { padding: 90px 0; }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-head p {
  color: var(--text-dim);
  font-size: 17px;
}

/* ===== Logo strip ===== */
.logos {
  padding: 30px 0 0;
}
.logos-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.logos-label {
  width: 100%;
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.logo-item {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.75;
}

/* ===== Feature grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: #2e314a;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.stat-label {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 4px;
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.price-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.popular {
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35), 0 24px 60px -20px rgba(124, 92, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(124, 92, 255, 0.08), transparent 30%),
    var(--bg-elev);
}
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0b14;
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
  letter-spacing: 0.04em;
}
.price-name { font-size: 14px; color: var(--text-dim); font-weight: 600; letter-spacing: 0.02em; }
.price-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 6px;
}
.price-amount .amount { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; }
.price-amount .per { color: var(--text-muted); font-size: 14px; }
.price-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 22px; min-height: 42px; }
.price-features {
  list-style: none;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.price-features li::before {
  content: '';
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 4px;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
}

/* ===== Testimonials ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.quote-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.quote-card p {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 18px;
}
.q-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.q-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: #0a0b14;
  font-weight: 700;
  font-size: 13px;
}
.q-name { font-size: 13px; font-weight: 600; }
.q-title { font-size: 12px; color: var(--text-muted); }

/* ===== CTA banner ===== */
.cta-banner {
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(124, 92, 255, 0.25), transparent 70%),
    var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 56px 48px;
  text-align: center;
}
.cta-banner h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta-banner p {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 26px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 32px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
}
.footer h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--text-dim); font-size: 14px; transition: color 0.15s ease; }
.footer a:hover { color: var(--text); }
.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 14px;
  max-width: 280px;
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Auth page ===== */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 60px 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.auth-head {
  text-align: center;
  margin-bottom: 28px;
}
.auth-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.auth-head p {
  color: var(--text-dim);
  font-size: 14px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.field .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.field .row a { font-size: 12px; color: var(--accent-2); }
.field .row a:hover { text-decoration: underline; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.checkbox-row input { accent-color: var(--accent); }

.alert {
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid rgba(255, 77, 109, 0.35);
  color: #ffb3c1;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: none;
  align-items: flex-start;
  gap: 10px;
}
.alert.show { display: flex; animation: shake 0.32s ease; }
.alert svg { flex-shrink: 0; margin-top: 1px; color: var(--danger); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 22px 0 18px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}
.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.social-btn:hover { background: #1c1f33; }
.auth-foot {
  text-align: center;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.auth-foot a { color: var(--accent-2); }
.auth-foot a:hover { text-decoration: underline; }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Inner page header ===== */
.page-hero {
  padding: 80px 0 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.page-hero p {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto;
}

/* ===== Download cards ===== */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.dl-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.dl-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent);
}
.dl-card h3 { font-size: 18px; margin-bottom: 4px; }
.dl-card .ver { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }

/* Mobile */
@media (max-width: 900px) {
  .hero { padding: 60px 0 40px; }
  .hero-grid, .feature-grid, .pricing-grid, .testimonials, .stats, .footer-grid, .dl-grid {
    grid-template-columns: 1fr;
  }
  .nav-links { display: none; }
  .code-card { transform: none; }
  .section { padding: 60px 0; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .cta-banner { padding: 36px 24px; }
}
