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

:root {
  --bg: #0b0f19;
  --bg-alt: #111827;
  --surface: #1a2234;
  --border: #2a3548;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.15);
  --success: #22c55e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0,0,0,0.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

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

.btn-ghost:hover {
  background: var(--surface);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: white;
}

.logo-icon.small {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

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

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

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

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

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Hero ===== */
.hero {
  padding: 100px 0 90px;
  text-align: center;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent);
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

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

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

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

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
}

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

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 18px;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
}

.price-card-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.price-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}

.price-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.price-features {
  list-style: none;
  margin-bottom: 28px;
}

.price-features li {
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.price-features li:last-child {
  border-bottom: none;
}

.price-card .btn {
  width: 100%;
  padding: 12px;
}

/* ===== CTA ===== */
.cta-section {
  padding: 80px 0;
  text-align: center;
  background: 
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(59, 130, 246, 0.12), transparent);
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

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

/* ===== Builder Overlay ===== */
.builder-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.builder-overlay.open {
  display: flex;
}

.builder-window {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 1000px;
  height: 90vh;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.builder-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.builder-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

.builder-close:hover {
  color: var(--text);
}

.builder-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.chat-area {
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border);
}

.message {
  display: flex;
  gap: 12px;
  max-width: 95%;
}

.message.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background: var(--surface);
  border: 1px solid var(--border);
}

.message-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.55;
}

.message.user .message-content {
  background: var(--primary-soft);
  border-color: rgba(59, 130, 246, 0.3);
}

.message-content p {
  margin-bottom: 8px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.preview-status {
  color: var(--primary);
  font-size: 12px;
}

.preview-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.preview-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px;
}

.preview-frame {
  background: white;
  color: #111;
  border-radius: 8px;
  padding: 20px;
  min-height: 200px;
  font-size: 14px;
}

.preview-frame h2 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.preview-frame p {
  margin-bottom: 8px;
  color: #444;
}

.builder-footer {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  background: var(--bg-alt);
}

.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.input-row textarea {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  resize: none;
  min-height: 48px;
  max-height: 120px;
  line-height: 1.4;
}

.input-row textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.send-btn {
  padding: 0 20px;
  height: 48px;
}

.builder-actions {
  display: flex;
  gap: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .builder-body {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    display: none;
  }
  .chat-area {
    border-right: none;
  }
  .hero {
    padding: 70px 0 60px;
  }
}
