/* ===========================================
   features.css — 功能页样式
   基于 common.css 设计系统变量
   =========================================== */

/* ========= HERO ========= */
.f-hero {
  padding: calc(68px + var(--space-3xl)) 0 var(--space-2xl);
  text-align: center;
  background: linear-gradient(180deg, #f1f5f9 0%, var(--bg-body) 100%);
  position: relative;
  overflow: hidden;
}

.f-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.f-hero-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  position: relative;
  z-index: 1;
}

.f-hero .section-eyebrow {
  margin-bottom: 16px;
}

.f-hero .section-title {
  font-size: clamp(32px, 4.5vw, 48px);
  margin-bottom: var(--space-md);
}

.f-hero .section-description {
  max-width: 520px;
  margin: 0 auto var(--space-lg);
}

.f-hero-divider {
  display: block;
  width: 80px;
  height: 3px;
  margin: 0 auto var(--space-lg);
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* Metrics bar */
.f-hero-metrics {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: 16px 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.f-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.f-metric-value {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.f-metric-value i {
  font-size: 20px;
}

.f-metric-label {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.f-metric-bar {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* ========= FILTER BAR ========= */
.f-grid-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 7px 18px;
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-soft);
}

.filter-btn.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--accent-gradient);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* ========= BENTO GRID ========= */
.f-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding-bottom: var(--space-2xl);
}

/* ========= CARDS ========= */
.f-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.f-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Featured cards — span 2 cols, gradient accent */
.f-card.is-featured {
  grid-column: span 2;
  border-color: rgba(37, 99, 235, 0.15);
  background: linear-gradient(135deg, #fff 0%, #f8faff 100%);
  position: relative;
}

.f-card.is-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.f-card.is-featured:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08), var(--shadow-md);
}

/* Extra-large card (first featured — 2 rows) */
.f-card.is-large {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.f-card.is-large .f-card-icon {
  width: 64px;
  height: 64px;
  font-size: 26px;
  margin-bottom: var(--space-md);
}

.f-card.is-large .f-card-body h3 {
  font-size: 22px;
}

.f-card.is-large .f-card-body p {
  font-size: 15px;
}

/* ========= CARD ICON ========= */
.f-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-start);
  border-radius: var(--radius-md);
  font-size: 20px;
  flex-shrink: 0;
  margin-bottom: var(--space-sm);
  transition: background 0.3s ease, transform 0.3s ease;
}

.f-card:hover .f-card-icon {
  background: rgba(37, 99, 235, 0.15);
  transform: scale(1.05);
}

.f-card.is-featured .f-card-icon {
  width: 56px;
  height: 56px;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
  color: var(--accent-start);
}

/* ========= CARD BODY ========= */
.f-card-body h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.f-card-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ========= CARD META / TAGS ========= */
.f-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.f-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  font-weight: 500;
}

.f-tag-cat {
  color: var(--text-tertiary);
  border: 1px solid var(--border-strong);
  background: transparent;
}

.f-tag-live {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.f-tag-beta {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ========= CTA ========= */
.f-cta {
  text-align: center;
  padding: var(--space-2xl) var(--space-md) var(--space-3xl);
  max-width: 600px;
  margin: 0 auto;
}

.f-cta-divider {
  width: 60px;
  height: 3px;
  margin: 0 auto var(--space-lg);
  background: var(--accent-gradient);
  border-radius: 2px;
}

.f-cta h3 {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3vw, 28px);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.f-cta p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.f-cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
  .f-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .f-card.is-featured {
    grid-column: span 2;
  }

  .f-card.is-large {
    grid-row: span 1;
  }

  .f-hero-metrics {
    gap: var(--space-sm);
    padding: 12px 20px;
  }

  .f-metric-value {
    font-size: 22px;
  }

  .f-hero {
    padding-top: calc(68px + var(--space-2xl));
  }
}

@media (max-width: 600px) {
  .f-grid {
    grid-template-columns: 1fr;
  }

  .f-card.is-featured {
    grid-column: span 1;
  }

  .f-card.is-large {
    flex-direction: row;
    align-items: flex-start;
  }

  .f-card.is-large .f-card-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
    margin-bottom: 0;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    padding: 5px 14px;
    font-size: 12px;
  }

  .f-hero-metrics {
    flex-direction: column;
    gap: var(--space-xs);
    padding: 14px 24px;
  }

  .f-metric-bar {
    width: 32px;
    height: 1px;
  }

  .f-hero {
    padding-top: calc(68px + var(--space-xl));
    padding-bottom: var(--space-xl);
  }
}
