/* =========================================================
   Contact Form Page — 初乐科技「申请网站诊断」
   设计来源：Figma「网站geo」- 表单页 (node 88-12, 1280 宽)
   色值与字号均取自设计稿实测值
   前缀 .cf-  避免与站点公共样式冲突
   ========================================================= */

:root {
    --cf-navy: #0A2540;          /* Hero 背景 / 标题 / 正文深色 */
    --cf-mint: #4EDEA3;          /* 统计数字 */
    --cf-muted: #DFE8FFB2;         /* 统计标签 */
    --cf-sub: #8FA5B8;           /* Hero 副标题 */
    --cf-accent: #0149D5;        /* 主色：按钮 / 标签 / 强调 */
    --cf-card-bg: #FFFFFF;
    --cf-section-bg: #F9F9FF;
    --cf-field-bg: #F0F2FF;
    --cf-placeholder: #A3ADBE;
    --cf-icon: #98A1B0;
    --cf-desc: #8A8F99;
    --cf-chip-bg: #F5F5F5;
    --cf-required: #F04438;
}

/* ---------- 容器 ---------- */
.cf-main {
    font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
        -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--cf-navy);
}

.cf-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Hero ---------- */
.cf-hero {
    padding: 80px 0 64px;
    background: var(--cf-navy);
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Hero 协议标签 */
.cf-hero-protocol {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 8px 18px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 1px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, .08);
    border-radius: 999px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.cf-hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cf-mint);
    display: inline-block;
    flex-shrink: 0;
}

/* 宽屏（>=1280px）：Hero 固定 576px 高，内容垂直居中 */
@media (min-width: 1280px) {
    .cf-hero {
        height: 576px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.cf-hero-title {
    max-width: 900px;
    margin: 0 auto 20px;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    color: #FFFFFF;
}

.cf-hero-sub {
    max-width: 720px;
    margin: 0 auto;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--cf-sub);
}

.cf-hero-stats {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.cf-stat {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.cf-stat-num {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cf-mint);
}
.cf-stat-num2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #FFFFFF;
}
.cf-stat-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--cf-muted);
}

/* ---------- 表单区 ---------- */
.cf-form-section {
    padding: 40px 0 80px;
    background: var(--cf-section-bg);
    position: relative;
    z-index: 2;
}

.cf-card {
    background: var(--cf-card-bg);
    border-radius: 24px;
    padding: 48px;
    position: relative;
}

/* 宽屏（>=1280px）：白色卡片向上浮，覆盖 Hero 底部边缘（上浮 48px） */
@media (min-width: 1280px) {
    .cf-card {
        margin-top: -64px;
        box-shadow: 0 16px 48px rgba(10, 37, 64, .12);
    }
}

/* 卡片头 */
.cf-card-head {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 36px;
    background: #F0F2FF;
    border-radius: 16px;
    padding: 28px 16px;
}

.cf-card-head-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.cf-protocol {
    margin-bottom: 14px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.8px;
    color: var(--cf-accent);
    text-transform: uppercase;
}

/* why-3 图标与协议标签紧挨一排 */
.cf-card-head-left img[src*="why-3"] {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.cf-card-head-left .cf-protocol {
    display: inline-flex;
    align-items: center;
}

.cf-card-title {
    flex: 0 0 100%;
}

.cf-card-desc {
    flex: 0 0 100%;
}

.cf-card-title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--cf-navy);
}

.cf-card-desc {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--cf-desc);
}

/* 状态胶囊 */
.cf-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--cf-mint);
    white-space: nowrap;
}

.cf-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cf-mint);
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(95, 215, 180, .2);
}

/* ---------- 表单字段 ---------- */
.cf-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 28px;
}

.cf-field {
    display: flex;
    flex-direction: column;
}

.cf-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--cf-navy);
}

.cf-required {
    margin-left: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cf-required);
}

/* 输入框 */
.cf-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cf-input,
.cf-select {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: var(--cf-navy);
    background: var(--cf-field-bg);
    border: 1px solid transparent;
    border-radius: 8px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.cf-select {
    padding-right: 42px;
    cursor: pointer;
}

.cf-input::placeholder {
    color: var(--cf-placeholder);
    opacity: 1;
}

.cf-input:focus,
.cf-select:focus {
    border-color: var(--cf-accent);
    box-shadow: 0 0 0 3px rgba(1, 73, 213, .1);
}

.cf-input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--cf-icon);
    pointer-events: none;
}

.cf-select-arrow {
    position: absolute;
    right: 14px;
    width: 16px;
    height: 16px;
    color: var(--cf-icon);
    pointer-events: none;
    transition: transform .2s ease;
}

.cf-select:focus + .cf-select-arrow {
    transform: rotate(180deg);
}

/* ---------- 提交按钮 ---------- */
.cf-submit-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.cf-privacy {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--cf-desc);
}

.cf-privacy-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--cf-mint);
}

.cf-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 82px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--cf-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.cf-submit svg {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

.cf-submit:hover {
    background: #013CBB;
}

.cf-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ---------- 蜜罐字段 / 提交提示 ---------- */
.cf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cf-form-msg {
    grid-column: 1 / -1;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.cf-form-msg:empty {
    display: none;
}

.cf-form-msg.is-ok {
    color: #0F9D58;
}

.cf-form-msg.is-err {
    color: var(--cf-required);
}

.cf-submit:hover svg {
    transform: translateX(3px);
}

.cf-submit:active {
    background: #0134A3;
}

.cf-submit:disabled {
    background: #9FB4E8;
    cursor: not-allowed;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .cf-hero {
        padding: 56px 0 44px;
    }
    .cf-hero-title {
        font-size: 30px;
    }
    .cf-hero-sub {
        font-size: 14px;
        line-height: 1.65;
    }
    .cf-hero-stats {
        flex-wrap: wrap;
        margin-top: 32px;
        gap: 20px 0;
    }
    .cf-stat {
        flex: 0 0 50%;
    }
    .cf-stat-num {
        font-size: 20px;
    }
    .cf-stat-label {
        font-size: 12px;
    }

    .cf-form-section {
        padding: 24px 0 56px;
    }
    .cf-card {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }
    .cf-card-head {
        flex-direction: column;
        gap: 14px;
        margin-bottom: 24px;
    }
    .cf-card-title {
        font-size: 22px;
    }
    .cf-card-desc {
        font-size: 14px;
    }
    .cf-form {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .cf-input,
    .cf-select {
        height: 46px;
    }
    .cf-submit {
        width: 100%;
        justify-content: center;
        height: 48px;
    }
}

@media (max-width: 420px) {
    .cf-hero-title {
        font-size: 26px;
    }
    .cf-card-title {
        font-size: 20px;
    }
    .cf-input,
    .cf-select {
        height: 44px;
    }
}
