/* ============================================================
   咕噜掌柜官网 · Base
   重置 / 排版 / 版式骨架 / 无障碍基础
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

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

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

img {
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* --- 焦点可见（仅键盘导航时） --- */
:focus-visible {
  outline: 2px solid var(--c-brand-deep);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* --- 跳至主内容 --- */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--gutter);
  z-index: 999;
  padding: 10px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-sm);
  font-size: var(--fs-sm);
  transition: top var(--dur-1) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------
   版式
   ------------------------------------------------------------ */
.display,
.h1,
.h2,
.h3 {
  font-weight: 650;
  letter-spacing: -0.018em;
  color: var(--c-ink);
}

.display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.028em;
}

.h1 {
  font-size: var(--fs-h1);
  line-height: 1.22;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: 1.28;
}

.h3 {
  font-size: var(--fs-h3);
  line-height: 1.36;
  letter-spacing: -0.012em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.72;
  color: var(--c-ink-2);
}

.muted {
  color: var(--c-ink-3);
}

/* 中文标题断行会落在任意字符上，容易把词切开（如「真 / 正」）。
   给不该被拆开的词包一层，断点就会提前到词边界。 */
.nowrap {
  white-space: nowrap;
}

/* 区块引导标签：实心品牌色块。
   刻意不靠「放大字号」——裸文字即使加大，在白底上仍弱于下方大标题；
   给它一块面积，章节的起点才立得住。
   字号反而收到 12px：标签语言靠底色 + 字距 + 字重，不靠字号。 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px 5px 12px; /* 左多右少，补偿字距在末字之后留下的空隙 */
  font-size: 0.75rem;        /* 12px */
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.14em;
  color: #fff;
  background: var(--c-brand); /* #C2410C：白字对比度 5.18:1 */
  border-radius: 6px;
}

/* 标签与紧随的大标题之间留出层级间距
   （.h1 是内页页头用，早前漏了这条 ⇒ 标签与标题贴在一起） */
.eyebrow + .h1,
.eyebrow + .h2,
.eyebrow + .display {
  margin-top: 20px;
}

/* ------------------------------------------------------------
   布局骨架
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--maxw-narrow);
}

.section {
  padding-block: clamp(var(--sp-8), 7.5vw, var(--sp-11));
}

.section--tight {
  padding-block: clamp(var(--sp-7), 5vw, var(--sp-9));
}

.section--warm {
  background: var(--c-surface-warm);
}

.section--white {
  background: var(--c-surface);
}

.section-head {
  max-width: 660px;
}

.section-head .h2 + .lead {
  margin-top: var(--sp-4);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.hairline {
  height: 1px;
  background: var(--c-line);
  border: 0;
  margin: 0;
}

/* --- 视觉隐藏（保留给屏幕阅读器） --- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
