/* ==========================================================
   聆昔官网样式
   配色取自 Android 端 ui/theme/Color.kt：品牌紫 #6F63AC、丁香紫 #8B7FC4
   ========================================================== */

/* 设计变量 */
:root {
  --brand: #6F63AC;          /* 品牌紫，按钮与强调 */
  --lilac: #8B7FC4;          /* 丁香紫，渐变起点 */
  --mauve: #A98FC8;          /* 渐变中段 */
  --rose: #C79BC0;           /* 渐变终点 */
  --pink: #F2A7B0;           /* 字标里的小心形 */
  --title: #3B3540;          /* 标题文字 */
  --text: #4A4352;           /* 正文文字 */
  --muted: #847C8C;          /* 次要文字 */
  --bg: #FCFBF9;             /* 页面底色 */
  --bg-tint: #F6F1F7;        /* 浅紫分区底色 */
  --card: #FFFFFF;
  --line: #ECE5EE;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(111, 99, 172, 0.12);
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--title); line-height: 1.35; margin: 0 0 12px; }
h2 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 251, 249, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: auto; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--brand); letter-spacing: 2px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--text); font-size: 15px; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }
.site-nav .nav-cta { color: #fff; background: var(--brand); padding: 7px 18px; border-radius: 999px; }
.site-nav .nav-cta:hover { color: #fff; background: #5F549A; }

/* 移动端菜单按钮（桌面端隐藏） */
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--title); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 132px; padding: 12px 26px; border-radius: 999px;
  font: 600 16px/1 var(--sans); cursor: pointer; border: 1.5px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--lilac), var(--brand)); box-shadow: 0 8px 20px rgba(111, 99, 172, .3); }
.btn-ghost { color: var(--brand); background: rgba(255, 255, 255, .7); border-color: rgba(111, 99, 172, .35); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(199, 155, 192, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(139, 127, 196, .25), transparent 60%),
    linear-gradient(180deg, #F4EEF8 0%, var(--bg) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 80px; }
.hero-wordmark { width: 240px; height: auto; margin-bottom: 18px; }
.hero-slogan { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); color: var(--title); margin-bottom: 18px; letter-spacing: 2px; }
.hero-desc { max-width: 520px; font-size: 16px; color: var(--text); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* 首屏手机样机，内容是 App 开屏图 */
.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative; width: 290px; aspect-ratio: 9 / 19.5;
  border-radius: 42px; padding: 10px; background: #2E2A35;
  box-shadow: 0 30px 60px rgba(59, 53, 64, .25), inset 0 0 0 2px #4A4352;
}
.phone-bg { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.phone-overlay {
  position: absolute; left: 10px; right: 10px; bottom: 70px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.phone-overlay img { width: 46%; }
.phone-overlay span { font-family: var(--serif); font-size: 13px; color: var(--brand); letter-spacing: 2px; }

/* ---------- 通用分区 ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--bg-tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 3px; color: var(--lilac); margin-bottom: 8px; }
.section-desc { color: var(--text); font-size: 16px; }

/* ---------- 功能卡片 ---------- */
.feature-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.feature {
  grid-column: span 3; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.feature > img { width: 100%; height: 280px; object-fit: cover; object-position: center 20%; }
.feature-body { padding: 22px 24px 26px; }
.feature-body p { color: var(--muted); font-size: 15px; margin: 0; }
/* 第一张卡横跨整行，图文左右排布 */
.feature-wide { grid-column: span 6; flex-direction: row; }
.feature-wide > img { width: 58%; height: auto; min-height: 300px; }
.feature-wide .feature-body { align-self: center; padding: 36px 40px; }
.feature-wide h3 { font-size: 24px; font-family: var(--serif); }
/* 图标类卡片：插画居中显示，不裁切 */
.feature-icon { grid-column: span 3; flex-direction: row; align-items: center; }
.feature-icon > img { width: 140px; height: 140px; object-fit: contain; margin: 20px 0 20px 24px; flex-shrink: 0; }

/* ---------- 临屿小城 ---------- */
.world { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.world-map img { border-radius: 28px; box-shadow: var(--shadow); }
.time-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 12px 0 16px; background: #fff; border-radius: 999px; border: 1px solid var(--line); }
.time-switch button {
  border: 0; background: none; cursor: pointer; padding: 6px 18px; border-radius: 999px;
  font: 500 14px/1.6 var(--sans); color: var(--muted);
}
.time-switch button.active { background: var(--brand); color: #fff; }
.place-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: #E9E1EE; }
.place-frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.place-frame img.fading { opacity: 0; }

/* ---------- 安全承诺 ---------- */
.safety-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.safety-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.safety-item h3 { font-size: 17px; color: var(--brand); }
.safety-item p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- 下载 ---------- */
.download { background: linear-gradient(135deg, var(--lilac), var(--mauve) 55%, var(--rose)); color: #fff; }
.download-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.download-inner img { margin-bottom: 16px; filter: drop-shadow(0 8px 16px rgba(59, 53, 64, .2)); }
.download h2 { color: #fff; }
.download p { opacity: .92; margin-bottom: 28px; }
.download .btn-primary { background: #fff; color: var(--brand); box-shadow: 0 8px 20px rgba(59, 53, 64, .15); }
.download .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }

/* ---------- 关于我们 ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.about h2 { font-size: clamp(22px, 2.6vw, 28px); }
.contact { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 26px; }
.contact div { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact div:last-child { border-bottom: 0; }
.contact dt { flex: 0 0 72px; color: var(--muted); font-size: 14px; }
.contact dd { margin: 0; color: var(--title); font-size: 15px; word-break: break-all; }

/* ---------- 页脚 ---------- */
.site-footer { background: #2E2A35; color: #B9B2C2; font-size: 13px; padding: 36px 0; }
.footer-inner { text-align: center; }
.footer-inner p { margin: 6px 0 0; }
.site-footer a { color: #D9D2E3; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 14px; font-size: 14px; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(46, 42, 53, .92); color: #fff; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 协议类文档页 ---------- */
.doc { max-width: 820px; padding-top: 56px; padding-bottom: 96px; }
.doc h1 { font-family: var(--serif); font-size: 32px; }
.doc h2 { font-family: var(--sans); font-size: 20px; margin-top: 36px; }
.doc .doc-meta { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 960px) {
  .hero-inner, .world, .about { grid-template-columns: 1fr; }
  .hero-inner { text-align: center; padding-top: 48px; gap: 40px; }
  .hero-wordmark { margin-left: auto; margin-right: auto; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .safety-grid { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-column: span 3; }
  .feature-icon { grid-column: span 3; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }

  /* 移动端折叠菜单 */
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .site-nav.open { display: flex; }
  /* 协议页只有一个“返回首页”链接，移动端保持常显 */
  .site-nav.site-nav-static { position: static; display: flex; padding: 0; background: none; border: 0; }
  .site-nav.site-nav-static a { border-bottom: 0; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin-top: 12px; text-align: center; border-bottom: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .feature, .feature-icon, .feature-wide { grid-column: span 6; }
  .feature-wide { flex-direction: column; }
  .feature-wide > img { width: 100%; min-height: 0; }
  .feature-wide .feature-body { padding: 22px 24px 26px; }
  .feature-icon > img { width: 96px; height: 96px; margin: 16px 0 16px 16px; }
  .feature-icon .feature-body { padding: 16px 18px 16px 12px; }
  .safety-grid { grid-template-columns: 1fr; }
  .phone { width: 240px; }
}
