/* Zerima 官网共用样式。只用系统字体与本地资源，不加载任何外部地址。 */

:root {
    --accent: #3a9fae;
    --accent-weak: rgba(58, 159, 174, 0.12);
    --grad: linear-gradient(120deg, #2bc6d3 0%, #4a86f7 55%, #7b5ce6 100%);
    --text: #1c2431;
    --text-2: #5b6575;
    --text-3: #8a93a3;
    --bg: #ffffff;
    --bg-2: #f5f7fa;
    --card: #ffffff;
    --line: #e6e9ef;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
    --radius: 18px;
    --max: 1080px;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --accent: #4fb7c6;
        --accent-weak: rgba(79, 183, 198, 0.16);
        --text: #f2f4f7;
        --text-2: #a9b1bf;
        --text-3: #7c8595;
        --bg: #0e1116;
        --bg-2: #151a21;
        --card: #1a2029;
        --line: #273040;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 18px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--text-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* 首页：主视觉 */
.hero {
    text-align: center;
    padding: 72px 0 48px;
}
.hero-icon {
    width: 128px;
    height: 128px;
    margin: 0 auto 24px;
    border-radius: 29px;
    box-shadow: var(--shadow);
}
.hero h1 {
    margin: 0;
    font-size: 48px;
    line-height: 1.15;
    letter-spacing: -0.5px;
}
.hero .subtitle {
    margin: 10px 0 0;
    font-size: 22px;
    font-weight: 600;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lead {
    max-width: 620px;
    margin: 18px auto 0;
    color: var(--text-2);
    font-size: 17px;
}
.hero .actions { margin-top: 30px; }
.hero .meta { margin-top: 14px; color: var(--text-3); font-size: 14px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    font-size: 15px;
}
.badge:hover { text-decoration: none; opacity: 0.9; }
.badge svg { width: 18px; height: 18px; fill: currentColor; }

/* 首页：功能 */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-2); }
.section h2 {
    margin: 0 0 8px;
    font-size: 32px;
    text-align: center;
}
.section .section-lead {
    margin: 0 auto 40px;
    max-width: 560px;
    text-align: center;
    color: var(--text-2);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
}
.feature .ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-weak);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; }
.feature ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-2);
    font-size: 15px;
}
.feature li + li { margin-top: 4px; }

.privacy-band {
    text-align: center;
}
.privacy-band p { max-width: 600px; margin: 0 auto; color: var(--text-2); }
.privacy-band .more { margin-top: 16px; }

/* 正文页 */
.doc {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 20px 80px;
}
.doc h1 { font-size: 34px; line-height: 1.25; margin: 0 0 8px; }
.doc .doc-meta { color: var(--text-3); font-size: 14px; margin: 0 0 28px; }
.doc h2 {
    font-size: 22px;
    margin: 40px 0 12px;
    padding-top: 8px;
}
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 6px;
}
.doc .callout {
    background: var(--accent-weak);
    border-radius: 14px;
    padding: 16px 20px;
    margin: 20px 0;
}
.doc .callout p { margin: 0; }
.doc .lang-switch { font-size: 14px; margin: 0 0 24px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }

.table-wrap { overflow-x: auto; margin: 16px 0; }
.doc table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.doc th, .doc td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.doc th { color: var(--text-2); font-weight: 600; white-space: nowrap; }

/* 页脚 */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 36px;
    color: var(--text-3);
    font-size: 13px;
}
.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
}
.site-footer a { color: var(--text-3); }
.site-footer a:hover { color: var(--text-2); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer .legal { line-height: 1.9; }
.site-footer .legal img { display: inline-block; vertical-align: -3px; margin-right: 4px; }

/* 窄屏 */
@media (max-width: 860px) {
    .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .nav { gap: 14px; font-size: 14px; }
    .nav .nav-home { display: none; }
    .hero { padding: 48px 0 32px; }
    .hero-icon { width: 104px; height: 104px; border-radius: 24px; }
    .hero h1 { font-size: 38px; }
    .hero .subtitle { font-size: 19px; }
    .features { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
    .section h2 { font-size: 26px; }
    .doc { padding-top: 36px; }
    .doc h1 { font-size: 28px; }
}

/* 首页：带设备边框的产品图展示 */
.showcase {
    position: relative;
    padding: 24px 0 40px;
    overflow: hidden;
}
.showcase::before {
    content: "";
    position: absolute;
    inset: 10% -20% auto;
    height: 70%;
    background: radial-gradient(closest-side, rgba(43, 198, 211, 0.18), transparent),
        radial-gradient(closest-side at 70% 60%, rgba(123, 92, 230, 0.14), transparent);
    pointer-events: none;
}
.showcase .wrap { position: relative; }
.device-wide { max-width: 920px; margin: 0 auto; }
.device-wide img, .story img { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(16, 24, 40, 0.18)); }
.device-caption { text-align: center; margin: 20px auto 0; max-width: 560px; }
.device-caption strong { display: block; font-size: 22px; }
.device-caption span { color: var(--text-2); }

.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    padding: 56px 0;
}
.story .phone { max-width: 300px; margin: 0 auto; }
.story .text h3 { margin: 0 0 12px; font-size: 30px; line-height: 1.3; }
.story .text p { margin: 0; color: var(--text-2); font-size: 17px; }
.story.reverse .phone { order: 2; }

@media (max-width: 760px) {
    .story, .story.reverse { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; text-align: center; }
    .story.reverse .phone { order: 0; }
    .story .phone { max-width: 240px; }
    .story .text h3 { font-size: 24px; }
    .device-caption strong { font-size: 19px; }
}

/* index2：深色首屏大图（左文字、右带边框 iPhone），不随浅色/深色模式变化 */
.hero2 {
    position: relative;
    overflow: hidden;
    color: #f2f4f7;
    background:
        radial-gradient(60% 70% at 15% 20%, rgba(43, 198, 211, 0.30), transparent 70%),
        radial-gradient(55% 65% at 85% 85%, rgba(123, 92, 230, 0.32), transparent 70%),
        radial-gradient(40% 50% at 55% 50%, rgba(74, 134, 247, 0.14), transparent 70%),
        linear-gradient(180deg, #141a24 0%, #0e1116 100%);
    padding: 88px 0 150px;
    /* 底部斜切直接裁剪首屏本身，避免叠加白色三角时在小数像素边缘露出细缝 */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 84px), 0 100%);
}
.hero2 .wrap {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    align-items: center;
    gap: 48px;
    position: relative;
    z-index: 1;
}
.hero2-icon { width: 72px; height: 72px; border-radius: 16px; margin-bottom: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.hero2 h1 { margin: 0; font-size: 56px; line-height: 1.1; letter-spacing: -0.5px; color: #fff; }
.hero2 .subtitle {
    margin: 12px 0 0;
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(120deg, #4fd6e0 0%, #7aa6ff 55%, #a48cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero2 .lead { margin: 18px 0 0; max-width: 470px; color: rgba(242, 244, 247, 0.78); font-size: 17px; text-wrap: pretty; }
.hero2 .actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero2 .badge { background: #fff; color: #0e1116; }
.hero2 .meta { color: rgba(242, 244, 247, 0.55); font-size: 14px; }
.hero2-points {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hero2-points li {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    color: rgba(242, 244, 247, 0.9);
}

/* 右侧：竖屏手机在后（左上），横屏手机在前（右下）压住竖屏，突出播放状态 */
.hero2-devices { position: relative; aspect-ratio: 1.18 / 1; }
.hero2-devices img { position: absolute; height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.45)); }
.hero2-devices .portrait { width: 34%; left: 2%; top: 0; z-index: 1; }
.hero2-devices .landscape { width: 100%; right: -6%; bottom: 2%; z-index: 2; }

@media (max-width: 900px) {
    .hero2 { padding: 56px 0 120px; }
    .hero2 .wrap { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero2-icon { margin-left: auto; margin-right: auto; }
    .hero2 .lead { margin-left: auto; margin-right: auto; }
    .hero2 .actions, .hero2-points { justify-content: center; }
    .hero2-devices { max-width: 520px; width: 100%; margin: 0 auto; }
    .hero2-devices { aspect-ratio: 1.3 / 1; }
    .hero2-devices .portrait { left: 0; top: 0; }
    .hero2-devices .landscape { width: 92%; right: 0; bottom: 0; }
}
@media (max-width: 600px) {
    .hero2 h1 { font-size: 42px; }
    .hero2 .subtitle { font-size: 20px; }
    .hero2 { padding-bottom: 80px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 44px), 0 100%); }
}

/* index3：首屏右侧只放一台横屏手机 */
.hero2--single .wrap { grid-template-columns: 1fr 1.25fr; }
.hero2--single .hero2-devices { aspect-ratio: auto; }
.hero2--single .hero2-devices::before {
    content: "";
    position: absolute;
    inset: -10% -6%;
    background: radial-gradient(closest-side, rgba(43, 198, 211, 0.28), transparent 75%);
    pointer-events: none;
}
.hero2--single .hero2-devices img.landscape {
    position: relative;
    display: block;
    width: 114%;
    max-width: none;
    top: auto;
    right: auto;
    bottom: auto;
}
@media (max-width: 900px) {
    .hero2--single .wrap { grid-template-columns: 1fr; }
    .hero2--single .hero2-devices { max-width: 560px; }
    .hero2--single .hero2-devices img.landscape { width: 100%; }
}
