/* 万启官网
   视觉：纯色色块分区（紫 / 米白 / 淡紫 / 墨色）+ 墨色描边的“贴纸”卡片，不用渐变、毛玻璃和发光阴影。
   动效：首屏纸条漂流、字带滚动、滚动入场、可交互演示；系统开启“减弱动态效果”时全部关闭。 */
:root {
  --violet: #6942d7; /* 与 App 品牌色一致（spec/design-tokens.yaml brand） */
  --violet-deep: #4b2bb3;
  --ink: #14111f;
  --cream: #f7f2e8;
  --lilac: #ece5ff;
  --sun: #ffd54a;
  --coral: #ff6a55;
  --mint: #bff0d4;
  --white: #fff;
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-jelly: cubic-bezier(.34, 1.56, .64, 1); /* 带过冲的回弹 */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.block-violet { background: var(--violet); color: var(--white); }
.block-cream { background: var(--cream); }
.block-lilac { background: var(--lilac); }
.block-ink { background: var(--ink); color: var(--cream); }

/* ---------- 页头 ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 20; color: var(--white); transition: background-color .3s, color .3s, box-shadow .3s; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-header.scrolled { background: var(--cream); color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; }
.brand img { border-radius: 24%; }
.site-header nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 30px); font-size: 15px; font-weight: 500; }
.site-header nav a { text-decoration: none; opacity: .86; transition: opacity .2s; }
.site-header nav a:hover { opacity: 1; }
.site-header nav .nav-cta { opacity: 1; padding: 7px 16px; border-radius: 999px; background: var(--sun); color: var(--ink); border: 2px solid var(--ink); transition: transform .25s var(--ease-jelly); }
.site-header nav .nav-cta:hover { transform: translateY(-2px) rotate(-2deg); }

/* ---------- 按钮 ---------- */
.button { display: inline-block; padding: 14px 28px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 600; font-size: 17px; text-decoration: none; transition: transform .25s var(--ease-jelly), box-shadow .25s var(--ease-out); }
.button-sun { background: var(--sun); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.button-sun:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.button-sun:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.button-ghost { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.button-ghost:hover { border-color: var(--white); transform: translateY(-2px); }

/* ---------- 首屏 ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: min(100vh, 860px); padding-top: 96px; padding-bottom: 56px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .14em; opacity: .9; }
.kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sun); animation: blink 2.4s ease-in-out infinite; }
h1 { margin-top: 22px; font-size: clamp(36px, 5.2vw, 72px); line-height: 1.14; font-weight: 800; letter-spacing: -.01em; }
h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
h1 .line > span { display: inline-block; white-space: nowrap; transform: translateY(110%); animation: rise .9s var(--ease-out) forwards; }
h1 .line:nth-child(2) > span { animation-delay: .12s; }
h1 em { font-style: normal; color: var(--sun); }
.lead { margin-top: 26px; max-width: 28em; font-size: clamp(17px, 1.5vw, 20px); opacity: 0; animation: fade-up .8s .35s var(--ease-out) forwards; color: rgba(255, 255, 255, .86); }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; opacity: 0; animation: fade-up .8s .5s var(--ease-out) forwards; }

/* 纸条墙：两列反向漂流，整体略微倾斜 */
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; height: min(78vh, 680px); transform: rotate(-5deg) scale(1.04); -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.wall-col { display: flex; flex-direction: column; gap: 18px; will-change: transform; }
.wall-col[data-drift="up"] { animation: drift-up 38s linear infinite; }
.wall-col[data-drift="down"] { animation: drift-down 44s linear infinite; }
.wall:hover .wall-col { animation-play-state: paused; }
.note { padding: 20px 20px 16px; border-radius: 18px; border: 2px solid var(--ink); color: var(--ink); font-size: 16px; line-height: 1.6; transition: transform .3s var(--ease-jelly); }
.note:hover { transform: scale(1.04) rotate(2deg); }
.note-cream { background: var(--cream); } .note-sun { background: var(--sun); } .note-white { background: var(--white); } .note-lilac { background: var(--lilac); } .note-mint { background: var(--mint); }
.note footer { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.note footer i { margin-left: auto; font-style: normal; font-weight: 600; }
.ava { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: var(--white); font-size: 13px; font-weight: 600; flex: none; }

/* ---------- 字带 ---------- */
.ribbon { background: var(--ink); color: var(--sun); overflow: hidden; border-block: 2px solid var(--ink); }
.ribbon-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.ribbon-track span { padding: 18px 0; font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; white-space: nowrap; }
.ribbon-track span::after { content: "✦"; margin: 0 clamp(20px, 3vw, 44px); color: var(--coral); font-size: .7em; vertical-align: .12em; }

/* ---------- 功能分节 ---------- */
.feature { padding: clamp(72px, 10vw, 136px) 0; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); }
.feature-head { position: sticky; top: 104px; align-self: start; }
.index { display: inline-block; padding: 3px 12px; border-radius: 999px; border: 2px solid currentColor; font: 700 14px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; }
h2 { margin-top: 22px; font-size: clamp(36px, 5vw, 64px); line-height: 1.15; font-weight: 800; }
.summary { margin-top: 20px; max-width: 21em; font-size: 18px; opacity: .78; }

/* 演示卡片：墨色描边 + 硬投影的贴纸质感 */
.demo { background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink); padding: 22px; max-width: 520px; }
.block-ink .demo { box-shadow: 8px 8px 0 var(--violet); border-color: var(--cream); background: var(--cream); }
.demo-hint { margin-top: 14px; font-size: 13px; opacity: .6; }

.points { margin-top: clamp(44px, 5vw, 64px); border-top: 2px solid currentColor; }
.points li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
h3 { font-size: 19px; font-weight: 700; line-height: 1.5; }
.points p { opacity: .76; font-size: 16px; }

/* 发表动态演示 */
.composer-top { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.composer-top strong { font-size: 17px; }
.composer-send { padding: 7px 18px; border-radius: 999px; background: var(--violet); color: var(--white); font-weight: 600; font-size: 14px; border: 2px solid var(--ink); transition: transform .25s var(--ease-jelly); }
.composer-send:hover { transform: scale(1.08) rotate(-3deg); }
.composer-send:active { transform: scale(.94); }
.composer-text { min-height: 5.4em; margin-top: 18px; font-size: 18px; line-height: 1.8; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; vertical-align: -.18em; background: var(--violet); animation: blink 1s steps(1) infinite; }
.composer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(20, 17, 31, .14); font-size: 15px; }
.seg { display: flex; padding: 3px; border-radius: 999px; background: var(--lilac); border: 2px solid var(--ink); }
.seg button { padding: 5px 14px; border-radius: 999px; font-size: 14px; transition: background-color .2s, color .2s, transform .25s var(--ease-jelly); }
.seg button.on { background: var(--ink); color: var(--white); transform: scale(1.04); }
.composer-feed { display: grid; gap: 10px; margin-top: 14px; }
.composer-feed li { padding: 12px 14px; border-radius: 14px; background: var(--cream); border: 2px solid var(--ink); font-size: 15px; line-height: 1.6; animation: pop .5s var(--ease-jelly); }
.composer-feed small { display: block; margin-top: 6px; font-size: 12px; opacity: .6; }

/* 群聊演示 */
.chat-top { display: flex; align-items: baseline; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid rgba(20, 17, 31, .14); }
.chat-top span { font-size: 13px; opacity: .6; }
.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 300px; padding-top: 16px; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; animation: pop .45s var(--ease-jelly); transform-origin: left bottom; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; transform-origin: right bottom; }
.msg p { padding: 9px 14px; border-radius: 18px 18px 18px 6px; background: var(--lilac); font-size: 15px; line-height: 1.55; }
.msg.me p { border-radius: 18px 18px 6px 18px; background: var(--violet); color: var(--white); }
.msg small { display: block; margin-bottom: 3px; font-size: 12px; opacity: .55; }
.typing p { display: flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.chat-call { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 16px; border-radius: 999px; background: var(--mint); border: 2px solid var(--ink); font-size: 14px; font-weight: 600; animation: pop .5s var(--ease-jelly); }
.chat-call[hidden] { display: none; }
.chat-call b { margin-left: auto; font: 700 14px ui-monospace, "SF Mono", Menlo, monospace; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #17a45f; animation: blink 1.2s ease-in-out infinite; }

/* 果冻导航演示 */
.dock-demo { margin-top: 44px; max-width: 520px; }
.dock-label { font-size: 22px; font-weight: 700; }
.dock-label span { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; opacity: .6; }
.dock { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; padding: 5px; height: 72px; border-radius: 999px; background: var(--white); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); --i: 0; }
.dock-indicator { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 4); border-radius: 999px; background: var(--lilac); transform: translateX(calc(var(--i) * 100%)); transition: transform .55s var(--ease-jelly); }
.dock.jelly .dock-indicator { animation: jelly .55s ease-out; }
.dock button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; font-size: 11px; color: #8a8f9c; transition: color .2s; }
.dock button svg { width: 24px; height: 24px; fill: currentColor; transition: transform .5s var(--ease-jelly); }
.dock button svg:nth-of-type(2) { display: none; }
.dock button.on { color: var(--violet); font-weight: 600; }
.dock button.on svg:nth-of-type(1) { display: none; }
.dock button.on svg:nth-of-type(2) { display: block; transform: scale(1.18); }

/* 签到月历 */
.cal-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; padding: 18px 20px; border-radius: 16px; background: var(--violet); color: var(--white); }
.cal-stats b { display: block; font-size: 30px; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; }
.cal-stats span { font-size: 12px; opacity: .86; }
.cal-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 20px; }
.cal-head span { font-size: 13px; opacity: .6; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); justify-items: center; }
.cal-week { margin-top: 14px; font-size: 12px; opacity: .5; }
.cal-grid { gap: 8px 0; margin-top: 10px; }
.cal-day { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; font-size: 14px; font-variant-numeric: tabular-nums; color: rgba(20, 17, 31, .4); }
.cal-day.past { background: rgba(20, 17, 31, .07); color: rgba(20, 17, 31, .62); }
.cal-day.today { border: 2px solid var(--violet); color: var(--violet); font-weight: 700; background: var(--lilac); }
.cal-day.checked { background: var(--violet); color: var(--white); font-size: 0; animation: pop .45s var(--ease-jelly); }
.cal-day.checked::after { content: "✓"; font-size: 17px; font-weight: 700; }
.cal-button { position: relative; width: 100%; margin-top: 20px; padding: 14px; border-radius: 14px; background: var(--ink); color: var(--white); font-weight: 600; border: 2px solid var(--ink); transition: transform .25s var(--ease-jelly), background-color .2s; }
.cal-button span { color: var(--sun); }
.cal-button:hover:not(:disabled) { transform: translateY(-2px); background: var(--violet); }
.cal-button:disabled { background: transparent; color: rgba(20, 17, 31, .5); cursor: default; }
.cal-button:disabled span { display: none; }
.float-plus { position: absolute; left: 50%; top: 0; color: var(--violet); font-weight: 800; font-size: 20px; pointer-events: none; animation: float-up 1s var(--ease-out) forwards; }

/* ---------- 安全与隐私 ---------- */
.safety { padding: clamp(72px, 10vw, 136px) 0; }
.safety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 64px); border-top: 2px solid var(--ink); counter-reset: safe; }
.safety-grid li { position: relative; padding: 28px 28px 34px 0; border-bottom: 1px solid rgba(20, 17, 31, .2); counter-increment: safe; transition: background-color .25s, padding-left .35s var(--ease-out); }
.safety-grid li:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid rgba(20, 17, 31, .2); }
.safety-grid li::before { content: "0" counter(safe); display: block; margin-bottom: 26px; font: 700 13px ui-monospace, "SF Mono", Menlo, monospace; color: var(--violet); }
.safety-grid li:hover { background: var(--sun); padding-left: 28px; }
.safety-grid p { margin-top: 8px; opacity: .76; font-size: 16px; }

/* ---------- 下载 ---------- */
.download { padding: clamp(80px, 11vw, 152px) 0; }
.download h2 { font-size: clamp(44px, 7.4vw, 104px); }
.download .summary { max-width: 28em; opacity: .86; }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 560px; margin-top: 44px; }
.platforms li { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 24px; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .5); }
.platform { font-size: 24px; font-weight: 700; }
.status { font-size: 14px; padding: 2px 12px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 48px 0 40px; font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.footer-brand p + p { margin-top: 8px; opacity: .6; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer nav a { text-decoration: none; opacity: .8; border-bottom: 1px solid transparent; transition: opacity .2s, border-color .2s; }
.site-footer nav a:hover { opacity: 1; border-color: var(--sun); }
.legal-line { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(247, 242, 232, .18); opacity: .55; font-size: 13px; }

/* ---------- 协议 / 隐私政策页 ---------- */
.legal-page { background: var(--cream); }
.legal-page .site-header { position: static; background: var(--cream); color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.legal { max-width: 820px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 96px; font-size: 16px; }
.legal h1 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); }
.legal .subtitle { margin-top: 14px; font-size: 14px; opacity: .6; }
.legal h2 { margin-top: 48px; padding-top: 22px; border-top: 2px solid var(--ink); font-size: 22px; line-height: 1.4; }
.legal h3 { margin-top: 26px; font-size: 17px; }
.legal p, .legal ul, .legal ol { margin-top: 12px; }
.legal ul, .legal ol { padding-left: 1.4em; }
.legal ul { list-style: disc; } .legal ol { list-style: decimal; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--violet); }
.legal .info, .legal .warn { margin-top: 20px; padding: 16px 20px; border-radius: 14px; border: 2px solid var(--ink); background: var(--white); }
.legal .warn { background: var(--sun); }
.legal .info p:first-child, .legal .warn p:first-child { margin-top: 0; }
.legal .table-wrap { margin-top: 16px; overflow-x: auto; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); }
.legal table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.legal th, .legal td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(20, 17, 31, .14); }
.legal th { background: var(--lilac); white-space: nowrap; }
.legal tr:last-child td { border-bottom: 0; }
.legal .footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(20, 17, 31, .2); font-size: 14px; opacity: .7; }

/* ---------- 滚动入场 ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- 关键帧 ---------- */
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .15; } }
@keyframes drift-up { to { transform: translateY(-50%); } }
@keyframes drift-down { from { transform: translateY(-50%); } to { transform: none; } }
@keyframes drift-left { to { transform: translateX(-50%); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes bounce { 30% { transform: translateY(-5px); } 60% { transform: none; } }
@keyframes jelly { 0% { scale: 1 1; } 35% { scale: 1.22 .82; } 65% { scale: .9 1.1; } 85% { scale: 1.04 .97; } 100% { scale: 1 1; } }
@keyframes float-up { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -56px); } }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-bottom: 0; }
  /* 纸条墙改为一行横向漂流 */
  .wall { display: flex; gap: 14px; height: auto; margin: 48px calc(var(--gutter) * -1) 0; padding: 6px 0 44px; transform: none; -webkit-mask-image: none; mask-image: none; overflow: hidden; }
  .wall-col { flex-direction: row; gap: 14px; flex: none; }
  .wall-col[data-drift] { animation: drift-left 36s linear infinite; }
  .wall-col[data-drift="down"] { display: none; }
  .note { width: 250px; flex: none; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feature-head { position: static; }
  .safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety-grid li:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .safety-grid li:nth-child(even) { padding-left: 24px; border-left: 1px solid rgba(20, 17, 31, .2); }
  .safety-grid li:hover { padding-left: 24px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-optional { display: none; }
  .demo { padding: 18px; box-shadow: 6px 6px 0 var(--ink); }
  .points li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .safety-grid { grid-template-columns: minmax(0, 1fr); }
  .safety-grid li, .safety-grid li:nth-child(even) { padding-left: 0; border-left: 0; }
  .safety-grid li::before { margin-bottom: 12px; }
  .platforms { grid-template-columns: minmax(0, 1fr); }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .cal-day { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  h1 .line > span { transform: none; }
  .lead, .hero-actions, [data-reveal] { opacity: 1; transform: none; }
}
