/* ==========================================================================
   官网配色规范 · 红色主色版
   基于 Logo 四色取样：1 主色 + 3 辅助色 + 中性色阶
   使用比例：主红 60-70% / 品牌蓝 ≤15% / 品红·草绿各 ≤10% / 其余中性色
   大面积留白保持浅色通透，主红只在关键处出现，辅助色作点缀
   ========================================================================== */

:root {
    /* 主色 · 品牌红 */
    --brand-50: #FDECEC;
    --brand-100: #FBD0D3;
    --brand-200: #F7A4AA;
    --brand-500: #F65E6B;
    --brand-600: #E24350;
    --brand-800: #B22A37;
    --brand: var(--brand-500);

    /* 辅助色 */
    --brand-blue: #00A1EF;
    --brand-magenta: #E60084;
    --brand-green: #ADCD20;
    --brand-pink: #FFBFE4;

    /* 中性色 */
    --ink: #1E2A32;
    --text: #5A6B76;
    --bg: #F5FAFD;
    /* 分隔线/卡片边界：浅，用于大面积分隔 */
    --line: #E2ECF2;
    /* 可交互元素边界：按钮、输入框、筛选项，需明显可见 */
    --line-strong: #BCCFDB;

    /* 语义映射：常规字号的白字按钮用 600，需达 WCAG AA 的小字用 800 */
    --btn-bg: var(--brand-600);
    --btn-bg-hover: var(--brand-800);
    --link: var(--brand-600);

    /* 版式 */
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(30, 42, 50, .06);
    --shadow: 0 8px 24px rgba(30, 42, 50, .08);
    --shadow-lg: 0 16px 48px rgba(30, 42, 50, .10);
    --maxw: 1180px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 基础 ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    /* 纵向弹性布局：内容不足一屏时页脚贴底，避免页面底部露出白条 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.01em;
}

p {
    margin: 0;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color .2s var(--ease);
}

a:hover {
    color: var(--brand-800);
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

code,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---------- 布局 ---------- */

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 96px 0;
}

.section--bg {
    background: var(--bg);
}

/* 浅粉强调底：用于需要拉开的区块，保持通透不压主色 */
.section--tint {
    background: linear-gradient(180deg, #FFF6F6 0%, #FFFFFF 100%);
}

.section--tight {
    padding: 64px 0;
}

.sec-head {
    max-width: 720px;
    margin: 0 0 56px;
}

.sec-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.sec-title {
    margin-bottom: 18px;
    font-size: 34px;
}

.sec-desc {
    color: var(--text);
    font-size: 17px;
    line-height: 1.8;
}

/* ---------- 按钮 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease),
        border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.btn--primary {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: #fff;
    box-shadow: 0 4px 14px -6px rgba(226, 67, 80, .5);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -8px rgba(226, 67, 80, .55);
}

.btn--ghost {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn--ghost:hover {
    border-color: var(--brand-500);
    color: var(--brand-600);
}

.btn--sm {
    height: 38px;
    padding: 0 18px;
    font-size: 14px;
}

.btn--lg {
    height: 52px;
    padding: 0 34px;
    font-size: 16px;
}

/* ---------- 卡片 ---------- */

.card {
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(30, 42, 50, .04);
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease),
        transform .25s var(--ease);
}

.card:hover {
    border-color: var(--brand-200);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* ---------- 标签 ---------- */

.tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    line-height: 1;
}

.tag--red {
    background: var(--brand-50);
    color: var(--brand-800);
}

.tag--blue {
    background: rgba(0, 161, 239, .1);
    color: #0479b3;
}

.tag--green {
    background: rgba(173, 205, 32, .16);
    color: #6b7f0c;
}

.tag--magenta {
    background: rgba(230, 0, 132, .09);
    color: #b3006a;
}

/* ---------- 页头导航 ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(12px);
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: 40px;
    height: 68px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.nav__logo:hover {
    color: var(--ink);
}

/* 品牌 logo 为正方形白底图，圆角后与文字基线对齐 */
.nav__logo-img {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    display: block;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-right: auto;
}

.nav__link {
    position: relative;
    color: var(--text);
    font-size: 15px;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--ink);
}

/* 下划线从中间向两侧展开，hover 与当前页共用同一套动画 */
.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    height: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .26s var(--ease);
}

.nav__link:hover::after,
.nav__link.is-active::after {
    transform: scaleX(1);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav__toggle {
    display: none;
}

/* ---------- 页脚 ---------- */

.footer {
    position: relative;
    /* 内容不足一屏时把页脚压到视口底部 */
    margin-top: auto;
    padding: 64px 0 32px;
    background: var(--bg);
    border-top: 1px solid var(--line);
}

/* 页脚顶部四色渐变条：呼应品牌 Logo 的四色取样 */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--brand-500) 0 25%,
            var(--brand-magenta) 25% 50%,
            var(--brand-green) 50% 75%,
            var(--brand-blue) 75% 100%);
}

.footer__top {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 48px;
}

.footer__brand-desc {
    max-width: 300px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.8;
}

/* 联系信息：标签固定宽度，值可换行，长地址不会被截断 */
.footer__contact {
    margin-top: 14px;
    max-width: 320px;
}

.footer__contact p {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13.5px;
    line-height: 1.7;
}

.footer__contact span {
    flex: none;
    color: #8c9aa4;
}

.footer__contact em {
    color: var(--text);
    font-style: normal;
    word-break: break-word;
}

.footer__col-title {
    margin-bottom: 16px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.footer__col li {
    margin-bottom: 10px;
}

.footer__col a {
    color: var(--text);
    font-size: 14px;
}

.footer__col a:hover {
    color: var(--brand-600);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    color: #8c9aa4;
    font-size: 13px;
}

.footer__bottom a {
    color: #8c9aa4;
}

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
    .section {
        padding: 72px 0;
    }

    .sec-title {
        font-size: 28px;
    }

    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .nav__inner {
        gap: 12px;
    }

    .nav__actions {
        margin-left: auto;
    }

    /* 移动端导航：折叠为下拉面板，靠 max-height + 位移 + 透明度做展开动画 */
    .nav__menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0 24px;
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 20px 32px -22px rgba(30, 42, 50, .35);
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        overflow: hidden;
        transition: max-height .34s var(--ease), opacity .22s var(--ease),
            transform .34s var(--ease), padding .34s var(--ease),
            visibility 0s linear .34s;
    }

    .nav__menu.is-open {
        max-height: 70vh;
        padding: 6px 24px 14px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: max-height .34s var(--ease), opacity .26s var(--ease),
            transform .34s var(--ease), padding .34s var(--ease),
            visibility 0s;
    }

    .nav__link {
        padding: 13px 2px;
        border-bottom: 1px solid var(--line);
    }

    .nav__link:last-child {
        border-bottom: 0;
    }

    .nav__link.is-active {
        color: var(--brand-600);
        font-weight: 500;
    }

    .nav__link.is-active::after {
        display: none;
    }

    .nav__toggle {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    .wrap {
        padding: 0 18px;
    }

    .section {
        padding: 56px 0;
    }

    .sec-title {
        font-size: 24px;
    }

    .footer__top {
        grid-template-columns: 1fr;
    }
}

/* ---------- 滚动交互效果 ---------- */

/* 吸顶导航滚动态：加投影并淡出分隔线 */
.nav.is-scrolled {
    border-bottom-color: transparent;
    box-shadow: 0 10px 26px -18px rgba(30, 42, 50, .42);
}

/* 滚动进场：仅在脚本就绪（html.js-reveal）后启用，
   无 JS 或用户偏好减弱动效时元素保持静态可见 */
.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .62s var(--ease), transform .62s var(--ease);
}

.js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}
