/* ==========================================================================
   INTERDECO — base.css
   设计系统基础：变量 / 重置 / 字体 / 排版

   改完这个文件要跑 python3 tools/stamp-assets.py 重新打指纹再提交，
   否则 URL 不变、访客被一年期缓存钉在旧样式上。tools/deploy.sh 会硬拦。
   ---------------------------------------------------------------------------
   暗场剧场 (Dark Theatre)
   石材陈列在射灯下的展厅。核心不是"底色是黑的"，而是明度分层：
   void < base < surface-1 < surface-2 < surface-3
   区块之间靠这个阶梯拉开空间感，砂金 (#D0C2A5) 只做强调，绝不铺面。
   ========================================================================== */

:root {
  /* --- 暗场明度阶梯 (elevation ladder) ---------------------------------
     每一级约 +4~6 明度。同一屏内最多同时出现 3 级，超过就会显脏。 */
  --void:       #0B0C0E;   /* 最深：hero 底、页脚、聚光外围 */
  --base:       #121417;   /* 主体背景 */
  --surface-1:  #191C20;   /* 抬起一层：卡片、表单 */
  --surface-2:  #21252A;   /* 抬起两层：hover 态 */
  --surface-3:  #2B3036;   /* 抬起三层：高亮边框、分隔 */

  /* --- 砂金强调 -------------------------------------------------------
     sand-deep 在浅底上好看，在暗底上会发灰发脏。暗场里主用 sand，
     需要更亮的高光时用 sand-bright。 */
  --sand:        #D0C2A5;
  --sand-bright: #E7DCC4;
  --sand-deep:   #B9A985;
  --sand-dim:    rgba(208, 194, 165, 0.38);

  /* 保留浅色三兄弟：局部反白区块（如样品卡）仍会用到 */
  --paper:      #F2F1EE;
  --paper-warm: #ECEAE5;
  --ink:        #14161A;

  /* --- 语义色 --------------------------------------------------------- */
  --bg:          var(--base);
  --fg:          #F2F1EE;
  --fg-2:        rgba(242, 241, 238, 0.68);  /* 正文次级 */
  --fg-3:        rgba(242, 241, 238, 0.45);  /* 说明、图注 */
  --fg-4:        rgba(242, 241, 238, 0.26);  /* 装饰、极弱 */
  --muted:       var(--fg-3);
  --accent:      var(--sand);

  --line:        rgba(242, 241, 238, 0.10);
  --line-strong: rgba(242, 241, 238, 0.20);

  /* --- 聚光 / 渐晕 -----------------------------------------------------
     暗场的空间感全靠这两个。渐晕压边角，聚光提视觉中心。 */
  --glow-sand:   radial-gradient(60% 50% at 50% 0%, rgba(208,194,165,0.22), transparent 65%);
  --vignette:    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(11,12,14,0.72) 100%);

  /* --- 字体 -----------------------------------------------------------
     Montserrat 自托管（见 css/fonts.css），不走 Google Fonts。
     站点为纯英文，字体栈里不再保留中文回退字体。 */
  --font-sans: "Montserrat", "Helvetica Neue", Arial, system-ui, sans-serif;

  /* --- 流体字阶 -------------------------------------------------------
     暗底上字重视觉上会变轻（光晕效应），所以标题比浅底版本略大。
     display 上限从 10rem 收到 8rem：10rem 时首屏三行标题会顶满屏幕，
     且长句会被迫折行、撞上 .line 的遮罩。 */
  /* 下限从 2.9rem 降到 2.5rem：8.2vw 在 488px 以下会低于下限，也就是说这个调整
     只作用于手机。在 375px 上原本 46.4px 的标题会让 "not quarried." 几乎顶到两边，
     40px 才留得出呼吸。488px 以上的表现和原来完全一致。 */
  --fs-display: clamp(2.5rem, 8.2vw, 8rem);
  --fs-h1:      clamp(2.5rem, 6.4vw, 5.4rem);
  --fs-h2:      clamp(2rem, 4.4vw, 3.6rem);
  --fs-h3:      clamp(1.3rem, 2.4vw, 1.9rem);
  --fs-lead:    clamp(1.05rem, 1.6vw, 1.35rem);
  --fs-body:    1rem;
  --fs-small:   0.82rem;
  --fs-eyebrow: 0.72rem;

  /* --- 布局 ----------------------------------------------------------- */
  --maxw:      1320px;
  --gutter:    clamp(1.25rem, 5vw, 5rem);
  --radius:    14px;
  --radius-lg: 26px;

  /* --- 动效：重、慢、克制 ---------------------------------------------
     ease 从 (0.22,1,0.36,1) 换成更接近 expo-out 的曲线，起步更猛、
     收尾更长，配合加长的 duration 才有"重量感"。 */
  --ease:        cubic-bezier(0.16, 1, 0.30, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --dur:         0.8s;
  --dur-slow:    1.25s;
  --dur-fast:    0.4s;

  --nav-h: 76px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis 接管平滑滚动 */
  background: var(--void); /* 过卷时露出的底色也要是暗的 */
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; padding: 0; }
input, textarea, select, button { font: inherit; }

/* 字距整体放松：原为 -0.025em / 行高 1.04，大字号下显得挤。
   Montserrat 800 本身字腔就紧，负字距叠上去会让大标题糊成一片。 */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; letter-spacing: -0.012em; }

p { text-wrap: pretty; }

::selection { background: var(--sand); color: var(--void); }

/* ---------- 全站胶片颗粒 ----------------------------------------------
   暗场大面积纯色会出现色带 (banding)，尤其是渐变过渡区。一层极淡的
   颗粒既能打散色带，也是"胶片感"的来源。pointer-events 必须关掉。 */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- 排版助手 ---------- */
.display { font-size: var(--fs-display); font-weight: 800; letter-spacing: -0.015em; line-height: 1.04; }
.h1      { font-size: var(--fs-h1); }
.h2      { font-size: var(--fs-h2); }
.h3      { font-size: var(--fs-h3); }
.lead    { font-size: var(--fs-lead); color: var(--fg-2); font-weight: 400; }

.eyebrow {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sand);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--sand);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }

/* ---------- 布局原语 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(5.5rem, 13vw, 12rem); position: relative; }
.section--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }
/* 与上一区块贴合：用于紧跟在内容后的 CTA 区，避免双倍留白 */
.section--flush-top { padding-top: 0; }
.section--tight-top { padding-top: clamp(2rem, 5vw, 3.5rem); }
.container--narrow { max-width: 820px; }

/* ---------- 背景层级工具类 --------------------------------------------
   .bg-ink / .bg-paper / .bg-warm 是旧类名，7 个内页仍在用。这里把它们
   映射到暗场阶梯上，保证内页在被逐页精修之前也不会是"浅底黑字"的破碎
   状态。逐页改造时再换成语义更准的 .bg-void / .bg-base / .bg-surface。 */
.bg-void    { background: var(--void);      color: var(--fg); }
.bg-base    { background: var(--base);      color: var(--fg); }
.bg-surface { background: var(--surface-1); color: var(--fg); }

.bg-ink     { background: var(--void);      color: var(--fg); }  /* legacy → 最深 */
.bg-paper   { background: var(--base);      color: var(--fg); }  /* legacy → 主体 */
.bg-warm    { background: var(--surface-1); color: var(--fg); }  /* legacy → 抬起一层 */

/* 暗底上统一的次级文字色 */
.bg-void .lead, .bg-base .lead, .bg-surface .lead,
.bg-ink  .lead, .bg-paper .lead, .bg-warm .lead,
.bg-void .muted, .bg-base .muted, .bg-surface .muted,
.bg-ink  .muted, .bg-paper .muted, .bg-warm .muted { color: var(--fg-2); }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }

/* ---------- 工具类 ---------- */
.muted        { color: var(--fg-3); }
.center       { text-align: center; }
.mx-auto      { margin-inline: auto; }
.measure      { max-width: 46ch; }
.measure-wide { max-width: 62ch; }
.mt-1 { margin-top: 0.75rem; } .mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.5rem; } .mt-4 { margin-top: 1.8rem; }
.hidden { display: none !important; }

/* 排版布局助手（替代内联 style） */
.stack-sm  { max-width: 52ch; }
.stack-md  { max-width: 60ch; }
.stack-lg  { max-width: 68ch; }
.stack-list { display: grid; gap: 1rem; }
.row-split { display: flex; justify-content: space-between; align-items: flex-end;
             flex-wrap: wrap; gap: 1.5rem; }
.center-cta { justify-content: center; margin-top: 2rem; }
.text-left  { text-align: left; }
.items-start { align-items: start; }
.order-1 { order: 1; } .order-2 { order: 2; }

/* 双语：两份文案都留在 DOM 里，由 JS 决定显示哪一份 */
[data-en], [data-zh] { }

/* 无障碍 */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* 降级动效 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
