/* ============================================================
   赛思云官网 · 联系我们
   规则：common.css → 页面 CSS → mobile.css（必须最后引入）
   设计稿：Figma「赛思云科技官网」node 360:3874（1920 宽）
   ============================================================ */

/* ---------- 1. 首屏：浅色底 + 彩色光晕 + 人像 ---------- */

/* 设计稿 360:4122 在 #F8F9FB 底上盖了一层 rgba(255,255,255,0.6) 白色蒙版，
   所以实际底色接近纯白（253~255），这里用两层背景还原 */
.c-hero {
  position: relative;
  z-index: 1;
  height: 600px;
  /* 人像底部超出首屏压到表单区，只裁左右、不裁上下 */
  overflow-x: clip;
  overflow-y: visible;
  background-color: #f8f9fb;
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.6)
  );
}

/* 三团光晕：Figma 里这些 SVG 以原始尺寸居中放置，
   外框只用于「对齐圆心」，并不裁切光晕本身，
   所以这里去掉 overflow:hidden，让模糊的光雾自然扩散。
   360:4124 蓝 #0158FF / 360:4125 蓝 #012BFF / 360:4126 黄绿 #A7CA3D */
.c-hero__glow {
  position: absolute;
  pointer-events: none;
}

.c-hero__glow img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--k, 1));
  transform-origin: center;
  /* 全局 img{max-width:100%} 会把光晕 SVG 钳到外框宽，
     必须放开，否则光雾被压成一小团 */
  max-width: none;
}

/* 360:4124 蓝 #0158FF
   Figma 里该椭圆带 mask-intersect 遮罩，光雾实际扩散范围比
   「圆直径 369.61」更宽（实测蓝雾半高宽约 550px），
   因此 SVG 按 1.15 倍放大，用外框 + left/top 定位圆心。
   left/top 为网格搜索后与设计稿蓝度分布最贴合的取值 */
.c-hero__glow--blue {
  left: 64.11%;
  top: 154.64px;
  width: 369.61px;
  height: 369.61px;
  --k: 1.15;
  /* 设计稿峰值蓝度 26，实测 23，略提不透明度补偿 */
  filter: opacity(1.12);
}

.c-hero__glow--blue img {
  width: 1148.81px;
  height: 1148.81px;
}

/* 360:4125 left 192.75 top -170.76，圆心 463.28 / 99.76，圆直径 541.06
   （SVG 原始 1320.26） */
.c-hero__glow--blue2 {
  left: 10.04%;
  top: -170.76px;
  width: 541.06px;
  height: 541.06px;
  --k: 1;
}

/* 360:4126 left 474.58 top 243.51，圆心 745.11 / 514.04，圆直径 541.06
   （SVG 原始 1320.26） */
.c-hero__glow--green {
  left: 24.72%;
  top: 243.51px;
  width: 541.06px;
  height: 541.06px;
  --k: 1;
}

.c-hero__glow--blue2 img,
.c-hero__glow--green img {
  width: 1320.26px;
  height: 1320.26px;
}

/* 内容层：文案在左，海报在右
   设计稿 360:4127 文案 left 409.8，360:4129 海报 left 1088.84 / top 129.08
   海报用绝对定位，位置不随 flex 拉伸而漂移 */
.c-hero__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding-top: 310.84px;
}

.c-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-left: 49.8px;
}

.c-hero__title {
  font-size: 48px;
  font-weight: 700;
  line-height: 64px;
  color: var(--color-text);
}

.c-hero__desc {
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  color: #5a5a5a;
}

/* 右侧人像图
   设计稿 360:4129 给的是 355.87 × 525.28 的占位框，
   实际人像素材比例不同（1068×1413 → 0.756），
   若强行 cover 到 0.677 的框里会裁掉头部，
   因此改为：宽度沿用设计稿 355.87，高度按素材比例自适应，
   顶部对齐设计稿的 129.08，图片完整显示不裁切。
   注意：绝对定位不受 padding-top 影响，这里直接用设计稿的 top 值。
   本元素定位在 .wrap 内部，left 相对版心左边缘：
   设计稿 360:4129 海报 left 1088.84，版心左边缘 360，差值 728.84。
   min() 保证版心变窄时不会溢出右边缘。 */
.c-hero__card {
  position: absolute;
  left: min(728.84px, calc(100% - 375.87px));
  top: 129.08px;
  width: 355.87px;
  aspect-ratio: 1068 / 1413;
  overflow: hidden;
}

.c-hero__card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- 2. 商务合作咨询表单 ---------- */

.c-form {
  background: var(--color-white);
  padding: 90px 0 120px;
}

/* 表单区：设计稿 360:4130 宽 1086，水平居中
   宽度不得超过版心，否则笔记本 / 移动端会突破左右留白 */
.c-form__inner {
  width: min(1086px, var(--content-width));
  margin: 0 auto;
}

.c-form__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 45px;
  text-align: center;
}

.c-form__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 54px;
  color: var(--color-text);
}

.c-form__sub {
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  color: var(--color-sub);
}

/* 两列：左 473.77 / 右 472，中间间距 140（设计稿 360:4134 gap-[140px]）
   整体宽度 1086，水平居中 */
.c-form__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 140px;
  align-items: start;
}

.c-form__col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* 表单项：标签 + 输入框，间距 8px */
.c-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.c-field__label {
  font-size: 18px;
  font-weight: 700;
  line-height: 21px;
  color: var(--color-text);
}

.c-field__input {
  width: 100%;
  height: 46px;
  padding: 12px 20px;
  border: 1px solid rgba(18, 18, 18, 0.13);
  border-radius: 8px;
  background: var(--color-white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.c-field__input::placeholder {
  color: var(--color-sub);
}

.c-field__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 32, 136, 0.1);
}

/* 校验失败态 */
.c-field__input.is-invalid {
  border-color: #e04b4b;
}

.c-field__input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(224, 75, 75, 0.12);
}

/* 多行输入：设计稿 360:4160 高 143px，文字顶对齐 */
.c-field__input--area {
  height: 143px;
  resize: vertical;
  line-height: 22px;
}

/* 提交按钮：设计稿 360:4162，160 × 48，圆角 50px，主题色实心
   位于右列底部、右对齐（360:4152 ml-[312px]，即右列宽 472 内靠右 160） */
.c-form__submit {
  align-self: flex-end;
  margin-top: 26px;
  min-width: 160px;
  height: 48px;
  padding: 8px 32px;
  border: 0;
  border-radius: 50px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 19px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.c-form__submit:hover {
  background: var(--color-primary-hover);
}

.c-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- 3. 提交反馈：顶部错误提示 + 成功弹层 ---------- */

/* 错误提示条：标题下方居中显示，2 秒后自动淡出 */
.c-form__tip {
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(224, 75, 75, 0.1);
  color: #e04b4b;
  font-size: 14px;
  line-height: 20px;
}

.c-form__tip[hidden] {
  display: none;
}

/* 成功弹层：半透明遮罩 + 居中卡片 */
.c-success {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
}

.c-success.is-open {
  display: flex;
}

.c-success__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 380px;
  padding: 36px 32px 32px;
  border-radius: 16px;
  background: var(--color-white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.c-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(29, 32, 136, 0.08);
  color: var(--color-primary);
}

.c-success__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  color: var(--color-text);
}

.c-success__desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 22px;
  color: var(--color-sub);
}

.c-success__btn {
  margin-top: 24px;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 50px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.c-success__btn:hover {
  background: var(--color-primary-hover);
}

/* ---------- 4. 响应式：1024–1679 保持桌面结构，仅缩间距 ---------- */

@media (min-width: 1024px) and (max-width: 1679px) {
  .c-hero {
    height: 540px;
  }

  .c-hero__inner {
    padding-top: 250px;
  }

  .c-hero__title {
    font-size: 40px;
    line-height: 54px;
  }

  .c-hero__desc {
    font-size: 18px;
    line-height: 28px;
  }

  /* 光晕是画布级装饰，按 1440/1920 = 0.75 等比缩小
     （外框缩小，SVG 同步 scale，圆形光晕仍正好铺满外框） */
  .c-hero__glow--blue {
    top: 86px;
    width: 277px;
    height: 277px;
    --k: 0.75;
  }

  .c-hero__glow--blue2 {
    top: -128px;
    width: 406px;
    height: 406px;
    --k: 0.75;
  }

  .c-hero__glow--green {
    top: 183px;
    width: 406px;
    height: 406px;
    --k: 0.75;
  }

  /* 版心宽恒为 1200，海报在版心内的相对位置不变，只缩小尺寸 */
  .c-hero__card {
    left: min(728.84px, calc(100% - 320px));
    top: 100px;
    width: 300px;
  }

  .c-form {
    padding: 70px 0 90px;
  }

  .c-form__title {
    font-size: 34px;
    line-height: 46px;
  }

  .c-form__body {
    gap: 60px;
  }
}
