<script setup lang="ts">
// P 关于我们 —— 文案来源 docs/关于我们.md
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'

const { t } = useI18n()

const heroStats = computed(() => [
  { label: t('about.statFounded'), value: '2023' },
  { label: t('about.statRegistered'), value: t('about.statRegisteredValue') },
  { label: t('about.statLicense'), value: t('about.statLicenseValue') },
  { label: t('about.statSupport'), value: '24 / 7' },
])

const highlights = computed(() => [
  {
    title: t('about.highlight1Title'),
    desc: t('about.highlight1Desc'),
    icon: '⚡',
  },
  {
    title: t('about.highlight2Title'),
    desc: t('about.highlight2Desc'),
    icon: '🛡️',
  },
  {
    title: t('about.highlight3Title'),
    desc: t('about.highlight3Desc'),
    icon: '🔒',
  },
  {
    title: t('about.highlight4Title'),
    desc: t('about.highlight4Desc'),
    icon: '⚙️',
  },
  {
    title: t('about.highlight5Title'),
    desc: t('about.highlight5Desc'),
    icon: '📉',
  },
  {
    title: t('about.highlight6Title'),
    desc: t('about.highlight6Desc'),
    icon: '💬',
  },
])
</script>

<template>
  <main class="page-main">
    <!-- Hero -->
    <section class="about-hero">
      <div class="page-container hero-inner">
        <p class="hero-eyebrow">ABOUT US</p>
        <h1 class="hero-title">{{ t('about.heroTitle') }}</h1>
        <p class="hero-desc">{{ t('about.heroDesc') }}</p>

        <ul class="hero-stats">
          <li v-for="s in heroStats" :key="s.label">
            <span class="stat-value">{{ s.value }}</span>
            <span class="stat-label">{{ s.label }}</span>
          </li>
        </ul>
      </div>
    </section>

    <!-- Intro -->
    <section class="about-section">
      <div class="page-container content">
        <h2 class="section-heading">
          <span class="bracket">[</span> {{ t('about.introTitle') }} <span class="bracket">]</span>
        </h2>
        <p class="section-p">{{ t('about.introDesc') }}</p>
      </div>
    </section>

    <!-- Highlights -->
    <section class="about-section about-section--alt">
      <div class="page-container content">
        <h2 class="section-heading">
          <span class="bracket">[</span> {{ t('about.highlightsTitle') }} <span class="bracket">]</span>
        </h2>
        <div class="highlight-grid">
          <div v-for="h in highlights" :key="h.title" class="highlight-card">
            <div class="highlight-icon">{{ h.icon }}</div>
            <h3 class="highlight-title">{{ h.title }}</h3>
            <p class="highlight-desc">{{ h.desc }}</p>
          </div>
        </div>
      </div>
    </section>

    <!-- 全球合规运营 -->
    <section class="about-section">
      <div class="page-container content">
        <h2 class="section-heading">
          <span class="bracket">[</span> {{ t('about.complianceTitle') }} <span class="bracket">]</span>
        </h2>
        <p class="section-p">{{ t('about.complianceDesc') }}</p>
      </div>
    </section>

    <!-- 支持的加密货币 -->
    <section class="about-section about-section--alt">
      <div class="page-container content">
        <h2 class="section-heading">
          <span class="bracket">[</span> {{ t('about.assetsTitle') }} <span class="bracket">]</span>
        </h2>
        <p class="section-p">{{ t('about.assetsDesc') }}</p>
      </div>
    </section>

    <!-- Mobile App -->
    <section class="about-section">
      <div class="page-container content">
        <h2 class="section-heading">
          <span class="bracket">[</span> {{ t('about.mobileTitle') }} <span class="bracket">]</span>
        </h2>
        <p class="section-p">{{ t('about.mobileDesc') }}</p>
        <div class="cta-row">
          <RouterLink to="/download" class="cta-btn">
            <span class="bracket">[</span> {{ t('about.downloadBtn') }} <span class="bracket">]</span>
          </RouterLink>
        </div>
      </div>
    </section>
  </main>
</template>

<style scoped>
/* ── Hero ── */
.about-hero {
  background: radial-gradient(ellipse at top, rgba(240, 185, 11, 0.12) 0%, transparent 60%),
              var(--color-bg-primary);
  padding: var(--space-16) 0 var(--space-12);
  border-bottom: 1px solid var(--color-border);
}
.hero-inner { max-width: 900px; }
.hero-eyebrow {
  font-size: var(--text-caption);
  letter-spacing: 4px;
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-3);
}
.hero-title {
  font-size: 48px;
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  line-height: 1.25;
  margin-bottom: var(--space-5);
}
.hero-desc {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  line-height: 1.85;
  margin-bottom: var(--space-10);
  max-width: 720px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  list-style: none;
  padding: 0;
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-left: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
}
.stat-value {
  font-size: 20px;
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}
.stat-label {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

/* ── Sections ── */
.about-section {
  padding: var(--space-16) 0;
  background: var(--color-bg-primary);
}
.about-section--alt { background: var(--color-bg-secondary); }
.content { max-width: 1080px; }

.section-heading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-h2);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-8);
}
.bracket {
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

.section-p {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  line-height: 1.9;
  max-width: 960px;
}

/* ── Highlights ── */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
.highlight-card {
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s;
}
.highlight-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.highlight-icon {
  font-size: 28px;
  margin-bottom: var(--space-4);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 185, 11, 0.1);
  border-radius: var(--radius-md);
}
.highlight-title {
  font-size: var(--text-body);
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.highlight-desc {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* ── CTA ── */
.cta-row {
  margin-top: var(--space-8);
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-size: var(--text-body);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: background 0.2s;
}
.cta-btn:hover { background: rgba(240, 185, 11, 0.1); }

/* ── 移动端 ── */
@media (max-width: 768px) {
  .about-hero { padding: var(--space-10) 0; }
  .hero-title { font-size: 32px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .about-section { padding: var(--space-10) 0; }
  .highlight-grid { grid-template-columns: 1fr; }
}
</style>
