@charset "UTF-8";
/* ============================================================
   中文排版微调 · typography.css
   目标：标点避头尾、行首缩进规整、字距节奏、中西文混排间隙
   ============================================================ */

/* ---------- 全局：中文排版基础 ---------- */
:root{
  --tracking-body: 0.015em;   /* 正文字距，轻微加开 */
  --tracking-head: 0.005em;   /* 标题字距 */
}

body{
  text-wrap: pretty;                    /* 避免孤字成行 */
  font-kerning: normal;
}

/* 段落：行首不出现避头标点 */
p, li, dd, td{
  line-break: strict;                   /* 严格避头尾 */
  word-break: normal;
  overflow-wrap: break-word;
}

/* 标题：字距略放松，中文不挤 */
h1, h2, h3, h4, .h-sec, .h-sub, .h-display,
.ipse__h, .q__title, .dir__title, .case-hero h1, .hero__brand{
  letter-spacing: var(--tracking-head);
  line-break: strict;
  text-wrap: balance;                   /* 标题两行更均衡 */
}

/* ---------- 中文段落：行首不缩进，段间留白 ---------- */
.ipse__body p,
.case-sec p,
.about-lab__body p,
.about__body p,
.contact-lab__facts span,
.credit__rows dd{
  letter-spacing: var(--tracking-body);
}

/* ---------- 正文行宽：中文最佳阅读宽度 ---------- */
.ipse__body p{max-width:38em}
.case-sec p{max-width:42em}
.about-lab__body p{max-width:36em}

/* ---------- 引号与括号内的中文 ---------- */
q, blockquote, .manifesto__q{
  hanging-punctuation: allow-end;       /* 支持时允许标点悬挂 */
}

/* ---------- 长标题不在词中断行 ---------- */
.ipse__h br,
.h-sec br,
.case-sec h2 br,
.case-hero h1 br{
  /* 显式 <br> 断行处保持，不加额外间距 */
  line-height: inherit;
}

/* ---------- 列表项：悬挂缩进对齐 ---------- */
.motifs li span,
.ipse__body ul li,
.credit__rows dd,
.case-meta dd{
  hanging-punctuation: allow-end;
}

/* ---------- 数字与英文在中文句中：用等宽数字更整齐 ---------- */
.credit__rows dd,
.case-meta dd,
.statbar b,
.figures b{
  font-variant-numeric: tabular-nums;
}

/* ---------- 移动端：字距略收，行高保持 ---------- */
@media(max-width:640px){
  body{ letter-spacing: 0.01em; }
  .ipse__body p,
  .case-sec p{ letter-spacing: 0.012em; }
}

/* ---------- 避免中文标点落在行首（降级方案） ---------- */
p::after, li::after{
  /* 占位，不影响布局 */
  content: none;
}

/* ---------- 段落间垂直节奏 ---------- */
.ipse__body p + p,
.case-sec p + p,
.about-lab__body p + p{
  margin-top: 0.35em;
}

/* ---------- 标题与正文之间的呼吸 ---------- */
.ipse__h + .ipse__body,
.case-sec h2 + p,
.h-sec + .lede{
  margin-top: clamp(.85rem,1.6vw,1.25rem);
}
