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

/* ---------- 1. 首屏：关于赛思云 + 数据卡片 ---------- */

.a-hero {
  position: relative;
  height: 800px;
  overflow: hidden;
  background: var(--color-primary);
}

/* 设计稿 351:3381：图片宽 1351，1920 − 1351 = 569，正好贴住视窗右边缘。
   用 right 锚定，保证视口宽于设计稿时也不会右侧露白。
   高度按原图比例 736/1351 ≈ 54.5% 跟随宽度缩放，
   配合 object-fit: cover 时图片不会被纵向裁切。 */
.a-hero__mask {
  position: absolute;
  top: -14.63px;
  right: 0;
  width: 1351px;
  max-width: 100%;
  height: 736.03px;
  overflow: hidden;
}

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

/* 设计稿 351:3388：底部由透明渐变到主题色 */
.a-hero__veil {
  position: absolute;
  top: 336.34px;
  left: 0;
  width: 100%;
  height: 463.63px;
  background: linear-gradient(
    to bottom,
    rgba(29, 32, 136, 0.01) 24.79%,
    var(--color-primary) 72.86%
  );
}

/* 左侧压暗层：保证正文永远压在纯色底上。
   背景图的亮光斜纹会随视口收窄扫到文字区域，
   用一层从左往右的深色渐变盖住斜纹，白字始终清晰。
   桌面 1920 下图片左缘在 x=569，斜纹区与正文列基本不重叠，
   所以压暗层只覆盖左侧约 40%，避免把设计稿的斜纹效果压没。 */
.a-hero__scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    to right,
    var(--color-primary) 0%,
    rgba(29, 32, 136, 0.88) 55%,
    rgba(29, 32, 136, 0) 100%
  );
}

/* 文案区：设计稿 351:3382，left 359.98 / top 175.38 */
.a-hero__copy {
  position: absolute;
  top: 175.38px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

/* 标题组：主标题 + 副标题，间距 12px（设计稿 351:3383 gap-[12px]） */
.a-hero__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.a-hero__title {
  font-size: 48px;
  font-weight: 700;
  line-height: 60px;
  color: var(--color-white);
  white-space: nowrap;
}

.a-hero__subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 21px;
  color: var(--color-white);
  white-space: nowrap;
}

/* 正文：容器只负责宽度，段落间距交给 .a-hero__desc-p 的 margin */
.a-hero__desc {
  width: 749px;
  max-width: 100%;
}

.a-hero__desc-p {
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  color: var(--color-white);
}

/* 段落之间留白：段间距 = 行距 24px + 额外 16px */
.a-hero__desc-p + .a-hero__desc-p {
  margin-top: 16px;
}

/* 数据卡片：设计稿 351:3356，left 359.98 / top 565.85，间距 40px
   原型共 6 项指标，按版心 1200 均分：6 列 Grid，卡片宽度自适应。
   整体下移 40px：top 565.85 → 605.85，
   卡片底 727.85 → 767.85，首屏 800px 底部留 32px。 */
.a-stats {
  position: absolute;
  top: 605.85px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  gap: 20px;
}

.a-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 162px;
  padding: 20px 8px;
  border: 1px solid var(--color-white);
  border-radius: 16px;
  background: linear-gradient(
    157.14deg,
    rgba(255, 255, 255, 0.13) 0.59%,
    rgba(255, 255, 255, 0.034) 79.36%
  );
  box-shadow: 0 12px 21.9px 0 rgba(0, 0, 0, 0.12);
}

/* 数字：48px 粗体 + 36px 中等加号，白色渐变填充 */
.a-stat__num {
  display: flex;
  align-items: baseline;
  color: var(--color-white);
}

.a-stat__num strong {
  font-size: 40px;
  font-weight: 700;
  line-height: 48px;
  background: linear-gradient(
    159deg,
    rgb(255, 255, 255) 10.86%,
    rgba(255, 255, 255, 0.5) 96.01%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.a-stat__num strong span {
  font: inherit;
  color: inherit;
  -webkit-text-fill-color: transparent;
}

.a-stat__num i {
  margin-left: 2px;
  font-size: 28px;
  font-style: normal;
  font-weight: 500;
  line-height: 48px;
  background: linear-gradient(
    124.54deg,
    rgb(255, 255, 255) 10.86%,
    rgba(255, 255, 255, 0.5) 96.01%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 标签：14px，与数字组间隔 8px */
.a-stat__label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  color: var(--color-white);
  white-space: nowrap;
}

/* ---------- 2. 发展历程（横向轮播） ----------
   设计稿 360:3767（区块 572px = pt 79 + 内容 413 + pb 80）
   351:3390 位于 left 360.02 / w 2235.65：卡片轨道左端对齐版心，
   右端延伸到 2595.67 超出 1920 视口，因此轨道要铺到视口右边缘后被裁切 */
.a-history {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
  padding: 79px 0 80px;
}

.a-section-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 54px;
  text-align: center;
  color: var(--color-text);
}

/* 发展历程标题：左对齐（设计稿 351:3392 位于 items-start 容器内） */
.a-history .a-section-title {
  text-align: left;
}

/* 视窗：左端对齐版心，右端铺到视口右边缘后被裁切
   设计稿 351:3390 轨道宽 2235.65，右端 2595.67 超出 1920 视口 */
.a-history__viewport {
  margin-top: 40px;
  overflow: hidden;
  padding-left: max(0px, calc((100% - var(--content-width)) / 2));
}

.a-history__track {
  display: flex;
  align-items: stretch;
  gap: 40px;
  width: max-content;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.a-milestone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* 顶部对齐（不要 center）：下方文案行数不同时，
     居中会让整块内容上下浮动，导致横线错位 */
  justify-content: flex-start;
  gap: 16px;
  width: 413.33px;
  height: 243px;
  /* 所有卡片内边距一致，保证 head 起点相同、横线才能对齐 */
  padding: 40px;
  border-radius: 16px;
  background: var(--color-module);
  /* 高亮样式在切换按钮点击后要在新旧卡片之间平滑过渡，
     这里把背景、描边、投影一并纳入过渡 */
  transition:
    transform 0.3s ease,
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* 设计稿 351:3394（首卡·高亮）：白底 + 主题色描边 + 投影
   内边距与其他卡片保持一致（40px），保证横线与其他卡片在同一水平线上 */
.a-milestone--active {
  padding: 40px;
  border: 0.5px solid var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 10px 15.85px rgba(29, 32, 136, 0.1);
}

/* 除首卡外，其余节点卡片样式保持一致：浅灰底 + 白色描边 + 圆角
   （设计稿 351:3401 / 3408 / 3415 / 3422 均归为同一套视觉） */
.a-milestone:not(.a-milestone--active) {
  border: 1px solid var(--color-white);
  background: var(--color-module);
  box-shadow: 0 6px 16px rgba(29, 32, 136, 0.05);
}

/* 年份组：设计稿 351:3396 = items-start + w-[116px]
   「2016」在 116px 框内 text-center，「起点」w-[min-content] 左对齐 */
.a-milestone__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.a-milestone--center .a-milestone__head {
  width: 116px;
}

.a-milestone__year {
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  color: var(--color-primary);
  text-align: center;
}

.a-milestone__label {
  font-size: 20px;
  font-weight: 700;
  line-height: 23px;
  color: var(--color-text);
  white-space: nowrap;
}

/* 分隔线：设计稿 351:3399 → Vector 73（#121212 / 13%）
   除首卡外卡片样式已统一，分隔线同样统一处理。
   用百分比宽度：卡片内边距一致时才能与其他卡片的横线等宽对齐 */
.a-milestone__line {
  display: block;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  height: 1px;
  background: rgba(18, 18, 18, 0.13);
}

.a-milestone__desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-sub);
}

/* 箭头按钮 */
.a-history__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

/* 箭头按钮
   形状用 SVG 作 mask（居中精确），颜色由 CSS 控制，
   可跟随「可点 / 禁用」状态变化。
   静态 svg 图片只能固定一种配色，无法做状态切换，故用 mask 方案。 */
.a-arrow {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* 可点状态：主题色圆底 + 白色箭头 */
  background: var(--color-primary);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* 箭头本体：mask 出形状，background 填充颜色 */
.a-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-white);
  -webkit-mask: url("../img/about/arrow-next.svg") center / contain no-repeat;
  mask: url("../img/about/arrow-next.svg") center / contain no-repeat;
}

.a-arrow[data-history-prev]::before {
  -webkit-mask-image: url("../img/about/arrow-prev.svg");
  mask-image: url("../img/about/arrow-prev.svg");
}

/* 禁用状态：浅灰圆底 + 灰色箭头 */
.a-arrow:disabled {
  background: #f8f8fa;
  cursor: not-allowed;
}

.a-arrow:disabled::before {
  background: rgba(18, 18, 18, 0.13);
}

.a-arrow:not(:disabled):hover {
  background: var(--color-primary-hover);
}

/* ---------- 3. 核心理念 ----------
   设计稿 357:3543（y=572, h=589）：内部 360:3845 高 509 顶对齐，区块 pb-[80px]
   内部 gap-80：上分隔线 → 80 → label+卡片组 → 80 → 下分隔线；顶部无 padding */
.a-idea {
  background: var(--color-white);
  padding: 0 0 80px;
}

.a-idea__line {
  width: 100%;
  height: 1px;
  background: rgba(18, 18, 18, 0.12);
}

.a-idea .sec-label {
  margin: 80px 0 40px;
}

.a-idea__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

/* 设计稿 360:3851/360:3857：卡片 580×280，圆角 16px
   底色 = mask 矢量 Rectangle 675（#F2F5FC），背景图在同尺寸圆角内叠加 */
.a-idea__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 280px;
  padding: 0 32.12px;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f5fc;
}

/* 背景图铺满卡片，圆角由父级裁切 */
.a-idea__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 文字层：桌面端让标题/描述相对这一层绝对定位，
   窄屏改为流式排版时也只需处理这一层 */
.a-idea__text {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.a-idea__name,
.a-idea__desc {
  position: absolute;
  left: 32.12px;
  z-index: 1;
}

/* 设计稿 360:3855：标题位于卡片内 mt 101.16 */
.a-idea__name {
  top: 101.16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 21px;
  color: var(--color-text);
}

/* 设计稿 360:3856：描述位于卡片内 mt 135.162，固定两行断行 */
.a-idea__desc {
  top: 135.16px;
  width: 196px;
  max-width: 100%;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-sub);
}

.a-idea__line--bottom {
  margin-top: 80px;
}

/* ---------- 4. 价值观 ----------
   设计稿 357:3544（h=503）：内部 357:3545 = label + gap-40 + 360:3610 两行卡片，pb-[80px] */
.a-values {
  background: var(--color-white);
  padding: 0 0 80px;
}

.a-values .sec-label {
  display: inline-flex;
  margin-bottom: 40px;
}

.a-values__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.a-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  height: 157px;
  padding: 40px 20px;
  border: 0.5px solid transparent;
  border-radius: 16px;
  background: var(--color-module);
  transition: border-color 0.25s ease, background 0.25s ease,
    box-shadow 0.25s ease;
}

/* 悬浮时：白底 + 主题色描边 + 投影 */
.a-value:hover {
  padding: 20px;
  border-color: var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 10px 15.85px rgba(29, 32, 136, 0.1);
}

.a-value__head {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.a-value__icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.a-value__icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.a-value__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 21px;
  color: #000000;
}

.a-value__desc {
  width: 540px;
  max-width: 100%;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-sub);
}

/* 资质与荣誉（横向轮播）
   设计稿 393:639：区块 py-80，内部 393:640 w-1200，gap-80
   393:644 卡片行 justify-center，10 张卡宽 231.73~109.25 不等，
   总宽超出 1200 版心，两端溢出视口被裁切 */
.a-honors {
  position: relative;
  overflow: hidden;
  background: var(--color-module);
  padding: 80px 0;
}

/* 视窗：突破版心，铺满整行，证书两端溢出被裁切
   卡片群整体由 JS 做居中偏移并循环左移，两端自然溢出被裁 */
.a-honors__viewport {
  margin-top: 80px;
  overflow: hidden;
}

.a-honors__track {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 40px;
  width: max-content;
  min-width: 100%;
}

/* 自动滚动轨道：匀速左移，不做 transition（由 JS 每帧控制） */
.a-honors__track.a-track--auto {
  transition: none;
  will-change: transform;
}

.a-honor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* 证书图：白底 + 0.5px #DFDFDF 细边框，内 padding 5px，框高 152px */
.a-honor__img {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 152px;
  padding: 5px;
  border: 0.5px solid #dfdfdf;
  background: var(--color-white);
}

/* 证书原图：设计稿统一高 140px，宽度按原图比例 */
.a-honor__img img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: contain;
}

/* 纯图片卡（瞪羚企业）：无白底框，按比例自适应
   高度仍固定为 152px（与带框卡一致），否则该卡标题会比其他卡低一截 */
.a-honor--plain .a-honor__img {
  height: 152px;
  padding: 0;
  border: 0;
  background: transparent;
}

.a-honor--plain .a-honor__img img {
  height: 140px;
  object-fit: contain;
}

/* 双图证书（信息安全 / 质量管理体系）：并排，共用一个白底框 */
.a-honor__img img.a-honor__pair {
  width: calc(50% - 3px);
  height: 140px;
  object-fit: cover;
}

.a-honor__img img.a-honor__pair + img.a-honor__pair {
  margin-left: 6px;
}

/* 标题：占满卡片宽度居中，与上方证书图的中心对齐。
   不加 width:100% 的话，标题只在自身文字宽度内居中，
   而各卡宽度不同（231px / 220px / 118px…），文字中心会左右错开。 */
.a-honor__name {
  width: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  color: var(--color-text);
}

/* ---------- 6. CTA（设计稿 377:6138） ---------- */

/* 设计稿：背景 #22222b，py-80，内容整体居中 */
.a-cta {
  background: #22222b;
  padding: 80px 0;
}

.a-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.a-cta__title {
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
  text-align: center;
  color: var(--color-white);
}

.a-cta__desc {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  text-align: center;
  color: var(--color-white);
}

.a-cta__actions {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* 设计稿：按钮 148×54，圆角 40 */
.a-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 148px;
  height: 54px;
  padding: 0 20px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.a-cta__btn--solid {
  background: var(--color-white);
  color: var(--color-primary);
}

.a-cta__btn--solid:hover {
  background: #eceef7;
}

.a-cta__btn--ghost {
  border: 1px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
}

.a-cta__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.a-cta__btn img,
.a-cta__arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ---------- 笔记本区间：保持桌面结构，只缩间距 / 字号 ---------- */

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

  /* 背景图始终贴住右边缘，宽视口不露白。
     宽度按视口比例缩放（1920 时 1351px ≈ 70.4%），
     视口收窄时图片跟着变小、整体右移，左侧亮光斜纹不会压到正文。
     固定 1351px 的话，1600 视口下图片左缘会滑到 x=249，
     直接盖住从 x=200 开始的 749px 正文列。
     高度按原图比例 736/1351 ≈ 54.5% 跟随，避免纵向裁切。 */
  .a-hero__mask {
    right: 0;
    width: min(70.4%, 1351px);
    height: auto;
    aspect-ratio: 1351 / 736;
  }

  /* 遮罩层跟随图片高度，底部渐变不被截断 */
  .a-hero__veil {
    top: 300px;
    height: 400px;
  }

  /* 左侧压暗层：视口收窄时背景图左缘逼近正文，
     用渐变盖住图片的亮光斜纹，白字始终清晰。
     正文列右缘 = 版心左缘 + 600px，1600 视口下约在 x=800（50%），
     所以压暗层要盖到 56% 才能兜住整列文字。 */
  .a-hero__scrim {
    width: 56%;
    background: linear-gradient(
      to right,
      var(--color-primary) 0%,
      rgba(29, 32, 136, 0.94) 46%,
      rgba(29, 32, 136, 0.7) 80%,
      rgba(29, 32, 136, 0) 100%
    );
  }

  /* 文案区：保持 .wrap 的版心宽度，left:50% + translateX(-50%) 才能按版心居中。
     不要在这里把宽度改成 749px —— translateX(-50%) 会按自身宽度平移，
     导致容器左边缘偏离版心、文字整体偏右。宽度限制应落在 .a-hero__desc 上。 */
  .a-hero__copy {
    top: 140px;
    width: var(--content-width);
  }

  .a-hero__title {
    font-size: 40px;
    line-height: 52px;
  }

  /* 正文列收窄：视口 <1700 时背景图会向左逼近，
     749px 的宽列会整段压在图片的亮光斜纹上，读不清。
     收到 600px 后，1600 视口下正文右缘 x=800，
     背景图左缘 x=474 起的亮纹区在 x>800 之后，文字不再被遮。 */
  .a-hero__desc {
    width: min(600px, 100%);
  }

  .a-hero__desc-p {
    line-height: 22px;
  }

  /* 卡片底部锚定，整体下移 40px（与宽版 top 565.85 → 605.85 一致） */
  .a-stats {
    top: auto;
    bottom: 20px;
    gap: 16px;
  }

  .a-stat {
    width: 100%;
    height: 148px;
  }

  .a-stat__num strong {
    font-size: 32px;
    line-height: 40px;
  }

  .a-stat__num i {
    font-size: 22px;
    line-height: 40px;
  }

  .a-history {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  /* 核心理念 / 价值观：设计稿顶部无 padding，只缩底部 */
  .a-idea,
  .a-values {
    padding-top: 0;
    padding-bottom: 60px;
  }

  .a-honors {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .a-milestone {
    width: 340px;
    height: 220px;
    padding: 32px;
  }

  /* 与其他卡片内边距一致，保证横线在同一水平线上 */
  .a-milestone--active {
    padding: 32px;
  }

  .a-milestone__year {
    font-size: 40px;
    line-height: 48px;
  }

  .a-milestone__line {
    width: 100%;
  }

  .a-history__track,
  .a-honors__track {
    gap: 28px;
  }

  .a-idea .sec-label {
    margin: 60px 0 32px;
  }

  .a-idea__grid,
  .a-values__grid {
    gap: 28px;
  }

  .a-idea__line--bottom {
    margin-top: 60px;
  }

  /* 核心理念文字位置按比例缩小 */
  .a-idea__name {
    top: 84px;
  }

  .a-idea__desc {
    top: 112px;
  }

  .a-value {
    height: 148px;
    padding: 32px 20px;
  }

  .a-value:hover {
    padding: 20px;
  }

  .a-honors__viewport {
    margin-top: 60px;
  }

  /* 荣誉卡宽度改为按比例缩放（覆盖 HTML 行内宽度） */
  .a-honor {
    width: auto !important;
    max-width: 190px;
  }
  .a-honor__img,
  .a-honor--plain .a-honor__img {
    height: 132px;
  }

  .a-honor__img img,
  .a-honor__img img.a-honor__pair,
  .a-honor--plain .a-honor__img img {
    height: 120px;
  }
}
