<template>
  <div class="value-propositions">
    <!-- 顶部价值摘要 -->
    <div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-20">
      <div v-for="(item, idx) in keyValues" :key="idx"
           class="value-summary-card p-8 rounded-3xl border border-slate-100 hover:border-indigo-200 transition-all group scroll-reveal-up"
           :style="{'--delay': idx * 0.1 + 's'}">
        <div class="w-14 h-14 rounded-2xl mb-6 flex items-center justify-center bg-indigo-50 text-indigo-600 group-hover:scale-110 group-hover:bg-indigo-600 group-hover:text-white transition-all duration-500">
          <div v-html="item.icon" class="w-7 h-7"></div>
        </div>
        <h4 class="text-xl font-black text-slate-900 mb-3">{{ item.title }}</h4>
        <p class="text-slate-500 font-medium leading-relaxed">{{ item.desc }}</p>
      </div>
    </div>

    <!-- 用户群体：沉浸式卡片 -->
    <div class="user-universe-section rounded-[3rem] bg-slate-50 p-12 lg:p-20 relative overflow-hidden">
      <div class="absolute top-0 right-0 w-96 h-96 bg-indigo-200/20 blur-[100px] rounded-full"></div>
      <div class="relative z-10">
        <div class="flex flex-col lg:flex-row lg:items-end justify-between gap-8 mb-16">
          <div>
            <h3 class="text-4xl font-black text-slate-900 mb-4">连接每一位 AI 创作者</h3>
            <p class="text-slate-500 text-lg font-medium">从独立开发者到企业决策者，暴米Ai 为不同角色提供定制化的自动化路径。</p>
          </div>
          <div class="flex items-center gap-4">
            <span class="text-sm font-black text-indigo-600 uppercase tracking-widest">Select Your Role</span>
            <div class="h-px w-12 bg-indigo-200"></div>
          </div>
        </div>
        <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-6">
          <div v-for="(user, idx) in userTypes" :key="idx" class="user-profile-card group cursor-pointer scroll-reveal-up" :style="{'--delay': (idx * 0.05 + 0.3) + 's'}">
            <div class="relative mb-4">
              <div class="absolute inset-0 bg-indigo-600 rounded-2xl rotate-6 scale-95 opacity-0 group-hover:opacity-100 group-hover:rotate-0 transition-all duration-500"></div>
              <img :src="user.image" :alt="user.name" class="relative z-10 w-full aspect-square object-cover rounded-2xl grayscale group-hover:grayscale-0 transition-all duration-500" />
            </div>
            <h5 class="text-sm font-black text-slate-900 text-center uppercase tracking-tighter">{{ user.name }}</h5>
            <p class="text-[10px] text-slate-400 text-center font-bold uppercase mt-1">{{ user.role }}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { onMounted } from 'vue';
const LightningIcon = `<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>`;
const ShieldIcon = `<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>`;
const DollarIcon = `<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>`;
const keyValues = [
  { title: '极致性能', desc: '毫秒级响应的执行引擎，确保业务流在高并发下依然稳健如初。', icon: LightningIcon },
  { title: '安全合规', desc: '全链路数据加密与私有化部署支持，为企业数据安全保驾护航。', icon: ShieldIcon },
  { title: '成本优化', desc: '通过智能调度减少 Token 消耗，比传统方案降低 40% 的运营成本。', icon: DollarIcon },
];
const userTypes = [
  { name: '企业白领', role: 'Efficiency Expert', image: 'https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=200&h=200&fit=crop&crop=face' },
  { name: 'AI 学习者', role: 'New Explorer', image: 'https://images.unsplash.com/photo-1531746790731-6c087fecd65a?w=200&h=200&fit=crop&crop=face' },
  { name: '开发者', role: 'Architect', image: 'https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?w=200&h=200&fit=crop&crop=face' },
  { name: '产品经理', role: 'Product Maker', image: 'https://images.unsplash.com/photo-1560250097-0b93528c311a?w=200&h=200&fit=crop&crop=face' },
  { name: '大学生', role: 'Future Talent', image: 'https://images.unsplash.com/photo-1523240795612-9a054b0db644?w=200&h=200&fit=crop&crop=face' },
  { name: '内容创作者', role: 'Content Creator', image: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=200&h=200&fit=crop&crop=face' },
];
onMounted(() => {
  const observer = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
      if (entry.isIntersecting) {
        entry.target.classList.add('is-active');
        observer.unobserve(entry.target);
      }
    });
  }, { threshold: 0.1 });
  document.querySelectorAll('.scroll-reveal-up').forEach(el => observer.observe(el));
});
</script>

<style scoped>
.value-summary-card { background: white; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 10px 15px -3px rgba(0, 0, 0, 0.03); }
.value-summary-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.1); }
.user-profile-card:hover h5 { color: #4f46e5; }
.scroll-reveal-up { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--delay, 0s); }
.is-active { opacity: 1; transform: translateY(0); }
</style>
