/* ============================================================
   赛思云官网 · 公共样式
   结构：Token → 基础重置 → 通用组件 → 导航 → 页脚
   设计稿：Figma「赛思云科技官网」node 291:815
   ============================================================ */

@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("../fonts/HarmonyOS_Sans_SC_Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("../fonts/HarmonyOS_Sans_SC_Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 品牌色 */
  --color-primary: #1d2088;
  --color-primary-hover: #141764;
  --color-text: #121212;
  --color-sub: #6e7286;
  --color-white: #ffffff;
  --color-grey: #f4f4f6;
  --color-module: #f8f8fa;
  --color-dark: #22222b;
  --color-footer: #121212;
  --color-line: rgba(0, 0, 0, 0.09);
  --color-white-60: rgba(255, 255, 255, 0.6);

  /* 尺寸 */
  --page-width: 1920px;
  --content-width: 1200px;
  --section-y: 80px;
  --block-gap: 80px;
  --card-gap: 40px;
  --title-size: 40px;
  --desc-size: 18px;
  --display-size: 48px;

  --font: "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

/* ---------- 基础重置 ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

.page {
  width: 100%;
  max-width: 100%;
  min-width: 1280px;
  overflow-x: hidden;
}

/* 每个 section 的第一层放 .wrap，负责左右留白 */
.wrap {
  width: var(--content-width);
  margin: 0 auto;
}

.media {
  position: relative;
  overflow: hidden;
  background: #e8edf5;
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
  font-size: 0;
}

.media img.is-missing {
  opacity: 0;
}

/* ---------- 通用组件 ---------- */

.sec-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(29, 32, 136, 0.1);
  color: var(--color-primary);
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
  white-space: nowrap;
}

/* 暗底区块：标签底改半透明白，文字改白 */
.sec-label--on-dark {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
}

.sec-title {
  font-size: var(--title-size);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: var(--color-text);
}

.sec-title--on-dark {
  color: var(--color-white);
}

.sec-desc {
  font-size: var(--desc-size);
  font-weight: 400;
  line-height: 32px;
  text-align: center;
  color: var(--color-sub);
}

/* 章节标题组：标签 + 大标题（+ 描述） */
.sec-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 24px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

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

.btn--outline {
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn--outline:hover {
  background: rgba(29, 32, 136, 0.06);
}

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

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

.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn--white:hover {
  background: #eceef7;
}

.btn--sm {
  height: 32px;
  padding: 0 16px;
  font-size: 14px;
}

.icon-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- 顶部导航 ---------- */

.header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.28s ease, background-color 0.28s ease;
}

.header__inner {
  width: var(--content-width);
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* Logo：深色底顶栏用白色版，滚动后（白底）换深色版
   两张图叠放，按 .is-stuck 切换 */
.logo {
  position: relative;
  display: block;
  width: 170px;
  height: 28px;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.7;
}

.logo img {
  position: absolute;
  inset: 0;
  width: 170px;
  height: 28px;
  object-fit: contain;
}

/* 默认显示深色版；深色顶栏下切换为白色版 */
.logo__img--light {
  display: none;
}

.header--on-dark .logo__img--dark {
  display: none;
}

.header--on-dark .logo__img--light {
  display: block;
}

/* 滚动后白底顶栏：换回深色版 */
.header.is-stuck .logo__img--light {
  display: none;
}

.header.is-stuck .logo__img--dark {
  display: block;
}

/* 导航默认深色文字（赛思云首屏为浅底） */
.nav {
  display: flex;
  align-items: center;
  gap: 40px;
  color: var(--color-text);
  font-size: 14px;
  line-height: 16px;
  white-space: nowrap;
}

.nav a {
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 0.6;
}

/* 深色顶栏（关于我们页）：导航改白字，Logo 用白色版本
   只作用于顶栏，不影响页脚 Logo */
.header--on-dark .nav {
  color: var(--color-white);
}

.header--on-dark .nav a:hover {
  opacity: 0.7;
}

/* 当前页导航高亮 */
.header--on-dark .nav a.is-active {
  opacity: 1;
  font-weight: 700;
}

/* 浅色顶栏页（联系我们）：当前页同样加粗高亮 */
.nav a.is-active {
  font-weight: 700;
}

/* 深色顶栏下电话胶囊改白描边白字 */
.header--on-dark .phone-pill {
  border-color: var(--color-white);
  color: var(--color-white);
}

.header--on-dark .phone-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-item {
  position: relative;
}

.nav-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 30;
  padding-top: 14px;
  transform: translateX(-50%);
}

.nav-item:hover .nav-drop,
.nav-item:focus-within .nav-drop {
  display: block;
}

.nav-drop a {
  display: block;
  min-width: 248px;
  padding: 12px 16px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
  opacity: 1;
}

.nav-drop a:first-child {
  border-radius: 12px 12px 0 0;
}

.nav-drop a:last-child {
  border-radius: 0 0 12px 12px;
}

.nav-drop a:hover,
.nav-drop a.is-current {
  background: rgba(29, 32, 136, 0.06);
  color: var(--color-primary);
  text-decoration: none;
  opacity: 1;
}

.nav-drop a small {
  display: block;
  margin-top: 4px;
  color: rgba(18, 18, 18, 0.5);
  font-size: 12px;
  line-height: 18px;
}

.nav-drop__name {
  display: block;
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
}

.nav-drop a:hover .nav-drop__name,
.nav-drop a.is-current .nav-drop__name {
  color: var(--color-primary);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.27);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 16px;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.phone-pill:hover {
  background: rgba(255, 255, 255, 0.55);
}

/* 电话图标：13.55px 方框内放 10.955px 矢量，整体旋转 16° */
.phone-pill__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 13.55px;
  height: 13.55px;
  flex-shrink: 0;
}

.phone-pill__icon img {
  width: 10.955px;
  height: 10.955px;
  transform: rotate(16deg);
}

/* 电话图标深浅两版：默认深色（首页浅底顶栏），
   深色顶栏（about 首屏）用白色版，滚动后白底再切回深色版 */
.phone-pill__icon--light {
  display: none;
}

.header--on-dark .phone-pill__icon--dark {
  display: none;
}

.header--on-dark .phone-pill__icon--light {
  display: block;
}

.header.is-stuck .phone-pill__icon--dark {
  display: block;
}

.header.is-stuck .phone-pill__icon--light {
  display: none;
}

/* 汉堡按钮（≤1023 显示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.header.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.header.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 深色底首屏：顶栏改白字白标（只改顶栏，不碰页脚 Logo） */
.header.header--on-dark .nav,
.header.header--on-dark .nav > a,
.header.header--on-dark .nav > .nav-item > a {
  color: var(--color-white);
}

.header.header--on-dark .phone-pill {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-white);
}

/* 滚动后吸顶：白底黑字 */
.header.is-stuck {
  position: fixed;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.header.is-stuck .nav,
.header.is-stuck .nav > a,
.header.is-stuck .nav > .nav-item > a {
  color: var(--color-text);
}

/* 深色顶栏页滚到白底后：电话胶囊恢复主题色描边与文字
   （需比 .header--on-dark 规则更具体，才能覆盖它） */
.header--on-dark.is-stuck .phone-pill,
.header.header--on-dark.is-stuck .phone-pill {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.27);
  color: var(--color-primary);
}

.header--on-dark.is-stuck .phone-pill:hover,
.header.header--on-dark.is-stuck .phone-pill:hover {
  background: rgba(255, 255, 255, 0.55);
}

/* 滚动后白底：主按钮由白底蓝字改为主题色实心 */
.header.is-stuck .btn--white {
  background: var(--color-primary);
  color: var(--color-white);
}

.header.is-stuck .btn--white:hover {
  background: var(--color-primary-hover);
}

/* ---------- 页脚 ----------
   设计稿 493:154（1062×331）：
   品牌区独占一行 → 联系信息行（地址 / 商务 / 二维码）→ 分割线 → 底部导航横排 */

.footer {
  background: var(--color-footer);
  padding: 64px 0 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  width: 1062px;
  max-width: 100%;
  margin: 0 auto;
}

/* 品牌区：Logo → 口号 → 大标题（独占一行，固定 289px 宽） */
.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  width: 289px;
  max-width: 100%;
}

.footer__logo {
  width: 170px;
  height: 28px;
}

/* 口号紧跟 Logo，间距 13.3px */
.footer__slogan-text {
  margin-top: -5px;
  font-size: 12px;
  line-height: 14px;
  color: var(--color-white);
  letter-spacing: 19.56px;
  white-space: nowrap;
}

.footer__title {
  margin-top: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 38px;
  color: var(--color-white);
}

/* 联系信息行：地址（359px） → 商务（140px） → 二维码
   设计稿间距 146px / 129px，用 Grid 固定列宽 + gap 实现。
   商务列原为 96px（只够放 12px 字号的电话号码），
   邮箱 business@saisiyun.com 实测需 135px，放不下会折成两行，
   这里放宽到 140px。二维码组 justify-self:end，仍贴右缘。 */
.footer__contact {
  display: grid;
  grid-template-columns: 359px 140px auto;
  align-items: start;
  column-gap: 146px;
  margin-top: 40px;
}

/* 地址组：武汉 / 深圳，行与行间隔 24px */
.footer__addr {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 359px;
  max-width: 100%;
  min-width: 0;
}

/* 商务组：商务合作 / 商务邮箱，与地址组结构一致
   宽度要放得下 12px 字号的完整邮箱（business@saisiyun.com 实测 135px） */
.footer__info--contact {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 140px;
  max-width: 100%;
  min-width: 0;
}

.footer__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.footer__info-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
  color: var(--color-white);
}

.footer__info-value {
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  color: var(--color-white-60);
  /* 地址栏固定 359px，深圳地址约 370px，
     nowrap 会横向溢出并贴到右侧导航列，这里允许换行 */
  white-space: normal;
  word-break: break-word;
}

/* 二维码组：两张码并排，码图 70×70，间距 32px */
.footer__qr-group {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  justify-self: end;
}

.footer__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8.92px;
  margin: 0;
}

/* 码图外层：固定 70×70 */
.footer__qr-box {
  display: block;
  width: 70px;
  height: 70px;
}

.footer__qr img {
  display: block;
  width: 70px;
  height: 70px;
  /* 设计稿 377:6166 为直角矩形，无圆角 */
  border-radius: 0;
}

.footer__qr figcaption {
  font-size: 12px;
  line-height: 14px;
  color: var(--color-white);
  white-space: nowrap;
}

/* 分割线：设计稿 493:152，0.5px #8C8C8C，位于联系信息与底部导航之间 */
.footer__line {
  width: 100%;
  max-width: 100%;
  height: 1px;
  margin-top: 24px;
  background: rgba(140, 140, 140, 0.5);
}

/* 底部导航行：左「导航」+ 右「产品与方案」，设计稿间距 145px */
.footer__nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 24px;
}

/* 底部导航：横向排布，链接之间用竖线分隔 */
.footer__nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.footer__nav--products {
  justify-content: flex-end;
}

.footer__nav-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  color: var(--color-white);
  white-space: nowrap;
}

.footer__nav a {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--color-white-60);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--color-white);
}

/* 链接之间的竖线分隔符（设计稿 #d9d9d9，1×10.4px） */
.footer__nav-sep {
  flex-shrink: 0;
  width: 1px;
  height: 10.41px;
  background: #d9d9d9;
}

.footer__copy {
  /* 底部版权条：整条通栏背景，高度 39px。
     必须放在 .footer__inner 之外（.footer 直接子元素），
     否则背景只覆盖中间 1062px 版心那一段。 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 39px;
  margin: 14px 0 0;
  padding: 0 20px;
  font-size: 12px;
  line-height: 14px;
  color: var(--color-white);
  text-align: center;
  background: rgba(255, 255, 255, 0.11);
  /* 不要用 pre-wrap：文案里的全角空格会在小屏撑破容器，正常折行即可 */
  white-space: normal;
  overflow-wrap: break-word;
}
