:root {
  --bg: #0b0f19;
  --bg-deep: #060912;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --text-mute: #64748b;
  --blue: #3b82f6;
  --blue-bright: #60a5fa;
  --violet: #8b5cf6;
  --violet-bright: #a78bfa;
  --grad: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --grad-bright: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 480px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  padding-bottom: env(safe-area-inset-bottom);
}

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

::selection { background: var(--blue-bright); color: #0b0f19; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 52px 0; position: relative; }
.section-tight { padding: 40px 0; }

/* ---------- Ambient background ---------- */
.bg-glow {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.4;
}
.glow-blue {
  width: 440px; height: 440px;
  background: var(--blue);
  top: -140px; left: -120px;
}
.glow-violet {
  width: 380px; height: 380px;
  background: var(--violet);
  top: 38%; right: -150px;
  opacity: 0.28;
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 30%, transparent 80%);
}

main, .nav, .footer, .sticky-cta { position: relative; z-index: 1; }

/* ---------- Glass ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  border-radius: 12px;
  padding: 13px 22px;
  transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 22px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 30px rgba(59, 130, 246, 0.5); }

.btn-lg { padding: 17px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn-pulse {
  animation: btnPulse 2.4s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(59,130,246,0.35), 0 0 40px rgba(139,92,246,0.15); }
  50% { box-shadow: 0 0 30px rgba(59,130,246,0.6), 0 0 64px rgba(139,92,246,0.32); }
}

/* ---------- Header / Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 25, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: rgba(59, 130, 246, 0.2); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
}
.logo-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad);
  color: #fff;
}
.logo-text {
  background: linear-gradient(135deg, #fff 0%, var(--blue-bright) 120%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-pro {
  color: var(--violet-bright);
  -webkit-text-fill-color: var(--violet-bright);
  font-weight: 800;
  margin-left: 1px;
}

.nav-status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
  animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 44px; text-align: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-size: 12px; font-weight: 600; color: var(--blue-bright);
  margin-bottom: 22px;
}

.hero-title {
  font-size: 36px; font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.grad-text {
  background: var(--grad-bright);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 16px; color: var(--text-dim);
  max-width: 340px; margin: 0 auto 30px;
  line-height: 1.6;
}
.hero-sub strong { color: var(--text); font-weight: 700; }

.hero-cta { margin-bottom: 36px; }
.hero-note {
  margin-top: 14px; font-size: 13px;
  color: var(--text-mute); font-weight: 500;
}

/* Stats */
.stats {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 18px 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.stat { flex: 1; text-align: center; }
.stat-num { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 11px; color: var(--text-mute); font-weight: 500; margin-top: 2px; }
.stat-divider { width: 1px; height: 32px; background: var(--surface-border); }

/* ---------- Section heads ---------- */
.section-head { text-align: center; margin-bottom: 30px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-bright); margin-bottom: 12px;
}
.section-head h2 {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.15;
  margin-bottom: 8px;
}
.section-head p { font-size: 15px; color: var(--text-dim); }

/* ---------- Features ---------- */
.features { display: flex; flex-direction: column; gap: 14px; }
.feature-card {
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 13px;
  display: grid; place-items: center; margin-bottom: 16px;
}
.icon-blue {
  background: rgba(59, 130, 246, 0.12); color: var(--blue-bright);
  border: 1px solid rgba(59, 130, 246, 0.22);
}
.icon-violet {
  background: rgba(139, 92, 246, 0.12); color: var(--violet-bright);
  border: 1px solid rgba(139, 92, 246, 0.22);
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.feature-card > p { font-size: 14px; color: var(--text-dim); line-height: 1.55; margin-bottom: 14px; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feature-list li {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--text-dim); font-weight: 500;
}
.check {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.check::after {
  content: '';
  width: 7px; height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0px, -1px);
  display: block;
}

/* ---------- Code Preview ---------- */
.code-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.code-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  background: rgba(0,0,0,0.25);
}
.code-dots { display: flex; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-amber { background: #f59e0b; }
.dot-green { background: #22c55e; }
.code-filename {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; color: var(--text-mute);
  margin-left: 4px;
}
.code-copy {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--text-mute);
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,0.03);
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.code-copy:hover { color: var(--text); border-color: rgba(59,130,246,0.3); }
.code-copy:active { transform: scale(0.94); }
.code-copy.copied { color: #22c55e; border-color: rgba(34,197,94,0.3); }

.code-block {
  margin: 0;
  padding: 18px 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.75;
  overflow-x: auto;
  color: #cbd5e1;
}
.code-block code { font-family: inherit; }

/* Syntax tokens */
.c-key { color: #c084fc; font-weight: 600; }
.c-str { color: #60a5fa; }
.c-com { color: #64748b; font-style: italic; }
.c-fn { color: #22d3ee; }
.c-num { color: #fbbf24; }

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative; border-radius: 24px;
  padding: 36px 24px; text-align: center; overflow: hidden;
}
.final-glow {
  position: absolute; top: -60%; left: 50%;
  transform: translateX(-50%);
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.final-cta h2 {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.2;
  margin: 10px 0 10px;
}
.final-cta > p {
  font-size: 14px; color: var(--text-dim);
  margin-bottom: 22px; max-width: 320px;
  margin-left: auto; margin-right: auto;
}
.final-trust {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: var(--text-mute); margin-top: 16px;
}

/* ---------- Sticky Mobile CTA ---------- */
.sticky-spacer { height: 72px; }
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--surface-border);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
}
.sticky-info { flex: 1; min-width: 0; }
.sticky-title { font-size: 15px; font-weight: 800; }
.sticky-meta { font-size: 12px; color: var(--text-mute); margin-top: 1px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 30px 0 36px;
}
.footer-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px; text-align: center;
}
.footer-links {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center;
}
.footer-links a { font-size: 13px; color: var(--text-mute); font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-dim); }
.copyright { font-size: 12px; color: var(--text-mute); }
.disclaimer {
  font-size: 11px; color: var(--text-mute);
  max-width: 360px; line-height: 1.6; margin-top: 4px;
  opacity: 0.7;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  :root { --maxw: 560px; }
  .hero-title { font-size: 44px; }
  .section-head h2 { font-size: 30px; }
  .final-cta h2 { font-size: 26px; }
}

@media (min-width: 768px) {
  :root { --maxw: 720px; }
  .hero { padding: 80px 0 60px; }
  .hero-title { font-size: 52px; }
  .hero-sub { font-size: 18px; }
  .stat-num { font-size: 24px; }
  .features { flex-direction: row; gap: 18px; }
  .feature-card { flex: 1; }
  .section { padding: 68px 0; }
  .code-block { font-size: 13.5px; }
}

@media (min-width: 1024px) {
  :root { --maxw: 880px; }
  .hero-title { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
