/* ============================================================
   1. 首屏 Hero（Figma 560_2：1920 × 700）
   ============================================================ */
.first {
    position: relative;
    height: 7rem;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

/* 背景大图：入场缓慢回缩（Ken Burns），顶部品牌蓝压色保证 header 衔接 */
.first__bg {
    position: absolute;
    inset: 0;
    background: url("../assets/images/contact/contact.webp") center / cover no-repeat;
    animation: firstZoom 2.2s var(--ease-out) both;
    will-change: transform;
}

/* 底部轻压暗，保证标题/面包屑可读性 */
.first::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(3, 82, 141, 0.35) 0%,
            rgba(3, 82, 141, 0) 30%,
            rgba(0, 0, 0, 0) 62%,
            rgba(0, 0, 0, 0.32) 100%);
    pointer-events: none;
}

.first__content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 1.6rem 0.76rem;
}

/* ---------- 标题：遮罩上滑 + 字距收缩 ---------- */
.first__title {
    overflow: hidden;
    /* 遮罩：文字从下方滑入 */
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1.15;
    color: #ffffff;
}

.first__title span {
    display: inline-block;
    animation: firstTitleUp 0.9s var(--ease-out) 0.25s both;
}

/* ---------- 入场动效 ---------- */
@keyframes firstZoom {
    from {
        transform: scale(1.12);
    }

    to {
        transform: scale(1);
    }
}

@keyframes firstTitleUp {
    from {
        transform: translateY(110%);
        letter-spacing: 0.04rem;
        opacity: 0.4;
    }

    to {
        transform: translateY(0);
        letter-spacing: normal;
        opacity: 1;
    }
}

/* ============================================================
   2. 第二屏头部（Figma 644_1962 / 644_1963：标题 + 描述左右分布）
   ============================================================ */
.second {
    padding: 1rem 1.6rem;
    background-color: #F5F5F5;
}

.second__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.4rem;
}

/* ---------- 标题：遮罩上滑 + 字距收缩（Figma 644_1962：48px Poppins 600 #333） ---------- */
.second__title {
    overflow: hidden;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.35;
    color: #333333;
}

.second__title span {
    display: inline-block;
}

/* ---------- 描述（Figma 644_1963：16px Inter 400 #666，右对齐） ---------- */
.second__desc {
    font-size: 0.16rem;
    line-height: 1.6;
    color: #666666;
    text-align: right;
    flex-shrink: 0;
    width: 2.27rem;
}

/* ---------- 入场动效：标题遮罩上滑，描述淡入上移（错峰） ---------- */
.second__title[data-reveal] span {
    transform: translateY(110%);
    letter-spacing: 0.02rem;
}

.second__title[data-reveal].is-in-view span {
    transform: translateY(0);
    letter-spacing: normal;
    transition:
        transform 0.9s var(--ease-out),
        letter-spacing 0.9s var(--ease-out);
}

.second__desc[data-reveal] {
    opacity: 0;
    transform: translateY(0.3rem);
}

.second__desc[data-reveal].is-in-view {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.9s var(--ease-out) 0.15s,
        transform 0.9s var(--ease-out) 0.15s;
}

/* ============================================================
   3. 联系人卡片（Figma 885_732：1596×427 白卡，两张间隔 38px）
   ============================================================ */
.second__cards {
    display: grid;
    gap: 0.38rem;
    margin-top: 0.6rem;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    padding: 0.32rem 0.22rem 0.32rem 0.42rem;
    background: #ffffff;
    border-radius: 0.1rem;
    border: 1px solid transparent;
    box-shadow: 0 0.04rem 0.16rem rgba(3, 82, 141, 0.06);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    will-change: transform;
}

@media (hover: hover) {
    .contact-card:hover {
        transform: translateY(-0.1rem);
        border-color: rgba(3, 82, 141, 0.18);
        box-shadow: 0 0.18rem 0.4rem rgba(3, 82, 141, 0.16);
    }
}

/* ---------- 左：人物照片（346×363，圆角 10） ---------- */
.contact-card__photo {
    flex-shrink: 0;
    width: 3.46rem;
    height: 3.63rem;
    object-fit: cover;
    border-radius: 0.1rem;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
    .contact-card:hover .contact-card__photo {
        transform: scale(1.04);
    }

    .contact-card:hover .contact-card__avatar {
        transform: rotate(4deg) scale(1.03);
    }
}

/* ---------- 中：姓名 / 职位 / 二维码 / 部门 ---------- */
.contact-card__info {
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.contact-card__name {
    margin-top: 0.25rem;
    font-size: 0.3rem;
    font-weight: 600;
    line-height: 1.2;
    color: #333333;
}

.contact-card__role {
    margin-top: 0.09rem;
    font-size: 0.24rem;
    font-weight: 500;
    line-height: 1.4;
    color: #03528d;
}

.contact-card__avatar {
    display: block;
    width: 1.85rem;
    height: 1.85rem;
    margin-top: 0.24rem;
    object-fit: cover;
    border-radius: 0.06rem;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-card__dept {
    margin-top: 0.04rem;
    padding-left: 0.15rem;
    font-size: 0.16rem;
    font-weight: 500;
    line-height: 1.4;
    color: #333333;
}

/* ---------- 右：Whatsapp / phone / email 三组联系方式 ---------- */
.contact-card__contacts {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 1.42rem;
    margin-left: auto;
    padding-right: 0.22rem;
    list-style: none;
}

.contact-card__item svg {
    display: block;
    width: 0.6rem;
    height: 0.6rem;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-card__label {
    margin-top: 0.38rem;
    font-size: 0.24rem;
    font-weight: 600;
    line-height: 1.35;
    color: #333333;
    transition: color 0.35s ease;
}

@media (hover: hover) {
    .contact-card__item:hover svg {
        transform: translateY(-0.06rem);
    }

    .contact-card__item:hover .contact-card__label {
        color: #03528d;
    }
}

.contact-card__value {
    margin-top: 0.13rem;
    font-size: 0.2rem;
    font-weight: 400;
    line-height: 1.6;
    color: #666666;
    white-space: nowrap;
}

/* ============================================================
   4. 第三屏 Address（Figma 923_1361：1600×506，内边距 60/160）
   ============================================================ */
.third {
    padding: 0.6rem 1.6rem;
}

.third__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.third__icon {
    width: 0.6rem;
    height: 0.6rem;
}

.third__title {
    margin-top: 0;
    font-size: 0.24rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333333;
}

.third__text {
    margin-top: 0.04rem;
    font-size: 0.2rem;
    font-weight: 400;
    line-height: 1.6;
    color: #666666;
}

.third__img {
    display: block;
    width: 100%;
    margin-top: 0.28rem;
    aspect-ratio: 1600 / 350;
    object-fit: cover;
}

/* 入场：图片淡入上移 + 轻微缩放回正 */
.third__img[data-reveal] {
    transform: translateY(0.4rem) scale(1.03);
}

.third__img[data-reveal].is-in-view {
    transform: none;
    transition:
        opacity 1s var(--ease-out) 0.15s,
        transform 1s var(--ease-out) 0.15s;
}

/* ============================================================
   5. 第四屏 Leave Us a Message（Figma 629_1101：1599×801，内边距 0/160/100）
   ============================================================ */
.fourth {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0 1.6rem 1rem;
}

.fourth__form-col {
    flex: 0 0 8.64rem;
}

.fourth__title {
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.2;
    color: #333333;
}

.fourth__desc {
    margin-top: 0.24rem;
    font-size: 0.16rem;
    font-weight: 400;
    line-height: 1.6;
    color: #999999;
}

.fourth__form-col .wpcf7 {
    margin-top: 0.7rem;
}

/* 字段区：2×2 + 通栏文本域（列 410，列距 44，行距 30） */
.fourth__form-col form>ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 0.44rem;
    list-style: none;
}

.fourth__form-col form>ul>li:last-child {
    grid-column: 1 / -1;
}

/* 标签：16px #666，输入框上移间距 14 */
.fourth__form-col label {
    display: block;
    font-size: 0.16rem;
    font-weight: 400;
    line-height: 1.5;
    color: #666666;
}

/* 输入框：高 50，白底，边框 1px #E6E6E6 */
.fourth__form-col input,
.fourth__form-col textarea {
    display: block;
    width: 100%;
    height: 0.5rem;
    margin-top: 0.14rem;
    padding: 0 0.16rem;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 0;
    font-size: 0.16rem;
    color: #333333;
    outline: none;
    transition: border-color 0.3s ease;
}

.fourth__form-col textarea {
    height: 1.73rem;
    padding: 0.12rem 0.16rem;
    resize: none;
}

.fourth__form-col input:focus,
.fourth__form-col textarea:focus {
    border-color: #03528d;
}

/* 保密说明：form 内第一个 p，16px #999 */
.fourth__form-col form>p:nth-of-type(1) {
    margin-top: 0.3rem;
    font-size: 0.16rem;
    font-weight: 400;
    line-height: 1.5;
    color: #999999;
}

/* Submit 按钮：218×46，#03528D，圆角 100（form 内第二个 p） */
.fourth__form-col form>p:nth-of-type(2) {
    margin-top: 0.3rem;
    display: flex;
}

.fourth__form-col form>p:nth-of-type(2) button {
    width: 2.18rem;
    height: 0.46rem;
    background: #03528d;
    border: none;
    border-radius: 1rem;
    font-size: 0.18rem;
    font-weight: 400;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

/* 悬浮动效：加深 + 上浮 + 投影 */
.fourth__form-col form>p:nth-of-type(2) button:hover,
.fourth__form-col form>p:nth-of-type(2) button:focus-visible {
    background: #023f6d;
    transform: translateY(-0.03rem);
    box-shadow: 0 0.08rem 0.2rem rgba(3, 82, 141, 0.35);
}

.fourth__form-col form>p:nth-of-type(2) button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 右图：650×495，圆角 20，顶部下移 200 */
.fourth__img {
    flex: 1;
    min-width: 0;
    height: 4.95rem;
    margin-top: 2rem;
    object-fit: cover;
    border-radius: 0.2rem;
}

/* 图片入场：淡入上移 + 缩放回正 */
.fourth__img[data-reveal] {
    transform: translateY(0.4rem) scale(1.03);
}

.fourth__img[data-reveal].is-in-view {
    transform: none;
    transition:
        opacity 1s var(--ease-out) 0.15s,
        transform 1s var(--ease-out) 0.15s;
}

/* ============================================================
   6. H5 适配
   ============================================================ */
html[data-mode="h5"] .second {
    padding: 0.6rem 0.4rem;
}

html[data-mode="h5"] .second__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.24rem;
}

html[data-mode="h5"] .second__title {
    font-size: 0.44rem;
}

html[data-mode="h5"] .second__desc {
    font-size: 0.32rem;
    text-align: left;
    width: 100%;
}

/* ---------- 卡片 H5：纵向堆叠，字号不小于 0.32rem ---------- */
html[data-mode="h5"] .contact-card {
    flex-direction: column;
    padding: 0.4rem;
}

html[data-mode="h5"] .contact-card__photo {
    width: 100%;
    height: 4.2rem;
}

html[data-mode="h5"] .contact-card__info {
    margin-left: 0;
}

html[data-mode="h5"] .contact-card__name {
    margin-top: 0.32rem;
    font-size: 0.4rem;
}

html[data-mode="h5"] .contact-card__role {
    margin-top: 0.12rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .contact-card__avatar {
    width: 2.4rem;
    height: 2.4rem;
    margin-top: 0.32rem;
}

html[data-mode="h5"] .contact-card__dept {
    margin-top: 0.12rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .contact-card__contacts {
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
    margin-left: 0;
    padding-right: 0;
}

html[data-mode="h5"] .contact-card__item svg {
    width: 0.64rem;
    height: 0.64rem;
}

html[data-mode="h5"] .contact-card__label {
    font-size: 0.32rem;
}

html[data-mode="h5"] .contact-card__value {
    font-size: 0.32rem;
    white-space: normal;
}

html[data-mode="h5"] .first {
    height: 4.8rem;
}

html[data-mode="h5"] .first__content {
    padding: 0 0.4rem 0.5rem;
}

html[data-mode="h5"] .first__title {
    font-size: 0.56rem;
}

/* ---------- 第三屏 Address H5 ---------- */
html[data-mode="h5"] .third {
    padding: 0.6rem 0.4rem;
}

html[data-mode="h5"] .third__icon {
    width: 0.64rem;
    height: 0.64rem;
}

html[data-mode="h5"] .third__title {
    font-size: 0.44rem;
}

html[data-mode="h5"] .third__text {
    font-size: 0.32rem;
}

html[data-mode="h5"] .third__img {
    margin-top: 0.4rem;
    aspect-ratio: auto;
    height: 4rem;
}

/* ---------- 第四屏 H5：纵向堆叠，字号不小于 0.32rem ---------- */
html[data-mode="h5"] .fourth {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0 0.4rem 0.6rem;
}

html[data-mode="h5"] .fourth__form-col {
    flex: none;
    width: 100%;
}

html[data-mode="h5"] .fourth__title {
    font-size: 0.44rem;
}

html[data-mode="h5"] .fourth__desc {
    margin-top: 0.2rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__form-col .wpcf7 {
    margin-top: 0.4rem;
}

html[data-mode="h5"] .fourth__form-col form>ul {
    grid-template-columns: 1fr;
    gap: 0.32rem;
}

html[data-mode="h5"] .fourth__form-col form>ul>li:last-child {
    grid-column: auto;
}

html[data-mode="h5"] .fourth__form-col label {
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__form-col input,
html[data-mode="h5"] .fourth__form-col textarea {
    margin-top: 0.12rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__form-col input {
    height: 0.72rem;
}

html[data-mode="h5"] .fourth__form-col textarea {
    height: 2.4rem;
}

html[data-mode="h5"] .fourth__form-col form>p:nth-of-type(1) {
    margin-top: 0.32rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__form-col form>p:nth-of-type(2) {
    display: flex;
    justify-content: center;
    margin-top: 0.4rem;
}

html[data-mode="h5"] .fourth__form-col form>p:nth-of-type(2) button {
    width: 100%;
    height: 0.88rem;
    font-size: 0.32rem;
}

html[data-mode="h5"] .fourth__img {
    width: 100%;
    height: 4rem;
    margin-top: 0;
}