/* ===== Design Tokens ===== */
:root {
  --color-bg: #0a0a0f;
  --color-bg-raised: #12121a;
  --color-bg-card: #16161f;
  --color-bg-card-hover: #1c1c28;
  --color-surface: #1e1e2a;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --color-text: #e8e8ed;
  --color-text-secondary: #8e8ea0;
  --color-text-tertiary: #5a5a6e;
  --color-accent: #6c5ce7;
  --color-accent-light: #a29bfe;
  --color-accent-glow: rgba(108, 92, 231, 0.3);
  --color-success: #00d2a0;
  --color-warning: #ffc048;
  --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #74b9ff 100%);
  --gradient-text: linear-gradient(135deg, #a29bfe 0%, #74b9ff 50%, #55efc4 100%);
  --gradient-card: linear-gradient(180deg, rgba(108, 92, 231, 0.08) 0%, transparent 100%);
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 60px rgba(108, 92, 231, 0.15);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

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

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
}
[data-animate].visible {
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-smooth);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.6);
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(10, 10, 15, 0.9);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
}
.logo-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(108, 92, 231, 0.5));
}
.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-fast);
  border-radius: 1px;
}
.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  transition: var(--transition-fast);
  box-shadow: 0 2px 12px var(--color-accent-glow);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--color-accent-glow);
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition-fast);
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--color-text-secondary);
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  justify-content: center;
}
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 16px var(--color-accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px var(--color-accent-glow);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-border-hover);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  width: 100%;
}
.btn-outline:hover {
  border-color: var(--color-accent);
  background: rgba(108, 92, 231, 0.08);
}
.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(108, 92, 231, 0.15) 0%, rgba(108, 92, 231, 0.05) 40%, transparent 70%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-accent-light);
  margin-bottom: 32px;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}
.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Code Window */
.code-window {
  max-width: 680px;
  margin: 60px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-align: left;
}
.code-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--color-border);
}
.code-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
}
.code-body {
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}
.code-body code { font-family: inherit; }
.code-comment { color: var(--color-text-tertiary); }
.code-keyword { color: var(--color-accent-light); }
.code-string { color: var(--color-success); }
.code-key { color: #74b9ff; }
.code-number { color: var(--color-warning); }

/* ===== Stats ===== */
.stats {
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-raised);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.stat-number, .stat-prefix, .stat-suffix {
  font-size: 2.4rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.section-desc {
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 16px auto 0;
  font-size: 1.05rem;
}

/* ===== Features ===== */
.features {
  padding: 120px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: var(--transition-smooth);
}
.feature-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(108, 92, 231, 0.1);
  color: var(--color-accent-light);
  margin-bottom: 20px;
}
.feature-card h3 {
  position: relative;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-card p {
  position: relative;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 120px 0;
  background: var(--color-bg-raised);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}
.step-card {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 32px 24px;
}
.step-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.6;
  margin-bottom: 16px;
  line-height: 1;
}
.step-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.step-card p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}
.step-connector {
  display: flex;
  align-items: center;
  padding-top: 48px;
  color: var(--color-text-tertiary);
}

/* ===== Pricing ===== */
.pricing {
  padding: 120px 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.pricing-card {
  padding: 36px 32px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  position: relative;
  transition: var(--transition-smooth);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.pricing-card.featured {
  border-color: var(--color-accent);
  background: linear-gradient(180deg, rgba(108, 92, 231, 0.08) 0%, var(--color-bg-card) 100%);
  box-shadow: var(--shadow-glow);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--gradient-primary);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.pricing-header {
  margin-bottom: 28px;
}
.pricing-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}
.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.price-label {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}
.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}
.pricing-features li svg {
  flex-shrink: 0;
  color: var(--color-success);
}

/* ===== FAQ ===== */
.faq {
  padding: 120px 0;
  background: var(--color-bg-raised);
  border-top: 1px solid var(--color-border);
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item summary {
  padding: 20px 0;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  transition: var(--transition-fast);
  color: var(--color-text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-text-tertiary);
  transition: var(--transition-fast);
}
.faq-item[open] summary::after {
  content: '−';
  color: var(--color-accent-light);
}
.faq-item summary:hover { color: var(--color-accent-light); }
.faq-answer {
  padding: 0 0 20px;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-answer a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== CTA ===== */
.cta {
  padding: 120px 0;
}
.cta-card {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(108, 92, 231, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card h2 {
  position: relative;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.cta-card p {
  position: relative;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* ===== Footer ===== */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--color-border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 280px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}
.footer-col a:hover {
  color: var(--color-accent-light);
}
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.footer-bottom p {
  color: var(--color-text-tertiary);
  font-size: 0.82rem;
}

/* ===== Legal Pages ===== */
.legal-page {
  padding: 140px 0 80px;
}
.legal-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.legal-page .legal-date {
  color: var(--color-text-tertiary);
  font-size: 0.85rem;
  margin-bottom: 40px;
}
.legal-page h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
}
.legal-page p, .legal-page li {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-page ul {
  padding-left: 24px;
  list-style: disc;
}
.legal-page a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .mobile-menu-btn { display: flex; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .features-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-connector { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 130px 0 60px; }
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 300px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .code-body { font-size: 0.72rem; }
}
