﻿/* =====================================================
   OpenClaw 一键启动器发布页面 — 样式表（深色主题）
   设计依据: DESIGN-OpenClaw-LandingPage-Dark-v1.0
   ===================================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* ===== 品牌色 ===== */
  --color-brand-green: #25D366;
  --color-brand-blue: #26A5E4;
  --color-brand-purple: #5865F2;

  /* 品牌色渐变 */
  --gradient-primary: linear-gradient(135deg, #25D366 0%, #26A5E4 50%, #5865F2 100%);
  --gradient-primary-hover: linear-gradient(135deg, #20bd5a 0%, #1f8fbf 50%, #4a54d6 100%);
  --gradient-primary-active: linear-gradient(135deg, #1da850 0%, #1a7aa5 50%, #3f47be 100%);
  --gradient-accent-1: linear-gradient(135deg, #25D366, #26A5E4);
  --gradient-accent-2: linear-gradient(135deg, #26A5E4, #5865F2);
  --gradient-accent-3: linear-gradient(135deg, #25D366, #5865F2);

  /* ===== 文字色 ===== */
  --color-text-heading: #FFFFFF;
  --color-text-primary: #E4E4E7;
  --color-text-regular: #A1A1AA;
  --color-text-secondary: #71717A;

  /* ===== 背景色 ===== */
  --color-bg-page: #1a1a22;
  --color-bg-section: #202028;
  --color-bg-card: #252530;
  --color-bg-card-hover: #2e2e3a;
  --color-bg-header: rgba(26, 26, 34, 0.88);

  /* ===== 边框色 ===== */
  --color-border: #27272A;
  --color-border-hover: #3F3F46;

  /* ===== 阴影 ===== */
  --shadow-button: 0 4px 20px rgba(38, 165, 228, 0.3);
  --shadow-button-hover: 0 6px 28px rgba(38, 165, 228, 0.45);
  --shadow-button-active: 0 2px 10px rgba(38, 165, 228, 0.2);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-header: 0 1px 8px rgba(0, 0, 0, 0.3);

  /* ===== 圆角 ===== */
  --radius-button: 8px;
  --radius-card: 12px;
  --radius-icon: 8px;

  /* ===== 间距 ===== */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 80px;

  /* ===== 容器 ===== */
  --container-max: 1120px;

  /* ===== 缓动 ===== */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1.0);
  --ease-in-out: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  position: relative; /* 确保 body 内容在粒子 canvas 之上 */
  display: flex;
  flex-direction: column;
  min-height: 100dvh; /* P1-修复: dvh 替代 100vh，解决 iOS Safari 地址栏遮挡 */
  min-height: 100vh; /* 回退 */
}

/* ---------- Main（页脚贴底） ---------- */
main {
  flex: 1;
  position: relative; /* 内容层置于粒子 canvas(z-index:0)之上，星空作为背景 */
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: var(--color-bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s var(--ease-in-out);
}

.header.scrolled {
  box-shadow: var(--shadow-header);
}

.header__inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.header__logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-heading);
  letter-spacing: 0.5px;
}

.header__link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 14px;
  color: var(--color-text-regular);
  transition: color 0.2s var(--ease-in-out);
}

.header__link:hover,
.header__link:focus-visible {
  color: var(--color-brand-blue);
}

.header__inner > .header__link + .header__link {
  margin-left: 20px;
}

/* ---------- Hero ---------- */
  /* ---------- Header Nav ---------- */
.header__nav 
{
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  margin-right: 24px;
}


.header__nav-link 
{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text-regular);
  transition: color 0.2s var(--ease-in-out);
  text-decoration: none;
}

.header__nav-icon {
  flex-shrink: 0;
}

.header__nav-link:hover, 
.header__nav-link:focus-visible 
{
  color: var(--color-brand-blue);
}

.header__nav-sep 
{
  font-size: 14px;
  color: var(--color-text-secondary);
}

  /* ---------- Hero ---------- */
  .hero {
  min-height: 100dvh; /* P1-修复: dvh 替代 100vh，解决 iOS Safari 地址栏遮挡 */
  min-height: 100vh; /* 回退 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent; /* 紧急修复: 改为透明，让粒子可见 */
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}

/* Hero 区域光晕效果 */
.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(38, 165, 228, 0.08) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
  animation: glow-pulse 4s var(--ease-in-out) infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero__inner {
  text-align: center;
  max-width: 720px;
}

.hero__title {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-regular);
  margin-bottom: var(--spacing-lg);
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-in-out);
}

.btn--primary {
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-button);
  border-radius: var(--radius-button);
  letter-spacing: 1px;
}

.btn--primary:hover {
  background: var(--gradient-primary-hover);
  box-shadow: var(--shadow-button-hover);
  transform: scale(1.02);
}

.btn--primary:active {
  background: var(--gradient-primary-active);
  box-shadow: var(--shadow-button-active);
  transform: scale(0.98);
}

.btn--primary:focus-visible {
  outline: 2px solid var(--color-brand-blue);
  outline-offset: 2px;
}

.btn__icon {
  flex-shrink: 0;
}

.btn--hero {
  width: 240px;
  height: 52px;
  font-size: 16px;
}

.btn--download {
  width: 280px;
  height: 52px;
  font-size: 16px;
}

/* ---------- Features ---------- */
.features {
  padding: var(--spacing-xxl) 0;
  background: rgba(32, 32, 40, 0.5); /* 紧急修复: 半透明背景，粒子透过 */
  backdrop-filter: blur(8px); /* 毛玻璃效果，保证卡片文字可读性 */
  -webkit-backdrop-filter: blur(8px);
}

.features__title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-heading);
  text-align: center;
  margin-bottom: var(--spacing-xs);
}

.features__subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-regular);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 320px);
  justify-content: center;
  gap: var(--spacing-md);
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.3s var(--ease-in-out);
}

.feature-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gradient-accent-1);
  border-radius: var(--radius-icon);
  margin-bottom: var(--spacing-sm);
  color: #FFFFFF; /* 子 SVG 的 currentColor 继承自此处 */
}

/* 第二个特性卡片图标 */
.feature-card:nth-child(2) .feature-card__icon {
  background: var(--gradient-accent-2);
}

/* 第三个特性卡片图标 */
.feature-card:nth-child(3) .feature-card__icon {
  background: var(--gradient-accent-3);
}

/* 图标内 SVG 颜色改为白色 */
.feature-card__icon svg path,
.feature-card__icon svg circle,
.feature-card__icon svg rect {
  stroke: #FFFFFF;
}

.feature-card__icon svg circle[fill],
.feature-card__icon svg rect[fill] {
  fill: #FFFFFF;
  stroke: none;
}

.feature-card__title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.feature-card__desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-regular);
}

/* ---------- Download ---------- */
.download {
  position: relative;

  padding: var(--spacing-xxl) 0;
  background: transparent; /* 紧急修复: 改为透明，让粒子可见 */
}

.download__inner {
  text-align: center;
}

.download__title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-heading);
  margin-bottom: var(--spacing-xs);
}

.download__subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-regular);
  margin-bottom: var(--spacing-lg);
}

.download__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.download__badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-brand-blue);
  background: rgba(38, 165, 228, 0.15);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(38, 165, 228, 0.3);
}

.download__version {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

/* ---------- Guide (使用教程) ---------- */
.guide {
  position: relative;
  padding: var(--spacing-xxl) 0;
  background: rgba(32, 32, 40, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.guide__inner {
  text-align: center;
}

.guide__title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-heading);
  margin-bottom: var(--spacing-xs);
}

.guide__subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-regular);
  margin-bottom: var(--spacing-xl);
}

.guide__steps {
  display: grid;
  grid-template-columns: repeat(3, 320px);
  justify-content: center;
  gap: var(--spacing-md);
  text-align: left;
}

/* 合并「核心特性」与「三步快速上手」后的区块 */
.features__guide {
  margin-top: var(--spacing-xl);
}

.features .guide__title,
.features .guide__subtitle {
  text-align: center;
}

.guide-step {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.3s var(--ease-in-out);
}

.guide-step:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.guide-step__head {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.guide-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}

.guide-step__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.guide-step__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.guide-step__list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-regular);
}

.guide-step__list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-brand-blue);
  opacity: 0.7;
}

.guide-step__list code,
.guide__tips code {
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  font-size: 13px;
  color: var(--color-brand-blue);
  background: rgba(38, 165, 228, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  word-break: break-all;
}

.guide__tips {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: var(--radius-card);
  text-align: left;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-regular);
}

.guide__tips strong {
  color: var(--color-brand-green);
}

/* ---------- Footer ---------- */
.footer {
  position: relative; /* 同 main：内容层置于粒子 canvas 之上 */
  z-index: 1;
  padding: var(--spacing-lg) 0;
  background: rgba(32, 32, 40, 0.5); /* 紧急修复: 半透明背景 */
  backdrop-filter: blur(8px); /* 毛玻璃效果 */
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.footer__copyright {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.footer__sep {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.footer__link {
  font-size: 12px;
  color: var(--color-text-secondary);
  transition: color 0.2s var(--ease-in-out);
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--color-brand-blue);
}

.footer__beian {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.footer__beian-icon {
  flex: none;
}

.footer__privacy {
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: default;
}


/* ========== 增强动效 ========== */

/* Hero 区域入场动画 */
@keyframes heroTitleIn {
  0% { opacity: 0; transform: translateY(-30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heroSubtitleIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroBtnIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* Feature 卡片悬浮呼吸动效 */
@keyframes featureFloat1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes featureFloat2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes featureFloat3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 下载按钮脉冲 */
@keyframes downloadPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* 下载区域背景光晕 */
@keyframes downloadGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.02); }
}

/* Logo 呼吸光效 */
@keyframes logoBreath {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(37, 211, 102, 0.3)); }
  50% { filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.6)); }
}

/* Hero 标题自动入场 (不用 JS) */
.hero__title.fade-in {
  animation: heroTitleIn 0.8s var(--ease-out) 0.1s both;
}
.hero__subtitle.fade-in {
  animation: heroSubtitleIn 0.7s var(--ease-out) 0.3s both;
}
.btn--hero.fade-in {
  animation: heroBtnIn 0.6s var(--ease-out) 0.5s both;
}

/* 下载按钮脉冲 */
.btn--download {
  animation: downloadPulse 2.5s ease-in-out infinite;
}
.btn--download:hover {
  animation: none;
}

/* Logo 呼吸光效 */
.header__logo-icon {
  animation: logoBreath 3s ease-in-out infinite;
}

/* 下载区域背景光晕 */
.download::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: downloadGlow 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Fade-in Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* 下载按钮组 */
.download__btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn--platform {
  min-width: 180px;
}

@media (max-width: 600px) {
  .btn--platform {
    width: 100%;
    max-width: 260px;
  }
}


/* Hero 统计数据 */
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
}

.hero__stats.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.hero__stat-icon {
  font-size: 14px;
}

.hero__stat-num {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  font-variant-numeric: tabular-nums;
}

.hero__stat-label {
  font-weight: 400;
}

.hero__stat-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* ---------- Responsive: Tablet (768px - 1199px) ---------- */
@media (max-width: 1199px) {
  .hero__title {
    font-size: 44px;
  }

  .hero__subtitle {
    font-size: 18px;
  }

  .features__grid,
  .guide__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .container {
    padding: 0 var(--spacing-lg);
  }

  .features,
  .download,
  .guide {
  position: relative;

    padding: 64px 0;
  }
}

/* ---------- 无障碍: 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* 仅禁用 CSS transition，不影响 Canvas 粒子和关键动效 */
}

/* ---------- Responsive: Mobile (< 768px) ---------- */
@media (max-width: 767px) {
  .hero__title {
    font-size: 36px;
    letter-spacing: 1px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  /* P2-修复: 缩小光晕尺寸，避免超小屏裁剪 */
  .hero::before {
    width: 300px;
    height: 300px;
  }

  .btn--hero,
  .btn--download {
    width: 100%;
    max-width: 320px;
  }

  .features__title {
    font-size: 24px;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .guide__steps {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .feature-card {
    width: 100%;
  }

  .download__title,
  .guide__title {
    font-size: 24px;
  }

  .features,
  .download,
  .guide {
  position: relative;

    padding: 48px 0;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .header__link span {
    display: none;
  }
}

/* ---------- 粒子 Canvas ---------- */
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* =====================================================
   滚动条美化（全局，替代系统默认滚动条）
   ===================================================== */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
  background: rgba(38, 165, 228, 0.6);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

