/* Covesay 官网样式 — 设计 token 与全站结构
   配色取自品牌 logo 与 App 主色：
   --sea  #2E9BE6  主蓝（与 App / 运营后台同源）
   --deep #1273B8  深蓝（悬停/渐变深端）
   --ink  #0F2436  深海墨蓝（正文标题，不用纯黑）
   --mist #5C7A93  蓝灰（次级文字）
   --foam #F2F8FD  浪沫浅蓝（区块底色）           */

:root {
  --sea: #2e9be6;
  --deep: #1273b8;
  --ink: #0f2436;
  --mist: #5c7a93;
  --foam: #f2f8fd;
  --line: #e3edf5;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--deep); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航 ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.brand:hover { color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-links a { color: var(--mist); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }

/* 语言下拉：地球图标 + 原生 select（无障碍/移动端友好） */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 8px 5px 10px;
  color: var(--mist);
  background: #fff;
}
.lang svg { width: 15px; height: 15px; flex-shrink: 0; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235c7a93' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right center;
  padding-right: 16px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}

/* 双语显隐：<html data-lang> 决定展示哪套文案（i18n.js） */
html[data-lang='zh'] [data-lang='en'] { display: none !important; }
html[data-lang='en'] [data-lang='zh'] { display: none !important; }

/* ---------------- Hero：海湾波浪 + 手机实景 ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(178deg, #fff 0%, var(--foam) 88%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding: 88px 0 140px;
}
.hero h1 {
  font-size: 54px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.hero h1 .en {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--sea);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero p.lead {
  margin-top: 22px;
  font-size: 19px;
  color: var(--mist);
  max-width: 30em;
}
.hero-cta { margin-top: 36px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--mist); }

/* 入场序列（reduced-motion 时由全局规则整体关闭） */
.rise { opacity: 0; transform: translateY(14px); animation: rise 0.7s ease forwards; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.24s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* App Store 徽章（深色按钮 + 苹果标） */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 10px 22px 10px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 36, 54, 0.22);
}
.store-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge .txt { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.store-badge .txt small { font-size: 11px; opacity: 0.8; }
.store-badge .txt strong { font-size: 17px; font-weight: 600; }

/* 波浪弧（签名元素：呼应 logo 的层叠浪瓣） */
.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  pointer-events: none;
}
.waves svg { display: block; width: 100%; height: 110px; }

/* ---------------- 手机实景（纯 CSS 复刻 App 聊天页） ---------------- */

.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 306px;
  border-radius: 44px;
  background: #0b0d10;
  padding: 10px;
  box-shadow:
    0 30px 60px rgba(15, 36, 54, 0.22),
    0 4px 14px rgba(15, 36, 54, 0.12);
}
.screen {
  border-radius: 35px;
  overflow: hidden;
  background: #eef4fa;
  display: flex;
  flex-direction: column;
  height: 600px;
}
.chat-top {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px 14px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}
.chat-top .back { color: var(--sea); font-size: 20px; line-height: 1; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6db9f2, var(--sea));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.peer { line-height: 1.25; }
.peer b { font-size: 14.5px; display: block; }
.peer span { font-size: 11px; color: #31c48d; }
.chat-body {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* 会话贴近输入框，与真实聊天视感一致 */
  gap: 8px;
  font-size: 14px;
}
/* 「正在输入」指示气泡 */
.typing {
  align-self: flex-start;
  background: #fff;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  padding: 12px 14px;
  display: flex;
  gap: 4px;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9fb2c2;
  animation: blink 1.3s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}
.bubble {
  max-width: 76%;
  padding: 8px 12px;
  border-radius: 18px;
  line-height: 1.45;
  position: relative;
}
.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; }
.out {
  align-self: flex-end;
  background: var(--sea);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.bubble time { display: inline-block; font-size: 10px; opacity: 0.62; margin-left: 8px; transform: translateY(1px); }
.pic {
  align-self: flex-start;
  width: 168px;
  height: 112px;
  border-radius: 14px;
  border-bottom-left-radius: 6px;
  background:
    radial-gradient(90px 46px at 78% 18%, rgba(255, 255, 230, 0.85), transparent 70%),
    linear-gradient(180deg, #8ecdf5 0%, #5eb2ee 52%, #2e86c9 52.5%, #1f6ba6 100%);
}
.day {
  align-self: center;
  font-size: 11px;
  color: var(--mist);
  background: rgba(255, 255, 255, 0.72);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 2px;
}
.chat-input {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
  padding: 9px 12px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mist);
}
.chat-input .field {
  flex: 1;
  background: #eef2f6;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: #9fb2c2;
}
.chat-input svg { width: 22px; height: 22px; }

/* ---------------- 特性区 ---------------- */

.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head h2 { font-size: 34px; font-weight: 700; letter-spacing: -0.3px; }
.section-head p { margin-top: 12px; color: var(--mist); font-size: 17px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(15, 36, 54, 0.08); }
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--foam);
  color: var(--sea);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 17px; font-weight: 650; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: var(--mist); }

/* ---------------- 隐私承诺带 ---------------- */

.privacy-band { background: var(--foam); }
.privacy-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 84px 0;
}
.privacy-inner h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.3px; }
.privacy-inner .pledge { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.pledge-item { display: flex; gap: 12px; font-size: 15.5px; }
.pledge-item svg { width: 21px; height: 21px; color: var(--sea); flex-shrink: 0; margin-top: 3px; }
.pledge-item p { color: var(--mist); }
.pledge-item b { color: var(--ink); display: block; }
.privacy-links { margin-top: 26px; font-size: 15px; }
.privacy-links a { font-weight: 600; margin-right: 22px; }

/* 承诺带右侧：品牌浪标放大陈列 */
.crest {
  display: flex;
  justify-content: center;
}
.crest img {
  width: 300px;
  height: 300px;
  border-radius: 67px;
  box-shadow: 0 30px 70px rgba(46, 155, 230, 0.28);
}

/* ---------------- 下载区 ---------------- */

.download { text-align: center; padding: 96px 0 104px; }
.download h2 { font-size: 34px; font-weight: 700; }
.download p { color: var(--mist); margin: 14px 0 30px; font-size: 17px; }

/* ---------------- 页脚 ---------------- */

.footer { border-top: 1px solid var(--line); padding: 34px 0 44px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--mist);
}
.footer-inner .brand { font-size: 15px; }
.footer-inner .brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--mist); }
.footer-links a:hover { color: var(--ink); }

/* ---------------- 法务文档页 ---------------- */

.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 90px; }
.doc h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.3px; }
.doc .meta { color: var(--mist); font-size: 14px; margin: 10px 0 24px; }
.doc article { font-size: 16px; }
.doc article h2 {
  font-size: 19px;
  font-weight: 650;
  margin: 34px 0 10px;
}
.doc article p { margin: 10px 0; }
.doc article ol { padding-left: 1.4em; margin: 10px 0; }
.doc article li { margin: 6px 0; }
.doc hr.lang-divider { border: none; border-top: 1px solid var(--line); margin: 56px 0; }
.doc .en-doc { color: #2a4257; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 130px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero h1 { font-size: 38px; }
  .features { grid-template-columns: 1fr 1fr; }
  .privacy-inner { grid-template-columns: 1fr; padding: 64px 0; }
  .crest img { width: 220px; height: 220px; border-radius: 49px; }
  .nav-links { gap: 18px; }
  .nav-links .hide-m { display: none; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .section { padding: 64px 0; }
}
