/* ========================================
   Home CSS - SheetNext 首页样式
   晨间简约风格
======================================== */

.home {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(238, 240, 242, 0.3) 35%, rgba(238, 240, 242, 0.8) 100%);
}

/* ---- Hero Section ---- */
.hero {
  padding: 52px 0 30px;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(55, 53, 47, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 53, 47, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: 0 -2px, 0 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 75%);
  pointer-events: none;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.hero-name-text {
  position: relative;
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.hero-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(55, 53, 47, 0.08);
  letter-spacing: 0.08em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  margin-top: 3px;
}

.hero-title {
  font-size: clamp(34px, 4.8vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

.hero-title-text {
  position: relative;
  display: inline-block;
  font-size: clamp(34px, 4vw, 42px);
  color: var(--color-text);
  letter-spacing: 1px;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  max-width: 800px;
  margin-bottom: 8px;
  line-height: 1.7;
}

.hide-mobile { display: inline; }

/* ---- Hero Highlights ---- */
.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.hero-tags, .tag, .tag:hover { display: none; }

/* ---- Hero CTA ---- */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 0;
  margin-top: 32px;
}

.hero-cta .btn i { font-size: 16px; }

/* ---- Hero Image / Mac Frame ---- */
.hero-image-wrap {
  width: 100%;
  max-width: 1280px;
  margin-top: 40px;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-video {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.mac-frame {
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 8px 16px rgba(0, 0, 0, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.mac-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}

.mac-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.mac-dot::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 50%);
}

.mac-dot.red {
  background: linear-gradient(180deg, #ff6058 0%, #e14640 100%);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.12), inset 0 -1px 1px rgba(0,0,0,0.1);
}

.mac-dot.yellow {
  background: linear-gradient(180deg, #ffbf2f 0%, #dea123 100%);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.12), inset 0 -1px 1px rgba(0,0,0,0.1);
}

.mac-dot.green {
  background: linear-gradient(180deg, #2bc840 0%, #1fa82e 100%);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.12), inset 0 -1px 1px rgba(0,0,0,0.1);
}

.mac-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.mac-body { background: #fff; }

/* ---- Partners Section ---- */
.partners-section {
  width: 100%;
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.partners-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.partners-wrapper {
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: scroll-partners 30s linear infinite;
}

.partners-track:hover { animation-play-state: paused; }

.partner-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.partner-item img {
  height: 42px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.5);
  transition: all 0.3s ease;
}

.partner-item:hover img {
  filter: grayscale(0%) opacity(1);
}

@keyframes scroll-partners {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Section ---- */
.section-muted {
  background: var(--color-bg-white);
}

.section-header.center {
  max-width: 600px;
}

/* ---- Workflow 工作原理 ---- */
.workflow-advanced {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto auto auto;
  grid-template-rows: auto auto auto;
  gap: 22px 10%;
  justify-content: center;
  align-items: center;
  padding: 36px 20px 32px;
  min-height: 380px;
}

.workflow-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.wf-path {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
  animation: wf-flow 1.2s linear infinite;
}

.wf-dot {
  filter: blur(0.5px);
}

@keyframes wf-flow {
  from { stroke-dashoffset: 22; }
  to { stroke-dashoffset: 0; }
}

.wf-path-main { stroke: rgba(35, 131, 226, 0.5); }
.wf-path-to-llm { stroke: rgba(35, 131, 226, 0.5); }
.wf-path-tool { stroke: rgba(16, 185, 129, 0.45); }
.wf-path-output { stroke: rgba(245, 158, 11, 0.5); }
.wf-path-llm { stroke: rgba(139, 92, 246, 0.55); stroke-width: 2; }
.wf-path-feedback { stroke: rgba(139, 92, 246, 0.45); }
.wf-path-loop { stroke: rgba(236, 72, 153, 0.45); }
.wf-path-edit { stroke: rgba(245, 158, 11, 0.5); }

/* 工作流节点 */
.wf-node {
  position: relative;
  z-index: 1;
}

.wf-node-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(55, 53, 47, 0.08);
  border-radius: 16px;
  cursor: default;
}

.wf-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 21px;
}

.wf-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.wf-sublabel {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* 输入节点 */
.wf-input { grid-column: 1; grid-row: 2; }
.wf-input .wf-node-inner,
.wf-context .wf-node-inner,
.wf-llm .wf-node-inner,
.wf-process .wf-node-inner {
  min-width: 90px;
}
.wf-input .wf-icon {
  width: 42px; height: 42px; font-size: 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff; border-radius: 13px;
}
.wf-input .wf-node-inner { border-color: rgba(16, 185, 129, 0.18); }

/* 整合节点 */
.wf-context { grid-column: 2; grid-row: 2; }
.wf-context .wf-node-inner { border-color: rgba(6, 182, 212, 0.18); }
.wf-context .wf-icon {
  width: 42px; height: 42px; font-size: 20px;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: #fff; border-radius: 13px;
}

/* 处理节点 */
.wf-process .wf-icon {
  width: 42px; height: 42px; font-size: 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff; border-radius: 13px;
}
.wf-process .wf-node-inner { border-color: rgba(35, 131, 226, 0.18); }
.wf-node[data-node="result"] { grid-column: 4; grid-row: 2; }

/* AI 核心节点 */
.wf-core { grid-column: 3; grid-row: 2; }
.wf-core .wf-node-inner {
  padding: 22px 28px;
  background: linear-gradient(135deg, rgba(235, 245, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1.5px solid rgba(35, 131, 226, 0.2);
}
.wf-core .wf-icon {
  width: 56px; height: 56px;
  background: transparent; font-size: 28px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.wf-core .wf-icon .wf-logo { width: 48px; height: 48px; object-fit: contain; }
.wf-core .wf-label { font-size: 14px; }
.wf-pulse { display: none; }

/* 工具节点组 */
.wf-tools-group {
  grid-column: 1 / 6; grid-row: 3;
  display: flex; justify-content: center;
  gap: 16px; z-index: 1; flex-wrap: wrap;
}

.wf-tool .wf-node-inner {
  padding: 14px 16px; border-radius: 14px;
  border-color: rgba(16, 185, 129, 0.15);
}
.wf-tool .wf-icon {
  width: 38px; height: 38px; font-size: 19px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669; border-radius: 11px;
}

/* LLM 节点 */
.wf-llm { grid-column: 3; grid-row: 1; }
.wf-llm .wf-icon {
  width: 42px; height: 42px; font-size: 20px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #fff; border-radius: 13px;
}
.wf-llm .wf-node-inner { border-color: rgba(139, 92, 246, 0.18); }

.wf-tooltip {
  display: none;
}

/* 输出节点组 */
.wf-outputs-group {
  grid-column: 5; grid-row: 2;
  display: flex; flex-direction: column;
  gap: 10px; z-index: 1;
}

.wf-output .wf-node-inner {
  padding: 14px;
  border-color: rgba(245, 158, 11, 0.15);
}
.wf-output .wf-icon {
  width: 38px; height: 38px; font-size: 19px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff; border-radius: 11px;
}

/* ---- Why SheetNext 布局 ---- */

/* 横向数据卡片行 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px 28px;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 1px 3px rgba(15, 15, 15, 0.04);
}

.stat-card:hover .stat-card-inner {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 15, 15, 0.08);
  border-color: rgba(35, 131, 226, 0.25);
}

.stat-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-text);
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 10px;
}

.stat-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* 功能卡片 */
.feat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feat-card-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
  padding: 26px 24px;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 1px 3px rgba(15, 15, 15, 0.04);
}

.feat-card:hover .feat-card-inner {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 15, 15, 0.08);
}

.feat-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 26px;
}

.feat-text {
  flex: 1;
  min-width: 0;
}

/* 卡片颜色主题 */
[data-color="blue"] .feat-icon {
  background: rgba(35, 131, 226, 0.1);
  color: #2383e2;
}
[data-color="blue"]:hover .feat-card-inner { border-color: rgba(35, 131, 226, 0.3); }

[data-color="amber"] .feat-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
[data-color="amber"]:hover .feat-card-inner { border-color: rgba(245, 158, 11, 0.3); }

[data-color="violet"] .feat-icon {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}
[data-color="violet"]:hover .feat-card-inner { border-color: rgba(139, 92, 246, 0.3); }

[data-color="green"] .feat-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}
[data-color="green"]:hover .feat-card-inner { border-color: rgba(16, 185, 129, 0.3); }

[data-color="cyan"] .feat-icon {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}
[data-color="cyan"]:hover .feat-card-inner { border-color: rgba(6, 182, 212, 0.3); }

[data-color="rose"] .feat-icon {
  background: rgba(236, 72, 153, 0.1);
  color: #db2777;
}
[data-color="rose"]:hover .feat-card-inner { border-color: rgba(236, 72, 153, 0.3); }

.feat-card-inner h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
}

.feat-card-inner p {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.65;
}

/* ---- Why CTA (内嵌底部) ---- */
.why-cta {
  margin-top: 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.why-cta-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  max-width: 560px;
}

.why-cta-desc {
  font-size: 15px;
  color: var(--color-text-light);
  max-width: 480px;
  line-height: 1.6;
}

.why-cta-actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.why-cta-actions .btn-ghost {
  color: var(--color-text-light);
  border-color: rgba(55, 53, 47, 0.15);
}

.why-cta-actions .btn-ghost:hover {
  color: var(--color-text);
  border-color: rgba(55, 53, 47, 0.3);
  background: rgba(55, 53, 47, 0.04);
}

.why-cta-hints {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.why-cta-hints span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.why-cta-hints i {
  font-size: 14px;
  color: #10b981;
}


/* ---- Why Section Tone-down ---- */
.section-why {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 255, 0.92) 55%, rgba(255, 255, 255, 0.96) 100%);
}

.section-why::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35, 131, 226, 0.25), transparent);
}

.section-why .stats-row {
  margin-bottom: 36px;
}

.section-why .stat-card-inner,
.section-why .feat-card-inner {
  background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(35, 131, 226, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.section-why .stat-card:hover .stat-card-inner,
.section-why .feat-card:hover .feat-card-inner {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12), 0 0 18px rgba(35, 131, 226, 0.08);
}

.section-why .stat-num {
  color: #1f2937;
}

.section-why .stat-label {
  color: #4b5563;
}

.section-why .stat-desc {
  color: #6b7280;
}

.section-why .feat-card {
  --feature-accent: 35, 131, 226;
}

.section-why .feat-card[data-color="green"],
.section-why .feat-card[data-color="cyan"] {
  --feature-accent: 16, 185, 129;
}

.section-why .feat-icon {
  background: rgba(var(--feature-accent), 0.14);
  color: rgb(var(--feature-accent));
}

.section-why .feat-card-inner h4 {
  color: #1f2937;
}

.section-why .feat-card-inner p {
  color: #6b7280;
}

.section-why .why-cta-actions .btn-ghost {
  border: 1px solid rgba(35, 131, 226, 0.22);
  background: rgba(255, 255, 255, 0.85);
  color: #334155;
}

.section-why .why-cta-actions .btn-ghost:hover {
  border-color: rgba(35, 131, 226, 0.34);
  background: rgba(35, 131, 226, 0.08);
  color: #1f2937;
}
/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .feat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .workflow-advanced {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 16px 24px;
  }
  .wf-tool-llm { grid-column: 2; grid-row: 1; }
  .wf-input { grid-column: 1; grid-row: 2; }
  .wf-context { grid-column: 2; grid-row: 2; }
  .wf-core { grid-column: 3; grid-row: 2; }
  .wf-node[data-node="result"] { grid-column: 2; grid-row: 3; }
  .wf-tools-group { grid-column: 1 / 4; grid-row: 4; flex-wrap: wrap; }
  .wf-outputs-group { grid-column: 1 / 4; grid-row: 3; flex-direction: row; justify-content: flex-end; }
  .workflow-svg { display: none; }
  .why-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .feat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 0 52px;
  }
  .hide-mobile { display: none; }
  .workflow-advanced {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .wf-tool-llm,
  .wf-input,
  .wf-context,
  .wf-core,
  .wf-node[data-node="result"] {
    grid-column: 1;
    grid-row: auto;
  }
  .wf-tools-group,
  .wf-outputs-group {
    grid-column: 1;
    grid-row: auto;
  }
  .feat-cards {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .stat-card-inner {
    padding: 24px 16px 22px;
  }
  .stat-num {
    font-size: 28px;
  }
}

/* ---- 减少动画偏好 ---- */
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; }
  .wf-path { animation: none; }
}
