/* 友友 · 介绍站（截图版）
   小程序界面只用 assets/screens/ 下的静态截图展示，不再用 DOM 模拟。
   视觉变量与 src/app.css 对齐：浅灰白底 / 纯黑主色 / 紫粉渐变；
   大标题用衬线（与小程序 --serif 一致），正文用系统黑体。 */

:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #111111;
  --text: #1a1a1a;
  --text-sub: #6b6b70;
  --text-dim: #a0a0a6;
  --border: #e9e9ee;
  --divider: #f0f0f3;
  --brand-ink: #5b3fb0;
  --brand: linear-gradient(135deg, #b9a7ff 0%, #ffc8dd 100%);
  --radius: 24px;
  --radius-card: 28px;
  --radius-pill: 999px;
  --card-shadow: 0 8px 30px rgba(17, 17, 17, .05);
  --float-shadow: 0 24px 70px rgba(36, 24, 64, .14);
  /* 与 src/app.css 的 --serif 一致：大标题衬线，营造杂志感 */
  --display: Georgia, "Songti SC", "STSong", "PingFang SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* 全局 height:auto，避免 HTML 的 width/height 属性被当成固定尺寸导致拉伸 */
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; }

:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 3px; }

.wrap { width: min(1160px, 100% - 64px); margin-inline: auto; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; line-height: 1.26; color: var(--ink); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 18px; border-radius: var(--radius-pill); background: var(--ink); color: #fff;
}
.skip-link:focus { top: 16px; }

/* 通用组件 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-pill);
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(17, 17, 17, .2); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(255, 255, 255, .75); box-shadow: none; }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 13px; }

.eyebrow, .kicker { display: flex; align-items: center; gap: 9px; color: var(--text-sub); font-size: 12px; font-weight: 600; letter-spacing: .14em; }
.kicker { margin-bottom: 18px; }
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--brand); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(185, 167, 255, .18); }

.marker { position: relative; white-space: nowrap; z-index: 0; }
.marker::after {
  content: ""; position: absolute; z-index: -1;
  left: -.04em; right: -.04em; bottom: .03em; height: .32em;
  border-radius: 2px; background: linear-gradient(90deg, #ffc8dd 0%, #d8c4ff 100%); transform: rotate(-1.2deg);
}

/* 顶栏 */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 245, 247, .84);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(17, 17, 17, .06);
}
.site-head__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand__mark { align-self: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); }
.brand__name { font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: .04em; line-height: 1; }
.brand__en { color: var(--text-dim); font-family: var(--mono); font-size: 10px; letter-spacing: .22em; }

/* 首屏 */

.hero {
  background:
    radial-gradient(900px 520px at 78% 8%, rgba(185, 167, 255, .3), transparent 70%),
    radial-gradient(700px 460px at 96% 42%, rgba(255, 200, 221, .28), transparent 72%),
    linear-gradient(180deg, #f6f2ff 0%, var(--bg) 72%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: center; gap: 64px; padding: 72px 0; }
.hero__copy h1 { margin: 22px 0 24px; font-size: clamp(46px, 5.6vw, 72px); line-height: 1.28; }
.lede { max-width: 510px; color: var(--text-sub); font-size: 16px; line-height: 1.9; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(17, 17, 17, .12); }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; color: var(--ink); }
.facts dd { color: var(--text-sub); font-size: 12px; }

.hero__shot { justify-self: center; }
/* height 必须写成 auto：HTML 上的 height="656" 是呈现提示，不覆盖就会被当成固定高度拉伸 */
.hero__shot img { width: 100%; height: auto; border-radius: var(--radius-card); box-shadow: var(--float-shadow); }
.hero__shot figcaption { margin-top: 14px; color: var(--text-dim); font-size: 11px; letter-spacing: .06em; text-align: center; }

/* 区块标题 */

.section { padding: 88px 0; }
.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(34px, 4.2vw, 52px); }
.sec-head__desc { margin-top: 18px; color: var(--text-sub); font-size: 15px; max-width: 620px; }

/* 截图画廊：箭头悬浮在内容区左右两侧 / 横滑切换 */

.gallery-stage { position: relative; }
.gallery-nav {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; pointer-events: none;
}
.gallery-nav__btn {
  display: grid; place-items: center;
  width: 46px; height: 46px; padding: 0;
  border: 1px solid rgba(17, 17, 17, .08); border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  box-shadow: 0 8px 24px rgba(17, 17, 17, .14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; pointer-events: auto;
  transition: background-color .2s ease, color .2s ease, transform .2s ease, opacity .2s ease;
}
.gallery-nav__btn:hover:not(:disabled) { background: var(--ink); color: #fff; transform: scale(1.06); }
.gallery-nav__btn:disabled { color: var(--text-dim); opacity: .5; cursor: default; }
.gallery-nav__btn svg { width: 20px; height: 20px; }

.gallery {
  display: flex; gap: 16px;
  overflow-x: auto; padding: 4px 4px 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }
.shot {
  /* 横图 2:1，卡片 600px 宽 → 图片天然高 300px；只控宽度，不碰 height */
  flex: 0 0 600px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); box-shadow: var(--card-shadow);
  scroll-snap-align: start;
}
/* 竖图 0.84:1，卡片 252px 宽 → 同样高 300px，与横图等高且不拉伸 */
.shot--portrait { flex-basis: 252px; }
/* height 必须留 auto：一旦写死高度，老 WebView 会把图片拉伸变形 */
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--border);
  background: var(--card); font-size: 12px;
}
.shot figcaption b { font-size: 14px; color: var(--ink); }
.shot figcaption span { color: var(--text-dim); }
.gallery__hint { margin-top: 10px; color: var(--text-sub); font-size: 12px; letter-spacing: .06em; }

/* 移动端横滑进度点，由脚本按截图数量生成 */
.gallery-dots { display: none; justify-content: center; gap: 8px; margin-top: 14px; }
.gallery-dot {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 50%; background: #d8d8de;
  cursor: pointer; transition: width .2s ease, background-color .2s ease;
}
.gallery-dot.is-active { width: 22px; border-radius: var(--radius-pill); background: var(--ink); }

/* 使用路径 */

.steps-section { border-top: 1px solid rgba(17, 17, 17, .07); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { padding-top: 22px; border-top: 1px solid #d8d8de; }
.steps li > span { display: block; margin-bottom: 18px; color: #c9c1e6; font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1; }
.steps h3 { margin-bottom: 10px; font-size: 18px; font-weight: 700; }
.steps p { color: var(--text-sub); font-size: 13px; line-height: 1.85; }

/* 扫码 */

.qr { background: linear-gradient(180deg, var(--bg) 0%, #f0eef8 100%); }
.qr__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: center; gap: 72px; }
.qr h2 { margin-bottom: 22px; font-size: clamp(38px, 5vw, 60px); }
.qr__desc { max-width: 460px; color: var(--text-sub); font-size: 15px; line-height: 1.9; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips span { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--card); color: var(--text-sub); font-family: var(--mono); font-size: 11px; }
.qr__card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); box-shadow: var(--card-shadow); text-align: center; }
.qr__frame { display: grid; place-items: center; aspect-ratio: 1; padding: 18px; border: 1px solid var(--divider); border-radius: 20px; }
.qr__frame img { width: 100%; max-width: 220px; height: auto; }
.qr__hint { margin-top: 18px; font-weight: 700; }
.qr__sub { margin-top: 4px; color: var(--text-dim); font-size: 12px; }

/* 页脚 */

.site-foot { border-top: 1px solid var(--border); background: var(--card); }
.site-foot__inner { display: flex; align-items: center; gap: 32px; padding: 30px 0; }
.site-foot__inner p { color: var(--text-dim); font-size: 11px; line-height: 1.7; }
.site-foot__inner a { margin-left: auto; flex: none; color: var(--text-sub); font-size: 12px; }
.site-foot__inner a:hover { color: var(--ink); }

/* 响应式：平板 */

@media (max-width: 980px) {
  .wrap { width: min(1160px, 100% - 44px); }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; padding: 56px 0; }
  .hero__shot { justify-self: center; }
  .hero__shot img { width: 280px; }
  .qr__grid { grid-template-columns: 1fr; gap: 36px; justify-items: center; text-align: center; }
  .qr__desc { margin-inline: auto; }
  .chips { justify-content: center; }
  .qr__card { max-width: 320px; width: 100%; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}

/* 响应式：手机 */

@media (max-width: 620px) {
  .wrap { width: min(1160px, 100% - 32px); }
  html { scroll-padding-top: 70px; }

  /* 顶栏收紧，但主按钮仍保持 ≥42px 可点区域 */
  .site-head__inner { min-height: 60px; gap: 12px; }
  .brand__en { display: none; }
  .brand__name { font-size: 21px; }
  .btn--small { min-height: 42px; padding: 0 14px; font-size: 12px; }

  .section { padding: 58px 0; }
  .hero__grid { padding: 44px 0 48px; gap: 30px; }
  .eyebrow { font-size: 11px; }
  .hero__copy h1 { margin: 18px 0 20px; font-size: clamp(34px, 9.6vw, 46px); line-height: 1.34; letter-spacing: 0; }
  .lede { font-size: 14px; line-height: 1.85; }
  .hero__actions { gap: 10px; margin-top: 26px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__shot img { width: 260px; max-width: 72vw; }
  .hero__shot figcaption { margin-top: 12px; }

  /* 数据改为 2×2，每项独立顶部分隔线，不再挤成四列 */
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 30px; padding-top: 0; border-top: 0; }
  .facts div { padding-top: 12px; border-top: 1px solid var(--border); }
  .facts dt { font-size: 30px; }
  .facts dd { font-size: 11px; }

  .sec-head { margin-bottom: 28px; }
  .sec-head h2 { font-size: 30px; }
  .sec-head__desc { font-size: 14px; margin-top: 14px; }

  /* 手机端隐藏悬浮箭头避免遮挡截图，改用横滑 + 进度点 */
  .gallery-nav { display: none; }
  .gallery { margin-inline: -16px; padding-inline: 16px; gap: 12px; align-items: flex-start; }
  .shot { flex-basis: 88%; scroll-snap-align: center; }
  .shot--portrait { flex-basis: 42%; }
  .shot figcaption { flex-wrap: wrap; gap: 2px 10px; padding: 10px 14px; }
  .shot figcaption b { font-size: 13px; }
  .gallery__hint { margin-top: 12px; font-size: 11px; }
  .gallery-dots { display: flex; }

  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps li { padding-top: 16px; }
  .steps li > span { font-size: 32px; margin-bottom: 10px; }
  .steps h3 { font-size: 17px; }
  .steps p { font-size: 13px; }

  .qr h2 { font-size: 34px; }
  .qr__desc { font-size: 14px; }
  .chips span { font-size: 10px; }
  .qr__card { padding: 22px; }

  .site-foot__inner { flex-wrap: wrap; gap: 12px; padding: 26px 0; }
  .site-foot__inner p { order: 3; width: 100%; }
  .site-foot__inner a { margin-left: 0; min-height: 42px; display: inline-flex; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
