:root {
  --bg: #ffffff;
  --bg2: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99,102,241,.1);
  --success: #10b981;
  --success-light: rgba(16,185,129,.1);
  --warning: #f59e0b;
  --warning-light: rgba(245,158,11,.1);
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-lg: 16px;
  --max-w: 1140px;
  --transition: all .3s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg2: #1e293b;
  --card: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary-light: rgba(99,102,241,.15);
  --success-light: rgba(16,185,129,.15);
  --warning-light: rgba(245,158,11,.15);
  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.4);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.5);
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fadeInUp { animation: fadeInUp .6s ease-out forwards; }
.animate-fadeIn { animation: fadeIn .6s ease-out forwards; }
.animate-slideInLeft { animation: slideInLeft .6s ease-out forwards; }
.animate-slideInRight { animation: slideInRight .6s ease-out forwards; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}

[data-theme="dark"] .nav {
  background: rgba(15,23,42,.95);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}

.nav-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; }
.nav-brand img { height: 40px; transition: transform .3s; }
.nav-brand:hover img { transform: scale(1.05); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--primary); transition: width .3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 6px 0; transition: .3s; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: none; cursor: pointer; transition: var(--transition); text-decoration: none;
  position: relative; overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s;
}

.btn:hover::before { left: 100%; }

.btn-primary { 
  background: var(--gradient); color: #fff; 
  box-shadow: 0 4px 15px rgba(99,102,241,.3);
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 25px rgba(99,102,241,.4); 
  color: #fff; 
}
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: 12px; }

/* HERO */
.hero {
  padding: 100px 0 80px;
  background: var(--gradient-hero);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 1; }

.hero-badge { 
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 30px; 
  background: rgba(255,255,255,.1); 
  border: 1px solid rgba(255,255,255,.2);
  font-size: 13px; font-weight: 600; margin-bottom: 24px; 
  backdrop-filter: blur(10px);
}

.hero h1 { 
  font-size: 56px; font-weight: 800; line-height: 1.1; 
  margin-bottom: 20px; letter-spacing: -1px;
}

.hero p { 
  font-size: 20px; opacity: .85; max-width: 640px; 
  margin: 0 auto 36px; line-height: 1.7; 
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex; justify-content: center; gap: 60px; margin-top: 60px;
  padding-top: 40px; border-top: 1px solid rgba(255,255,255,.1);
}

.hero-stat { text-align: center; }
.hero-stat-number { font-size: 42px; font-weight: 800; display: block; }
.hero-stat-label { font-size: 14px; opacity: .7; }

/* SECTIONS */
.section { padding: 100px 0; }
.section-alt { background: var(--bg2); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 36px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.section-title p { font-size: 18px; color: var(--muted); max-width: 600px; margin: 0 auto; }

/* GRID */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* CARDS */
.card {
  background: var(--card); border: 1px solid var(--border); 
  border-radius: var(--radius-lg); padding: 32px; 
  transition: var(--transition);
  position: relative; overflow: hidden;
}

.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform .3s;
}

.card:hover { 
  transform: translateY(-8px); 
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.card:hover::before { transform: scaleX(1); }

.card-icon { 
  width: 56px; height: 56px; border-radius: 14px; 
  display: flex; align-items: center; justify-content: center; 
  font-size: 28px; margin-bottom: 20px;
  transition: transform .3s;
}

.card:hover .card-icon { transform: scale(1.1); }

.card-icon.primary { background: var(--primary-light); color: var(--primary); }
.card-icon.success { background: var(--success-light); color: var(--success); }
.card-icon.warning { background: var(--warning-light); color: var(--warning); }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--muted); line-height: 1.7; }

/* PRICING */
.pricing-card {
  background: var(--card); border: 1px solid var(--border); 
  border-radius: var(--radius-lg); padding: 40px 32px; 
  text-align: center; position: relative; transition: var(--transition);
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 8px 40px rgba(99,102,241,.25);
  transform: scale(1.05);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-8px);
}

.pricing-card.featured::before {
  content: '⭐ POPULER';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: #fff; padding: 6px 20px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}

.pricing-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.pricing-card .price { font-size: 48px; font-weight: 800; margin: 20px 0; letter-spacing: -1px; }
.pricing-card .price small { font-size: 16px; font-weight: 400; color: var(--muted); }
.pricing-card .features { list-style: none; text-align: left; margin: 28px 0; }
.pricing-card .features li { 
  padding: 10px 0; font-size: 15px; 
  display: flex; align-items: flex-start; gap: 12px; 
  border-bottom: 1px solid var(--border);
}
.pricing-card .features li:last-child { border-bottom: none; }
.pricing-card .features li::before { 
  content: '✓'; color: var(--success); font-weight: 700; 
  flex-shrink: 0; width: 20px; height: 20px; 
  background: var(--success-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* TESTIMONIALS */
.testimonial-card {
  background: var(--card); border: 1px solid var(--border); 
  border-radius: var(--radius-lg); padding: 32px; 
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.testimonial-text {
  font-size: 16px; line-height: 1.8; margin-bottom: 24px;
  font-style: italic; color: var(--text);
}

.testimonial-author {
  display: flex; align-items: center; gap: 16px;
}

.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
}

.testimonial-name { font-weight: 700; font-size: 15px; }
.testimonial-role { font-size: 13px; color: var(--muted); }

/* FAQ */
.faq-item {
  background: var(--card); border: 1px solid var(--border); 
  border-radius: var(--radius); margin-bottom: 12px; 
  overflow: hidden; transition: var(--transition);
}

.faq-item:hover { border-color: var(--primary); }

.faq-question {
  padding: 20px 24px; font-weight: 600; font-size: 16px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: var(--transition);
}

.faq-question:hover { color: var(--primary); }

.faq-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: transform .3s;
}

.faq-item.active .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .3s ease-out;
  padding: 0 24px;
}

.faq-item.active .faq-answer { max-height: 200px; padding-bottom: 20px; }

.faq-answer p { font-size: 15px; color: var(--muted); line-height: 1.7; }

/* TECH STACK */
.tech-card {
  background: var(--card); border: 1px solid var(--border); 
  border-radius: var(--radius-lg); padding: 40px; 
  text-align: center; transition: var(--transition);
}

.tech-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.tech-icon {
  width: 80px; height: 80px; border-radius: 20px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(99,102,241,.2);
}

.tech-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.tech-card p { font-size: 15px; color: var(--muted); }

/* CTA SECTION */
.cta-section {
  background: var(--gradient);
  padding: 80px 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-content { position: relative; z-index: 1; }
.cta-section h2 { font-size: 40px; font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 18px; opacity: .9; margin-bottom: 32px; }

/* DEMO */
.demo-wrap { 
  background: var(--card); border: 1px solid var(--border); 
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.demo-video { 
  position: relative; padding-bottom: 56.25%; height: 0; 
  background: #000; 
}

.demo-video iframe { 
  position: absolute; top: 0; left: 0; 
  width: 100%; height: 100%; border: none; 
}

/* DOCS */
.doc-sidebar {
  position: sticky; top: 90px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; max-height: calc(100vh - 100px); overflow-y: auto;
}

.doc-sidebar h4 { 
  font-size: 12px; font-weight: 700; text-transform: uppercase; 
  color: var(--muted); margin-bottom: 16px; letter-spacing: 1px;
}

.doc-sidebar a { 
  display: block; padding: 10px 14px; font-size: 14px; 
  color: var(--muted); border-radius: 8px; transition: var(--transition); 
  margin-bottom: 4px;
}

.doc-sidebar a:hover, .doc-sidebar a.active { 
  background: var(--primary-light); color: var(--primary); 
  font-weight: 500;
}

.doc-content { font-size: 16px; line-height: 1.8; }
.doc-content h1 { font-size: 32px; font-weight: 800; margin-bottom: 20px; }
.doc-content h2 { font-size: 24px; font-weight: 700; margin: 40px 0 16px; }
.doc-content h3 { font-size: 20px; font-weight: 600; margin: 28px 0 12px; }
.doc-content p { margin-bottom: 16px; }

.doc-content code {
  background: var(--bg2); padding: 3px 10px; border-radius: 6px;
  font-size: 14px; font-family: 'Fira Code', monospace;
}

.doc-content pre {
  background: #1e293b; color: #e2e8f0; padding: 20px 24px;
  border-radius: 12px; overflow-x: auto; margin: 20px 0;
  font-size: 14px; line-height: 1.7;
}

.doc-content pre code { background: none; padding: 0; color: inherit; }
.doc-content ul, .doc-content ol { margin: 16px 0; padding-left: 28px; }
.doc-content li { margin-bottom: 8px; }

.doc-content .callout {
  padding: 20px 24px; border-radius: 12px; margin: 20px 0;
  border-left: 4px solid var(--primary); background: var(--primary-light);
}

/* FOOTER */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 60px 0 32px; margin-top: 80px;
}

.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}

.footer h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer a { 
  display: block; font-size: 14px; color: var(--muted); 
  margin-bottom: 10px; transition: color .2s; 
}
.footer a:hover { color: var(--text); }

.footer-copy { 
  text-align: center; font-size: 13px; color: var(--muted); 
  margin-top: 40px; padding-top: 24px; 
  border-top: 1px solid var(--border); 
}

/* THEME TOGGLE */
.theme-toggle { 
  background: none; border: 1px solid var(--border); 
  border-radius: 10px; padding: 8px 12px; 
  cursor: pointer; font-size: 18px; color: var(--text);
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* NAV MOBILE */
.nav-links.show {
  display: flex !important;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}

/* SCROLL ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .hero { padding: 80px 0 60px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .hero-stat-number { font-size: 32px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .section { padding: 60px 0; }
  .section-title h2 { font-size: 28px; }
  .pricing-card.featured { transform: none; }
  .pricing-card.featured:hover { transform: translateY(-8px); }
}
