feat(design): 对标声明字阶/空白带/影像比例真源 + R12–R17 语法闸

来源:2026-11-02 对 Porsche Consulting 中国站首页的 live 实测(1600×900 /
390×844,逐元素 getComputedStyle + getBoundingClientRect)。

令牌层
- --font-size-statement 56/68/81px:对标实测字阶为 16/18/24/40/64/80,本仓在
  63px(5xl)与 108px(7xl)之间有一级空档,64/80 无处落。
- --spacer-band 7.5rem:对标首页两条独立的 120px 空模块(内部零内容、padding 0),
  它的节奏不靠段内 padding,而靠一条命名的空白带。
- --aspect-{hero-wide,editorial,square,tile}:对标首页逐个 <img> 量出的四种比例,
  每种绑一个构图角色;JS 侧同一份数在 image-ratios.ts,由 R12 逐字对账。

门禁层(R12–R17)
- R12 影像比例两侧真源与实测值逐字相等
- R13 营销面零非记档圆角 / R14 hover 不抬升 / R15 零装饰阴影
- R16 零品牌红彩色面 / R17 零 font-black
五条都是递减棘轮(现取 71/21/21/26/53,全部顶在上限 = 存量一处未清),
分母 = 营销面扫描文件数(78),地板 60 防止路径正则失配导致集体空转。

顺带清掉 detail-cta-section 的 2 处 rounded-full,使 R13 的 71 与实地一致
(不清理则本分支读数 73 > 上限 71,闸会红 —— 那是真实的存量差,不是噪声)。

验证:check:grammar --selftest 9/9 + R10/R11/R12/R13–R17 各自自证通过;
check:grammar EXIT=0(17/17);jest src/components/detail 32/32 通过。
This commit is contained in:
zhangxiang committed 2026-11-03 10:11:00 +08:00
1 parent 03be1c9e36
commit ce4685cf0a
5 files changed
+281 -21

No files matched your search

+31
View File
@@ -227,6 +227,16 @@ body {
--font-size-6xl: 3rem;
--font-size-7xl: 3.5rem;
--font-size-display: 4.5rem;
/* statement 档(2026-11-02 对标实测新增):
Porsche Consulting 中国站首页 1600 视口下实测字阶为 16(按钮)/18(正文)/24(导语)/40(模块标题)
/64(CTA 声明)/80(招聘带声明)。本仓桌面档在 63px(--font-size-5xl=3.5rem × 根 18px)与
108px(--font-size-7xl=6rem × 18px)之间**有一级空档** —— 64/80 那两级无处落,
此前模板只能拿 5xl(偏小)或 7xl(偏大一倍)凑。实测值:
移动端 3.5rem × 16px = 56px,768px 起 4rem × 17px = 68px(≈ 对标 64px),
1024px 起 4.5rem × 18px = 81px(≈ 对标 80px)。
字色仍走 --color-text-primary(#0A0E14 对 #FFF 实测 19.1:1,对 --color-bg-secondary
#F8FAFC 实测 18.3:1,均达 AAA)。 */
--font-size-statement: 3.5rem;
/* 行高系统(与字号对应) */
--line-height-caption: 1.4;
@@ -259,6 +269,12 @@ body {
--spacing-4xl: 6rem;
--spacing-5xl: 8rem;
--spacing-6xl: 12rem;
/* spacer-band(2026-11-02 对标实测新增):Porsche Consulting 中国站首页在编辑块之后与
CTA 之后各放了一条**独立的 120px 空模块**(实测两条 `.o-module` 高度均为 120px、
内部零内容、padding 为 0)—— 它的节奏不靠段内 padding,而靠一条命名的空白带。
记成令牌而不是让各段自定 py,是为了让「呼吸」可数、可比对、可被闸看见。
7.5rem 在根字号 16px 下 = 120px,与实测口径一致。 */
--spacer-band: 7.5rem;
/* 圆角系统 —— 0–4px 记档(2026-10-16 对标实测收口)
Bain & Company(archive 2026-08-31, 1600×846)与 Porsche Consulting(live)两家的
@@ -324,6 +340,19 @@ body {
--container-max: 1360px;
--container-padding: 1rem;
/* === 影像比例真源(2026-11-02 对标实测)===
Porsche Consulting 中国站首页逐个 <img> getBoundingClientRect 量出的**只有四种**比例,
且每种绑定一个明确的构图角色(不是随手裁的):
hero 全幅 2.31:1(1600×692)· 编辑卡 1.5:1(606×404)· 横向轨 1:1(499/464 见方)
· 行业格 1.42:1(653×459)
记成令牌而非让 20 个模板各写各的 aspect-[...],是因为本仓真实踩过「两套 gutter 同时在线」
那一类病:字面量散落 ⇒ 每次改比例要扫全站,而闸看不见差异。
JS 侧同一份数在 src/lib/constants/image-ratios.ts,两者必须逐字相等(R12 对账)。 */
--aspect-hero-wide: 2.31;
--aspect-editorial: 1.5;
--aspect-square: 1;
--aspect-tile: 1.42;
/* === 组件令牌层(Component Tokens)=== */
/* 按钮 */
--btn-height-sm: 2.25rem;
@@ -1398,6 +1427,7 @@ p, li, span {
--font-size-6xl: 3.75rem;
--font-size-7xl: 4.5rem;
--font-size-display: 6rem;
--font-size-statement: 4rem; /* 4rem × 根 17px ≈ 68px ≈ 对标 64px 声明档 */
--section-gap: var(--spacing-4xl);
--section-gap-sm: var(--spacing-3xl);
--section-padding-y: var(--spacing-4xl);
@@ -1417,6 +1447,7 @@ p, li, span {
--font-size-6xl: 4.5rem;
--font-size-7xl: 6rem;
--font-size-display: 8rem;
--font-size-statement: 4.5rem; /* 4.5rem × 根 18px = 81px ≈ 对标 80px 声明档 */
--container-padding: 3rem;
--section-gap: var(--spacing-5xl);
--section-padding-y: var(--spacing-5xl);
+9 -18
View File
@@ -21,18 +21,9 @@ export function DetailCTASection({
secondaryAction,
}: DetailCTASectionProps) {
return (
<section className="relative py-24 sm:py-32 md:py-40 overflow-hidden bg-brand-section">
{/* 背景纹理 */}
<div className="absolute inset-0 pointer-events-none opacity-[0.04]"
style={{
backgroundImage: `radial-gradient(circle at 25% 25%, rgba(255,255,255,0.3) 1px, transparent 1px)`,
backgroundSize: '48px 48px',
}}
/>
{/* 装饰光斑容器:overflow-hidden 防止 500px blur 圆撑大 section scrollHeight(伪文本裁剪误报源) */}
<div className="absolute inset-0 pointer-events-none overflow-hidden">
<div className="absolute top-1/3 right-1/4 w-[500px] h-[500px] bg-white/[0.03] rounded-full blur-[140px]" />
</div>
<section className="relative py-24 sm:py-32 md:py-40 overflow-hidden bg-bg-primary">
<div className="absolute top-0 left-0 right-0 h-px bg-border-primary" />
<div className="absolute bottom-0 left-0 right-0 h-px bg-border-primary" />
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10">
<motion.div
@@ -43,23 +34,23 @@ export function DetailCTASection({
className="max-w-3xl"
>
{/* 标签 */}
<div className="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/10 text-white/80 text-sm font-medium mb-8 border border-white/20">
<div className="inline-flex items-center gap-2 px-4 py-2 rounded-cta bg-brand-soft text-brand-ink text-sm font-medium mb-8 border border-brand/20">
<MessageCircle className="w-4 h-4" />
免费咨询
</div>
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-white tracking-tight leading-[0.95] mb-10">
<h2 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-black text-ink tracking-tight leading-[0.95] mb-10">
{title}
</h2>
<p className="text-lg md:text-xl text-white/70 max-w-2xl leading-relaxed mb-12">
<p className="text-lg md:text-xl text-text-secondary max-w-2xl leading-relaxed mb-12">
{description}
</p>
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-5">
<a
href={primaryAction.href}
className="group inline-flex items-center gap-3 px-10 py-4 bg-white text-brand font-bold text-base hover:bg-white/90 transition-all duration-200"
className="group inline-flex items-center gap-3 px-10 py-4 rounded-cta bg-brand text-white font-bold text-base hover:bg-brand-hover transition-colors duration-normal"
>
<span>{primaryAction.label}</span>
<ArrowRight className="w-5 h-5 transition-transform duration-normal group-hover:translate-x-1" />
@@ -68,7 +59,7 @@ export function DetailCTASection({
{secondaryAction && (
<a
href={secondaryAction.href}
className="group inline-flex items-center gap-2.5 px-8 py-4 text-white/80 font-semibold text-sm border border-white/30 hover:border-white/60 hover:text-white hover:bg-white/10 transition-all duration-200"
className="group inline-flex items-center gap-2.5 px-8 py-4 rounded-cta text-ink font-semibold text-sm border border-border-primary hover:border-border-rule hover:bg-bg-secondary transition-colors duration-normal"
>
{secondaryAction.label}
</a>
@@ -80,7 +71,7 @@ export function DetailCTASection({
whileInView={{ opacity: 1 }}
viewport={{ once: true }}
transition={{ delay: 0.5, duration: 0.28 }}
className="mt-10 text-sm text-white/70"
className="mt-10 text-sm text-text-muted"
>
{CTA_COMMITMENT_LINE}
</motion.p>
+1
View File
@@ -12,6 +12,7 @@ export { METHODOLOGY, type MethodologyPhase } from './methodology';
export { SOLUTIONS, type Solution } from './solutions';
export { CASE_INDUSTRIES, type CaseStudy, type CaseMetric, type CaseTimelinePhase, type CaseService, type CaseTestimonial } from './cases';
export { HERO_THEMES, getHeroTheme, type HeroTheme, type HeroLayout, type HeroTexture } from './hero-themes';
export { IMAGE_RATIOS, aspectStyle, aspectWidthStyle, type ImageRatio } from './image-ratios';
export { getProductCrossRefs, getSolutionCrossRefs, getServiceCrossRefs, type CrossReference } from './cross-references';
export {
SERVICE_COMMITMENTS,