/* =============================================================================
   熟韵 · 社交版（sy1.szliyukeji.cn / 深圳市励虞科技有限公司）
   源文件: figma.com/design/Ut5TMqoC6MsrRx514152gF  node 205045:6384「熟韵社交版」
   画板: 1555 x 4240，底色 #ece6fb

   🔴 与 `app-website/shuyun2/`（sy2.szliyukeji.cn，**熟韵婚庆版**）是**同一品牌的两个版本**：
      两套画板、两套文案、两个域名、两个 webroot，**不共用任何文件**（连底色和正文字号都不同：
      本站 40px / 婚庆版 36px）。只有页脚主体信息四站共用一套。

   >=1555px   完全按 Figma 绝对坐标渲染，像素级还原
   768-1554px 整体等比缩放（zoom），版式不变
   <768px     单栏流式布局（移动端适配，非原稿版式）

   注意：不引 Google Fonts —— 展示机在国内，fonts.googleapis.com 会被墙掉
   导致首屏阻塞。正文一律走系统 CJK 字体栈。

   🔴 **本稿所有正文/品牌字都是「居中对齐」**，而 get_design_context 给的 `left` 是
      **中心 x（配 -translate-x-1/2）不是左边**。照抄那个值会整体右移半个文本宽。
      这里一律用 get_metadata 的「框 left + 框 width + text-align:center」还原，
      与原稿等价且不依赖 transform。
   🔴 **本稿 letter-spacing = 0**（Figma 没给 tracking），**不要**从 jiaochun / liuruan
      那两站把 1.2px / 1.92px 顺手带过来 —— 带过来换行点全跑。只有导航项还是 0.66px。
   🔴 导航「首页」的颜色不要照抄 Figma 导出的 #d9d9d9 ——
      那个值在 #ece6fb 底上几乎看不见，1:1 原稿渲染图里量到的实际墨色是 rgb(21,21,21)。
   🔴 正文一律不用 <br> 硬换行：换行点由「width + CJK 禁则」算出（每行 ≈ 宽度 ÷ 40）。
      ⚠️ .txt-2 第一行是 **13 字不是 14 字** —— 14 字（560px）明明放得下 577px 的框，
      但第 14 字后面跟着「，」，禁则不许它落到行首，凑 15 字又超框，只好退回 13 字。
      **改 width 换行点就跑。**
   🔴 行高实测 1.2（40px→48px），与 Figma line-height:auto 一致。
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body { margin: 0; background: #ece6fb; overflow-x: hidden; }

h1, h2, p { margin: 0; font-weight: inherit; }

img { display: block; }

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

:root {
  --f-han: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Hiragino Sans GB",
           "Microsoft YaHei", sans-serif;

  --c-bg:      #ece6fb;   /* 画板底色 */
  --c-ink:     #000;
  --c-nav-cur: #151515;   /* 导航当前项「首页」（实测墨色，非导出的 #d9d9d9） */
  --c-nav-ink: #282626;   /* 导航其余项 */
  --c-cta-bg:  #10100e;   /* 「下载」胶囊按钮 */
  --c-cta-ink: #ece6fb;
}

.canvas { background: var(--c-bg); }

.stage { width: 1555px; margin: 0 auto; }

.page {
  position: relative;
  width: 1555px;
  height: 4240px;
}

.page section { position: static; }

/* ============================== 顶部导航 ============================== */
/* 容器铺满画板宽，子元素直接用画板绝对坐标（原稿里 logo / 品牌字是画板的直接子节点，
   只有三个导航项 + 下载按钮在 frame 205046:6410 里） */
.nav {
  position: absolute;
  left: 0; top: 0;
  width: 1555px; height: 142px;
}

.nav-mark {
  position: absolute;
  left: 42px; top: 25px;
  width: 109px; height: 117px;
  object-fit: cover;
}

/* 居中对齐：框 left=205 width=128（2 字 × 64px），中心 269 */
.nav-word {
  position: absolute;
  left: 205px; top: 50px;        /* 原稿 y=54，64px 档补偿 −4（见下方正文的 top 说明） */
  width: 128px;
  font-family: var(--f-han);
  font-size: 64px; font-weight: 400; line-height: 1.2;
  color: var(--c-ink);
  text-align: center;
  white-space: nowrap;
}

/* 三个导航项 + 下载按钮是一条 gap:60 的 flex —— 与原稿 frame 205046:6410 一致，
   算出来的绝对位置正好是 638 / 743 / 893 / 1043 */
.nav-links {
  position: absolute;
  left: 638px; top: 54.5px;
  height: 33px;
  display: flex;
  align-items: center;
  gap: 60px;
}

.nav-links a {
  font-family: var(--f-han);
  font-size: 22px; font-weight: 700; line-height: 33px;
  letter-spacing: 0.66px;
  color: var(--c-nav-ink);
  white-space: nowrap;
  transition: opacity .2s;
}

.nav-links a.is-current { color: var(--c-nav-cur); }

.nav-links a:hover { opacity: .6; }

.nav-cta {
  position: absolute;
  left: 1043px; top: 43px;
  width: 120px; height: 56px;
  border-radius: 40px;
  background: var(--c-cta-bg);
  color: var(--c-cta-ink);
  font-family: var(--f-han);
  font-size: 20px; font-weight: 700; line-height: 56px;
  letter-spacing: 0.6px;
  text-align: center;
  transition: opacity .2s;
}

.nav-cta:hover { opacity: .85; }

/* ========================== 标题 / 正文 ========================== */
/* 本稿画板内只有 40px 一档（没有 64px 标题，那是 jiaochun 才有的）；
   .tt 只是把首段标成 h1 做语义，字号与 .txt 同。
   🔴 全部居中对齐，且 letter-spacing = 0（见文件头）。 */
.tt, .txt {
  position: absolute;
  color: var(--c-ink);
  font-family: var(--f-han);
  font-size: 40px; font-weight: 400; line-height: 48px;
  text-align: center;
}

/* left/width 是原稿的**文本框**（不是中心点），width 同时决定换行点，别动。
   top 比 Figma 节点 y 少 2px：系统 CJK 字体的行盒 ascent 与 Figma 回退字体差 2px，
   照抄 y 会整体下坠。括号里是原稿 y。 */
.tt-1  { left: 113px; top:  544px; width: 720px; white-space: nowrap; } /* 原稿 y=546；18 字单行，正好占满 720 */
.txt-2 { left: 489px; top: 1498px; width: 577px; }   /* 原稿 y=1500；13 / 12 字（禁则，见文件头） */
.txt-3 { left: 479px; top: 1807px; width: 580px; }   /* 原稿 y=1809；14 / 12 字 */
.txt-4 { left: 125px; top: 2693px; width: 934px; }   /* 原稿 y=2695；23 /  4 字 */
.txt-5 { left: 561px; top: 3476px; width: 963px; }   /* 原稿 y=3478；24 /  2 字 */

/* ============================ App 截图 ============================ */
.ph { position: absolute; }

.ph-home  { left:  953px; top:  281px; width: 339px; height: 733px; }
.ph-chat  { left: 1066px; top: 1430px; width: 351px; height: 758px; }
.ph-feed  { left:   97px; top: 1463px; width: 350px; height: 758px; }
.ph-topup { left: 1083px; top: 2490px; width: 317px; height: 686px; }
.ph-mine  { left:  149px; top: 3217px; width: 304px; height: 658px; }

/* ======================= 中屏：整体等比缩放 ======================= */
/* zoom 而非 transform:scale —— zoom 会带动布局高度，页面不会留白。
   每档的 zoom 按该区间**最窄**的视口算：(下界 − 20px 滚动条余量) ÷ 1555。
   第一档上界 1574 = 画板 1555 + 19px 滚动条余量：媒体查询比的是视口宽（含滚动条），
   而能不能放下画板取决于内容区宽。 */
@media (max-width: 1574px) { .stage { zoom: .95; } }
@media (max-width: 1500px) { .stage { zoom: .88; } }
@media (max-width: 1400px) { .stage { zoom: .82; } }
@media (max-width: 1300px) { .stage { zoom: .75; } }
@media (max-width: 1200px) { .stage { zoom: .69; } }
@media (max-width: 1100px) { .stage { zoom: .63; } }
@media (max-width: 1000px) { .stage { zoom: .56; } }
@media (max-width:  900px) { .stage { zoom: .51; } }
@media (max-width:  820px) { .stage { zoom: .48; } }

/* ========================= 窄屏：单栏流式 ========================= */
@media (max-width: 767px) {
  .stage { zoom: 1; width: 100%; }

  .page {
    width: 100%;
    height: auto;
    padding: 96px 20px 48px;   /* 顶部留给绝对定位的 .nav（72px）+ 24px 呼吸 */
  }

  /* 导航压成固定高度的普通栏；窄屏放不下三个导航项，收起，只留下载按钮 */
  .nav { width: 100%; height: 72px; }

  .nav-mark { left: 14px; top: 12px; width: 45px; height: 48px; }

  .nav-word {
    left: 70px; top: 12px;
    width: auto; height: 48px;
    font-size: 28px; line-height: 48px;
    text-align: left;
  }

  .nav-links { display: none; }

  .nav-cta {
    left: auto; right: 14px; top: 17px;
    width: 88px; height: 38px;
    font-size: 15px; line-height: 38px;
  }

  .page section {
    display: block;
    margin-bottom: 44px;
  }

  .tt, .txt, .ph {
    position: static;
    white-space: normal;
    width: auto;
  }

  .tt, .txt {
    font-size: 15px; line-height: 1.7;
    text-align: center;
  }

  .tt {
    font-size: 24px; line-height: 1.5;
    margin-bottom: 10px;
  }

  .ph {
    width: 100%; max-width: 240px; height: auto;
    margin: 20px auto 0;
    border-radius: 8px;
  }
}

/* ================================ 页脚 ================================ */
/* 与 jiaochun / liuruan / shuyun2 四站逐字节相同，改一处要四处一起改 */
.site-footer {
  background: #000;
  color: rgba(255, 255, 255, .72);
  font-family: var(--f-han);
  padding: 40px 24px;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.9;
}

.site-footer__corp {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.site-footer__addr,
.site-footer__contact {
  font-size: 13px;
}

.site-footer__sep {
  margin: 0 10px;
  color: rgba(255, 255, 255, .35);
}

.site-footer__icp {
  margin-top: 8px;
  font-size: 13px;
}

.site-footer__icp a {
  color: rgba(255, 255, 255, .72);
  transition: color .2s;
}

.site-footer__icp a:hover { color: #fff; }

@media (max-width: 767px) {
  .site-footer { padding: 28px 16px; }
  .site-footer__corp { font-size: 15px; }
  .site-footer__addr,
  .site-footer__contact,
  .site-footer__icp { font-size: 12px; }
  /* 窄屏把「手机号 | 邮箱」拆成两行，竖线隐藏。
     🔴 隐藏那条必须写成 `.site-footer__contact .site-footer__sep`：
        单写 `.site-footer__sep`（0,1,0）打不过上一行的 `.site-footer__contact span`（0,1,1）。 */
  .site-footer__contact span { display: block; }
  .site-footer__contact .site-footer__sep { display: none; }
}
