/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text-primary: #eeeef0;
  --text-secondary: #8b8b9e;
  --text-muted: #5a5a6e;
  --accent-indigo: #6366f1;
  --accent-pink: #ec4899;
  --accent-purple: #8b5cf6;
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

code {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85em;
  font-family: 'SF Mono', Consolas, monospace;
}

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

.hide-mobile {
  display: inline;
}

/* ========== Animations ========== */
.anim-fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
  padding: 10px 0;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.logo-icon {
  display: flex;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(99, 102, 241, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 60%, rgba(236, 72, 153, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 30% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.08);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-indigo);
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-indigo);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-pink), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.03);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-unit {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-indigo);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ========== Trust Bar ========== */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-secondary);
}

.trust-bar .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.trust-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.trust-items {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-item {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ========== Section Shared ========== */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-indigo);
  padding: 4px 12px;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== Features ========== */
.features {
  padding: 120px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.08);
  color: var(--accent, var(--accent-indigo));
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== How It Works ========== */
.how-it-works {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr 280px;
  gap: 24px;
  align-items: start;
  padding: 32px 0;
}

.step-number {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(180deg, var(--accent-indigo), transparent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.step-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-visual {
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  padding: 20px;
  min-height: 100px;
}

.step-connector {
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, rgba(99,102,241,0.3), transparent);
  margin-left: 39px;
}

/* Mock Chat */
.mock-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.mock-bubble.user {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.mock-at {
  color: var(--accent-indigo);
  font-weight: 700;
}

/* Mock Index */
.mock-index {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.index-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.idx-id {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 20px;
}

.idx-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-purple));
  opacity: 0.6;
  flex-shrink: 0;
}

.idx-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Mock Retrieval */
.mock-retrieval {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.retrieval-bar {
  height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0 8px;
  position: relative;
  overflow: hidden;
}

.retrieval-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--pct) * 1%);
  background: linear-gradient(90deg, rgba(99,102,241,0.2), rgba(139,92,246,0.1));
  transition: width 1s ease;
}

.retrieval-bar.active {
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--text-secondary);
}

.retrieval-bar.active::before {
  background: linear-gradient(90deg, rgba(99,102,241,0.25), rgba(139,92,246,0.15));
}

/* Mock Response */
.mock-response {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 28px;
  font-size: 13px;
  color: var(--text-secondary);
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--accent-indigo);
  animation: blink 1s step-end infinite;
  order: 1;
}

@keyframes blink {
  50% { opacity: 0; }
}

.typed-text {
  order: 0;
}

/* ========== Architecture ========== */
.architecture {
  padding: 120px 0;
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.arch-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}

.arch-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.arch-icon {
  margin-bottom: 16px;
}

.arch-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.arch-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== Scenarios ========== */
.scenarios {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scenario-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
  cursor: default;
}

.scenario-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.scenario-emoji {
  font-size: 32px;
  margin-bottom: 16px;
}

.scenario-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.scenario-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== Demo ========== */
.demo {
  padding: 120px 0;
}

.demo-window {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}

.demo-dots {
  display: flex;
  gap: 6px;
}

.demo-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.demo-title {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
  margin-right: 40px;
}

.demo-body {
  display: flex;
  flex-direction: column;
  height: 420px;
}

.demo-chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  animation: msg-in 0.3s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: #fff;
}

.demo-msg.ai {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.demo-msg.ai .msg-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-indigo);
  background: rgba(99,102,241,0.12);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.demo-msg.typing .typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.demo-msg.typing .typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: bounce-dot 1.4s ease-in-out infinite;
}

.demo-msg.typing .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.demo-msg.typing .typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce-dot {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.demo-input-wrap {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.demo-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}

.demo-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.demo-input::placeholder {
  color: var(--text-muted);
}

.demo-send {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.demo-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

/* ========== CTA ========== */
.cta {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.cta-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-content p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  justify-content: center;
}

/* ========== Footer ========== */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-brand .logo {
  font-size: 16px;
}

.footer-brand .logo-icon svg {
  width: 18px;
  height: 18px;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scenario-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .step {
    grid-template-columns: 60px 1fr;
  }

  .step-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }

  /* Nav */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 20px;
  }

  .nav-toggle {
    display: flex;
    z-index: 100;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: 100px 16px 60px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-num {
    font-size: 24px;
  }

  /* Features */
  .features {
    padding: 80px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 24px;
  }

  /* How It Works */
  .how-it-works {
    padding: 80px 0;
  }

  .step {
    grid-template-columns: 48px 1fr;
    gap: 16px;
    padding: 20px 0;
  }

  .step-number {
    font-size: 32px;
  }

  .step-connector {
    margin-left: 23px;
    height: 20px;
  }

  /* Architecture */
  .architecture {
    padding: 80px 0;
  }

  .arch-grid {
    grid-template-columns: 1fr;
  }

  /* Scenarios */
  .scenarios {
    padding: 80px 0;
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  /* Demo */
  .demo {
    padding: 80px 0;
  }

  .demo-window {
    margin: 0 -8px;
    border-radius: 12px;
  }

  .demo-body {
    height: 360px;
  }

  /* CTA */
  .cta {
    padding: 80px 0;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 40px;
  }
}
