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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a26;
  --bg-section-alt: #08080d;
  --text: #e4e4ed;
  --text-dim: #8888a0;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.15);
  --border: #1e1e2e;
  --green: #00d2a0;
  --red: #ff6b6b;
  --yellow: #ffd93d;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

/* === Nav === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.nav-icon { width: 22px; height: 22px; color: var(--accent-light); }
.nav-logo-img { width: 24px; height: 24px; object-fit: contain; }
.footer-logo-img { width: 22px; height: 22px; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.nav-links a:hover { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #7c6cf0;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

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

.btn-ghost:hover {
  color: #fff;
  border-color: var(--text-dim);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

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

.btn-outline:hover {
  color: #fff;
  border-color: var(--text-dim);
}

/* === Hero === */
.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, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  border: 1px solid rgba(108, 92, 231, 0.3);
  background: rgba(108, 92, 231, 0.08);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

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

/* === Terminal === */
.terminal {
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d0d14;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #161622;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--green); }

.terminal-title {
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.term-line { white-space: nowrap; }
.term-line.dim { color: var(--text-dim); }
.term-line.success { color: var(--green); }
.term-prompt { color: var(--accent-light); margin-right: 8px; }
.term-tag {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
  margin-left: 4px;
}

/* === Sections === */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-section-alt);
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-title em {
  font-style: italic;
  color: var(--accent-light);
}

.section-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 56px;
}

/* === Pain Grid === */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 0.2s;
}

.pain-card:hover { border-color: #2a2a3e; }
.pain-icon { font-size: 1.3rem; flex-shrink: 0; }
.pain-card p { color: var(--text-dim); font-size: 0.95rem; }

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

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

.feature-card:hover {
  border-color: rgba(108, 92, 231, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent-light);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* === Steps === */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  text-align: center;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}

.step-arrow {
  color: var(--text-dim);
  font-size: 1.5rem;
  margin-top: 12px;
  flex-shrink: 0;
}

/* === Integrations === */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.integration-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.integration-group h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.integration-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(108, 92, 231, 0.1);
  color: var(--text);
  border: 1px solid rgba(108, 92, 231, 0.15);
}

.tag-more {
  color: var(--text-dim);
  background: transparent;
  border-style: dashed;
}

/* === Not Grid === */
.not-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 700px;
  margin: 0 auto 32px;
}

.not-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.not-x {
  color: var(--red);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.not-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.not-instead {
  text-align: center;
  color: var(--text-dim);
  font-size: 1rem;
}

.not-instead strong {
  color: var(--green);
}

/* === FAQ === */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--text-dim);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 0 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === CTA === */
.section-cta {
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, #0e0e18 100%);
  border-top: 1px solid var(--border);
}

.section-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.section-cta p {
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

.footer-left p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

.footer-right {
  display: flex;
  gap: 24px;
}

.footer-right a {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-right a:hover { color: #fff; }

/* === Mobile === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: block; }

  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 2rem; }

  .section { padding: 64px 0; }

  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
  .step { max-width: 100%; }

  .terminal-body { overflow-x: auto; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-right { justify-content: center; }
}

/* === Animations === */
@media (prefers-reduced-motion: no-preference) {
  .feature-card, .pain-card, .integration-group, .not-card, .step {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease forwards;
  }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }

  .features-grid .feature-card:nth-child(1) { animation-delay: 0.05s; }
  .features-grid .feature-card:nth-child(2) { animation-delay: 0.1s; }
  .features-grid .feature-card:nth-child(3) { animation-delay: 0.15s; }
  .features-grid .feature-card:nth-child(4) { animation-delay: 0.2s; }
  .features-grid .feature-card:nth-child(5) { animation-delay: 0.25s; }
  .features-grid .feature-card:nth-child(6) { animation-delay: 0.3s; }
}
