/* ============================================================
   炼体官网 · 样式表
   设计方向：国风宣纸 × 现代编辑排版
   宣纸暖白打底 / 墨色衬线大标题 / 朱砂唯一强调色 / 鎏金只做装饰线
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 色 */
  --paper:      #F7F4EC;   /* 宣纸底 */
  --paper-deep: #F1EDE0;   /* 宣纸加深（分区） */
  --card:       #FCFBF6;   /* 卡面 */
  --ink:        #1F1D1A;   /* 墨 */
  --ink-soft:   #57534B;   /* 次级文字 */
  --ink-mute:   #8A857B;   /* 弱文字 */
  --cinnabar:   #C0392B;   /* 朱砂（唯一强调色） */
  --cinnabar-d: #A93226;   /* 朱砂加深（悬停） */
  --gold:       #C9A961;   /* 鎏金（仅装饰线） */
  --line:       #E3DCCB;   /* 分隔线 */

  /* 字 */
  --serif: "Noto Serif SC","Source Han Serif SC","Songti SC",STSong,SimSun,serif;
  --sans:  -apple-system,"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",sans-serif;

  /* 间距（4pt 网格） */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px;

  /* 圆角与阴影（三级） */
  --r-sm: 10px; --r-md: 18px; --r-lg: 28px;
  --sh-1: 0 1px 2px rgba(31,29,26,.06);
  --sh-2: 0 8px 24px rgba(31,29,26,.08);
  --sh-3: 0 24px 48px rgba(31,29,26,.14);

  /* 动效 */
  --t-fast: 180ms cubic-bezier(.16,1,.3,1);
  --t-mid:  320ms cubic-bezier(.16,1,.3,1);
  --t-long: 700ms cubic-bezier(.16,1,.3,1);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--s6); }
section { scroll-margin-top: 84px; }   /* 锚点定位避开吸顶导航 */

/* 键盘焦点环（无障碍） */
:focus-visible { outline: 3px solid var(--cinnabar); outline-offset: 3px; border-radius: 4px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,244,236,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
}
.nav.scrolled {
  background: rgba(252,251,246,.94);
  border-bottom-color: var(--line);
  box-shadow: var(--sh-1);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 var(--s6);
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--serif);
  font-size: 22px; font-weight: 700; letter-spacing: 2px;
}
.brand img { width: 38px; height: 38px; border-radius: 9px; box-shadow: var(--sh-1); }
.brand .seal {
  display: inline-block; background: var(--cinnabar); color: #FCFBF6;
  font-size: 11px; line-height: 1; padding: 4px 5px; border-radius: 3px;
  letter-spacing: 1px; transform: translateY(-6px);
}
.nav-links { display: flex; align-items: center; gap: var(--s2); }
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-size: 15px;
  padding: 10px 14px; border-radius: 999px; position: relative;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: var(--cinnabar); background: rgba(192,57,43,.06); }
.nav-links a.active { color: var(--cinnabar); font-weight: 600; }

/* 移动端汉堡 */
.nav-toggle {
  display: none; width: 44px; height: 44px; border: none; background: none;
  cursor: pointer; border-radius: var(--r-sm);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 2px;
  background: var(--ink); margin: 5px auto; border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; text-align: center;
  padding: calc(var(--s16) + 20px) var(--s6) var(--s16);
  overflow: hidden;
}
/* 墨晕背景：多层径向渐变，极淡 */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 320px at 18% 8%,  rgba(192,57,43,.055), transparent 70%),
    radial-gradient(640px 380px at 85% 20%, rgba(201,169,97,.09),  transparent 70%),
    radial-gradient(760px 460px at 50% 108%, rgba(31,29,26,.05),   transparent 72%);
}
.hero-inner { position: relative; max-width: 860px; margin: 0 auto; }

.app-icon {
  width: 118px; height: 118px; margin: 0 auto var(--s6);
  border-radius: 26px; overflow: hidden;
  box-shadow: var(--sh-3), 0 0 0 1px rgba(201,169,97,.35);
  animation: float 6s ease-in-out infinite;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700; letter-spacing: .04em; line-height: 1.25;
}
.hero h1 em { font-style: normal; color: var(--cinnabar); }
.hero .sub {
  font-size: clamp(16px, 2.4vw, 19px); color: var(--ink-soft);
  margin: var(--s4) 0 var(--s8); letter-spacing: .06em;
}
.hero .sub b { color: var(--ink); font-weight: 600; }

.hero-cta { display: flex; gap: var(--s4); justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 42px; border-radius: 999px;
  font-size: 17px; font-weight: 700; text-decoration: none; letter-spacing: 1px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.btn-primary {
  background: var(--cinnabar); color: #FCFBF6;
  box-shadow: 0 10px 26px rgba(192,57,43,.32);
}
.btn-primary:hover { background: var(--cinnabar-d); transform: translateY(-3px); box-shadow: 0 16px 34px rgba(192,57,43,.4); }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px var(--gold), var(--sh-1); }

.hero .tip { margin-top: var(--s4); font-size: 13px; color: var(--ink-mute); letter-spacing: .08em; }

/* 首屏入场序列（一次性编排，间隔 90ms） */
.rise { opacity: 0; transform: translateY(26px); animation: rise .9s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: .05s } .d2 { animation-delay: .16s } .d3 { animation-delay: .27s }
.d4 { animation-delay: .38s } .d5 { animation-delay: .5s }

/* ---------- 章节通用 ---------- */
.section { padding: var(--s16) 0; }
.section.alt { background: var(--paper-deep); }
.sec-head { text-align: center; margin-bottom: var(--s12); }
.sec-title {
  font-family: var(--serif); font-size: clamp(26px, 4vw, 34px);
  font-weight: 700; letter-spacing: .12em;
}
.sec-title::after {
  content: ""; display: block; width: 44px; height: 3px;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold));
  margin: 14px auto 0; border-radius: 2px;
}
.sec-desc { color: var(--ink-soft); margin-top: var(--s3); font-size: 16px; }

/* ---------- 功能卡片 ---------- */
.grid { display: grid; gap: var(--s6); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s8) var(--s6);
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-2); border-color: rgba(192,57,43,.28); }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: var(--s4);
  background: linear-gradient(145deg, rgba(192,57,43,.09), rgba(201,169,97,.12));
}
.card h3 { font-family: var(--serif); font-size: 19px; margin-bottom: var(--s2); letter-spacing: .05em; }
.card p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- 隐私宣言 ---------- */
.pledge {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #2B2622, #43382E);
  color: #F3EEE2; border-radius: var(--r-lg);
  padding: var(--s12) var(--s8); text-align: center;
  box-shadow: var(--sh-3);
}
.pledge::before {
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(201,169,97,.4); border-radius: 20px; pointer-events: none;
}
.pledge h2 { font-family: var(--serif); font-size: clamp(24px, 4vw, 32px); letter-spacing: .14em; }
.pledge p { max-width: 660px; margin: var(--s4) auto 0; opacity: .92; font-size: 15.5px; }
.pledge .stamp {
  position: absolute; right: 26px; bottom: 22px;
  width: 54px; height: 54px; border-radius: 8px;
  background: var(--cinnabar); color: #FCFBF6;
  font-family: var(--serif); font-size: 15px; line-height: 1.15;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 2px; writing-mode: vertical-rl;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transform: rotate(-4deg);
}

/* ---------- 应用预览（截图占位） ---------- */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s6); }
.phone {
  aspect-ratio: 9 / 19; border-radius: 30px; overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(31,29,26,.028) 0 10px, transparent 10px 20px),
    var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s2); color: var(--ink-mute); font-size: 14px;
  transition: transform var(--t-mid), box-shadow var(--t-mid);
  position: relative;
}
.phone:hover { transform: translateY(-6px); box-shadow: var(--sh-3); }
.phone .notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 22px; border-radius: 999px; background: rgba(31,29,26,.08);
}
.phone .name { font-family: var(--serif); font-size: 17px; color: var(--ink); letter-spacing: .1em; }
.phone .hint { font-size: 12px; letter-spacing: .06em; }
/* 替换截图时：删掉 .phone 里的占位文字，放入 <img class="shot-img" src="shot1.png" alt="今日"> 即可 */
.shot-img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 下载 ---------- */
.dl-card { text-align: center; position: relative; }
.dl-card h3 { font-family: var(--serif); font-size: 20px; letter-spacing: .08em; }
.badge {
  display: inline-block; margin-top: var(--s2);
  font-size: 12.5px; color: var(--ink-mute);
  border: 1px dashed var(--line); border-radius: 999px; padding: 4px 14px;
}
.dl-note { text-align: center; color: var(--ink-mute); font-size: 13px; margin-top: var(--s6); letter-spacing: .05em; }

/* ---------- 关于 ---------- */
.about-wrap { max-width: 780px; margin: 0 auto; text-align: center; }
.about-wrap p { font-size: 16px; color: var(--ink-soft); margin-bottom: var(--s4); text-align: justify; text-align-last: center; }
.chips { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; margin-top: var(--s6); }
.chip {
  font-family: var(--serif); font-size: 15px; letter-spacing: .2em;
  padding: 9px 22px; border-radius: 999px;
  border: 1px solid rgba(201,169,97,.55); color: var(--ink);
  background: rgba(201,169,97,.07);
}

/* ---------- 联系 ---------- */
.contact-strip {
  display: flex; gap: var(--s6); justify-content: center; align-items: center; flex-wrap: wrap;
}
.contact-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 14px 28px; text-decoration: none; font-size: 15.5px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.contact-item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: rgba(192,57,43,.3); }
.contact-item .ci-icon { font-size: 20px; }
.contact-item b { font-weight: 600; }

/* ---------- 页脚 ---------- */
.footer { background: #23201C; color: #B7B0A3; margin-top: var(--s16); }
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: var(--s12) var(--s6) var(--s8);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s8);
}
.footer h4 {
  font-family: var(--serif); color: #F3EEE2; font-size: 16px;
  letter-spacing: .12em; margin-bottom: var(--s3);
}
.footer a { color: #B7B0A3; text-decoration: none; transition: color var(--t-fast); }
.footer a:hover { color: var(--gold); }
.footer .fbrand { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s3); }
.footer .fbrand img { width: 34px; height: 34px; border-radius: 8px; }
.footer .fbrand b { font-family: var(--serif); color: #F3EEE2; font-size: 19px; letter-spacing: 2px; }
.footer ul { list-style: none; }
.footer li { margin: 8px 0; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(201,169,97,.18);
  max-width: 1080px; margin: 0 auto; padding: var(--s4) var(--s6) var(--s8);
  text-align: center; font-size: 13px; color: #8F887B; letter-spacing: .04em;
}
.footer-bottom a { color: #A79F8F; }
.footer-bottom a:hover { color: var(--gold); }
.footer-bottom p { margin: 5px 0; }

/* ---------- 滚动浮现 ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--t-long), transform .8s var(--t-long); }
.reveal.on { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s }
.reveal:nth-child(3) { transition-delay: .16s }
.reveal:nth-child(4) { transition-delay: .24s }

/* ---------- 动效降级（尊重系统设置） ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: var(--s6); text-align: center; }
  .footer .fbrand { justify-content: center; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(252,251,246,.98); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: var(--s3) var(--s4) var(--s4);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px; border-radius: var(--r-sm); font-size: 16px; }
  .grid-3, .grid-4, .shots { grid-template-columns: 1fr; }
  .shots { max-width: 300px; margin: 0 auto; }
  .pledge { padding: var(--s8) var(--s6); }
  .pledge .stamp { display: none; }
  .hero { padding-top: var(--s12); }
  .btn { width: min(320px, 88vw); }
  .contact-strip { flex-direction: column; }
  .contact-item { width: min(360px, 92vw); justify-content: center; }
}
