/* ============================================================
   破晓 DawnLife 官网 · 「墨」
   与 App / 后台同一血脉：米白纸面 + 墨色 + 细线 + 大量留白
   ============================================================ */
:root {
  --paper: #f7f4ec;
  --ink: #111111;
  --sub: #555555;
  --faint: #999999;
  --line: rgba(17, 17, 17, 0.14);
  --card: #fffefb;
  --dawn-core: #e9a75e;
  --dawn-glow: rgba(214, 138, 64, 0.55);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  background-image: radial-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.9;
}
.serif { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif; }
a { color: var(--ink); text-decoration: none; }
a:hover { opacity: 0.65; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* ---------- 页眉 ---------- */
header {
  border-bottom: 0.5px solid var(--line);
  background: rgba(247, 244, 236, 0.92);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
header .wrap {
  display: flex; align-items: center; gap: 12px;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.brand .name { font-size: 13px; letter-spacing: 5px; font-weight: 600; }
/* 导航整体垂直居中：默认 align-items: stretch 会让纯文字链接贴着拉伸框顶，
   与胶囊按钮/主题圆钮一对比就"没居中" */
nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
nav a { font-size: 13px; letter-spacing: 2px; color: var(--sub); display: inline-flex; align-items: center; }
nav a.active { color: var(--ink); font-weight: 600; }
nav a.nav-cta {
  color: #f7f4ec; background: var(--ink); border-radius: 999px;
  padding: 7px 18px; letter-spacing: 3px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.15s;
}
nav a.nav-cta:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 5px 16px rgba(17, 17, 17, 0.22); }

/* 导航「支持破晓」锚点：平滑滚动 + 吸顶页眉偏移（约 63px，留足余量） */
html { scroll-behavior: smooth; }
#support { scroll-margin-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- 通用板块 ---------- */
section { padding: 96px 0; border-bottom: 0.5px solid var(--line); }
section:last-of-type { border-bottom: none; }
.sec-mark {
  font-size: 12px; letter-spacing: 6px; color: var(--faint);
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.sec-mark::before {
  content: ""; width: 10px; height: 10px; background: var(--ink); flex: none;
}
h2.sec-title {
  font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; letter-spacing: 3px;
  margin-bottom: 16px; text-align: center;
}
.sec-sub { color: var(--sub); max-width: 640px; margin: 0 auto; text-align: center; }
.sec-mark { justify-content: center; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 110px 0 96px; position: relative; overflow: hidden; }
.hero img.logo { width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 30px;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.18); }
.hero .brand-line { font-size: 13px; letter-spacing: 10px; color: var(--sub); margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(36px, 4.8vw, 60px); font-weight: 600; letter-spacing: 2px;
  line-height: 1.35; margin-bottom: 8px; text-wrap: balance;
}
.hero .slogan-sub { color: var(--sub); margin: 0 auto 44px; max-width: 620px; font-size: 16px; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 38px; border-radius: 999px;
  font-size: 14px; letter-spacing: 4px; transition: opacity 0.15s;
}
.btn-dark { background: var(--ink); color: #f7f4ec; }
.btn-ghost { border: 0.5px solid var(--ink); color: var(--ink); }
.btn:hover { opacity: 0.8; }
.hero .platforms { margin-top: 22px; font-size: 12px; letter-spacing: 2px; color: var(--faint); }

/* ---------- 六习惯 ---------- */
.habits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin-top: 48px; }
.habit {
  text-align: center; padding: 34px 6px 30px;
  border-left: 0.5px solid var(--line);
}
.habit:first-child { border-left: none; }
.habit .char { font-size: 48px; font-weight: 600; line-height: 1.2; margin-bottom: 12px; }
.habit .desc { font-size: 12px; color: var(--sub); letter-spacing: 1px; line-height: 1.7; }

/* ---------- 机制三条 ---------- */
.rules { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.rule {
  background: var(--card); border: 0.5px solid var(--line);
  border-radius: 16px; padding: 34px 30px;
}
.rule .no { font-size: 12px; letter-spacing: 3px; color: var(--faint); margin-bottom: 14px; }
.rule h3 { font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; font-weight: 600; }
.rule p { font-size: 13px; color: var(--sub); }

/* ---------- 截图 ---------- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; align-items: start; }
.shots .shot {
  background: var(--card); border: 0.5px solid var(--line);
  border-radius: 16px; padding: 14px;
}
.shots .shot img { border-radius: 10px; }
.shots .shot .cap { font-size: 12px; color: var(--faint); text-align: center; padding: 12px 0 4px; letter-spacing: 2px; }
.shots-wide { margin-top: 22px; }
.shots-wide .shot { grid-column: 1 / -1; }

/* ---------- 支持破晓 ---------- */
.support { max-width: 620px; margin: 44px auto 0; }
.support-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 0.5px solid var(--line);
  border-radius: 16px; padding: 26px 30px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.support-card:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(17, 17, 17, 0.1); }
.sc-left { flex: 1; min-width: 0; }
.sc-name { font-size: 17px; letter-spacing: 2px; font-weight: 600; }
.sc-url { font-size: 12px; color: var(--faint); letter-spacing: 1px; margin-top: 4px; }
.sc-go {
  flex: none; font-size: 13px; letter-spacing: 3px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  border: 0.5px solid var(--ink); border-radius: 999px; padding: 8px 18px;
}
.support-note { text-align: center; font-size: 12px; color: var(--faint); letter-spacing: 2px; margin-top: 16px; }
.dl-support { margin-top: 18px; text-align: center; font-size: 13px; color: var(--sub); letter-spacing: 1px; }
.dl-support a { border-bottom: 0.5px solid var(--ink); padding-bottom: 1px; }
[data-theme="night"] .support-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
@media (max-width: 720px) {
  .support-card { flex-direction: column; text-align: center; gap: 14px; padding: 24px 20px; }
}

/* ---------- 黑色 CTA 带 ---------- */
.cta-band { background: var(--ink); color: #f7f4ec; text-align: center; padding: 76px 0; }
.cta-band h2 { font-size: 26px; letter-spacing: 4px; margin-bottom: 12px; font-weight: 600; }
.cta-band p { color: rgba(247, 244, 236, 0.6); margin-bottom: 30px; font-size: 14px; }
.cta-band .btn { border: 0.5px solid #f7f4ec; color: #f7f4ec; }

/* ---------- 页脚 ---------- */
footer { padding: 40px 0 48px; }
footer .wrap {
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center;
  font-size: 12px; color: var(--faint); letter-spacing: 1px;
}
footer a { color: var(--faint); }
footer .right { margin-left: auto; }

/* ---------- 内页（理念 / 下载 / 隐私） ---------- */
.page-head { padding: 96px 0 56px; border-bottom: 0.5px solid var(--line); text-align: center; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: 3px; font-weight: 600; margin-bottom: 14px; }
.page-head p { color: var(--sub); max-width: 620px; margin: 0 auto; }
.article { padding: 56px 0 72px; max-width: 680px; }
.article h2 {
  font-size: 20px; letter-spacing: 3px; font-weight: 600;
  margin: 48px 0 16px; display: flex; align-items: center; gap: 10px;
}
.article h2::before { content: ""; width: 8px; height: 8px; background: var(--ink); flex: none; }
.article h2:first-child { margin-top: 0; }
.article p { margin-bottom: 16px; color: #2b2b2b; }
.article .quote-line {
  border-left: 2px solid var(--ink); padding: 4px 0 4px 18px;
  margin: 26px 0; color: var(--sub); font-size: 14px;
}
.article ul { margin: 0 0 16px 20px; color: #2b2b2b; }
.article li { margin-bottom: 8px; }

/* ---------- 下载页 ---------- */
.dl-card {
  background: var(--card); border: 0.5px solid var(--line); border-radius: 18px;
  padding: 40px 36px; text-align: center; margin: 44px 0 28px;
}
.dl-card img { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px; }
.dl-card .ver { font-size: 12px; color: var(--faint); letter-spacing: 2px; margin: 14px 0 26px; }
.wechat-tip {
  display: none; background: var(--ink); color: #f7f4ec; border-radius: 12px;
  padding: 14px 18px; font-size: 13px; letter-spacing: 1px; margin-top: 20px;
}
.steps { margin-top: 40px; }
.step { display: flex; gap: 16px; padding: 18px 0; border-bottom: 0.5px solid var(--line); }
.step:last-child { border-bottom: none; }
.step .n {
  width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #f7f4ec;
  font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none;
}
.step .t { font-size: 14px; color: #2b2b2b; }
.step .t b { letter-spacing: 1px; }
.ios-bar {
  margin-top: 34px; border: 0.5px dashed var(--line); border-radius: 14px;
  padding: 20px 24px; text-align: center; color: var(--faint); font-size: 13px; letter-spacing: 2px;
}

/* ============================================================
   昼 / 夜主题（右上角开关切换，记忆在浏览器，默认跟随系统）
   ============================================================ */
:root { --band-bg: #111111; --band-fg: #f7f4ec; }
body { transition: background-color 0.25s ease, color 0.25s ease; }

.theme-toggle {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; flex: none;
  border: 1px solid var(--ink); padding: 0; align-self: center;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
  transition: transform 0.3s ease;
}
[data-theme="night"] .theme-toggle { transform: rotate(180deg); }

[data-theme="night"] {
  --paper: #15130f;
  --ink: #ece7da;
  --sub: #a9a395;
  --faint: #6e695d;
  --line: rgba(236, 231, 218, 0.16);
  --card: #1e1b15;
  --band-bg: #ece7da;
  --band-fg: #15130f;
  --dawn-core: #8a6740;
  --dawn-glow: rgba(190, 140, 80, 0.3);
}
[data-theme="night"] body {
  background-image: radial-gradient(rgba(236, 231, 218, 0.05) 1px, transparent 1px);
}
[data-theme="night"] header { background: rgba(21, 19, 15, 0.92); }
[data-theme="night"] .hero img.logo { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); }
[data-theme="night"] .shots img { filter: brightness(0.92); }
[data-theme="night"] .article p,
[data-theme="night"] .article ul,
[data-theme="night"] .step .t { color: #d8d2c4; }

/* 以下原为浅色主题下的硬编码，改为变量以跟随主题（浅色下取值与原来一致） */
.btn-dark { color: var(--paper); }
nav a.nav-cta { color: var(--paper); }
.step .n { color: var(--paper); }
.wechat-tip { color: var(--paper); }
.brand img, .hero img.logo, .dl-card img { border: 0.5px solid var(--line); }
.cta-band { background: var(--band-bg); color: var(--band-fg); }
.cta-band p { color: var(--band-fg); opacity: 0.62; }
.cta-band .btn { border-color: var(--band-fg); color: var(--band-fg); }

/* ============================================================
   入场动画 · 首屏错峰浮起 + 破晓弧光 + 滚动入场
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero .logo, .hero .brand-line, .hero h1, .hero .dawn-arc,
.hero .slogan-sub, .hero .btn-row, .hero .platforms {
  opacity: 0; animation: rise .8s cubic-bezier(.2, .7, .3, 1) forwards;
}
.hero .logo        { animation-delay: .05s; }
.hero .brand-line  { animation-delay: .18s; }
.hero h1           { animation-delay: .32s; }
.hero .dawn-arc    { animation-delay: .5s; }
.hero .slogan-sub  { animation-delay: .62s; }
.hero .btn-row     { animation-delay: .76s; }
.hero .platforms   { animation-delay: .9s; }

/* 破晓弧光：地平线 + 半轮日出 + 呼吸光晕（纯 CSS，无图片）。
   两层结构：glow 是大范围弥散光晕负责"晨光感"；disc 是小日盘，
   圆心压在地平线下方，露出的部分是自然圆弧而非水平切边。 */
.dawn-arc { position: relative; width: 320px; height: 62px; margin: 12px auto 32px; overflow: hidden; }
.dawn-arc .glow {
  position: absolute; left: 50%; bottom: -160px; width: 340px; height: 340px; margin-left: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--dawn-glow) 0%, transparent 55%);
  transform-origin: 50% 100%;
  animation: dawn-breathe 6s ease-in-out infinite;
}
.dawn-arc .disc {
  position: absolute; left: 50%; bottom: -36px; width: 140px; height: 140px; margin-left: -70px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 66%, var(--dawn-core) 0%, var(--dawn-glow) 72%, transparent 100%);
  transform-origin: 50% 100%;
  animation: dawn-pulse 6s ease-in-out infinite;
}
.dawn-arc .horizon { position: absolute; left: 10%; right: 10%; bottom: 0; height: 1px; background: var(--line); }
/* 呼吸：幅度特意调大（透明度半幅 + 12% 缩放）——之前只动 .72→1 的透明度，
   叠加在半透明光晕上人眼不可见，曾被误以为"没有动画" */
@keyframes dawn-breathe {
  0%, 100% { opacity: .45; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.12); }
}
@keyframes dawn-pulse {
  0%, 100% { opacity: .8; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.05); }
}

/* 滚动入场：.reveal 进入视口时浮起（JS 按兄弟顺序加 transitionDelay 错峰）。
   仅在 JS 可用（<html class="js">）时隐藏元素——无 JS 或脚本异常也保证内容可见 */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .85s ease, transform .85s cubic-bezier(.2, .7, .3, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* 尊重系统「减弱动态效果」 */
@media (prefers-reduced-motion: reduce) {
  .hero .logo, .hero .brand-line, .hero h1, .hero .dawn-arc,
  .hero .slogan-sub, .hero .btn-row, .hero .platforms { animation: none; opacity: 1; }
  .dawn-arc .glow, .dawn-arc .disc { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 回到顶部（滚动超一屏后出现，到顶自动隐藏；JS 注入） ---------- */
#toTop {
  position: fixed; right: 26px; bottom: 26px; z-index: 9;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.22);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, box-shadow .2s ease;
}
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { box-shadow: 0 6px 18px rgba(17, 17, 17, 0.3); transform: translateY(-2px); }
#toTop svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  #toTop { right: 18px; bottom: 18px; width: 40px; height: 40px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 72px 0 64px; }
  .hero h1 { font-size: 30px; letter-spacing: 1px; }
  .dawn-arc { width: 200px; height: 54px; }
  .dawn-arc .glow { width: 260px; height: 260px; margin-left: -130px; bottom: -120px; }
  .dawn-arc .disc { width: 110px; height: 110px; margin-left: -55px; bottom: -28px; }
  h2.sec-title { font-size: 24px; }
  section { padding: 60px 0; }
  .habits { grid-template-columns: repeat(3, 1fr); }
  .habit:nth-child(4) { border-left: none; }
  .habit:nth-child(n + 4) { border-top: 0.5px solid var(--line); }
  .rules { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .cta-band h2 { font-size: 20px; letter-spacing: 2px; }
  nav { gap: 12px; }
  nav a { letter-spacing: 1px; white-space: nowrap; }
  nav a.nav-cta { padding: 6px 14px; letter-spacing: 2px; }
  .brand .name { display: none; }
}
