/* =============================================================
 * base.css — 设计令牌 / 样式重置 / 基础排版 / 通用组件
 * Aiums 产品官网（参考 Shopify 风格的绿色增长系视觉语言）
 * 所有页面共用本文件；页面级样式见 header/footer/home/inner.css
 * ============================================================= */

/* ---------- 设计令牌（集中维护，全站换肤只改这里） ---------- */
:root {
    /* 品牌绿 */
    --c-primary: #0e9f6e;
    --c-primary-hover: #0a8a5f;
    --c-primary-active: #066b4a;
    --c-primary-50: #e9f8f2;
    --c-primary-100: #cdf0e1;
    --c-primary-200: #a7e3cb;

    /* 墨色 / 文本 */
    --c-ink: #101a1f;
    --c-heading: #13222a;
    --c-body: #465863;
    --c-muted: #70838e;
    --c-caption: #8b9aa3;

    /* 线 / 背景 */
    --c-line: #e6ebef;
    --c-line-strong: #d4dde2;
    --c-bg: #ffffff;
    --c-bg-soft: #f6f9f8;
    --c-bg-muted: #f1f5f4;
    --c-dark: #0b1f26;
    --c-dark-2: #10302b;

    /* 强调色 */
    --c-gold: #f5a623;
    --c-gold-soft: #fff5e3;
    --c-red: #e5484d;
    --c-blue: #2f7de1;

    /* 圆角 */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 26px;
    --r-pill: 999px;

    /* 阴影 */
    --sh-xs: 0 1px 2px rgba(16, 26, 31, 0.05);
    --sh-sm: 0 2px 8px rgba(16, 26, 31, 0.06);
    --sh-md: 0 10px 30px rgba(16, 26, 31, 0.10);
    --sh-lg: 0 24px 60px rgba(16, 26, 31, 0.14);
    --sh-green: 0 12px 28px rgba(14, 159, 110, 0.28);

    /* 排版 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

    /* 布局尺寸 */
    --container: 1180px;
    --header-h: 72px;
    --announce-h: 40px;
}

/* ---------- 样式重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* 锚点跳转时预留固定头部高度 */
    scroll-padding-top: calc(var(--header-h) + 16px);
    /* 切断抽屉等离屏元素造成的横向溢出；clip 不产生滚动容器，不影响 sticky/抽屉
       （老浏览器降级为 hidden） */
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-body);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img, svg, video {
    max-width: 100%;
    vertical-align: middle;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button { cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

::selection {
    background: var(--c-primary-200);
    color: var(--c-primary-active);
}

/* ---------- 通用容器 ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 92px 0;
}

.section--soft { background: var(--c-bg-soft); }
.section--dark {
    background: linear-gradient(160deg, var(--c-dark) 0%, var(--c-dark-2) 100%);
    color: #cfe3dc;
}

/* ---------- 通用标题排版 ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-primary);
    margin-bottom: 14px;
}

.section-head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-head--left {
    margin-left: 0;
    text-align: left;
}

.section-title {
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.25;
    font-weight: 800;
    color: var(--c-heading);
    letter-spacing: -0.01em;
}

.section-desc {
    margin-top: 16px;
    font-size: 17px;
    color: var(--c-muted);
}

.section--dark .section-title { color: #fff; }
.section--dark .section-desc { color: #9bbcb2; }
.section--dark .eyebrow { color: #5fd9a7; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease,
        background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn--lg { padding: 16px 36px; font-size: 16px; }
.btn--sm { padding: 9px 20px; font-size: 14px; }
.btn--block { width: 100%; }

.btn-primary {
    background: var(--c-primary);
    color: #fff;
    box-shadow: var(--sh-green);
}
.btn-primary:hover {
    background: var(--c-primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(14, 159, 110, 0.34);
}
.btn-primary:active { background: var(--c-primary-active); transform: translateY(0); }

.btn-dark {
    background: var(--c-ink);
    color: #fff;
}
.btn-dark:hover { background: #22313a; color: #fff; transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    border-color: var(--c-line-strong);
    color: var(--c-heading);
}
.btn-outline:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background: var(--c-primary-50);
}

.btn-light {
    background: #fff;
    color: var(--c-primary-active);
}
.btn-light:hover { background: var(--c-primary-50); color: var(--c-primary-active); transform: translateY(-2px); }

.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); color: #fff; }

.btn .icon { width: 18px; height: 18px; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--r-pill);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.badge--green { background: var(--c-primary-50); color: var(--c-primary-active); }
.badge--gold { background: var(--c-gold-soft); color: #b57100; }
.badge--soft { background: var(--c-bg-muted); color: var(--c-body); }
.badge--outline { border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; }

/* ---------- 图标（SVG 精灵引用） ---------- */
.icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ---------- 通用勾选清单 ---------- */
.check-list { display: grid; gap: 12px; }
.check-list li {
    position: relative;
    padding-left: 32px;
    font-size: 15px;
    color: var(--c-body);
}
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--c-primary-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e9f6e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.check-list--light li { color: #cfe3dc; }
.check-list--light li::before {
    background-color: rgba(95, 217, 167, 0.16);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235fd9a7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---------- 滚动渐显动画（默认隐藏，JS 加 .is-visible） ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
/* 用户开启“减少动态效果”时直接显示 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 通用文本工具 ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--c-muted); }
.mt-0 { margin-top: 0 !important; }

/* ---------- Toast 全局轻提示 ---------- */
.toast-container {
    position: fixed;
    top: 88px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    max-width: 90vw;
    padding: 12px 20px;
    border-radius: var(--r-md);
    background: var(--c-ink);
    color: #fff;
    font-size: 14px;
    box-shadow: var(--sh-lg);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hiding { opacity: 0; transform: translateY(-12px); }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast-success .toast-icon { color: #5fd9a7; }
.toast-error .toast-icon { color: #ff8b8f; }
.toast-warning .toast-icon { color: #ffcf7a; }
.toast-info .toast-icon { color: #8cc4ff; }

/* ---------- PWA 安装悬浮按钮（由 pwa.js 动态创建） ---------- */
.pwa-install-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9950;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px 11px 14px;
    border: none;
    border-radius: var(--r-pill);
    background: var(--c-ink);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: var(--sh-lg);
    cursor: pointer;
    animation: pwa-btn-in 0.35s ease;
}
.pwa-install-btn:hover { background: #22313a; }
.pwa-install-btn .pwa-install-close {
    margin-left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 14px;
    line-height: 17px;
    text-align: center;
}
@keyframes pwa-btn-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 工具类 ==================== */
/* 初始隐藏态：JS 可通过 element.style.display 覆盖（不加 !important） */
.u-hidden { display: none; }
