/* ============================================
   COMPONENTS — Automation AI
   ============================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-400));
  color: var(--color-white);
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-brand-400), var(--color-brand-300));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 40px rgba(124,58,237,0.6), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:active { transform: translateY(0); }

.btn-primary span { position: relative; z-index: 1; }

.btn-ghost {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border: 1px solid var(--color-bg-border);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  border-color: var(--color-bg-border-hover);
  background: rgba(139,92,246,0.08);
  color: var(--color-brand-300);
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-base);
}

.btn-sm {
  padding: 8px 20px;
  font-size: var(--text-xs);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139,92,246,0.3);
  background: rgba(124,58,237,0.08);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand-300);
  margin-bottom: 20px;
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* ── Cards ── */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-bg-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  border-radius: inherit;
}

.card:hover {
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 0 30px rgba(124,58,237,0.1), 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(-4px);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(139,92,246,0.1));
  border: 1px solid rgba(139,92,246,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-brand-300);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.card-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-brand-300);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.card-link:hover { gap: 10px; color: var(--color-brand-200); }

/* ── Feature List (inside cards) ── */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.feature-list li::before {
  content: '';
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Stat Card ── */
.stat-card {
  text-align: center;
  padding: 40px 24px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: var(--weight-bold);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

/* ── Testimonial Card ── */
.testimonial-card {
  padding: 28px;
}

.testimonial-quote {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-quote::before { content: '"'; color: var(--color-brand-400); font-size: 1.5em; }

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

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: white;
  flex-shrink: 0;
}

.author-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.author-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Stars ── */
.stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
  color: var(--color-warning);
  font-size: var(--text-sm);
}

/* ── Tag Pill ── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-bg-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-bg-card);
}

/* ── Pricing Card ── */
.pricing-card {
  padding: 40px;
  position: relative;
}

.pricing-card.featured {
  border-color: rgba(139,92,246,0.4);
  background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(139,92,246,0.04) 100%);
  box-shadow: 0 0 40px rgba(124,58,237,0.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-400));
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 4px 16px;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pricing-plan {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-brand-300);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.price-unit {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.pricing-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.pricing-features li .check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-features li .check svg {
  width: 10px;
  height: 10px;
  color: var(--color-success);
}

/* ── FAQ Item ── */
.faq-item {
  border-bottom: 1px solid var(--color-bg-border);
  padding: 24px 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  transition: color var(--transition-fast);
  user-select: none;
}

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

.faq-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  color: var(--color-text-muted);
}

.faq-item.open .faq-icon {
  background: var(--color-brand-500);
  border-color: var(--color-brand-500);
  color: white;
  transform: rotate(45deg);
}

.faq-answer {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.75;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 16px;
}
