/* ==========================================================================
   Lenrine Tec — Base
   重置 / 排版基线 / 版心 / 段落骨架。不含具体组件。
   ========================================================================== */

/* ---- 自托管字体（把字体文件放进 assets/fonts/ 后自动生效，缺失则静默回落）---- */
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-variable.woff2') format('woff2-variations');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('../fonts/noto-sans-sc-subset.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  /* 常用汉字子集，避免整包 2MB+ 拖慢首屏 */
  unicode-range: U+4E00-9FFF, U+3000-303F, U+FF00-FFEF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: clamp(15px, 0.55vw + 13.2px, 16px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 中文站整体走中文字体栈；英文站不加这个 class */
body.lang-cn { font-family: var(--cn); }

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }

/* 键盘可达性 —— 国际站的无障碍基线 */
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: 12px 20px;
  font-size: 14px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---- 版心 ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- 段落骨架 ---- */
.section         { padding: var(--section-y) 0; }
.section--paper  { background: var(--paper); }
.section--dark   { background: var(--navy); color: #fff; }
.section--tight  { padding: calc(var(--section-y) * .6) 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
}
.section--dark .eyebrow { color: var(--yellow); }

/* 段落标题：中文站 h2 走中文字体，英文站走 sans（由 body class 决定） */
.sec-head { margin-bottom: 48px; max-width: 780px; }
.sec-head h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--navy);
}
.lang-cn .sec-head h2 { font-family: var(--cn); }
/* 标题下的次级说明行（中文站用 .sub 走中文，英文站用 .en） */
.sec-head h2 .en,
.sec-head h2 .sub {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--blue);
}
.sec-head p {
  margin: 14px 0 0;
  font-size: clamp(14.5px, 1.15vw, 15.5px);
  line-height: 1.8;
  color: var(--muted);
  max-width: 62ch;
}
.section--dark .sec-head h2      { color: #fff; }
.section--dark .sec-head h2 .en,
.section--dark .sec-head h2 .sub { color: var(--on-dark-3); }
.section--dark .sec-head p       { color: var(--on-dark-2); }
.lang-cn .sec-head h2 .sub       { font-family: var(--cn); font-weight: 500; }

/* 标题行右侧带操作按钮时 */
.sec-head--row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; max-width: none;
}
@media (max-width: 860px) {
  .sec-head--row { flex-direction: column; align-items: flex-start; gap: 20px; }
}

/* ---- 图片占位槽 ----
   配图前的统一占位。caption 里写的就是目标文件路径，配好图直接替换成 <img>。 */
.ph {
  position: relative; width: 100%; height: 100%;
  background: linear-gradient(135deg, #6B8597 0%, #3F5B72 45%, #1F3A52 100%);
  overflow: hidden;
}
.ph::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 1px, transparent 1px 6px);
}
.ph__cap {
  position: absolute; left: 12px; bottom: 10px; max-width: calc(100% - 24px);
  font-family: var(--mono); font-size: 10px; line-height: 1.4;
  color: rgba(255,255,255,.72);
  background: rgba(11,31,51,.4);
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 2px;
}
.ph--soft { background: linear-gradient(160deg, #DDE6EE 0%, #B8C7D3 100%); }
.ph--soft .ph__cap { color: #1b3a54; background: rgba(255,255,255,.7); border-color: rgba(11,31,51,.14); }
.ph--dark { background: linear-gradient(135deg, #1a3348 0%, #0d2035 100%); }

/* 真实图片入位后：所有图槽统一裁切行为，替换 .ph 占位时不需要改结构 */
.split__img img,
.acard__media img,
.feature__media img,
.hero-sub__bg img,
.scene img,
.prose figure img {
  width: 100%; height: 100%; object-fit: cover;
}
.scene img, .feature__media img, .hero-sub__bg img { position: absolute; inset: 0; }
/* 子页 Hero 背景压暗，保证白色标题始终可读 */
.hero-sub__bg img { opacity: .4; }
.prose figure img { aspect-ratio: 16/9; border-radius: var(--radius); }

/* ---- 通用小工具 ---- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; font-size: 11.5px; color: var(--muted);
  background: var(--paper); white-space: nowrap;
}
.section--dark .chip {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.2);
  color: var(--on-dark-2);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
