/* ============================================
   全局基础样式
   ============================================ */
:root {
    /* 主题色板 */
    --blue-deep: #0b2a6b;
    --blue-main: #1554c0;
    --blue-bright: #2f7bf6;
    --blue-grad: linear-gradient(135deg, #1e63d8 0%, #123a9e 100%);
    --blue-grad-rev: linear-gradient(135deg, #2f7bf6 0%, #1a4fc0 100%);
    --bg-light: #eef3fb;
    --text-dark: #16233f;
    --text-gray: #6b7a99;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 12px 32px rgba(17, 51, 130, 0.12);
    --font: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    width: min(1160px, 92%);
    margin: 0 auto;
}

/* ============================================
   按钮通用样式
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 45, 120, 0.25);
}

.btn--white {
    background: var(--white);
    color: var(--blue-main);
}

.btn--outline {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn--primary {
    background: var(--blue-grad-rev);
    color: var(--white);
}

.btn--pill {
    /* 参考设计稿：左浅右深的蓝色渐变胶囊按钮 */
    background: linear-gradient(90deg, #4a97ff 0%, #1e5fd6 100%);
    color: var(--white);
    border-radius: 999px;
    padding: 18px 70px;
    font-size: 18px;
    min-width: 340px;
    gap: 16px;
    box-shadow: 0 10px 26px rgba(46, 108, 223, 0.4);
}

.btn--block {
    width: 100%;
}

.btn__icon {
    font-size: 14px;
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(47, 123, 246, 0.35) 0%, transparent 55%),
        linear-gradient(135deg, #0d2f7a 0%, #0b2260 100%);
    color: var(--white);
    padding: 72px 0 88px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    /* 网格装饰背景 */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}

.hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    position: relative;
    z-index: 1;
}

.hero__badge {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 3px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.85);
}

/* PC 端显示英文徽标，隐藏中文徽标与标题分隔符 */
.badge-cn,
.hero__title-sep {
    display: none;
}

.hero__title {
    font-size: 40px;
    line-height: 1.35;
    margin-bottom: 18px;
}

.hero__title-light {
    font-weight: 600;
    background: linear-gradient(90deg, #9fc4ff, #5b93f5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__title-strong {
    font-weight: 700;
    color: #7db1ff;
}

.hero__sub {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 16px;
}

.hero__sub b {
    color: #ffd479;
    font-weight: 700;
}

.hero__divider {
    margin: 0 10px;
    opacity: 0.5;
}

.hero__tags {
    display: flex;
    gap: 26px;
    margin-bottom: 34px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.hero__tags li::before {
    content: '•';
    margin-right: 6px;
    color: #ffd479;
}

.hero__actions {
    display: flex;
    gap: 18px;
}

/* 行情装饰卡片 */
.hero__charts {
    position: relative;
    width: 420px;
    flex-shrink: 0;
    padding-bottom: 60px;
}

.quote-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    padding: 18px 20px;
    backdrop-filter: blur(6px);
}

.quote-card--main {
    position: relative;
    z-index: 2;
}

.quote-card--sub {
    position: absolute;
    right: -16px;
    bottom: 0;
    width: 70%;
    z-index: 3;
    background: rgba(13, 42, 100, 0.85);
}

.quote-card__head {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.quote-card__change.up {
    color: #ff6b6b;
}

.quote-card__change.down {
    color: #35d07f;
}

/* PC 端涨跌幅显示在顶部右侧，隐藏价格旁的涨跌幅 */
.quote-card__change--price {
    display: none;
}

/* 价格与涨跌幅同行容器 */
.quote-card__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 6px 0 12px;
}

.quote-card__price {
    font-size: 28px;
    font-weight: 700;
}

.quote-card__bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 90px;
}

.quote-card__bars i {
    flex: 1;
    border-radius: 2px 2px 0 0;
}

.quote-card__bars i:nth-child(3n+1) {
    background: #e05252;
}

.quote-card__bars i:nth-child(3n+2) {
    background: #35b877;
}

.quote-card__bars i:nth-child(3n) {
    background: #e08052;
}

/* 柱状图高度工具类：替代内联 style，兼容 CSP style-src 'self' 限制 */
.bar-h-30 { height: 30%; }

.bar-h-35 { height: 35%; }

.bar-h-40 { height: 40%; }

.bar-h-45 { height: 45%; }

.bar-h-50 { height: 50%; }

.bar-h-55 { height: 55%; }

.bar-h-60 { height: 60%; }

.bar-h-65 { height: 65%; }

.bar-h-70 { height: 70%; }

.bar-h-75 { height: 75%; }

.bar-h-80 { height: 80%; }

.bar-h-85 { height: 85%; }

.bar-h-90 { height: 90%; }

.hero__float-tag {
    position: absolute;
    top: -18px;
    right: 10px;
    background: var(--white);
    color: var(--blue-main);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 4;
}

/* ============================================
   客户权益区域
   ============================================ */
.benefits {
    padding: 72px 0;
    background: linear-gradient(180deg, #f6f9ff 0%, var(--bg-light) 100%);
}

.section-eyebrow {
    text-align: center;
    letter-spacing: 5px;
    font-size: 12px;
    color: var(--blue-bright);
    font-weight: 600;
    margin-bottom: 8px;
}

.section-title {
    text-align: center;
    font-size: 30px;
    margin-bottom: 44px;
    color: var(--blue-deep);
}

.benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 48px;
}

.benefit-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px 22px 22px;
    box-shadow: 0 4px 18px rgba(17, 51, 130, 0.08);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.benefit-card__num {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 30px;
    font-weight: 800;
    color: rgba(21, 84, 192, 0.12);
}

.benefit-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    font-size: 22px;
    margin-bottom: 14px;
}

.benefit-card__icon--red {
    background: #fdeeee;
}

.benefit-card__icon--blue {
    background: #e8f0fe;
}

.benefit-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.benefit-card p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.7;
}

.benefits__cta {
    text-align: center;
}

.benefits__tip {
    margin-top: 18px;
    font-size: 14px;
    color: var(--text-gray);
}

/* 提示文案中的高亮部分（"填写手机号"） */
.benefits__tip-hl {
    color: var(--blue-bright);
    font-weight: 600;
}

/* ============================================
   代理招募区域
   ============================================ */
.agent {
    padding: 24px 0 72px;
    background: var(--bg-light);
}

.agent__card {
    background: var(--blue-grad);
    border-radius: 18px;
    color: var(--white);
    padding: 48px 52px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
}

.agent__intro h2 {
    font-size: 26px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.agent__highlight {
    color: #8fc0ff;
}

.agent__intro p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 26px;
    line-height: 1.8;
}

.agent__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.agent__list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.agent__step {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.agent__list h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.agent__list h3 em {
    font-style: normal;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: 2px;
}

.agent__list p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

/* ============================================
   底部联系方式
   ============================================ */
.contact {
    background: linear-gradient(180deg, #eaf1fc 0%, #f2f6fd 100%);
    padding: 44px 0;
}

/* PC 端悬浮归位：观测外层 .contact（稳定占位），仅内层 .contact__inner 做 fixed，
   避免元素自身被钉在视口导致 IntersectionObserver 反复触发闪烁 */
@media (min-width: 993px) {
    .contact__inner.contact--docked {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        width: 100%;
        padding: 14px 20%;
        background: linear-gradient(180deg, #eaf1fc 0%, #f2f6fd 100%);
        border-top: 1px solid #dde7f6;
        box-shadow: 0 -6px 24px rgba(15, 42, 92, 0.12);
    }

    /* 悬浮态收紧排版：单行紧凑条，避免标题换行与描述挤压 */
    .contact__inner.contact--docked .contact__text {
        flex: 1;
        min-width: 0;
    }

    .contact__inner.contact--docked .contact__text h2 {
        font-size: 17px;
        margin-bottom: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .contact__inner.contact--docked .contact__text p {
        display: none;
    }

    .contact__inner.contact--docked .contact__form {
        gap: 10px;
    }

    .contact__inner.contact--docked .form-field--inline input {
        height: 46px;
    }

    .contact__inner.contact--docked .contact__form .btn {
        height: 46px;
        padding: 0 26px;
    }
}

.contact__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.contact__text h2 {
    font-size: 22px;
    color: var(--blue-deep);
    margin-bottom: 6px;
}

.contact__text p {
    font-size: 13px;
    color: var(--text-gray);
}

/* 内联表单：输入框与按钮同行 */
.contact__form {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

/* 输入框与按钮固定等高，避免两者高度不一致 */
.contact__form .form-field--inline input {
    height: 52px;
    padding: 0 14px;
}

.contact__form .btn {
    height: 52px;
    padding: 0 30px;
    flex-shrink: 0;
}

.form-field--inline {
    margin-bottom: 0;
    width: 180px;
}

.form-field--inline .form-error {
    position: absolute;
}

.form-field--inline {
    position: relative;
}

/* 提交成功提示占一行，不影响同行布局 */
.contact__form .form-success {
    position: absolute;
    left: 0;
    bottom: -28px;
    margin-top: 0;
    width: 100%;
    text-align: left;
}

.contact__privacy {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 14px;
    text-align: center;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    text-align: center;
    padding: 32px 0 36px;
    background: var(--white);
}

.footer__company {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.footer__risk {
    font-size: 12px;
    color: var(--text-gray);
}

/* ============================================
   弹窗表单
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 50, 0.6);
    backdrop-filter: blur(2px);
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: var(--white);
    border-radius: 16px;
    padding: 34px 32px 30px;
    box-shadow: 0 24px 64px rgba(8, 20, 50, 0.35);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 26px;
    color: var(--text-gray);
    line-height: 1;
}

.modal__close:hover {
    color: var(--text-dark);
}

.modal__title {
    font-size: 22px;
    color: var(--blue-deep);
    margin-bottom: 8px;
}

.modal__desc {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 22px;
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d4deef;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus {
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(47, 123, 246, 0.15);
}

.form-field input.is-invalid {
    border-color: #e05252;
    box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

.form-error {
    margin-top: 6px;
    font-size: 12px;
    color: #e05252;
}

.form-success {
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
    color: #1d9e5f;
    font-weight: 600;
}

/* 失败提示：同一元素复用，通过修饰类切为红色 */
.form-success--error {
    color: #e05252;
}

/* ============================================
   响应式：平板
   ============================================ */
@media (max-width: 992px) {
    .hero__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__charts {
        width: 100%;
        max-width: 480px;
    }

    .benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agent__card {
        grid-template-columns: 1fr;
        padding: 36px 30px;
    }
}

/* ============================================
   响应式：手机端
   ============================================ */
@media (max-width: 640px) {
    .hero {
        padding: 36px 0 12px;
    }

    /* 内容容器拍平，便于用 order 把行情卡片插到标签与按钮之间 */
    .hero__inner {
        gap: 0;
    }

    .hero__content {
        display: contents;
    }

    .hero__badge {
        order: 1;
        font-size: 11px;
        letter-spacing: 1px;
        padding: 5px 14px;
        margin-bottom: 18px;
        align-self: flex-start;
    }

    .badge-en {
        display: none;
    }

    .badge-cn {
        display: inline;
    }

    .hero__title {
        order: 2;
        font-size: 24px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    .hero__title-light {
        background: none;
        -webkit-background-clip: initial;
        background-clip: initial;
        color: var(--white);
        font-weight: 700;
    }

    .hero__title-sep {
        display: inline;
        margin: 0 2px;
    }

    .hero__title-strong {
        display: none;
    }

    .hero__sub {
        order: 3;
        font-size: 15px;
        font-weight: 600;
        color: var(--white);
        margin-bottom: 12px;
    }

    /* .hero__sub b {
        color: var(--white);
    } */

    .hero__tags {
        order: 4;
        gap: 16px;
        font-size: 13px;
        margin-bottom: 20px;
    }

    /* 行情卡片插入到标签与按钮之间（order: 5） */
    .hero__charts {
        order: 5;
        width: 100%;
        padding-bottom: 0;
        margin-bottom: 22px;
        display: flex;
        gap: 12px;
    }

    .quote-card {
        flex: 1;
        padding: 12px 14px;
        background: rgba(255, 255, 255, 0.1);
    }

    .quote-card--sub {
        position: static;
        width: auto;
        background: rgba(255, 255, 255, 0.1);
    }

    /* 手机端涨跌幅显示在价格旁，隐藏顶部右侧的涨跌幅 */
    .quote-card__head .quote-card__change--head {
        display: none;
    }

    .quote-card__change--price {
        display: inline;
        font-size: 12px;
        font-weight: 600;
    }

    .quote-card__row {
        margin: 4px 0 10px;
    }

    .quote-card__price {
        font-size: 20px;
    }

    .quote-card__bars {
        height: 48px;
    }

    /* 按钮：双卡下方横排等宽 */
    .hero__actions {
        order: 6;
        width: 100%;
        flex-direction: row;
        gap: 12px;
    }

    .hero__actions .btn {
        flex: 1;
        padding: 14px 8px;
        font-size: 15px;
    }

    .hero__float-tag {
        display: none;
    }

    .section-title {
        font-size: 23px;
        margin-bottom: 30px;
    }

    .benefits {
        padding: 24px 0 0px;
    }

    .benefits__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin-bottom: 24px;
    }
    .contact__text p{
        font-size: 12px;
    }
    .agent__card{
        gap: 16px;
    }
    .agent__intro p{
        margin-bottom: 16px;
    }

    .benefit-card {
        padding: 18px 14px 16px;
    }

    .benefit-card__num {
        font-size: 22px;
        top: 12px;
        right: 14px;
    }

    .benefit-card__icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .benefit-card h3 {
        font-size: 15px;
    }

    .benefit-card p {
        font-size: 12px;
    }

    .btn--pill {
        width: 100%;
        min-width: 0;
        padding: 15px 20px;
        font-size: 17px;
        gap: 12px;
    }

    .agent__card {
        border-radius: 14px;
        padding: 28px 22px;
    }

    .agent__intro h2 {
        font-size: 21px;
    }

    /* 手机端压缩区块间距，避免代理招募与联系方式之间空隙过大 */
    .agent {
        padding-bottom: 36px;
    }

    .contact {
        padding: 8px 0 40px;
    }

    .contact__inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 20px;
    }

    .contact__text h2 {
        font-size: 18px;
    }

    /* 手机端：按设计稿仅保留手机号输入 + 提交按钮 */
    .contact__form {
        flex-direction: row;
        gap: 10px;
    }

    .contact__form .form-field--inline:nth-of-type(1) {
        /* 手机端隐藏称呼输入框，与设计稿 2 一致 */
        display: none;
    }

    .form-field--inline {
        width: auto;
        flex: 1;
    }

    /* 输入框与按钮等高，尺寸对齐 */
    .contact__form .form-field--inline input {
        height: 48px;
        padding: 0 14px;
    }

    .contact__form .btn {
        height: 48px;
        padding: 0 22px;
        font-size: 15px;
        flex-shrink: 0;
    }

    .modal__dialog {
        padding: 26px 22px 24px;
    }
}
