/* ============================================
   SAMURAI Design System — Components
   ============================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-cta);
  color: #fff;
}

.btn-gradient {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
}

.btn-gradient:hover {
  box-shadow: var(--shadow-cta);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-light);
  border-color: var(--border-active);
  color: #fff;
}

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

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

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-slow);
}

.card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.card-header {
  margin-bottom: 1rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent-light);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-info {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Section Headers ── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.section-title {
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Code Block ── */
.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

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

.code-block-dots span:nth-child(1) { background: #ef4444; }
.code-block-dots span:nth-child(2) { background: #f59e0b; }
.code-block-dots span:nth-child(3) { background: #22c55e; }

.code-block-lang {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

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

.code-block-body pre {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* ── Stat Counter ── */
.stat {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

.divider-accent {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  height: 1px;
}

/* ── Tag / Pill ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Feature List ── */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.feature-list-item .check {
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-light);
  font-size: 0.7rem;
  margin-top: 2px;
}
