/* ============================================
   COMPONENTS — Reusable UI elements
   ============================================ */

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.8125rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--bg-primary);
  background: var(--accent);
  border-radius: var(--border-radius);
  transition: background var(--transition-base), transform var(--transition-fast);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.8125rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-fast);
  white-space: nowrap;
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  background: var(--bg-card);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--bg-primary);
  background: var(--accent);
  border-radius: var(--border-radius);
  transition: background var(--transition-base);
  white-space: nowrap;
}

.btn-nav:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

/* ---- Badge (hero) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.375rem 1rem 0.375rem 0.625rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  letter-spacing: 0.02em;
}

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

/* ---- Cards (features) ---- */
.card {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--border-radius-lg);
  transition: background var(--transition-base);
}

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

.card .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-lg);
  color: var(--accent);
}

.card .card-icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card p {
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ---- Feature cards (use cases) ---- */
.feat {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-base), background var(--transition-base);
}

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

.feat .feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-md);
  color: var(--accent);
}

.feat .feat-icon svg {
  width: 20px;
  height: 20px;
}

.feat h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.feat p {
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ---- Testimonial cards ---- */
.tcard {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.tcard blockquote {
  font-family: var(--font-body);
  font-weight: 300;
  font-style: italic;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
}

.tcard .tcard-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tcard .avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.tcard .tcard-info {
  display: flex;
  flex-direction: column;
}

.tcard .tcard-info .name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

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

/* ---- Code block ---- */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.code-block .code-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

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

.code-block .code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-block .code-dots span:nth-child(1) { background: #ff5f57; }
.code-block .code-dots span:nth-child(2) { background: #febc2e; }
.code-block .code-dots span:nth-child(3) { background: #28c840; }

.code-block .code-label {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.code-block pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}

.code-block .kw  { color: var(--code-keyword); }
.code-block .str { color: var(--code-string); }
.code-block .cm  { color: var(--code-comment); }
.code-block .fn  { color: #bb9af7; }
.code-block .op  { color: #89ddff; }
.code-block .nr  { color: #ff9e64; }

/* ---- Stat (metrics bar) ---- */
.stat {
  text-align: center;
  padding: var(--space-lg) 0;
}

.stat .stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-3xl);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

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

/* ---- Step (how it works) ---- */
.step {
  text-align: center;
  position: relative;
  flex: 1;
}

.step .step-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-4xl);
  color: var(--accent);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: var(--space-md);
}

.step h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.step p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 200px;
  margin: 0 auto;
}

/* Connector line between steps */
.steps-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 40px);
  right: calc(-50% + 40px);
  height: 1px;
  background: var(--border);
}

/* ---- Hamburger menu ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
