/* =========================================================
   孟健个人主页 · 样式
   方向：Bento 便当格 —— 暖米白桌面 + 白色卡 + 深墨块 + 单一橙
   移动优先，断点 720 / 960
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 颜色 */
  --bg: #F4F1EA;
  --bg-alt: #EFEBE2;
  --surface: #FFFDF9;
  --surface-2: #EAE5DB;
  --ink: #17170F;
  --ink-2: #5F5B51;
  --ink-3: #756F64;
  --line: rgba(23, 23, 15, .10);
  --line-strong: rgba(23, 23, 15, .18);
  --accent: #C23A12;
  --accent-bright: #FF6B3D;
  --accent-soft: #F7E3D9;
  --dark: #14140F;
  --dark-2: #1C1C15;
  --on-dark: #F7F4EC;
  --on-dark-2: #B3AD9E;

  /* 圆角 */
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 80px;

  /* 阴影：三级高度 */
  --shadow-1: 0 1px 2px rgba(23, 23, 15, .05), 0 2px 6px rgba(23, 23, 15, .04);
  --shadow-2: 0 2px 6px rgba(23, 23, 15, .05), 0 14px 30px -12px rgba(23, 23, 15, .18);
  --shadow-3: 0 4px 10px rgba(23, 23, 15, .06), 0 28px 60px -20px rgba(23, 23, 15, .26);

  /* 动效 */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 620ms;

  /* 字体：全系统栈，零外部请求（国内秒开） */
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC",
          "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
          "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
          "Cascadia Mono", "Liberation Mono", monospace;

  --header-h: 56px;
  --wrap: 1120px;
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  overflow-x: clip;               /* 兜底：任何宽度都不出现横向滚动条 */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 氛围层：两团极低饱和的暖光 + 细颗粒，避免纯色平铺 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(48rem 34rem at 6% -12%, rgba(255, 107, 61, .16), transparent 62%),
    radial-gradient(42rem 30rem at 104% 2%, rgba(201, 63, 22, .09), transparent 58%),
    radial-gradient(40rem 32rem at 50% 108%, rgba(20, 20, 15, .06), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .042;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .topbar, .footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, dl, dd, dt, figure, blockquote { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--accent-soft); color: var(--accent); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 99;
  padding: 10px 14px;
  background: var(--dark);
  color: var(--on-dark);
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* ---------- 3. 通用部件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 32px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.kicker__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(255, 107, 61, .16);
}
.kicker__num {
  color: var(--accent);
  font-weight: 600;
}
.kicker--on-dark { color: var(--on-dark-2); }
.kicker--on-dark .kicker__num { color: var(--accent-bright); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out,
              box-shadow var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out;
}
.btn--primary {
  background: var(--dark);
  color: var(--on-dark);
  box-shadow: var(--shadow-2);
}
.btn--primary:hover { background: #000; box-shadow: var(--shadow-3); }
.btn--primary:active { transform: scale(.985); }
.btn--ghost {
  background: rgba(255, 253, 249, .72);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 14px;
}
.btn--wide { width: 100%; }

.chip {
  flex: none;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* 防拆词：中文默认可以在任意字间断行，关键词需要单独锁住 */
.nw { white-space: nowrap; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;          /* 触摸目标 ≥ 44px */
  margin-block: -6px;
  padding-block: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) ease-out, gap var(--dur-fast) ease-out;
  align-self: flex-start;
}
.arrow-link:hover { border-bottom-color: var(--accent); gap: 10px; }

/* ---------- 4. 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(244, 241, 234, .82);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  font-weight: 700;
  letter-spacing: -.01em;
}
.brand__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}
.topbar__nav {
  display: none;
  gap: 22px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.topbar__nav a {
  position: relative;
  padding: 6px 0;
  transition: color var(--dur-fast) ease-out;
}
.topbar__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.topbar__nav a:hover { color: var(--ink); }
.topbar__nav a:hover::after { transform: scaleX(1); }

/* ---------- 5. 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--header-h));
  padding-top: clamp(18px, 4vh, 44px);
  padding-bottom: clamp(56px, 10vh, 72px); /* 给底部跑马灯留位，同时压缩首屏底部空场 */
}
@supports not (height: 100svh) {
  .hero { min-height: calc(100vh - var(--header-h)); }
}

.hero__grid {
  display: grid;
  gap: var(--sp-5);
  align-content: center;
  flex: 1;
}

.hero__title {
  margin-top: 14px;
  font-size: clamp(34px, 10.4vw, 72px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.035em;
}
.hero__title .line { display: block; }

/* 手写荧光笔效果：只压在"做出海赚美金"上 */
.mark {
  font-style: normal;
  color: var(--accent);
  background-image: linear-gradient(rgba(201, 63, 22, .15), rgba(201, 63, 22, .15));
  background-repeat: no-repeat;
  background-size: 100% 34%;
  background-position: 0 86%;
}

.hero__sub {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 2px;
  margin-top: 16px;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
/* 每段不内部断行；分隔点只在能放下时出现，手机上换行就不再补点，
   避免出现「行首挂一个 · 」这种断行事故 */
.hero__sub span { white-space: nowrap; }
.hero__sub span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--ink-3);
}
@media (max-width: 719px) {
  .hero__sub { column-gap: 0; row-gap: 0; }
  .hero__sub span + span::before { content: none; }
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.stat__label {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-2);
  min-height: 2.9em;
}
.stat__num {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--mono);
  font-size: clamp(27px, 8.4vw, 46px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat__num .unit { font-size: .5em; font-weight: 600; letter-spacing: 0; }
/* 数字后面的单位（如「万册」）留一点气口，避免 94万册 糊成一团 */
.stat__num .unit:not(:first-child) { margin-left: 4px; }
.stat__note { font-size: 11.5px; color: var(--ink-3); }

.stat--dark {
  background: var(--dark);
  border-color: transparent;
  color: var(--on-dark);
}
.stat--dark .stat__label { color: var(--on-dark-2); }
.stat--dark .stat__note { color: var(--on-dark-2); }
.stat--dark .stat__num { color: #FFB59A; }
.stat__ticks,
.card__ticks {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-top: 1px solid rgba(247, 244, 236, .38);
  border-right: 1px solid rgba(247, 244, 236, .38);
  border-top-right-radius: 6px;
  pointer-events: none;
}

.hero__cta { display: grid; gap: 12px; }
.hero__hint {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
}
.hero__hint a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border-bottom: 1px dashed var(--line-strong);
}

/* 跑马灯：固定在首屏底部，交代"还在持续更新" */
.marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  overflow: hidden;
  background: rgba(244, 241, 234, .6);
  /* 两端羽化 + 段首留白，避免首字被裁成半句 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__inner {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  /* 两组同样留白，-50% 循环仍然无缝；首帧不再从半个词开始 */
  padding-left: clamp(36px, 7vw, 110px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink-2);
  white-space: nowrap;
}
.marquee__group li { display: flex; align-items: center; gap: 28px; }
.marquee__group li::after {
  content: "·";
  color: var(--accent-bright);
  font-size: 14px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 6. 分区与标题 ---------- */
.section { padding-block: clamp(48px, 9vw, 96px); }
.section--alt { background: rgba(234, 229, 219, .38); }

.sec-head { margin-bottom: clamp(22px, 4vw, 34px); }
.sec-head h2 {
  margin-top: 10px;
  font-size: clamp(26px, 6.4vw, 42px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.03em;
  text-wrap: balance;
}
/* 断行位置由内容决定：手机上按「前半句 / 后半句」断开，不留孤字 */
.br-m { display: inline; }

/* ---------- 7. 便当格 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
/* 鼠标跟随的暖光（仅精确指针设备） */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(180px 140px at var(--mx, 50%) var(--my, 0%),
              rgba(255, 107, 61, .16), transparent 72%);
  transition: opacity var(--dur) ease-out;
}

.card__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.card__eyebrow--on-dark { color: var(--on-dark-2); }

.card__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.card__desc {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.card__rule {
  border: 0;
  border-top: 1px dashed var(--line-strong);
  margin: 4px 0;
}

.card--now { grid-column: 1 / -1; }
.card--opinion { grid-column: 1 / -1; }
.card--stage,
.card--story { grid-column: 1 / -1; }
.now__item { display: flex; flex-direction: column; }

/* 手机上便当格改为单列：双列时「开源」「大厂」两张卡只有 162px 宽，
   长文案会被拆成碎句（行首挂「·」、词被劈开），可读性优先 */
@media (max-width: 599px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card--oss,
  .card--bigco { grid-column: 1 / -1; }
  /* 卡变宽后，开源两行改为「名称 —— 数字」一行一对 */
  .card--oss .oss__row {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
  }
  .card--oss .oss__num { font-size: 26px; }
}

/* 开源两行数字 */
.oss__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}
.oss__row + .oss__row { border-top: 1px dashed var(--line); }
.oss__name {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
}
.oss__num {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1.2;
}
.oss__num em {
  font-family: var(--font);
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-3);
}

/* 小列表 */
.mini-list { display: grid; gap: 8px; }
.mini-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.mini-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-bright);
}
.mini-list strong { color: var(--ink); font-weight: 700; }
.mini-list__meta {
  display: block;
  margin-top: 1px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* 引述卡 */
.quote {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
  text-wrap: pretty;
}
/* 引号用拉丁衬线体，避免中文字体的全角引号带巨大左侧字距（视觉上像缩进） */
.quote::before {
  content: "\201C";
  display: block;
  margin-left: -2px;
  margin-bottom: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: .7;
  color: var(--accent);
}
.quote__by { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

/* 观点卡：深色，全页视觉重心 */
.card--opinion {
  background: var(--dark);
  border-color: transparent;
  color: var(--on-dark);
  box-shadow: var(--shadow-2);
}
.opinion__pre {
  font-size: 14px;
  color: var(--on-dark-2);
}
/* 只划掉中间那句话，括号保持完整，比整行划线干净 */
.opinion__pre .strike {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 107, 61, .7);
  text-decoration-thickness: 1.5px;
}
.opinion__main {
  margin-top: 4px;
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.opinion__main span { display: block; }

/* ---------- 8. 项目卡 ---------- */
.group + .group { margin-top: clamp(32px, 6vw, 52px); }
.group__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--ink);
  text-transform: uppercase;
}
.group__title::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.group__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.p-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.p-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.p-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(200px 150px at var(--mx, 50%) var(--my, 0%),
              rgba(255, 107, 61, .14), transparent 72%);
  transition: opacity var(--dur) ease-out;
}
.p-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.p-card__head h4 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.p-card__desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.p-card__meta { display: grid; gap: 8px; }
.p-card__meta > div {
  display: grid;
  grid-template-columns: 4.6em minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.p-card__meta dt {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
}
.p-card__meta dd { font-size: 13.5px; line-height: 1.7; color: var(--ink); }
/* 上线版：域名已失效的项目，只留一句状态说明，不给死链 */
.p-card__offline {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- 9. 数字条 ---------- */
.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 64px);   /* 比常规分区收窄，读起来是一条「带子」而不是又一屏 */
}
.band__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.band__item {
  padding: 18px 16px;
  background: var(--bg);
}
.band__item dt {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}
.band__item dd {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--mono);
  font-size: clamp(26px, 6.6vw, 48px);     /* 比标题更大，数字才是这一段的视觉主角 */
  font-weight: 700;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.band__item .unit { font-size: .4em; font-weight: 600; color: var(--ink-2); margin-left: 4px; }

/* ---------- 10. 联系卡 ---------- */
.contact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: 24px 20px;
  border-radius: var(--r-lg);
  background: radial-gradient(120% 90% at 100% 0%, #23231a 0%, var(--dark) 58%);
  color: var(--on-dark);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(28rem 18rem at 0% 100%, rgba(255, 107, 61, .16), transparent 60%);
}
.contact__copy { position: relative; display: grid; gap: 14px; }
.contact__title {
  font-size: clamp(28px, 7.4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.contact__desc { font-size: 14px; line-height: 1.75; color: var(--on-dark-2); max-width: 30ch; }

.contact__wx {
  display: inline-grid;
  gap: 2px;
  justify-self: start;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: rgba(247, 244, 236, .07);
  border: 1px dashed rgba(247, 244, 236, .28);
}
.contact__wx-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--on-dark-2); }
.contact__wx-id { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: .02em; color: #FFB59A; }

.contact__links { display: grid; gap: 2px; }
.contact__links li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(247, 244, 236, .12);
  font-size: 13.5px;
}
.contact__links li > span:first-child {
  flex: none;
  width: 4.2em;
  font-size: 11.5px;
  color: var(--on-dark-2);
}
.contact__links a {
  color: var(--on-dark);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
}
.contact__links a:hover { color: #FFB59A; border-bottom-color: #FFB59A; }
.contact__plain { color: var(--on-dark); }

.contact__qr {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  align-content: start;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  justify-self: center;      /* 手机上居中收尾，避免右边留一块死白 */
}
.contact__qr img {
  width: 168px;
  height: 168px;
  object-fit: contain;
  border-radius: 8px;
}
.contact__qr figcaption {
  font-size: 12px;
  color: var(--ink-2);
}

/* 联系区里的小按钮：不抢二维码的主体地位，但看得出能点 */
.qr-zoom {
  min-height: 30px;
  padding: 4px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 11.5px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out,
              background-color var(--dur-fast) ease-out;
}
.qr-zoom:hover {
  color: var(--accent);
  border-color: rgba(194, 58, 18, .5);
  background: #FFF4EF;
}
.qr-zoom:active { transform: scale(.97); }

/* ---------- 10.5 微信二维码弹窗 ---------- */
.wx-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 20, 15, .58);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
          backdrop-filter: blur(6px) saturate(120%);
  overscroll-behavior: contain;
  animation: wx-fade 200ms ease-out both;
}
.wx-modal[hidden] { display: none; }

.wx-modal__card {
  position: relative;
  width: min(100%, 358px);
  max-height: calc(100vh - 32px);      /* 老浏览器兜底（iOS 15.4 以下不认 svh） */
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 22px 20px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .55);
  text-align: center;
  animation: wx-pop 320ms var(--ease) both;
}

.wx-modal__close {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
}
.wx-modal__close:hover { background: var(--surface-2); color: var(--ink); }

.wx-modal__eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.wx-modal__title {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.wx-modal__desc {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* 二维码白底：长按识别的区域要够大，且不能被任何遮罩盖住 */
.wx-modal__qr {
  margin-top: 16px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 15, .08),
              0 2px 10px -4px rgba(23, 23, 15, .12);
}
.wx-modal__qr img {
  width: min(64vw, 236px);
  height: auto;
  margin-inline: auto;
  border-radius: 6px;
  -webkit-touch-callout: default;   /* 允许长按出「识别图中二维码」 */
}

.wx-modal__id {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.wx-modal__id b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
}
.wx-modal__copy {
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid rgba(194, 58, 18, .26);
  border-radius: var(--r-pill);
  background: #FFF4EF;
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out;
}
.wx-modal__copy:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.wx-modal__copy.is-done { background: var(--accent); border-color: var(--accent); color: #fff; }

.wx-modal__note {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

@keyframes wx-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes wx-pop {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* 矮屏（横屏手机、小窗口）：收紧留白，卡片内部可滚动，不裁掉二维码 */
@media (max-height: 560px) {
  .wx-modal__card { padding: 18px 18px 16px; border-radius: 22px; }
  .wx-modal__qr { margin-top: 10px; }
  .wx-modal__qr img { width: min(44vw, 180px); }
  .wx-modal__note { display: none; }
}

/* 横屏手机这种「不高但有宽」的窗口：只留标题 + 码 + 微信号 */
@media (max-height: 480px) {
  .wx-modal { padding: 8px; }
  .wx-modal__card { max-height: calc(100vh - 16px); max-height: calc(100svh - 16px); padding: 14px 16px 12px; border-radius: 20px; }
  .wx-modal__title { margin-top: 2px; font-size: 18px; }
  .wx-modal__desc, .wx-modal__note { display: none; }
  .wx-modal__qr { margin-top: 8px; padding: 8px; border-radius: 12px; }
  .wx-modal__qr img { width: 168px; }
  .wx-modal__id { margin-top: 8px; padding-top: 8px; }
}

/* 极矮窗口（320px 高的横屏）：只保留标题、码、微信号，保证一屏放得下 */
@media (max-height: 340px) {
  .wx-modal__card { padding: 12px 14px 10px; }
  .wx-modal__eyebrow { display: none; }
  .wx-modal__title { font-size: 17px; }
  .wx-modal__qr { margin-top: 6px; }
  .wx-modal__qr img { width: 152px; }
}

/* 桌面：屏幕离得远，码放大一点更好扫（矮窗口走上面的紧凑规则） */
@media (min-width: 720px) and (min-height: 481px) {
  .wx-modal__card { width: min(100%, 376px); padding: 26px 26px 22px; }
  .wx-modal__qr img { width: 256px; }
}

/* ---------- 11. 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 22px; }
.footer__in {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.footer__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.footer__meta { margin-left: auto; font-family: var(--mono); }

/* ---------- 12. 动效：便当盒开盖（先出轮廓，内容再升起） ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px) scale(.985);
    transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  html.js [data-reveal] > * {
    opacity: 0;
    transform: translateY(9px);
    transition: opacity 420ms var(--ease), transform 420ms var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms + 90ms);
  }
  html.js [data-reveal].in { opacity: 1; transform: none; }
  html.js [data-reveal].in > * { opacity: 1; transform: none; }
}

/* 悬停浮起：只在有精确指针时生效 */
@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .p-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-3);
    border-color: rgba(201, 63, 22, .28);
  }
  .card:hover::after,
  .p-card:hover::after { opacity: 1; }
  .card--opinion:hover { border-color: rgba(255, 107, 61, .4); }
  .stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
  .stat { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
}

/* 触屏：按压回弹 */
@media (hover: none) {
  .card:active, .p-card:active, .stat:active { transform: scale(.988); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__inner { animation: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- 13. 断点 ---------- */
@media (min-width: 600px) {
  .p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__desc { max-width: 34ch; }
}

/* 数字条到 900 才排成 4 列：600–899 之间每格只有 143px，会把 $10,257 顶出格子 */
@media (min-width: 900px) {
  .band__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  :root { --header-h: 64px; }
  .topbar__nav { display: flex; }
  .br-m { display: inline; }
  .hero__title { letter-spacing: -.04em; }
  .hero__sub { font-size: 15px; }
  .btn--wide { width: auto; }
  .hero__cta { justify-items: start; }
  .hero__hint { text-align: left; }
  .stat { padding: 20px; }
  .stat__label { font-size: 12.5px; min-height: 0; }
  .card, .p-card { padding: 22px; }
  .bento { gap: 16px; }
  .p-grid { gap: 16px; }

  /* 宽屏下正文与标题的字号差收一收：42px 的标题配 13.5px 正文，中间是断层的 */
  .card__title { font-size: 19px; }
  .card__desc { font-size: 14.5px; line-height: 1.75; }
  .p-card__head h4 { font-size: 17.5px; }
  .p-card__desc { font-size: 14px; }
  .p-card__meta dt { font-size: 12.5px; }
  .p-card__meta dd { font-size: 14px; line-height: 1.72; }
  .mini-list li { font-size: 14px; }
  .mini-list__meta { font-size: 13px; }
}

@media (min-width: 960px) {
  .hero {
    padding-top: 0;
    padding-bottom: 0;
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    grid-template-areas:
      "copy stats"
      "cta  stats";
    align-items: start;
    column-gap: clamp(32px, 5vw, 72px);
    row-gap: 30px;
    padding-block: clamp(24px, 5vh, 56px);
  }
  .hero__copy { grid-area: copy; }
  .hero__cta { grid-area: cta; align-self: start; }
  .hero__stats {
    grid-area: stats;
    align-self: start;               /* 与标题顶部对齐，不再悬在右下方 */
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-top: clamp(22px, 3.6vh, 40px);
  }
  .stat { padding: 22px 24px; }
  .stat__num { font-size: clamp(38px, 3.3vw, 50px); }
  /* 第二张数字卡向右错位，制造非对称 */
  .hero__stats .stat:last-child {
    margin-left: clamp(18px, 4vw, 46px);
    margin-top: -2px;
  }
  .marquee { margin-top: auto; }

  /* 便当格：6 列，最大的卡占 4 列 2 行 */
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
  .card--now { grid-column: span 4; grid-row: span 2; }
  .card--oss { grid-column: span 2; }
  .card--bigco { grid-column: span 2; }
  .card--stage { grid-column: span 3; }
  .card--story { grid-column: span 3; }
  .card--opinion { grid-column: span 6; }

  /* 观点卡：整幅横条，左注释 + 右大字（flex 让注释与大字垂直居中对齐） */
  .card--opinion {
    display: flex;
    flex-direction: row;      /* 基础 .card 是 column，这里必须显式改回来 */
    flex-wrap: wrap;
    align-items: center;
    column-gap: clamp(24px, 4vw, 56px);
    row-gap: 6px;
    padding: 30px 36px;
  }
  .card--opinion .card__eyebrow { flex: 0 0 100%; }
  .card--opinion .opinion__pre {
    flex: 0 0 auto;
    font-size: 17px;
    line-height: 1.6;
    max-width: 15ch;
  }
  .card--opinion .opinion__main {
    flex: 1 1 min(60%, 520px);
    margin-top: 0;
    font-size: clamp(30px, 3.2vw, 44px);
  }

  .card--now { padding: 26px; }

  .contact {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(28px, 4.5vw, 56px);
    padding: 40px 44px;
    align-items: center;
  }
  .contact__copy { align-content: center; }
  .contact__qr {
    justify-self: end;
    padding: 16px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
  }
  .contact__qr img { width: 200px; height: 200px; }

  .section { padding-block: clamp(72px, 9vw, 104px); }
}

/* 宽屏项目区：6 列 + 自动补位（3 / 5 / 2 / 1 张都不会留半排空洞） */
@media (min-width: 1080px) {
  .p-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .p-grid > * { grid-column: span 2; }

  /* 末排只剩 2 张时，各占一半 */
  .p-grid > *:nth-last-child(2):nth-child(3n + 1),
  .p-grid > *:nth-last-child(1):nth-child(3n + 2) { grid-column: span 3; }

  /* 末排只剩 1 张时，占满整行 */
  .p-grid > *:last-child:nth-child(3n + 1) { grid-column: span 6; }
}

@media (min-width: 1200px) {
  .hero__title { font-size: 74px; }
}

/* 超窄屏（320px）兜底：缩小数字，保持两栏 */
@media (max-width: 359px) {
  .stat { padding: 12px; }
  .stat__num { font-size: 22px; }
  .stat__num .unit { font-size: .45em; }
  .stat__label { font-size: 11px; }
  .contact__qr img { width: 148px; height: 148px; }
}

/* 手机上项目卡字段改为上下排（放在定义之后，确保覆盖） */
@media (max-width: 599px) {
  .p-card__meta > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .p-card__meta dd { margin-top: 1px; }
}
