/* ============================================================
   CTA / 联系表单（共用：product-detail / markets / markets-detail）
   设计稿 form#section #590:4357（与 products.html 的 form#section 同款）：
   - 卡片 1700 宽（out-bg 1700×470）+ 白底 radius 8
   - 左：图片区 1120×450 右侧斜切（M0 0 H1120 L927.5 450 H0 V0 Z）
     + rgba(2,72,150,0.75) 蒙版 + 文案（76px 标题 / 75% 白副题 / 下划线链接）
   - 右：下划线表单 465×303（行高 32、两列 230px、行距 45/82/55）
   ============================================================ */

.mk-cta {
  background: var(--color-soft-blue);
  padding: 100px 0;
}

.mk-cta__inner {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 10px;
}

.mk-cta__panel {
  display: grid;
  grid-template-columns: 1120px 1fr;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* --- 左：图片区（右侧斜切） --- */
.mk-cta__visual {
  position: relative;
  min-height: 450px;
}

.mk-cta__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mk-cta__overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 72, 150, 0.75);
}

/* 左区图片 + 蒙版：右侧斜切（Figma #590:4360 路径） */
.mk-cta__visual img,
.mk-cta__overlay {
  clip-path: polygon(0 0, 100% 0, 82.81% 100%, 0 100%);
}

.mk-cta__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  padding: 64px 0 64px 55px;
  box-sizing: border-box;
}

.mk-cta__title {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 76px;
  line-height: 90px;
  letter-spacing: -1.52px;
  color: var(--color-white);
  margin: 0 0 20px;
  max-width: 756px;
}

.mk-cta__lead {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 24px;
  line-height: 33px;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 64px;
  max-width: 868px;
}

.mk-cta__link {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 18px;
  line-height: 25px;
  color: var(--color-white);
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
}

.mk-cta__link::before {
  content: "";
  position: absolute;
  inset: -13px 0;
}

.mk-cta__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-standard);
}

.mk-cta__link:hover::after {
  transform: scaleX(1);
}

/* --- 右：表单区（465×303 下划线风格，垂直下移 30px） --- */
.mk-cta__form-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 60px 48px 0;
}

.mk-cta__form {
  width: 465px;
}

.mk-cta__row {
  display: grid;
  grid-template-columns: 230px 230px;
  gap: 5px;
}

.mk-cta__row:first-of-type {
  margin-bottom: 45px;
}

.mk-cta__row:nth-of-type(2) {
  margin-bottom: 82px;
}

.mk-cta__field {
  position: relative;
  height: 32px;                 /* 设计稿行高：label 20 + 12 间距 + 线 */
}

.mk-cta__field--full {
  margin-bottom: 55px;
}

.mk-cta__label {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 18px;
  line-height: 20px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.mk-cta__input {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 20px;
  padding: 0;
  border: none;
  border-bottom: 1px solid #CCCCCC;
  background: transparent;
  font-family: var(--font-primary);
  font-size: 18px;
  line-height: 20px;
  color: var(--color-text);
  border-radius: 0;
  transition: border-color var(--duration-base) var(--ease-standard);
}

.mk-cta__input:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.mk-cta__textarea {
  resize: none;
  overflow: hidden;
}

/* Submit：纯文字（无下划线），右对齐 */
.mk-cta__submit {
  display: flex;
  justify-content: flex-end;
}

.mk-cta__btn {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 18px;
  line-height: 25px;
  color: var(--color-primary);
  position: relative;
  transition: color var(--duration-base) var(--ease-standard);
}

.mk-cta__btn::before {
  content: "";
  position: absolute;
  inset: -13px 0;
}

.mk-cta__btn:hover {
  color: var(--color-primary-dark);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1440px) {
  .mk-cta {
    padding: 80px 0;
  }

  .mk-cta__panel {
    grid-template-columns: 1fr;
  }

  /* 响应式：图片恢复普通长方形（去掉斜切） */
  .mk-cta__visual img,
  .mk-cta__overlay {
    clip-path: none;
  }

  .mk-cta__visual {
    min-height: 380px;
  }

  .mk-cta__copy {
    padding: 48px 40px;
  }

  .mk-cta__title {
    font-size: 56px;
    line-height: 68px;
    letter-spacing: -1.12px;
  }

  .mk-cta__lead {
    margin-bottom: 48px;
  }

  .mk-cta__form-wrap {
    justify-content: center;
    padding: 56px 24px;
  }

  /* 响应式：Submit 左右居中 */
  .mk-cta__submit {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .mk-cta {
    padding: 60px 0;
  }

  /* 文字内容上下居中：visual 变 flex 容器（min-height 内垂直居中 copy） */
  .mk-cta__visual {
    min-height: 300px;
    display: flex;
    align-items: center;
  }

  /* 文字内容左右居中（标题/副题/链接居中对齐） */
  .mk-cta__copy {
    height: auto;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
  }

  .mk-cta__title {
    font-size: 40px;
    line-height: 50px;
    letter-spacing: -0.8px;
  }

  /* 移动端：Connect with Well-T 标题在 "Well-T" 前强制换行（仅 product-detail 有此 span） */
  .mk-cta__title-break {
    display: block;
  }

  .mk-cta__lead {
    font-size: 18px;
    line-height: 26px;
    margin-bottom: 36px;
  }

  .mk-cta__form {
    width: 100%;
  }

  .mk-cta__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* 4 行等距（参考 products 表单）：字段间距 24px，行尾字段归零防叠加，
     行间距由 row margin 控制；telephone 行与 Message 之间空开 48px */
  .mk-cta__row:first-of-type {
    margin-bottom: 24px;
  }

  .mk-cta__row:nth-of-type(2) {
    margin-bottom: 48px;
  }

  .mk-cta__field {
    margin-bottom: 24px;
  }

  .mk-cta__row .mk-cta__field:last-child {
    margin-bottom: 0;
  }

  .mk-cta__field--full {
    margin-bottom: 40px;
  }

  .mk-cta__form-wrap {
    padding: 40px 24px;
  }
}

/* ==================== 无障碍降级 ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
