feat(ui): 保时捷语法复刻收尾(ADR-0008/0009/0011/0012/0013) #65

Merged
zhangxiang merged 63 commits from feat/porsche-ui-replica into dev 2026-12-02 19:34:32 +08:00
7 changed files with 113 additions and 76 deletions
Showing only changes of commit 09b78369eb - Show all commits

No files matched your search

@@ -104,3 +104,47 @@ E2E_TARGET=production ... --update-snapshots=none → 125 passed / 0 failed
--workers=2 --update-snapshots=none → 125 passed / 0 failed
(新增 1 个用例 × 5 project 后,全量 130 例;上面 125 是加用例之前那一轮)
```
---
## 2026-11-03 · P4-B2(详情五页)之后
### 同一个根因的第二次发作:这次是 **ISR 在运行期改写产物**
顺序错了会重演:`build → 跑 @smoke(其中有用例写库建 news)→ 跑视觉` 时,
`/news` 又在 5 个 project 一致判红。但这次 `prisma/dev.db` 是**干净**的(只有 2 条真实新闻),
脏的是产物:
```
grep -c "E2E 测试新闻" dist/standalone/dist/server/app/news.html → 2
```
即运行的 server 在测试数据存在的那段时间里重新生成了 `/news` 并**把结果写回了 dist**。
⇒ 根因与「build 时脏」是同一条,只是触发点从构建期换成了 ISR 运行期。
处置与上次一致:重建(产物归零)→ **只跑视觉**,不再在视觉之前跑写库 E2E。
**可执行纪律(两条,缺一不可)**:
1. `grep -c "E2E 测试新闻" dist/standalone/dist/server/app/news.html` 必须为 0,否则先重建;
2. 视觉认证轮不要与写库型 E2E 同轮执行 —— 先 E2E 后 build,再只跑视觉。
### B2 的视觉结果
```
--workers=2 --update-snapshots=none → 130 passed / 0 failed
```
过程中 `visual-webkit-desktop › 解决方案详情-制造` 红过一次,**重跑 3 次全绿**(15.0s / 13.8s / 14.6s)。
按已写定的判据(连跑两轮失败集不同 = 抖动;同一张两轮都红 = 真回归)判为抖动,不重采。
另外确认了一件事:B2 在 `solution-detail-content-v3` 上改的 7 处圆角 + 9 处彩砖,
**没有改变 `/solutions/manufacturing` 的像素** —— 那些图标砖位于该行业未渲染的分支里
(`suiteCombination` / `certifications` 需要数据)。这不代表改动没生效:
同页 HTML 实测 `bg-bg-secondary` 命中 44 次、`/products/erp` 49 次。
### 新增一条判据通道(R16 内联)
B2 暴露出 R16 只看类名的盲区:`case-detail-page.tsx` 把整整一个 `<section>` 刷成
`style={{ background: "var(--color-brand)" }}`,类名通道零命中。已给 R16 加**内联通道**
(`background`/`backgroundColor` 取 `var(--color-brand*)`),并把该 section 改为 ink 底、
删掉两枚白色 `blur-[120px]` 光晕球(玻璃拟态)、两处内联彩砖改用 DESIGN 许可的
`--color-brand-bg`(blush) + `--color-brand-ink` 双通道徽章写法。
棘轮读数随之降到 R13 48 · R14 13 · R15 13 · R16 8(类名 8 + 内联 0)· R17 39 · R19 7。
+23 -6
View File
@@ -100,8 +100,11 @@ const MARKETING_FLOOR = 60;
* 按「只降不升」的纪律在同一提交里把上限跟着降下来(否则棘轮成了永久豁免)。
* 同日 hub 六页(P4-B1)清账后再次下调:R13 71→67 · R14 21→17 · R15 20→16 ·
* R16 26→22 · R17 53→43 · R19 21→11。降的是**真实存量**,不是为了让闸变绿而改数。
* 同日详情五页(P4-B2)清账后再降:R13 67→48 · R14 17→13 · R15 16→13 ·
* R16 22→8(其中 2 处来自新开的**内联通道**,见 BRAND_SURFACE_INLINE_RE)·
* R17 43→39 · R19 11→7。
*/
const MARKETING_HIT_CEILINGS = { R13: 67, R14: 17, R15: 16, R16: 22, R17: 43, R18: 0, R19: 11 };
const MARKETING_HIT_CEILINGS = { R13: 48, R14: 13, R15: 13, R16: 8, R17: 39, R18: 0, R19: 7 };
/**
* 判据正则一律**不带 g 旗标**。
@@ -115,7 +118,16 @@ const ROUNDED_UTILITY_RE = /\brounded-(?:md|lg|xl|2xl|3xl|full)\b/;
const HOVER_LIFT_RE = /hover:-translate-y\b/;
/** 装饰阴影:任意 hover:shadow*(含 hover:shadow-[…] 带值那族)+ lg/xl/2xl 档 */
const DECOR_SHADOW_RE = /(?:hover:shadow(?:-[a-z0-9]+)?(?::\[[^\]]+\])?|\bshadow-(?:2xl|xl|lg)\b)/;
/**
* R16 的**两条通道**。为什么必须两条:类名通道可以被内联样式整条绕过 ——
* 实测案例 `src/components/sections/case-detail-page.tsx` 把整整一个 section 刷成
* `style={{ background: "var(--color-brand)" }}`,类名通道零命中,闸看不见,
* 而那正是「饱和红从不用作面」最严重的一种违反。
* 内联通道只认**品牌底色**写法:`background` / `backgroundColor` 取 `var(--color-brand*)`。
* 不认 `color:`(文字通道由 check:brand-token 管)也不认任意色值(避免与 accents 闸重叠)。
*/
const BRAND_SURFACE_RE = /\bbg-brand-(?:soft|section)\b/;
const BRAND_SURFACE_INLINE_RE = /\bbackground(?:Color)?\s*:\s*["'`]\s*var\(\s*--color-brand(?:-soft|-section)?\s*\)/;
const FONT_BLACK_RE = /\bfont-black\b/;
const FONT_EXTRA_BOLD_RE = /\bfont-extrabold\b/;
/**
@@ -442,10 +454,15 @@ function checkGrammar(rawText, rawFiles, twConfig = "", opts = {}) {
// R16 饱和/浅色品牌红不得做「面」。两家实测红只出现在按钮上;本仓把它铺成图标砖
// (bg-brand-soft) 与满幅段 (bg-brand-section),是决策一「红是结论电压」最直接的稀释。
const r16Count = marketingFiles.reduce((a, [, f]) => a + countHits(f, BRAND_SURFACE_RE), 0);
rule({ id: "R16", name: "营销面零品牌红彩色面(bg-brand-soft / bg-brand-section)", denominator: rScan,
red: r16Count > ceilings.R16 ? [`营销面彩色面 ${r16Count} 处 > 上限 ${ceilings.R16}(红只做:实心 CTA 填充 / eyebrow 短线 / hairline hover / 角牌;中性底走 bg-bg-secondary)`] : [],
note: `实测 ${r16Count} 处 · 上限 ${ceilings.R16}${r16Count < ceilings.R16 ? " ⇒ 请把上限下调" : ""}` });
const r16ClassCount = marketingFiles.reduce((a, [, f]) => a + countHits(f, BRAND_SURFACE_RE), 0);
const r16InlineCount = marketingFiles.reduce((a, [, f]) => a + countHits(f, BRAND_SURFACE_INLINE_RE), 0);
const r16Count = r16ClassCount + r16InlineCount;
const r16InlineFiles = marketingFiles.filter(([, f]) => countHits(f, BRAND_SURFACE_INLINE_RE) > 0);
rule({ id: "R16", name: "营销面零品牌红彩色面(类名 + 内联两条通道)", denominator: rScan,
red: r16Count > ceilings.R16
? [`营销面彩色面 ${r16Count} 处 > 上限 ${ceilings.R16}(类名 ${r16ClassCount} + 内联 ${r16InlineCount}${r16InlineFiles.length ? ` 内联位于 ${r16InlineFiles.map(([p]) => p).join(", ")}` : ""};红只做:实心 CTA 填充 / eyebrow 短线 / hairline hover / 角牌;中性底走 bg-bg-secondary)`]
: [],
note: `实测 ${r16Count} 处(类名 ${r16ClassCount} + 内联 ${r16InlineCount})· 上限 ${ceilings.R16}${r16Count < ceilings.R16 ? " ⇒ 请把上限下调" : ""}` });
// R17 字重集合。对标实测层级来自 字号 × 字重 两轴,字重只用 400/500/700;
// 本仓 53 处 font-black(900) 是「靠更粗建立层级」的单轴做法,与 statement 档冲突。
@@ -544,7 +561,7 @@ function selftest() {
* 夹具一律带 `opts.floor = 0`:合成样本只有一两个文件,
* 不关掉地板就会把「扫描面太小」的红混进这一维,读数不再单义。
*/
const dirty = `<div className="rounded-full rounded-2xl hover:-translate-y-1 hover:shadow-lg shadow-xl bg-brand-soft bg-brand-section font-black font-extrabold" style={{ backgroundImage: 'url(tile_hatching.svg)', transform: 'rotate(140deg)' }}><path d="M22 14.204v-3.948" /></div>`;
const dirty = `<div className="rounded-full rounded-2xl hover:-translate-y-1 hover:shadow-lg shadow-xl bg-brand-soft bg-brand-section font-black font-extrabold" style={{ backgroundImage: 'url(tile_hatching.svg)', transform: 'rotate(140deg)', background: "var(--color-brand)" }}><path d="M22 14.204v-3.948" /></div>`;
const inScope = (rel) => new Map([[rel, dirty]]);
const hitRed = (rel, id, ceiling) =>
checkGrammar(cssText, inScope(rel), "", { floor: 0, hitCeilings: { [id]: ceiling } })
@@ -20,7 +20,7 @@ function RelatedNewsCard({ news, index }: { news: NewsItem; index: number }) {
>
<a
href={`/news/${news.id}`}
className="group relative block border border-border-primary hover:border-brand/30 bg-bg-elevated transition-all duration-150 hover:-translate-y-2 overflow-hidden h-full"
className="group relative block border border-border-primary hover:border-brand/30 bg-bg-elevated transition-colors duration-hover overflow-hidden h-full"
>
<div className="absolute top-0 left-0 bottom-0 w-1 bg-brand scale-y-0 group-hover:scale-y-100 transition-transform duration-150 origin-top" />
@@ -150,7 +150,7 @@ export default function NewsDetailContentV3({ news, relatedNews = [] }: NewsDeta
<div className="mt-16 sm:mt-20 flex flex-col sm:flex-row justify-center gap-4">
<StaticLink
href="/news"
className="inline-flex items-center justify-center gap-2 px-8 py-4 font-medium text-base text-ink border border-border-primary rounded-full hover:border-border-secondary hover:bg-bg-secondary transition-all duration-normal"
className="inline-flex items-center justify-center gap-2 px-8 py-4 font-medium text-base text-ink border border-border-primary rounded-cta hover:border-border-secondary hover:bg-bg-secondary transition-colors duration-hover"
>
<ArrowLeft className="w-4 h-4" />
返回新闻列表
@@ -36,11 +36,11 @@ function DetailHero({ product }: DetailHeroProps) {
transition={{ duration: 0.28, ease: EASE_OUT }}
className="flex items-center gap-4 mb-8"
>
<div className="w-16 h-16 rounded-2xl bg-brand-soft flex items-center justify-center text-brand-ink">
<div className="w-16 h-16 bg-bg-secondary flex items-center justify-center text-brand-ink">
{productIcon}
</div>
<div>
<span className="px-3 py-1.5 text-xs font-bold text-brand-ink bg-brand-soft/50">
<span className="px-3 py-1.5 text-xs font-bold text-brand-ink bg-bg-secondary">
{product.category}
</span>
<div className="flex items-center gap-3 mt-2">
@@ -137,10 +137,10 @@ function FeaturesSection({ features }: FeaturesSectionProps) {
{features.map((feature, idx) => (
<div
key={idx}
className="group relative p-8 bg-bg-primary hover:bg-bg-secondary transition-all duration-150"
className="group relative p-8 bg-bg-primary hover:bg-bg-secondary transition-colors duration-hover"
>
<div className="flex items-center gap-5">
<div className="w-10 h-10 rounded-xl bg-brand-soft flex items-center justify-center text-brand-ink shrink-0">
<div className="w-10 h-10 bg-bg-secondary flex items-center justify-center text-brand-ink shrink-0">
<Check className="w-5 h-5" />
</div>
<p className="text-lg text-ink font-medium leading-relaxed">{feature}</p>
@@ -180,10 +180,10 @@ function BenefitsSection({ benefits }: BenefitsSectionProps) {
{benefits.map((benefit, idx) => (
<div
key={idx}
className="group relative p-8 bg-bg-primary hover:bg-bg-secondary transition-all duration-150"
className="group relative p-8 bg-bg-primary hover:bg-bg-secondary transition-colors duration-hover"
>
<div className="flex items-center gap-6">
<div className="w-12 h-12 rounded-2xl bg-brand-soft/50 flex items-center justify-center text-brand-ink shrink-0">
<div className="w-12 h-12 bg-bg-secondary flex items-center justify-center text-brand-ink shrink-0">
<TrendingUp className="w-6 h-6" />
</div>
<p className="text-xl text-ink font-semibold leading-relaxed">{benefit}</p>
@@ -233,9 +233,9 @@ function ProcessSection({ process }: ProcessSectionProps) {
{process.map((step, idx) => (
<div
key={idx}
className="group relative text-center p-8 bg-bg-primary hover:bg-bg-secondary transition-all duration-150"
className="group relative text-center p-8 bg-bg-primary hover:bg-bg-secondary transition-colors duration-hover"
>
<div className="relative z-10 w-20 h-20 rounded-3xl bg-bg-secondary border border-border-primary group-hover:border-brand/50 flex items-center justify-center mx-auto mb-8 transition-all duration-150">
<div className="relative z-10 w-20 h-20 bg-bg-secondary border border-border-primary group-hover:border-brand/50 flex items-center justify-center mx-auto mb-8 transition-colors duration-hover">
<span className="text-3xl font-bold text-brand-ink">{idx + 1}</span>
</div>
@@ -40,19 +40,19 @@ function DetailHero({ service }: { service: Service }) {
initial={{ opacity: 0, y: 40 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.28, delay: 0.2, ease: EASE_OUT }}
className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-black text-ink leading-[0.95] tracking-tighter mb-6 sm:mb-8"
className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-ink leading-[0.95] tracking-tighter mb-6 sm:mb-8"
>
<div className="block">{service.title}</div>
<div className={firstBenefit ? "block mt-4 sm:mt-6" : "hidden"}>
<span className="relative inline-block">
<span className="relative text-brand-ink font-black">
<span className="relative text-brand-ink font-bold">
{firstBenefit}
<motion.span
className="absolute -bottom-2 left-0 w-full h-[3px] bg-brand"
style={{ transformOrigin: "left" }}
initial={{ scaleX: 0 }}
animate={{ scaleX: 1 }}
transition={{ duration: 0.28, delay: 1.2, ease: EASE_OUT }}
transition={{ duration: 0.28, delay: 0.15, ease: EASE_OUT }}
/>
</span>
</span>
@@ -110,7 +110,7 @@ function OverviewSection({ service }: { service: Service }) {
transition={{ duration: 0.28, ease: EASE_OUT }}
className="lg:col-span-5"
>
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95]">
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-ink tracking-tight leading-[0.95]">
解决什么问题
</h2>
</motion.div>
@@ -154,7 +154,7 @@ function FeaturesSection({ service }: { service: Service }) {
transition={{ duration: 0.28, ease: EASE_OUT }}
className="max-w-3xl mb-16 sm:mb-20 md:mb-24"
>
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95]">
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-ink tracking-tight leading-[0.95]">
核心能力
</h2>
<p className="mt-6 text-lg text-text-secondary leading-relaxed">
@@ -178,7 +178,7 @@ function FeaturesSection({ service }: { service: Service }) {
delay: index * 0.06,
ease: EASE_OUT,
}}
className="group relative p-8 sm:p-10 transition-all duration-150 hover:bg-bg-secondary hover:shadow-lg hover:-translate-y-1 bg-bg-primary"
className="group relative p-8 sm:p-10 transition-colors duration-hover hover:bg-bg-secondary bg-bg-primary"
>
<div className="relative z-10">
<Icon className="w-8 h-8 mb-6 text-brand-ink" />
@@ -214,7 +214,7 @@ function ProcessSection({ service }: { service: Service }) {
transition={{ duration: 0.28, ease: EASE_OUT }}
className="max-w-3xl mb-16 sm:mb-20 md:mb-24"
>
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95]">
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-ink tracking-tight leading-[0.95]">
服务流程
</h2>
<p className="mt-6 text-lg text-text-secondary leading-relaxed">
@@ -236,10 +236,10 @@ function ProcessSection({ service }: { service: Service }) {
delay: index * 0.06,
ease: EASE_OUT,
}}
className="relative group p-6 sm:p-8 bg-bg-primary hover:bg-bg-secondary hover:shadow-lg hover:-translate-y-1 transition-all duration-150"
className="relative group p-6 sm:p-8 bg-bg-primary hover:bg-bg-secondary transition-colors duration-hover"
>
<div
className="w-2 h-2 rounded-full mb-6"
className="w-2 h-2 rounded-cta mb-6"
style={{
backgroundColor:
index === 0 ? "#C41E3A" : "var(--color-border-primary)",
@@ -277,7 +277,7 @@ function CTASection() {
transition={{ duration: 0.28, ease: EASE_OUT }}
className="max-w-3xl"
>
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-extrabold text-ink tracking-tight leading-[0.95] mb-8">
<h2 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-ink tracking-tight leading-[0.95] mb-8">
准备好开始了吗?
</h2>
<p className="text-lg text-text-secondary leading-relaxed mb-10">
@@ -64,11 +64,11 @@ function DetailHero({ solution }: DetailHeroProps) {
transition={{ duration: 0.28, ease: EASE_OUT }}
className="flex items-center gap-4 mb-8"
>
<div className="w-16 h-16 rounded-2xl bg-brand-soft flex items-center justify-center text-brand-ink">
<div className="w-16 h-16 bg-bg-secondary flex items-center justify-center text-brand-ink">
{industryIcon}
</div>
<div>
<span className="px-3 py-1.5 text-xs font-bold text-brand-ink bg-brand-soft/50">
<span className="px-3 py-1.5 text-xs font-bold text-brand-ink bg-bg-secondary">
{solution.industry}
</span>
<div className="text-text-muted text-sm mt-2">{solution.subtitle}</div>
@@ -138,11 +138,11 @@ function ChallengesSection({ challenges }: ChallengesSectionProps) {
{challenges.map((challenge, idx) => (
<div
key={idx}
className="group relative p-8 bg-bg-elevated hover:bg-bg-secondary transition-all duration-150"
className="group relative p-8 bg-bg-elevated hover:bg-bg-secondary transition-colors duration-hover"
>
<div className="absolute left-0 top-0 bottom-0 w-1 bg-brand scale-y-0 group-hover:scale-y-100 transition-transform duration-150 origin-top" />
<div className="flex items-start gap-6">
<div className="w-10 h-10 rounded-xl bg-brand-soft/50 flex items-center justify-center text-brand-ink shrink-0 mt-0.5">
<div className="w-10 h-10 bg-bg-secondary flex items-center justify-center text-brand-ink shrink-0 mt-0.5">
<span className="text-lg font-bold">{idx + 1}</span>
</div>
<p className="text-lg text-ink leading-relaxed">{challenge}</p>
@@ -187,12 +187,12 @@ function SolutionsSection({ solutions }: SolutionsSectionProps) {
{solutions.map((solution, idx) => (
<div
key={idx}
className="group relative p-10 bg-bg-elevated hover:bg-bg-secondary transition-all duration-150"
className="group relative p-10 bg-bg-elevated hover:bg-bg-secondary transition-colors duration-hover"
>
<div className="absolute top-0 left-0 right-0 h-1 bg-brand scale-x-0 group-hover:scale-x-100 transition-transform duration-150 origin-left" />
<div className="flex items-start gap-6">
<div className="w-14 h-14 rounded-2xl bg-brand-soft flex items-center justify-center text-brand-ink shrink-0">
<div className="w-14 h-14 bg-bg-secondary flex items-center justify-center text-brand-ink shrink-0">
<Lightbulb className="w-7 h-7" />
</div>
<div>
@@ -244,11 +244,11 @@ function ValuePropositionSection({ valueProposition }: ValuePropositionProps) {
return (
<div
key={idx}
className="group relative p-10 text-center bg-bg-elevated hover:bg-bg-secondary transition-all duration-150"
className="group relative p-10 text-center bg-bg-elevated hover:bg-bg-secondary transition-colors duration-hover"
>
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-1/3 h-1 bg-brand scale-x-0 group-hover:scale-x-100 transition-transform duration-150 origin-center" />
<div className="w-20 h-20 rounded-3xl bg-brand-soft flex items-center justify-center text-brand-ink mx-auto mb-8">
<div className="w-20 h-20 bg-bg-secondary flex items-center justify-center text-brand-ink mx-auto mb-8">
{icon}
</div>
@@ -297,11 +297,11 @@ function SuiteCombinationSection({ suiteCombination, products }: SuiteCombinatio
{primaryProducts.map((product) => product && (
<div
key={product.id}
className="group relative p-8 bg-bg-elevated hover:bg-bg-secondary transition-all duration-150 text-center lg:col-span-2"
className="group relative p-8 bg-bg-elevated hover:bg-bg-secondary transition-colors duration-hover text-center lg:col-span-2"
>
<div className="absolute top-0 left-0 right-0 h-1 bg-brand scale-x-0 group-hover:scale-x-100 transition-transform duration-150 origin-left" />
<div className="w-16 h-16 rounded-2xl bg-brand-soft flex items-center justify-center text-brand-ink mx-auto mb-6">
<div className="w-16 h-16 bg-bg-secondary flex items-center justify-center text-brand-ink mx-auto mb-6">
<Package className="w-8 h-8" />
</div>
@@ -315,16 +315,16 @@ function SuiteCombinationSection({ suiteCombination, products }: SuiteCombinatio
</StaggerReveal>
<ScrollReveal delay={0.2} className="flex items-center justify-center lg:col-span-1 bg-bg-elevated">
{/* 装饰圆改方角牌:rounded-full 只留给功能性的圆(头像/开关钮/滑块),
{/* 装饰圆改方角牌:rounded-cta 只留给功能性的圆(头像/开关钮/滑块),
这是套件组合图的中心节点装饰,两家对标实测都没有装饰性圆形 */}
<div className="w-20 h-20 rounded-cta bg-brand-soft border border-border-rule flex items-center justify-center text-brand-ink font-bold text-xl">
<div className="w-20 h-20 rounded-cta bg-bg-secondary border border-border-rule flex items-center justify-center text-brand-ink font-bold text-xl">
+
</div>
</ScrollReveal>
<ScrollReveal delay={0.3} className="lg:col-span-2">
<div className="group relative p-8 bg-brand-soft/10 hover:bg-bg-secondary transition-all duration-150 text-center h-full flex flex-col justify-center">
<div className="w-16 h-16 rounded-2xl bg-brand-soft flex items-center justify-center text-brand-ink mx-auto mb-6">
<div className="group relative p-8 bg-bg-secondary hover:bg-bg-secondary transition-colors duration-hover text-center h-full flex flex-col justify-center">
<div className="w-16 h-16 bg-bg-secondary flex items-center justify-center text-brand-ink mx-auto mb-6">
<Users className="w-8 h-8" />
</div>
+12 -36
View File
@@ -74,10 +74,10 @@ function CaseDetailHero({ data }: CaseDetailHeroProps) {
transition={{ duration: 0.28, ease: EASE }}
>
<span
className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-medium"
className="inline-flex items-center gap-2 px-4 py-1.5 rounded-cta text-xs font-medium"
style={{
backgroundColor: "var(--color-brand-soft)",
color: "var(--color-brand)",
backgroundColor: "var(--color-brand-bg)",
color: "var(--color-brand-ink)",
}}
>
<Building2 className="w-3.5 h-3.5" />
@@ -99,7 +99,7 @@ function CaseDetailHero({ data }: CaseDetailHeroProps) {
transition={{ duration: 0.28, delay: 0.1, ease: EASE }}
>
<div
className="font-sans text-[clamp(56px,12vw,120px)] font-black leading-none tracking-[-2px] mb-2"
className="font-sans text-[clamp(56px,12vw,120px)] font-bold leading-none tracking-[-2px] mb-2"
style={{ color: "var(--color-brand)" }}
>
{data.metrics[0]?.value}
@@ -344,10 +344,10 @@ function SolutionSection({ data }: { data: CaseDetailData }) {
{data.timeline.map((t, i) => (
<div key={i} className="flex gap-4">
<div
className="shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold"
className="shrink-0 w-8 h-8 rounded-cta flex items-center justify-center text-xs font-bold"
style={{
backgroundColor: "var(--color-brand-soft)",
color: "var(--color-brand)",
backgroundColor: "var(--color-brand-bg)",
color: "var(--color-brand-ink)",
}}
>
{i + 1}
@@ -421,31 +421,8 @@ function ResultsSection({ data }: { data: CaseDetailData }) {
return (
<section
ref={resultsRef}
className="relative py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden"
style={{ background: "var(--color-brand)" }}
className="relative bg-[#0B0A08] py-20 sm:py-28 md:py-36 lg:py-44 overflow-hidden"
>
{/* Background decoration */}
<div className="absolute inset-0 pointer-events-none">
<div
className="absolute w-[600px] h-[600px] rounded-full opacity-[0.15] blur-[120px]"
style={{
background:
"radial-gradient(circle, rgba(255,255,255,0.8), transparent 70%)",
top: "-30%",
right: "-10%",
}}
/>
<div
className="absolute w-[400px] h-[400px] rounded-full opacity-[0.1] blur-[100px]"
style={{
background:
"radial-gradient(circle, rgba(255,255,255,0.6), transparent 70%)",
bottom: "-20%",
left: "10%",
}}
/>
</div>
<div className="max-w-[1280px] mx-auto px-5 sm:px-8 lg:px-16 relative z-10">
<ScrollReveal className="mb-16 sm:mb-20 text-center max-w-3xl mx-auto">
<div
@@ -474,15 +451,14 @@ function ResultsSection({ data }: { data: CaseDetailData }) {
return (
<div
key={i}
className="p-10 sm:p-12 text-center transition-all duration-150 hover:bg-white/[0.05] group relative overflow-hidden"
style={{ backgroundColor: "var(--color-brand)" }}
className="relative overflow-hidden border-t border-white/15 p-10 text-center transition-colors duration-hover hover:bg-white/[0.05] group sm:p-12"
>
{m.highlight && (
<div className="absolute top-4 right-4 px-2 py-1 text-[10px] font-bold text-brand bg-white rounded-full">
<div className="absolute top-4 right-4 px-2 py-1 text-[10px] font-bold text-brand bg-white rounded-cta">
核心指标
</div>
)}
<div className="font-sans tabular-nums text-[clamp(40px,8vw,64px)] font-black leading-none mb-3 text-white transition-transform duration-150 group-hover:scale-110">
<div className="font-sans tabular-nums text-[clamp(40px,8vw,64px)] font-bold leading-none mb-3 text-white">
{isNumeric && inView && !shouldReduceMotion ? (
<AnimatedCounter
value={num}
@@ -519,7 +495,7 @@ function ResultsSection({ data }: { data: CaseDetailData }) {
&ldquo;{data.testimonial.quote}&rdquo;
</blockquote>
<div className="flex items-center gap-4">
<div className="w-12 h-12 rounded-full bg-white/10 flex items-center justify-center">
<div className="w-12 h-12 rounded-cta bg-white/10 flex items-center justify-center">
<Building2 className="w-5 h-5 text-white/60" />
</div>
<div>