/* 首页专用：标题与正文宽度、演示区留白、能力叙事。
   演示组件本身的样式在 demo.css，首页与文档共用。
   文档页不加载本文件；共享基础样式仍由 site.css 提供。 */

/* 标题略收一号，正文用实际容器宽度自然换行 */
.hero-title {
  /* 上方 badge 已删除，去掉原先为它预留的 30px */
  margin-top: 0;
  font-size: clamp(1.95rem, 4.9vw, 4.45rem);
  line-height: 1.02;
}

.hero-title:lang(zh) {
  line-height: 1.14;
}

.hero-title-line {
  display: block;
  text-wrap: balance;
}

.hero-copy {
  max-width: 900px;
}

.hero-lead {
  max-width: 76ch;
  text-wrap: wrap;
}

:root[data-locale="zh"] .hero-lead {
  max-width: 46em;
}

.section-head {
  max-width: 980px;
}

.section-head .section-lead {
  max-width: 80ch;
  text-wrap: wrap;
}

:root[data-locale="zh"] .section-head .section-lead {
  max-width: 48em;
}

/* 删掉重复模块后收紧纵向留白。
   .cta .section-head 的 margin-bottom:0 优先级更高，仍按原样生效。 */
.hero {
  padding-top: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(32px, 3.6vw, 48px);
}

.section {
  padding-block: clamp(36px, 4vw, 64px);
}

.section-head {
  margin-bottom: clamp(24px, 3vw, 36px);
}

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn .i-download {
  width: 21px;
  height: 21px;
}

.nav-download .i-download {
  width: 18px;
  height: 18px;
}

/* ── 顶部连续操作演示：只留首页专属留白，组件样式见 demo.css ───── */

.fd-showcase {
  margin-top: clamp(26px, 3vw, 40px);
}

/* ── 能力：一条主流程 + 六张同规格卡片 ─────────────────────── */

.flow-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 40px);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(70% 90% at 100% 0%, var(--glow-blue), transparent 62%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-card);
}

.flow-copy {
  display: grid;
  gap: 12px;
}

.flow-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.flow-kicker .i {
  width: 14px;
  height: 14px;
}

.flow-copy h3 {
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  font-stretch: 106%;
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: balance;
}

.flow-copy p {
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.7;
  text-wrap: wrap;
}

.flow-steps {
  display: grid;
  gap: 9px;
  margin-top: 3px;
}

.flow-steps li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.flow-step-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--accent-text);
}

.flow-step-icon .i {
  width: 13px;
  height: 13px;
}

.flow-steps b {
  display: block;
  font-size: 0.91rem;
  font-weight: 650;
  line-height: 1.4;
}

.flow-steps > li > div > span {
  display: block;
  color: var(--ink-3);
  font-size: 0.85rem;
  line-height: 1.5;
}

.flow-map {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 86%, var(--paper-2));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 55%);
}

:root[data-theme="dark"] .flow-map {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
}

.flow-source {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.flow-source-label {
  display: block;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.flow-source p {
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.45;
}

.flow-core {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  font-size: 0.87rem;
}

.flow-core .i {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--accent-text);
}

.flow-core b {
  font-weight: 650;
}

.flow-core span {
  margin-left: auto;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.flow-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.flow-task {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-2);
  border-radius: 7px;
  background: var(--surface);
}

.flow-task b {
  display: block;
  overflow: hidden;
  font-size: 0.83rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-task code {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-task-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 9px;
}

.flow-task-status .i {
  width: 10px;
  height: 10px;
}

.flow-merge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.flow-merge .i {
  width: 12px;
  height: 12px;
  color: var(--ok);
}

.flow-merge .is-ok {
  color: var(--ok);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  /* 原先是给 .flow-spotlight 拉开的距离，模块删掉后不再需要 */
  margin-top: 0;
}

.cap-card {
  display: flex;
  min-height: 188px;
  flex-direction: column;
  gap: 11px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.25s,
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.cap-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -40px rgb(18 19 16 / 42%);
}

.cap-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent-text);
}

.cap-icon .i {
  width: 17px;
  height: 17px;
}

.cap-card h3 {
  font-size: 1.08rem;
  font-stretch: 105%;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.cap-card p {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.67;
  text-wrap: wrap;
}

.cap-meta {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* ── 工作流：一条齐整的步骤列表 ─────────────────────────────── */

.wf-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.wf-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 22px 26px;
  border-top: 1px solid var(--line);
}

.wf-item:first-child {
  border-top: 0;
}

.wf-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--accent-text);
}

.wf-icon .i {
  width: 19px;
  height: 19px;
}

.wf-body {
  min-width: 0;
}

.wf-step-num {
  display: block;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.wf-body h3 {
  margin-top: 2px;
  font-size: 1.06rem;
  font-weight: 720;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

.wf-body p {
  margin-top: 5px;
  max-width: 74ch;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.65;
  text-wrap: wrap;
}

.wf-tool {
  align-self: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}

/* 响应式 */

@media (max-width: 1080px) {
  .flow-spotlight {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-copy p {
    max-width: 72ch;
  }

  .cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wf-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .wf-tool {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }
}

@media (max-width: 720px) {
  .hero-title {
    font-size: clamp(1.78rem, 7vw, 2.75rem);
  }

  .cap-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cap-card {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .hero-title {
    font-size: clamp(1.7rem, 7vw, 2.6rem);
  }

  .flow-task-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wf-item {
    gap: 12px;
    padding: 18px;
  }

  .wf-body p {
    font-size: 0.92rem;
  }
}

/* 首页模型厂商循环栏 */

/* .providers 是 .strip-inner 网格的直接子项：默认 min-width:auto 会取内容
   （max-content 的三份轨道）作为自动最小尺寸并上传给网格列，把整条 .strip 撑开。
   显式 min-width:0 让列宽只由容器决定，再由 viewport 的 overflow:hidden 裁剪轨道。 */
.providers {
  min-width: 0;
  padding-block: 4px 6px;
}

.providers-title {
  margin: 0 0 clamp(20px, 2.4vw, 30px);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.providers-marquee {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 16px;
}

.providers-marquee:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}

.providers-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-block: clamp(10px, 1.6vw, 20px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.providers-track {
  display: flex;
  width: max-content;
  animation: providers-scroll 42s linear infinite;
}

/* 每份副本末尾留出一份间距，三份等宽副本才能用 -100% / 3 无缝接回 */
.providers-set {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(48px, 6vw, 88px);
  margin: 0;
  padding: 0 clamp(48px, 6vw, 88px) 0 0;
  list-style: none;
}

.provider {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.1vw, 14px);
  color: var(--ink-2);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.provider-mark {
  flex: none;
  width: clamp(24px, 2.8vw, 31px);
  height: clamp(24px, 2.8vw, 31px);
  opacity: 0.66;
}

:root[data-theme="dark"] .provider-mark {
  filter: invert(1);
  opacity: 0.72;
}

.providers-marquee:hover .providers-track,
.providers-marquee:focus-within .providers-track {
  animation-play-state: paused;
}

@keyframes providers-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-100% / 3), 0, 0);
  }
}

@media (max-width: 720px) {
  .providers-track {
    animation-duration: 34s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .providers-viewport {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .providers-track {
    display: block;
    width: auto;
    animation: none;
    transform: none;
  }

  .providers-set {
    flex-wrap: wrap;
    row-gap: clamp(14px, 2vw, 20px);
    padding-right: 0;
  }

  .providers-set[aria-hidden="true"] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cap-card {
    transition: none;
  }

  .cap-card:hover {
    transform: none;
  }
}

/* 暗色：流程卡改为中性黑，彩色只保留在文字与状态点上（演示窗口的暗色在 demo.css） */

:root[data-theme="dark"] .flow-spotlight,
:root[data-theme="dark"] .flow-map,
:root[data-theme="dark"] .cap-card,
:root[data-theme="dark"] .wf-list {
  border-color: rgb(255 255 255 / 8%);
  background: rgb(255 255 255 / 2%);
  box-shadow: none;
}

:root[data-theme="dark"] .flow-source,
:root[data-theme="dark"] .flow-core,
:root[data-theme="dark"] .flow-task {
  border-color: rgb(255 255 255 / 8%);
  background: rgb(255 255 255 / 3%);
}

:root[data-theme="dark"] .flow-task {
  border-left-color: var(--accent-2);
}

:root[data-theme="dark"] .cap-card:hover {
  border-color: rgb(255 255 255 / 16%);
  background: rgb(255 255 255 / 4%);
  box-shadow: none;
}
