/* ================== 基础变量 & 重置 ================== */
:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-dark: #0f1e3d;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-border: #e2e8f0;
    --color-bg-light: #f5f7fb;
    --color-white: #ffffff;
    --hero-gradient: linear-gradient(120deg, #fde68a 0%, #fbcfe8 35%, #f5d0fe 55%, #fde68a 100%);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 10px 30px rgba(15, 30, 61, .08);
    --header-height: 72px;
    --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ================== 按钮 ================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s ease;
    cursor: pointer;
    line-height: 1.4;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-lg { padding: 12px 34px; font-size: 15px; border-radius: var(--radius-sm); }

/* ================== 顶部导航 ================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: transparent;
    transition: background .25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
/* 首页顶部渐变背景跟随 */
.page-home .site-header:not(.scrolled),
.page-contact .site-header:not(.scrolled),
.page-legal .site-header:not(.scrolled) { background: transparent; }
/*.page-home .hero, .page-contact .contact-hero, .page-legal .legal-hero { padding-top: 0; }*/

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .5px; color: #0f172a; }

.main-nav { display: flex; gap: 28px; margin-left: auto; margin-right: 12px; }
.nav-link {
    font-size: 14px;
    color: var(--color-text);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color .2s;
}
.nav-link:hover, .nav-link.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
    width: 36px; height: 30px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--color-text);
}
.lang-switch:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-login { padding: 7px 18px; }

.nav-toggle {
    display: none;
    width: 36px; height: 30px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px;
    flex-direction: column;
    justify-content: space-between;
    /* 部分移动端浏览器（X5/旧版WebView）对 button 走原生渲染，内部 flex 失效，
       需重置 appearance 让 display:flex 生效 */
    -webkit-appearance: none;
    appearance: none;
}
/* span 为无内容空元素，显式给宽度兜底：即使 flex 失效，块级堆叠也能画出三条杠 */
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--color-text); border-radius: 2px; }

/* ================== Hero ================== */
.hero {
    /* 背景图来自 assets/u3.svg；#fcf1f8 为其边缘主色，作图片加载前的兜底色 */
    background: #fcf1f8 url("../assets/u3.svg") center / cover no-repeat;
    padding: 40px 0 80px;
    margin-top: calc(var(--header-height) * -1);
    padding-top: calc(var(--header-height) + 40px);
    overflow: hidden;
    position: relative;
}

/* 动态色彩流动：从 u3.svg 提取的粉(#f9a8d4)与淡金(#fce9b8)两团光斑 transform 漂移 */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 60vmax;
    height: 50vmax;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}
.hero::before {
    left: -10vmax;
    top: -5vmax;
    background: radial-gradient(circle, rgba(249, 168, 212, 0.8) 0%, rgba(249, 168, 212, 0) 62%);
    animation: blobDriftA 12s ease-in-out infinite;
}
.hero::after {
    right: -15vmax;
    bottom: -25vmax;
    background: radial-gradient(circle, rgba(245, 201, 85, 0.6) 0%, rgba(252, 233, 184, 0) 62%);
    animation: blobDriftB 17s ease-in-out infinite;
}

@keyframes blobDriftA {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(32vmax, 16vmax, 0) scale(1.2); }
}
@keyframes blobDriftB {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1.1); }
    50%      { transform: translate3d(-28vmax, -18vmax, 0) scale(.85); }
}

/* 尊重系统"减弱动态效果"设置：仅停用光斑，背景图保留 */
@media (prefers-reduced-motion: reduce) {
    .hero::before, .hero::after { animation: none; }
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    gap: 48px;
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: 52px;
    font-weight: 800;
    margin: 0 0 18px;
    letter-spacing: 2px;
    color: #0f172a;
}
.hero-subtitle {
    font-size: 17px;
    color: #334155;
    margin: 0;
}

/* Hero 产品视觉（CSS 模拟原型） */
.hero-mockup { position: relative; }
.hero-mockup-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    /*box-shadow: 0 20px 50px rgba(15, 23, 42, .0);*/
}

.hero-card {
    position: absolute;
    left: 4%;
    bottom: -30px;
    width: 200px;
    height: 130px;
    border-radius: 12px;
    background: linear-gradient(140deg, #1f2937, #111827);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .35);
}
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-chip { width: 30px; height: 22px; border-radius: 4px; background: linear-gradient(135deg, #fbbf24, #d97706); }
.card-brand { font-size: 12px; color: #f59e0b; letter-spacing: 1px; }
.card-bottom { font-size: 20px; font-weight: 700; letter-spacing: 2px; text-align: right; }

/* ================== Features ================== */
.features { padding: 40px 0; background: #fff; }
.feature-block { padding: 80px 0; }
.feature-block.bg-light { background: var(--color-bg-light); }
.feature-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.feature-text h2 {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #0f172a;
}
.feature-text p { font-size: 15px; color: var(--color-text-light); margin: 0; }

/* 视觉堆叠 */
.visual-stack { position: relative; height: 320px; display: flex; align-items: center; justify-content: center; }
.visual-card {
    position: absolute;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 20px;
}
.visual-img { position: absolute; border-radius: 10px; overflow: hidden; }

/* 特性 1：支付 */
.visual-pay::before {
    content: ""; position: absolute; left: 20%; top: 20%;
    width: 60%; height: 65%;
    background: #a7f3d0; border-radius: 10px; z-index: 0;
}
/*.visual-pay .visual-card-front {*/
/*    left: 12%; top: 18%; width: 45%; height: 60%; z-index: 2;*/
/*}*/
/*.visual-pay .img-money {*/
/*    right: 12%; top: 12%; width: 55%; height: 70%; z-index: 1;*/
/*    background: linear-gradient(135deg, #6b7280, #374151);*/
/*}*/
.check-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.check-item { display: flex; align-items: center; gap: 8px; }
.check { width: 14px; height: 14px; border-radius: 3px; background: #bfdbfe; display: inline-block; }
.bar { display: inline-block; height: 8px; background: #fcd34d; border-radius: 4px; width: 60%; }
.bar-long { width: 90%; }
.visual-btn {
    background: #d97706; color: #fff; text-align: center;
    padding: 6px 0; border-radius: 4px; font-size: 12px;
}

/* 特性 2：地图 */
.visual-fast::before {
    content: ""; position: absolute; right: 15%; bottom: 15%;
    width: 55%; height: 55%; background: #fde68a; border-radius: 10px; z-index: 0;
}
.visual-fast .visual-card-map {
    left: 15%; top: 15%; width: 55%; height: 60%; z-index: 2;
    background: #fff;
}
.map-dots {
    width: 100%; height: 100%;
    background:
        radial-gradient(circle at 20% 40%, #60a5fa 2px, transparent 3px),
        radial-gradient(circle at 40% 30%, #60a5fa 2px, transparent 3px),
        radial-gradient(circle at 60% 50%, #60a5fa 2px, transparent 3px),
        radial-gradient(circle at 75% 35%, #60a5fa 2px, transparent 3px),
        radial-gradient(circle at 30% 60%, #60a5fa 2px, transparent 3px),
        radial-gradient(circle at 55% 70%, #60a5fa 2px, transparent 3px),
        linear-gradient(180deg, #f1f5f9, #e2e8f0);
    background-size: 100% 100%;
    border-radius: 8px;
}
.visual-fast .img-globe {
    right: 10%; bottom: 10%; width: 55%; height: 65%; z-index: 1;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 60%, #f59e0b);
}

/* 特性 3：汇兑 */
.visual-fx::before {
    content: ""; position: absolute; left: 18%; top: 25%;
    width: 55%; height: 60%; background: #ddd6fe; border-radius: 10px; z-index: 0;
}
.visual-fx .visual-card-fx {
    left: 10%; top: 15%; width: 45%; height: 65%; z-index: 2;
}
.fx-line { height: 8px; background: #e2e8f0; border-radius: 4px; margin-bottom: 10px; }
.fx-line-1 { width: 90%; background: #c7d2fe; }
.fx-line-2 { width: 70%; }
.fx-line-3 { width: 80%; }
.fx-btn {
    background: #8b5cf6; color: #fff; text-align: center;
    padding: 8px 0; border-radius: 4px; font-size: 12px; margin-top: 18px;
}
.visual-fx .img-business {
    right: 10%; top: 25%; width: 55%; height: 60%; z-index: 1;
    background: linear-gradient(135deg, #94a3b8, #475569);
}

/* 装饰 */
.deco { position: absolute; pointer-events: none; }
.deco-dot { width: 14px; height: 14px; border-radius: 50%; background: #bfdbfe; }
.deco-dot.d1 { left: 8%; top: 12%; }
.deco-dot.d2 { right: 18%; top: 8%; width: 10px; height: 10px; }
.deco-dot.d3 { left: 10%; top: 18%; width: 10px; height: 10px; }
.deco-star { color: #a78bfa; font-size: 18px; }
.deco-star.s1 { left: 8%; top: 15%; }
.deco-star.s2 { right: 20%; top: 12%; }

/* ================== Partners ================== */
.partners {
    background: var(--color-dark);
    color: #fff;
    padding: 80px 0;
    /* 兜底：防止轮播轨道在部分浏览器上撑宽整个页面导致横向滑动 */
    overflow-x: hidden;
}
.partners-inner {
    display: grid;
    /* minmax(0,…) 允许轨道收缩：避免 grid 项 min-content 宽度（max-content 轮播轨道）撑爆视口 */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 60px;
    align-items: center;
}
.partners-text h2 { font-size: 28px; margin: 0 0 12px; font-weight: 700; }
.partners-text p { color: #94a3b8; margin: 0; }

/* 合作伙伴轮播：4 行，每行可视最多 6 个，整组无缝左右滚动 */
.partners-logos {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    /* 阻断子项 min-content 向 grid 轨道传递 */
    min-width: 0;
}
.partners-marquee {
    overflow: hidden;
    width: 100%;
    max-width: 604px; /* 6*84 + 5*20 ≈ 6 个可见 */
    margin: 0 auto;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: partnersMarquee 30s linear infinite;
}
.marquee-reverse .marquee-track { animation-direction: reverse; }
.partners-marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; }
.marquee-item {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    margin-right: 20px;
    background: #16335f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.marquee-item img { max-width: 100%; max-height: 100%; object-fit: contain; }

@keyframes partnersMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ================== CTA ================== */
.cta {
    background: var(--hero-gradient);
    padding: 80px 0;
    text-align: center;
}
.cta-inner h2 { font-size: 30px; font-weight: 700; margin: 0 0 10px; color: #0f172a; }
.cta-inner p { color: #334155; margin: 0 0 26px; }

/* ================== Footer ================== */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--color-border);
    padding: 30px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.brand-footer .brand-logo { width: 40px; height: 40px; }
.brand-footer .brand-name { font-size: 22px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a { color: var(--color-text-light); font-size: 14px; }
.footer-links a:hover { color: var(--color-primary); }
.copyright { color: var(--color-text-light); font-size: 13px; }

/* ================== 联系我们页 ================== */
.contact-hero {
    background: var(--hero-gradient);
    padding: calc(var(--header-height) + 40px) 0 40px;
    margin-top: calc(var(--header-height) * -1);
    text-align: center;
}
.page-title { font-size: 40px; font-weight: 800; margin: 0; color: #0f172a; letter-spacing: 2px; }

.contact-form-wrap {
    background: var(--hero-gradient);
    /*padding: 20px 0 80px;*/
    margin-top: -216px;
    padding: 236px 0 80px;
}
.contact-form {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    padding: 60px 70px;
    border-radius: 4px;
}
.form-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}
.form-label {
    text-align: right;
    color: var(--color-text-light);
    font-size: 14px;
    padding-top: 10px;
}
.form-label .req { color: #ef4444; font-style: normal; margin-left: 4px; }
.form-control { flex: 1; }
.form-control input,
.form-control textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.form-control textarea { resize: vertical; min-height: 110px; }
.form-control input:focus,
.form-control textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.form-control input.invalid,
.form-control textarea.invalid { border-color: #ef4444; }
.field-error {
    display: none;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}
.field-error.show { display: block; }
.form-actions { text-align: center; margin-top: 30px; }
.form-tip { text-align: center; color: #ef4444; font-size: 13px; margin-top: 12px; min-height: 20px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* 成功弹层 */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 200; }
.modal.show { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.modal-body {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px 44px;
    text-align: center;
    max-width: 420px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .2);
    animation: modalIn .25s ease;
}
@keyframes modalIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-icon {
    width: 56px; height: 56px; line-height: 56px;
    border-radius: 50%; background: #dcfce7; color: #16a34a;
    font-size: 28px; margin: 0 auto 14px;
}
.modal-body h3 { margin: 0 0 8px; font-size: 20px; }
.modal-body p { margin: 0 0 20px; color: var(--color-text-light); }

/* ================== 法务页 ================== */
.legal-hero {
    background: var(--hero-gradient);
    padding: calc(var(--header-height) + 40px) 0 40px;
    margin-top: calc(var(--header-height) * -1);
    text-align: center;
}
.legal-body { padding: 50px 0 80px; }
.legal-body .container { max-width: 860px; }
.legal-body h2 { font-size: 20px; margin: 28px 0 10px; color: #0f172a; }
.legal-body p { color: var(--color-text-light); margin: 0 0 10px; }

/* ================== 响应式 ================== */
@media (max-width: 992px) {
    .hero-inner, .feature-inner, .partners-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .hero-title { font-size: 40px; }
    .feature-text h2 { font-size: 26px; }
    .contact-form { padding: 40px 28px; }
    .form-row { grid-template-columns: 1fr; gap: 6px; }
    .form-label { text-align: left; padding-top: 0; }
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .main-nav.open {
        display: flex; flex-direction: column;
        position: absolute; top: var(--header-height); left: 0; right: 0;
        background: #fff; padding: 16px 24px; gap: 14px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
        z-index: 99;
    }
}
@media (max-width: 640px) {
    .hero { padding: calc(var(--header-height) + 20px) 0 60px; }
    .hero-title { font-size: 30px; letter-spacing: 1px; }
    .hero-subtitle { font-size: 14px; }
    .mockup-body { grid-template-columns: 1fr; }
    .cta-inner h2 { font-size: 22px; }
    .page-title { font-size: 28px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .visual-stack { height: 260px; }
    .contact-form { padding: 28px 18px; }
}
