/* ============================================
   Harloops 官网样式
   苹果极简风 · 白色底 · 品牌红 #F02020
   主旨：一切皆可运营 · 全能运营智能体工厂
   ============================================ */

:root {
  --red: #F02020;        /* 品牌红（取自 logo） */
  --dark: #111111;       /* 主文字 */
  --gray: #6e6e73;       /* 次要文字 */
  --card: #f5f5f7;       /* 卡片底色 */
  --border: #e8e8ed;     /* 分隔线 */
  --white: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(240, 32, 32, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(100, 120, 255, 0.04) 0%, transparent 50%),
    var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 顶部导航（毛玻璃） ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: none;
  box-shadow: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  color: var(--dark);
  letter-spacing: -0.3px;
}

.logo img { width: 30px; height: auto; }

/* ---------- 首屏 Hero ---------- */
.hero {
  text-align: center;
  padding: 110px 24px 70px;
}

.hero h1 {
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
}

.hero h1 em { color: var(--red); font-style: normal; }

.hero .subtitle {
  font-size: 21px;
  color: var(--gray);
  margin: 22px 0 36px;
}

.cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(240, 32, 32, 0.35);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  color: var(--dark);
}

.btn:hover { transform: translateY(-2px); }

/* ---------- 通用板块 ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 24px;
}

.section h2 {
  text-align: center;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section h2 em {
  color: var(--red);
  font-style: normal;
}

.section-sub {
  text-align: center;
  color: var(--gray);
  font-size: 17px;
  margin: 16px 0 44px;
}

/* 三要素（Harness / Graph / Loop） */
.triad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.triad-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.triad-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.triad-icon { font-size: 38px; margin-bottom: 12px; }

.triad-card h3 { font-size: 18px; margin-bottom: 8px; }

.triad-card p { font-size: 14px; color: var(--gray); }

/* 应用场景卡片（8 卡通用） */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.store-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s, box-shadow 0.3s;
}

.store-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.07);
}

.store-icon { font-size: 34px; margin-bottom: 12px; }

.store-card h3 { font-size: 17px; margin-bottom: 6px; }

.store-card p { font-size: 14px; color: var(--gray); }

/* ---------- 下载按钮 ---------- */
.download-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* 下载按钮内的小图标（Android / iOS） */
.btn-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.btn-icon svg, .btn-icon {
  fill: none;
  stroke: currentColor;
}

/* ---------- 产品演示视频（无感嵌入 · 白底融合） ---------- */
.demo-video-wrap {
  max-width: 1100px;
  margin: 44px auto 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.demo-video {
  width: 100%;
  height: auto;
  display: block;
  /* 白底视频 × 白底页面：白色区域自然消失，实现无感嵌入 */
  mix-blend-mode: multiply;
  background: transparent;
  /* 方案 A：四边羽化渐隐，消除视频矩形硬边 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%),
                      linear-gradient(to bottom, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%),
              linear-gradient(to bottom, transparent 0%, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  /* 方案 C：微调亮度和对比度，让视频色调更贴近页面背景 */
  filter: brightness(1.03) contrast(0.97);
}

/* ---------- 页脚 ---------- */
.footer {
  text-align: center;
  padding: 60px 24px 44px;
  border-top: none;
  background: transparent;
}

.footer-logo { width: 40px; margin: 0 auto 14px; }

.footer p { color: var(--gray); }

.footer-copy { font-size: 13px; margin-top: 8px; }

.footer-links {
  margin-top: 16px;
  font-size: 14px;
  color: var(--gray);
}

.footer-legal {
  margin-top: 10px;
  font-size: 12px;
  color: #aaa;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-icp {
  margin-top: 8px;
  font-size: 12px;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer-icp a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-icp a:hover {
  color: var(--gray);
}

.icp-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* ---------- 法律文档页面 ---------- */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

.legal-page h1 {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.legal-page .legal-update {
  text-align: center;
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--dark);
}

.legal-page p {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 12px;
  line-height: 1.8;
}

.legal-page ul {
  margin: 12px 0 12px 24px;
}

.legal-page li {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 8px;
  line-height: 1.8;
}

.legal-back {
  display: inline-block;
  margin-top: 40px;
  color: var(--red);
  text-decoration: none;
  font-size: 14px;
}

.legal-back:hover {
  text-decoration: underline;
}

/* ---------- 提示气泡 ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(17, 17, 17, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: 0.3s;
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   流式输出演示区（首屏）
   ============================================ */
.demo {
  max-width: 1100px;
  margin: 60px auto 0;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  text-align: left;
}

.chat { padding: 22px 24px; min-height: 280px; }

.msg {
  max-width: 92%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.user {
  background: rgba(245, 245, 247, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.03);
  color: var(--dark);
  margin-left: auto;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.msg.ai {
  background: rgba(245, 245, 247, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.03);
  color: var(--dark);
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.msg.ai::before {
  content: '';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: url('favicon.ico') no-repeat center / contain;
  margin-top: 2px;
}

.msg .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--red);
  animation: blink 0.8s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.demo-questions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  font-size: 13px;
  color: var(--gray);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chip:hover {
  color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.chip.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* ---------- 手机适配 ---------- */
@media (max-width: 768px) {
  .hero h1 { font-size: 40px; }
  .hero { padding: 80px 20px 50px; }

  .triad-grid,
  .stores-grid { grid-template-columns: repeat(2, 1fr); }

  .section { padding: 64px 20px; }
  .section h2 { font-size: 30px; }

  .demo { margin-top: 44px; }
  .chat { min-height: 200px; }
}

@media (max-width: 480px) {
  .triad-grid,
  .stores-grid { grid-template-columns: 1fr; }

  .btn { padding: 12px 22px; font-size: 15px; }
}
