/* ==========================================================================
   GEOER · Reset / 排版 / 栅格 / 工具类
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 导航吸顶高度补偿：锚点跳转时不被导航盖住 */
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

/* 焦点可见性：键盘操作时给品牌色描边，鼠标点击不出现 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ 栅格 */

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: var(--pad-page);
}

/* 区块外壳：负责背景与上下 padding */
.section {
  padding-block: var(--section-y);
  padding-inline: var(--pad-page);
  background: var(--bg-base);
}

.section--alt {
  background: var(--bg-alt);
}

.section--tight {
  padding-block: var(--section-y-tight);
}

/* 区块内容容器：统一 1312 可用宽并居中 */
.section > .inner {
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
}

/* 区块内的纵向节奏由各区块自己的 gap 决定 */
.stack {
  display: flex;
  flex-direction: column;
}

/* -------------------------------------------------------------- 文字角色 */

.h1 {
  font-size: 58px;
  line-height: 74px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.h2 {
  font-size: 36px;
  line-height: 48px;
  font-weight: 700;
  color: var(--text-primary);
}

.h3 {
  font-size: 30px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text-primary);
}

.card-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
}

.num-lg {
  font-family: var(--font-num);
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-primary);
}

.sub {
  font-size: 18px;
  line-height: 32px;
  color: var(--text-muted);
}

.body {
  font-size: 15px;
  line-height: 28px;
  color: var(--text-muted);
}

.body-sm {
  font-size: 14px;
  line-height: 26px;
  color: var(--text-body);
}

.muted {
  color: var(--text-muted);
}

.faint {
  color: var(--text-faint);
}

.mono {
  font-family: var(--font-mono);
}

/* 元信息标签：11px IBM Plex Mono Medium */
.meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
}

/* -------------------------------------------------------- 区块标题组 */

/* 居中标题组：首屏、痛点、检测能力、FAQ */
.head-center {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.head-center .h2 + .sub {
  margin-top: 0;
}

.head-center--hero {
  gap: 22px;
  max-width: 900px;
}

/* 左对齐标题组：数据呈现、可考究可追溯、报告结构、关于GEOER、近期文章 */
.head-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
}

.head-left--14 {
  gap: 14px;
  max-width: 880px;
}

.head-left--16 {
  gap: 16px;
  max-width: none;
}

/* ------------------------------------------------------------ 通用工具 */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.divider {
  height: 1px;
  width: 100%;
  background: var(--border-base);
  border: 0;
}

/* 待建页面的占位链接：JS 会拦截默认行为，避免跳到页首 */
a.is-todo {
  cursor: not-allowed;
  opacity: 0.72;
}

/* 滚动入场（PRD 交互 #14，只做一次，尊重 prefers-reduced-motion） */
.reveal {
  opacity: 1;
}

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   响应式断点（PRD 5.1）
   ≥1440 原样 | 1200–1439 pad48 | 900–1199 pad40 + 换列 |
   640–899 pad24 + H1 40/54 + 卡片单列 + 导航收抽屉 | ≤639 pad20 + 输入行竖排 + H2 28/40
   ========================================================================== */

@media (max-width: 1439px) {
  :root {
    --pad-page: 48px;
    --content-w: 1200px;
  }
}

@media (max-width: 1199px) {
  :root {
    --pad-page: 40px;
    --content-w: 100%;
  }
}

@media (max-width: 899px) {
  :root {
    --pad-page: 24px;
    --section-y: 64px;
    --section-y-tight: 56px;
    --header-pad-top: 48px;
  }

  .h1 {
    font-size: 40px;
    line-height: 54px;
  }

  .h2 {
    font-size: 32px;
    line-height: 44px;
  }

  .h3 {
    font-size: 26px;
  }

  .sub {
    font-size: 17px;
    line-height: 30px;
  }
}

@media (max-width: 639px) {
  :root {
    --pad-page: 20px;
    --section-y: 56px;
  }

  .h1 {
    font-size: 34px;
    line-height: 46px;
  }

  .h2 {
    font-size: 28px;
    line-height: 40px;
  }

  .h3 {
    font-size: 24px;
  }

  .num-lg {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
