/* ==========================================================================
   pages/home.css — 首页专属样式
   设计基准：Figma「Setrex」首页（1512px 宽）。所有尺寸取自设计稿实测值。
   跨页面复用的区块（数据 / 评价 / 团队 / 定价）在 css/blocks.css。
   ========================================================================== */

.page--home {
  background: var(--c-bg);
}

/* ==========================================================================
   1. Hero
   ========================================================================== */
.home-hero {
  position: relative;
  min-height: 706px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  isolation: isolate;
}

.home-hero__bg {
  position: absolute;
  top: var(--hero-bg-offset);
  left: 0;
  width: 100%;
  height: calc(100% - var(--hero-bg-offset));
  object-fit: cover;
  object-position: center top;
  z-index: -2;
}

.home-hero__fade {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* 设计稿 Bottom Overlay：整幅线性 0 → #010105 */
  background: linear-gradient(180deg, rgba(1, 1, 5, 0) 0%, #010105 100%);
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* 首屏只有主标题：在页眉以下的可见区域内垂直居中（页眉 85 + 上下留白 + 标题 147 = 706 与设计稿同高） */
  padding-top: 322px;
  /* 主标语下新增一行英文（约 37px），从下留白里让出，保持首屏总高仍为 706px */
  padding-bottom: 200px;
}

.home-hero__title {
  max-width: 900px;
  margin: 0;
}

/* 主标语英文行（v3 重写稿） */
.home-hero__en {
  margin: 18px 0 0;
  font-size: 14px;
  letter-spacing: 0.07em;
  color: var(--c-muted);
}

/* ==========================================================================
   3. 功能
   ========================================================================== */
.home-features {
  padding-block: 60px;
}

.home-features__head {
  margin-bottom: 80px;
}

.home-features__head h2 {
  /* 434px 是英文版的行宽；中文行宽放宽，让断行落在「把产品」之后而不是「把」字后 */
  max-width: 560px;
}

/* 主卡（界面示意） */
.home-features__hero {
  height: 492px;
  padding: 112px 60px;
  margin-bottom: 20px;
}

.home-features__hero-text {
  position: relative;
  z-index: 2;
  max-width: 470px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-features__hero-text h3 {
  margin: 20px 0 0;
  max-width: 400px;
}

.home-features__hero-text p {
  margin-top: 22px;
  max-width: 454px;
  color: var(--c-body);
  font-size: 14.8px;
  line-height: var(--lh-body);
}

/* 界面骨架示意（纯 CSS 绘制，非图片） */
.ui-mock {
  position: absolute;
  top: 63px;
  left: 688px;
  width: 700px;
  height: 471px;
  border-radius: 28px;
  border: 2px solid rgba(248, 248, 248, 0.05);
  background: linear-gradient(
    135deg,
    rgb(var(--c-accent-rgb) / 0.05) 0%,
    rgb(var(--c-accent-rgb) / 0.07) 8%,
    #0c0c0f 25%
  );
  overflow: hidden;
  box-shadow: var(--sh-card);
}

.ui-mock__glow {
  position: absolute;
  inset: -40% -60% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle,
    rgb(var(--c-accent-rgb) / 0.35) 0%,
    rgb(var(--c-accent-rgb) / 0) 68%
  );
  filter: blur(40px);
  pointer-events: none;
}

.ui-mock__bar {
  display: flex;
  gap: 12px;
  padding: 24px;
}

.ui-mock__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(1, 1, 4, 0.2);
}

.ui-mock__dot--red {
  background: #fc605c;
}

.ui-mock__dot--amber {
  background: #fcbb40;
}

.ui-mock__dot--green {
  /* 品牌色统一：原本的 macOS 交通灯绿也换成品品牌橙 */
  background: var(--c-accent);
}

.ui-mock__grid {
  display: grid;
  grid-template-columns: 183px 454px;
  gap: 17px;
  padding: 0 24px 24px;
}

.ui-mock__col,
.ui-mock__main {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ui-mock__panel {
  border-radius: 18px;
  border: 2px solid rgba(248, 248, 248, 0.05);
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ui-mock__panel--tall {
  height: 216px;
  justify-content: center;
  gap: 24px;
}

.ui-mock__duo {
  display: grid;
  grid-template-columns: 250px 187px;
  gap: 17px;
  height: 132px;
}

.ui-mock__row {
  display: flex;
  align-items: center;
  gap: 30px;
}

.ui-mock__circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #212124;
  flex: none;
}

.ui-mock__lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.ui-mock__split {
  display: flex;
  gap: 10px;
}

.ui-mock i {
  display: block;
  height: 10px;
  border-radius: 18px;
  background: rgba(248, 248, 248, 0.1);
}

.ui-mock__square {
  height: 107px;
  border-radius: 18px;
  background: #212124;
}

.ui-mock__square--sm {
  height: 100%;
}

/* 两张副卡 */
.home-features__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.home-features__card {
  height: 522px;
  padding: 0 0 49px;
  display: flex;
  flex-direction: column;
}

.home-features__card-text {
  padding-inline: 50px;
}

.home-features__card-text h4 {
  margin-bottom: 19px;
}

.home-features__card-text p {
  color: var(--c-body);
  font-size: 14.6px;
}

.home-features__card--orbit {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(247, 247, 247, 0.01) 21%,
    #0e0e11 100%
  );
  justify-content: flex-start;
}

.home-features__card--orbit .home-features__card-text {
  margin-top: auto;
}

/* 轨道图形 */
.orbit {
  position: relative;
  width: 100%;
  height: 391px;
  flex: none;
}

.orbit__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  left: 50%;
  transform: translateX(-50%);
}

.orbit__ring--1 {
  width: 112px;
  height: 112px;
  top: 149px;
}

.orbit__ring--2 {
  width: 176px;
  height: 176px;
  top: 117px;
}

.orbit__ring--3 {
  width: 240px;
  height: 240px;
  top: 85px;
}

.orbit__ring--4 {
  width: 304px;
  height: 304px;
  top: 53px;
}

.orbit__badge {
  position: absolute;
  display: grid;
  place-items: center;
  background: #111;
  border-radius: 20px;
}

.orbit__badge img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}

.orbit__badge--a {
  width: 56px;
  height: 56px;
  left: 288px;
  top: 265px;
  transform: rotate(2.2deg);
}

.orbit__badge--b {
  width: 56px;
  height: 56px;
  left: 249px;
  top: 96px;
  transform: rotate(2.2deg);
}

.orbit__badge--c {
  width: 63px;
  height: 63px;
  border-radius: 22px;
  left: 195px;
  top: 260px;
  transform: rotate(2.2deg);
}

.orbit__badge--d {
  width: 63px;
  height: 63px;
  border-radius: 22px;
  left: 332px;
  top: 67px;
  transform: rotate(2.2deg);
}

.orbit__badge--e {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  left: 144px;
  top: 127px;
  transform: rotate(2.7deg);
}

.orbit__badge--f {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  left: 438px;
  top: 190px;
  transform: rotate(2.7deg);
}

.orbit__badge--center {
  width: 56px;
  height: 56px;
  border-radius: 28px;
  left: 282px;
  top: 177px;
  background: var(--c-accent);
  box-shadow: 0 0 40px rgb(var(--c-accent-rgb) / 0.55);
}

/* 中心图标 = 灿荣 LOGO，橙底上用白色标记 */
.orbit__badge--center img {
  filter: brightness(0) invert(1);
}

/* 24/7 支持卡 */
.home-features__card--support {
  background: rgba(248, 248, 248, 0.05);
  justify-content: flex-start;
}

.support-visual {
  position: relative;
  height: 390px;
  flex: none;
}

.support-visual__word {
  position: absolute;
  left: 50px;
  top: -26px;
  font-size: 264px;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(248, 248, 248, 0.05);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
  mask-image: linear-gradient(180deg, transparent 9%, #000 50%, #000 82.5%, transparent 82.5%);
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 9%,
    #000 50%,
    #000 82.5%,
    transparent 82.5%
  );
  white-space: nowrap;
  pointer-events: none;
}

.support-visual__pill {
  position: absolute;
  left: 194px;
  top: 145px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 75px;
  padding-inline: 50px;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-size: var(--fs-h5);
  font-weight: 500;
  letter-spacing: var(--ls-h5);
  box-shadow: 0 0 45px rgb(var(--c-accent-rgb) / 0.6);
}

.support-visual__icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  /* 灿荣 LOGO 用白色标记，配浅色圆底 */
  background: rgba(255, 255, 255, 0.22);
}

.support-visual__icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.home-features__card--support .home-features__card-text {
  margin-top: auto;
}

/* ==========================================================================
   4. 能力（六格）
   ========================================================================== */
.home-values {
  padding-top: 60px;
  padding-bottom: 120px;
}

.home-values__head {
  margin-bottom: 80px;
}

.home-values__head h2 {
  max-width: 706px;
}

.home-values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.home-values__card {
  height: 242px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.home-values__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 45px;
}

.home-values__card h4 {
  font-size: var(--fs-h5);
  line-height: var(--lh-h5);
  letter-spacing: var(--ls-h5);
  margin-bottom: 18px;
}

.home-values__card p {
  color: var(--c-body);
  font-size: 14.8px;
}

/* ==========================================================================
   5. 集成
   ========================================================================== */
.home-integration {
  padding-top: 120px;
  background: rgba(248, 248, 248, 0.05);
}

.home-integration__text {
  max-width: 570px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-integration__text p {
  margin: 22px 0 42px;
  color: var(--c-body);
}

.home-integration__marquee {
  margin-top: 100px;
}

.home-integration__list {
  display: flex;
  align-items: center;
}

.home-integration__list li {
  width: clamp(145px, 6vw, 175px);
  height: 115px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 0;
  flex: none;
}

.home-integration__list img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}

/* ==========================================================================
   7. 动态
   ========================================================================== */
.home-blog {
  padding-block: 120px;
}

.home-blog__head {
  margin-bottom: 80px;
}

.home-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.home-blog__card a {
  display: flex;
  flex-direction: column;
}

.home-blog__image {
  width: 100%;
  aspect-ratio: 407 / 347;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-bottom: 20px;
}

.home-blog__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
}

.home-blog__date {
  display: inline-grid;
  place-items: center;
  width: 57px;
  height: 23px;
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-ink);
}

.home-blog__date svg {
  width: 15px;
  height: 15px;
}

.home-blog__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-label);
  line-height: 21px;
}

.home-blog__title {
  margin-top: 19px;
  display: block;
  color: var(--c-ink);
  font-size: 18.6px;
  line-height: 30px;
  letter-spacing: -0.4px;
  transition: color var(--dur-fast) ease;
}

.home-blog__card a:hover .home-blog__title {
  color: var(--c-accent);
}

/* ==========================================================================
   8. 响应式
   ========================================================================== */
@media (max-width: 1400px) {
  .ui-mock {
    left: auto;
    right: -120px;
    opacity: 0.75;
  }

  .orbit__badge--a,
  .orbit__badge--c,
  .orbit__badge--f {
    left: auto;
  }

  .orbit__badge--a {
    right: 46px;
  }

  .orbit__badge--c {
    right: 139px;
  }

  .orbit__badge--f {
    right: -104px;
  }
}

@media (max-width: 1180px) {
  .home-values__grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-blog__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .home-hero__inner {
    padding-top: 180px;
  }

  .home-features__hero {
    height: auto;
    min-height: 520px;
    padding: 60px 32px 320px;
  }

  .ui-mock {
    top: auto;
    bottom: -40px;
    right: -160px;
    width: 560px;
    height: 380px;
    opacity: 0.6;
  }

  .home-features__cards {
    grid-template-columns: 1fr;
  }

  /* 窄屏等比缩小轨道图形，避免左右两个角标被卡片裁掉 */
  .orbit {
    height: 250px;
    transform: scale(0.7);
    transform-origin: 50% 0;
  }

  .support-visual__word {
    font-size: 180px;
    left: -24px;
  }

  .support-visual__pill {
    left: 40px;
  }

  .home-features__card {
    height: auto;
    min-height: 460px;
  }

  .home-values__grid,
  .home-blog__grid {
    grid-template-columns: 1fr;
  }

  .home-blog,
  .home-integration,
  .home-values {
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

@media (max-width: 640px) {
  .home-hero {
    min-height: 0;
  }

  .home-hero__inner {
    padding-top: 140px;
    padding-bottom: 48px;
  }

  .home-hero__title {
    margin-bottom: 0;
  }

  .home-hero__en {
    margin-top: 14px;
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  .home-cta__app {
    display: none;
  }

  .home-features__hero {
    padding: 40px 24px 260px;
  }
}

/* ==========================================================================
   9. 中文版新增元素
   ========================================================================== */

/* 技术标签（替代设计稿中的集成方 logo 方块） */
.tech-chip {
  color: var(--c-logo);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 能力卡：用图标代替人像头像 */
.person--capability .avatar {
  padding: 20px;
  background: rgb(var(--c-accent-rgb) / 0.1);
  object-fit: contain;
}

/* 联系方式行（替代价格数字）：沿用价格行的排版，但降到 H5 字号 */
.pricing-block__amount--text {
  font-size: var(--fs-h5);
  line-height: var(--lh-h5);
  letter-spacing: var(--ls-h5);
  font-weight: 500;
}

/* 产品卡：meta 行不再有头像，去掉为头像预留的左侧内边距 */
.home-blog__author {
  padding-inline: 12px;
}

/* ==========================================================================
   10. 首页精简（2026-09-26 批注）
   ========================================================================== */

/* 「我们相信」区块：右侧数据卡（4 条 / 1 个）已移除，引用卡改为通栏 */
.page--home .stat-block__box {
  display: block;
}

/* 引用卡正文跟随卡片宽度（原 610px 上限在通栏后不再适用） */
.page--home .stat-block__quote-body blockquote {
  max-width: none;
}

/* 两个区块标题保持单行显示 */
.page--home .stat-block__head h2,
.page--home .home-features__head h2 {
  white-space: nowrap;
}

/* 引用卡不再保留空白高度：底边贴合「灿荣数字」署名 */
.page--home .stat-block__quote {
  min-height: 0;
}

/* 合作与加入：两张卡改为等高并排（原错位卡片在中文内容下高度不一致） */
.page--home .pricing-block__box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 20px;
  min-height: 0;
}

.page--home .pricing-block__card--basic,
.page--home .pricing-block__card--pro {
  position: relative;
  inset: auto;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 40px;
  border-radius: 14.5px;
}

.page--home .pricing-block__card--basic {
  background: rgba(1, 1, 5, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1180px) {
  .page--home .pricing-block__box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  /* 单行标题在窄屏用更小字号，避免溢出 */
  .page--home .stat-block__head h2,
  .page--home .home-features__head h2 {
    font-size: clamp(18px, 6vw, 26px);
  }

  .page--home .pricing-block__card--basic,
  .page--home .pricing-block__card--pro {
    padding: 24px;
  }
}

/* ==========================================================================
   11. 视觉增强 · 首页应用（共享组件见 css/blocks.css 第 8 节）
   ========================================================================== */

/* D · 巨型描边字位置（公司简介 / 产品方法） */
.stat-block {
  position: relative;
  overflow: hidden;
}

.stat-block__outline {
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
}

.home-features {
  position: relative;
  overflow: hidden;
}

.home-features__outline {
  right: -1%;
  top: 8px;
}

.stat-block > .container,
.home-features > .container {
  position: relative;
  z-index: 1;
}

/* 引号短语不可断行：避免「理论可/行」这类拆词（2026-09-29 掌柜反馈） */
.nb {
  white-space: nowrap;
}

/* 桌面端标题列加宽（2026-09-29 文案改长后）：400px → 460px，
   让「带着问题去思考，从“理论可行”到“技术可行”，解决实际问题」在 ≥1101px 收到 3 行；
   界面骨架示意（.ui-mock）从 left:688px 起，460px 仍在安全区内。 */
@media (min-width: 1101px) {
  .home-features__hero-text h3 {
    max-width: 460px;
  }
}

/* 桌面端强制三行（2026-09-29 掌柜要求）：断行点只在大屏生效，小屏仍按容器宽度自然换行。
   同时把标题列放宽到 560px、字号收一档，保证最长的一行（从“理论可行”到“技术可行”，）不折行。 */
.br-lg {
  display: none;
}

@media (min-width: 1101px) {
  .br-lg {
    display: inline;
  }

  /* 父容器原为 470px（会把 h3 一起卡住）→ 放宽到 600px；
     段落自带 454px 上限，不受影响；右侧 .ui-mock 从 688px 起，620px 以内不会重叠 */
  .home-features__hero-text {
    max-width: 600px;
  }

  .home-features__hero-text h3 {
    max-width: 560px; /* 字号仍用设计系统的 --fs-h3 */
  }
}
