/* Quantum Top — 版式与字体平衡微调层
   只收敛排版（字号层级 / 行高 / 留白节奏 / 行宽 / 字距），不改配色与结构 */

:root {
  --qet-font-sans: Inter, "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--qet-font-sans);
}

/* 1. 内容栅格收窄：1440/1920 下正文行宽更舒适，卡片不显松散 */
@media (min-width: 1280px) {
  .max-w-7xl {
    max-width: 75rem; /* 1200px */
  }
}

/* 2. 首屏留白节奏：原 192px 上下留白过长，压缩到与内页一致的比例 */
main > section:first-child {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  main > section:first-child {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

/* 3. 首屏主标题：CJK 大字需略放行高，避免字块拥挤 */
main > section:first-child h1 {
  line-height: 1.08;
  letter-spacing: 0.02em;
}

/* 单行标题页面（关于/服务/联系）：统一到同一字号，消除 36px vs 48px 的跳变 */
main > section:first-child h1 > span:only-child {
  line-height: 1.15;
}

@media (min-width: 768px) {
  main > section:first-child h1 > span:only-child {
    font-size: 3rem;
  }
}

/* 4. 首屏副标题：与主标题拉开层级，避免 96/36 的视觉角力 */
main > section:first-child h1 span + span {
  font-weight: 500;
  line-height: 1.5;
  margin-top: 0.75rem;
}

@media (max-width: 767px) {
  main > section:first-child h1 span + span {
    font-size: 1.125rem;
  }
}

@media (min-width: 768px) {
  main > section:first-child h1 span + span {
    font-size: 1.75rem;
  }
}

/* 5. 标题：中英混排字距 + 自动平衡换行，避免末行只剩一两个字 */
h1,
h2,
h3 {
  text-wrap: balance;
  letter-spacing: 0.012em;
}

/* 6. 英文小标签统一字距（配合原 uppercase 使用） */
[class*="uppercase"] {
  letter-spacing: 0.1em;
}

/* 7. 正文行高：说明文字更透气 */
.leading-relaxed {
  line-height: 1.75;
}

/* 8. 段落行宽上限，避免宽屏下单行过长 */
p {
  max-width: 72ch;
  text-wrap: pretty;
}

/* 9. 按钮与链接不折行，保持按钮版式稳定 */
button,
a {
  text-wrap: nowrap;
}

/* 10. 键盘可见焦点（可访问性） */
:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.75);
  outline-offset: 2px;
}
