/* MIMI 官网 — 简洁版（参考 telegram.org 的版式：顶部细导航、居中 Logo、右侧最新公告、设备截图、九宫格卖点、多列页脚） */
:root {
    --blue: #3f74fc;
    --blue-dark: #2c5fe0;
    --blue-soft: #eef3ff;
    --text: #222;
    --text-2: #4a5563;
    --muted: #8a94a3;
    --line: #e8eaef;
    --bg-soft: #f7f8fa;
    --wrap: 1000px;
    --radius: 12px;
}

/* 品牌字「MIMI」用圆体：Nunito 500（SIL OFL），只含 M/I/m/i 四个字形的子集，约 1KB；苹果设备优先用系统圆体 */
@font-face { font-family: "MIMI Rounded"; src: url("../fonts/mimi-rounded.woff2") format("woff2"); font-weight: 500; font-display: swap; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; }
.doc a, .art-body a, .faq a { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ===== 顶部导航 ===== */
.head {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
}
.head-in { display: flex; align-items: center; height: 56px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-family: "MIMI Rounded", ui-rounded, "SF Pro Rounded", sans-serif; font-weight: 500; font-size: 18px; letter-spacing: .8px; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; align-items: stretch; gap: 26px; margin: 0; padding: 0; list-style: none; height: 100%; }
.nav a { display: flex; align-items: center; height: 100%; font-size: 14px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; padding-top: 2px; }
.nav a:hover { text-decoration: none; color: var(--text); }
.nav a.on { color: var(--text); border-bottom-color: var(--text); }
.head-r { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.btn-get {
    display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
    border-radius: 16px; background: var(--blue); color: #fff !important; font-weight: 500; font-size: 13px;
}
.btn-get:hover { background: var(--blue-dark); text-decoration: none; }
.burger { display: none; margin-left: auto; width: 40px; height: 40px; border: 0; background: none; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger span + span { margin-top: 6px; }
.head.open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.head.open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ===== 首页 Hero ===== */
.hero { padding: 64px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1fr minmax(0, 420px) 1fr; align-items: center; }
.hero-main { grid-column: 2; text-align: center; }
.hero-icon { width: 104px; height: 104px; border-radius: 24px; margin: 0 auto; box-shadow: 0 8px 24px rgba(63, 116, 252, .25); }
.hero h1 { margin-top: 18px; font-family: "MIMI Rounded", ui-rounded, "SF Pro Rounded", sans-serif; font-size: 42px; font-weight: 500; letter-spacing: 2px; }
.hero .tagline { margin-top: 6px; font-size: 19px; font-weight: 300; color: var(--text-2); letter-spacing: 2px; }
.hero .sub { margin-top: 10px; font-size: 14px; color: var(--muted); }
/* 动态 Logo：进场时背景弹出 → 「m」两笔依次写出 → 「i」竖笔上提 → 圆点落下回弹；之后每 6 秒圆点轻跳 + 一道高光扫过。悬停/点击重播（mimi.js） */
.logo-anim { display: block; overflow: hidden; animation: lg-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; cursor: pointer; }
.logo-anim .lg-s { stroke-dasharray: 1 1.2; stroke-dashoffset: 1.1; animation: lg-draw .5s cubic-bezier(.55, .1, .35, 1) forwards; }
.logo-anim .lg-m1 { animation-delay: .25s; }
.logo-anim .lg-m2 { animation-delay: .62s; animation-duration: .4s; }
.logo-anim .lg-i { animation-delay: .9s; animation-duration: .28s; }
.logo-anim .lg-dot { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; animation: lg-drop .6s cubic-bezier(.3, 0, .3, 1) 1.12s forwards, lg-hop 6s ease-in-out 3s infinite; }
.logo-anim .lg-shine { animation: lg-shine 6s ease-in-out 1.6s infinite; }
@keyframes lg-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-drop {
    0% { opacity: 0; transform: translateY(-46px); }
    35% { opacity: 1; transform: translateY(0) scale(1.15, .8); }
    55% { opacity: 1; transform: translateY(-12px) scale(.95, 1.06); }
    75% { opacity: 1; transform: translateY(0) scale(1.06, .94); }
    100% { opacity: 1; transform: none; }
}
@keyframes lg-hop {
    0%, 82%, 100% { opacity: 1; transform: none; }
    87% { opacity: 1; transform: translateY(-16px) scale(.94, 1.08); }
    92% { opacity: 1; transform: translateY(0) scale(1.1, .88); }
    96% { opacity: 1; transform: translateY(-4px); }
}
@keyframes lg-shine { 0%, 70% { transform: translateX(0); } 100% { transform: translateX(420px); } }
@media (prefers-reduced-motion: reduce) {
    .logo-anim, .logo-anim .lg-s, .logo-anim .lg-dot, .logo-anim .lg-shine { animation: none !important; }
    .logo-anim .lg-s { stroke-dashoffset: 0; }
    .logo-anim .lg-dot { opacity: 1; }
}
.news { grid-column: 3; justify-self: start; margin-left: 40px; padding-left: 20px; border-left: 2px solid #d5d9e0; max-width: 260px; }
.news h4 { font-size: 15px; color: var(--text); margin-bottom: 10px; }
.news ul { list-style: none; margin: 0; padding: 0; }
.news li { margin-bottom: 12px; }
.news time { display: block; font-size: 12px; color: var(--muted); }
.news li a { font-size: 13px; line-height: 1.45; display: block; color: var(--text); }
.news .all { font-size: 13px; color: var(--text-2); }
.news .empty { font-size: 13px; color: var(--muted); }

/* ===== 设备截图 ===== */
.devices { padding: 36px 0 20px; }
.device-row { display: flex; justify-content: center; gap: 70px; flex-wrap: wrap; }
.pair { position: relative; display: flex; align-items: flex-end; }
.phone {
    width: 200px; border-radius: 30px; overflow: hidden;
    border: 6px solid #1c1d21; background: #1c1d21;
    box-shadow: 0 18px 40px rgba(20, 30, 60, .18);
}
.phone img { width: 100%; height: auto; border-radius: 24px; }
.pair .phone + .phone { margin-left: -46px; transform: translateY(-26px); }
.pair .phone:first-child { width: 180px; z-index: 1; }
.pair .phone:last-child { z-index: 2; }
.get-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px 52px; margin-top: 44px; }
.get-row a { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; }
.get-row a img { width: 32px; height: 32px; }

/* ===== 为什么选择（卡片式：浅灰圆角卡 + 渐变底双色图标，内容居中；电脑一行 4 张、≤900px 两列） ===== */
.why { padding: 72px 0 80px; }
.why h2 { text-align: center; font-size: 28px; }
.why-sub { text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.why-item { background: #f6f7f9; border-radius: 20px; padding: 30px 20px; text-align: center; transition: transform .2s, box-shadow .2s; }
.why-item:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20, 30, 60, .08); }
.why-ic {
    display: flex; width: 48px; height: 48px; margin: 0 auto; border-radius: 14px; align-items: center; justify-content: center;
    background: linear-gradient(to bottom left, #00d6f5, #1b9efa 52%, #346dff);
    box-shadow: 0 6px 14px rgba(36, 120, 250, .26), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.why-ic svg { width: 26px; height: 26px; }
.why-item h3 { font-size: 17px; margin-top: 20px; }
.why-item p { font-size: 14px; color: var(--text-2); margin-top: 4px; line-height: 1.6; text-wrap: pretty; }

/* ===== 子页通用 ===== */
.page { padding: 44px 0 72px; }
.page .wrap { max-width: 780px; }
.page h1 { font-size: 30px; margin-bottom: 10px; }
.page .lead { font-size: 16px; color: var(--text-2); margin-bottom: 28px; }
.page .meta { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.crumb { font-size: 13px; margin-bottom: 18px; color: var(--muted); }
.crumb a { color: var(--muted); }

/* 文档（协议 / 隐私） */
.doc h2 { font-size: 19px; margin: 34px 0 12px; }
.doc h3 { font-size: 16px; margin: 20px 0 8px; }
.doc p, .doc li { font-size: 15px; color: var(--text-2); line-height: 1.8; }
.doc p + p { margin-top: 8px; }
.doc ul, .doc ol { padding-left: 22px; margin: 8px 0; }
.doc strong { color: var(--text); }
.doc section:first-child h2 { margin-top: 0; }

/* 常见问题 */
.faq-toc { background: var(--bg-soft); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 36px; }
.faq-toc h4 { font-size: 14px; color: var(--text); margin: 14px 0 6px; }
.faq-toc h4:first-child { margin-top: 0; }
.faq-toc ul { list-style: none; margin: 0; padding: 0; }
.faq-toc li { font-size: 14px; line-height: 1.9; }
.faq h2 { font-size: 21px; margin: 40px 0 6px; padding-top: 8px; }
.faq h3 { font-size: 16px; margin: 22px 0 6px; scroll-margin-top: 72px; }
.faq p { color: var(--text-2); }

/* 下载页 */
.dl-group { margin-top: 34px; }
.dl-group > h2 { font-size: 15px; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dl-card {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 80px;
}
.dl-card img { width: 56px; height: 56px; flex: none; }
.dl-card h3 { font-size: 17px; }
.dl-card p { font-size: 13px; color: var(--muted); }
.dl-card .pill {
    margin-left: auto; flex: none; font-size: 12px; color: var(--muted);
    background: var(--bg-soft); border-radius: 14px; padding: 4px 12px;
}
.dl-card .pill.go { background: var(--blue); color: #fff; }
.dl-shots { display: flex; justify-content: center; gap: 18px; margin: 8px 0 6px; flex-wrap: wrap; }
.dl-shots .phone { width: 168px; border-radius: 26px; border-width: 5px; }
.dl-shots .phone img { border-radius: 21px; }
.note { margin-top: 26px; font-size: 13px; color: var(--muted); }

/* 公告列表 */
.an-list { border-top: 1px solid var(--line); }
.an-row { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); color: inherit; }
.an-row:hover { text-decoration: none; }
.an-row:hover h3 { text-decoration: underline; }
.an-row .m { flex: 1; min-width: 0; }
.an-row h3 { font-size: 17px; color: var(--text); }
.an-row p { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.an-row time { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.an-row img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; }
.an-row .pin { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--text); border-radius: 4px; padding: 1px 6px; margin-right: 8px; vertical-align: 2px; }
.an-sec { font-size: 13px; color: var(--muted); padding: 18px 0 4px; }
.an-msg { padding: 60px 0; text-align: center; color: var(--muted); }
.an-more { display: block; margin: 24px auto 0; padding: 8px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--text-2); font-size: 14px; cursor: pointer; }
.an-more[disabled] { color: var(--muted); cursor: default; }

/* 公告详情（结构由 announcement.js 的 renderDetail 输出） */
.art-title { font-size: 28px; }
.art-sub { font-size: 16px; color: var(--text-2); margin-top: 8px; }
.art-date { font-size: 13px; color: var(--muted); margin-top: 8px; }
.art-fig { margin: 22px auto; }
.art-fig img { width: 100%; height: auto; border-radius: 10px; margin: 0 auto; }
.art-fig figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.art-body { margin-top: 18px; }
.art-body p { color: var(--text-2); line-height: 1.85; margin: 12px 0; }
.art-body h1, .art-body h2, .art-body h3 { margin: 26px 0 10px; }
.art-body h2 { font-size: 20px; }
.art-body h3 { font-size: 17px; }
.art-sign { margin-top: 30px; text-align: right; font-size: 14px; color: var(--muted); }
.cta-box {
    display: flex; align-items: center; gap: 14px; margin-top: 44px; padding: 18px 20px;
    background: var(--bg-soft); border-radius: var(--radius);
}
.cta-box img { width: 48px; height: 48px; border-radius: 12px; }
.cta-box b { display: block; font-size: 16px; }
.cta-box span { font-size: 13px; color: var(--muted); }
.cta-box .btn-get { margin-left: auto; }

/* ===== 页脚 ===== */
.foot { background: #fff; border-top: 1px solid var(--line); padding: 44px 0 28px; font-size: 13px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.foot h5 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { line-height: 2; }
.foot li a { color: var(--text-2); }
.foot li a:hover { color: var(--text); }
.foot .about p { color: var(--muted); max-width: 300px; margin-top: 8px; line-height: 1.7; }
.foot .brand { font-size: 15px; }
.foot .brand img { width: 24px; height: 24px; border-radius: 6px; }
.foot-copy { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 6px 18px; }
.foot-copy a { color: var(--muted); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-main, .news { grid-column: 1; }
    .news { justify-self: center; margin: 36px 0 0; max-width: 420px; width: 100%; }
    .device-row { gap: 40px; }
    .why-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    body { font-size: 15px; }
    .head-in { gap: 0; }
    .burger { display: block; }
    .nav, .head-r { display: none; }
    .head.open .nav {
        display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 56px; height: auto;
        background: #fff; border-bottom: 1px solid var(--line); padding: 6px 20px 14px; gap: 0;
    }
    .head.open .nav a { height: 46px; border-bottom: 1px solid var(--line); font-size: 15px; padding-top: 0; }
    .head.open .nav li:last-child a { border-bottom: 0; }
    .head.open .nav a.on { border-bottom-color: var(--line); }
    .hero { padding: 40px 0 10px; }
    .hero-icon { width: 84px; height: 84px; border-radius: 20px; }
    .hero h1 { font-size: 34px; }
    .hero .tagline { font-size: 17px; }
    .phone { width: 160px; border-radius: 24px; border-width: 5px; }
    .phone img { border-radius: 19px; }
    .pair .phone:first-child { width: 142px; }
    .pair .phone + .phone { margin-left: -38px; transform: translateY(-20px); }
    .pair-b { display: none; }
    .get-row { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 26px 76px; justify-items: start; margin: 40px auto 0; }
    .get-row a { font-size: 17px; }
    .get-row a img { width: 30px; height: 30px; }
    .why { padding: 44px 0 48px; }
    .why h2 { font-size: 22px; }
    .why-grid { gap: 10px; margin-top: 26px; }
    .why-item { border-radius: 18px; padding: 20px 12px; }
    .why-item:hover { transform: none; box-shadow: none; }
    .why-ic { width: 42px; height: 42px; border-radius: 13px; }
    .why-ic svg { width: 24px; height: 24px; }
    .why-item h3 { font-size: 15px; margin-top: 14px; }
    .why-item p { font-size: 13px; line-height: 1.55; }
    .page { padding: 30px 0 52px; }
    .page h1 { font-size: 25px; }
    .dl-grid { grid-template-columns: 1fr; }
    .dl-shots { gap: 14px; }
    .dl-shots .phone { width: 140px; }
    .dl-shots .phone:nth-child(3) { display: none; }
    .an-row img { width: 72px; height: 72px; }
    .art-title { font-size: 23px; }
    .cta-box { flex-wrap: wrap; }
    /* 链接区左右距屏幕边缘 20px（即页面内边距）：「关于」贴左、「下载」贴右，「联系我们」另起一行居左 */
    .foot-grid { grid-template-columns: auto auto; justify-content: space-between; gap: 24px 40px; }
    .foot .about, .foot-grid > div:last-child { grid-column: 1 / -1; }
    .foot .about { text-align: center; }
    .foot .about .brand { justify-content: center; }
    .foot .about p { max-width: none; font-size: 14px; }
    .foot { font-size: 15px; }
    .foot h5 { font-size: 15px; margin-bottom: 12px; }
    .foot .brand { font-size: 17px; }
    .foot .brand img { width: 28px; height: 28px; border-radius: 7px; }
    .foot-copy { font-size: 13px; }
}
