/* ==========================================================================
   TrustChat（星河信）官网样式
   品牌：墨蓝 #333C50 + 薄荷绿 #64EDAC + 暖纸白背景
   ========================================================================== */

:root {
  /* 品牌色 */
  --ink: #2b3347;
  --ink-deep: #222a3c;
  --ink-soft: #5c6577;
  --mint: #64edac;
  --mint-deep: #18a684;
  --mint-soft: #e6f7f0;
  --paper: #faf8f3;
  --card: #ffffff;
  --line: rgba(43, 51, 71, 0.12);
  --line-strong: rgba(43, 51, 71, 0.22);

  /* 字体 */
  --font-sans: system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;

  /* 圆角与阴影 */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(34, 42, 60, 0.08);
  --shadow-lg: 0 24px 70px rgba(34, 42, 60, 0.14);

  /* 容器 */
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
}

/* ==========================================================================
   通用元素
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint-deep);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--mint-deep);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 22px rgba(43, 51, 71, 0.22);
}
.btn-primary:hover {
  background: #1d2433;
  box-shadow: 0 10px 28px rgba(43, 51, 71, 0.3);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(43, 51, 71, 0.04);
}
.btn-light {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.btn-light:hover {
  background: var(--mint);
  color: var(--ink-deep);
  transform: translateY(-1px);
}
.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}
.btn-lg {
  padding: 14px 30px;
  font-size: 16px;
}
.btn-block {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
}

/* 区块头 */
.section {
  padding: 96px 0;
}
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .eyebrow {
  justify-content: center;
}
.section-head .eyebrow::after {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--mint-deep);
}
.section-head h2 {
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.section-sub {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-nav.scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-cn {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}
.nav-links {
  display: flex;
  gap: 30px;
  margin-left: auto;
  font-weight: 600;
  font-size: 15px;
}
.nav-links a {
  color: var(--ink-soft);
  transition: color 0.18s ease;
  position: relative;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
@media (max-width: 640px) {
  .mobile-menu:not([hidden]) {
    display: flex;
  }
}
.mobile-menu a:not(.btn) {
  padding: 12px 4px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn {
  margin-top: 12px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 237, 172, 0.32), rgba(100, 237, 172, 0) 62%);
  pointer-events: none;
}
.hero-glow::after {
  content: '';
  position: absolute;
  left: -260px;
  bottom: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 51, 71, 0.1), rgba(43, 51, 71, 0) 62%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(40px, 6.2vw, 68px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ink-deep);
}
.hero-sub {
  margin: 26px 0 34px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-soft);
  max-width: 30em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 36px;
  color: var(--ink-soft);
  font-size: 14px;
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-trust li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-deep);
}

/* Hero 右侧：手机聊天示意 */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.phone {
  width: min(360px, 88%);
  border-radius: 34px;
  background: var(--ink);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}
.phone-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 14px;
  color: #fff;
}
.phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--ink-deep);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.phone-name {
  font-weight: 700;
  font-size: 14px;
}
.phone-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  margin-left: auto;
  box-shadow: 0 0 0 3px rgba(100, 237, 172, 0.25);
  animation: pulse 2s ease-in-out infinite;
}
.phone-body {
  background: #eef2f4;
  border-radius: 24px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(34, 42, 60, 0.06);
}
.bubble-in {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 4px;
  color: var(--ink);
}
.bubble-out {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chip {
  display: inline-block;
  background: var(--mint-soft);
  color: var(--ink);
  border: 1px solid rgba(24, 166, 132, 0.3);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  margin: 2px 3px 2px 0;
}
.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  border-bottom-left-radius: 4px;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  animation: typing 1.2s ease-in-out infinite;
}
.typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

/* 漂浮标签 */
.float-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  color: var(--ink);
  animation: floaty 5s ease-in-out infinite;
}
.float-card-a {
  top: 12%;
  left: 0;
}
.float-card-b {
  bottom: 20%;
  right: 0;
  animation-delay: 1.2s;
}
.float-card-c {
  top: 58%;
  left: -3%;
  animation-delay: 2.4s;
}

/* ==========================================================================
   功能特性
   ========================================================================== */

.features {
  background: var(--paper);
}
.feature-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 44px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.feature-lead-copy h3 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 10px 0 14px;
}
.feature-lead-copy p {
  color: var(--ink-soft);
  font-size: 16.5px;
}
.feature-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--mint-deep);
  letter-spacing: 0.08em;
}
.mini-chat {
  background: var(--mint-soft);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mini-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.mini-row-out {
  justify-content: flex-end;
}
.mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.mini-a {
  background: var(--ink);
  color: var(--mint);
}
.mini-b {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.mini-bubble {
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13.5px;
  border-bottom-left-radius: 3px;
  box-shadow: 0 2px 6px rgba(34, 42, 60, 0.05);
}
.mini-bubble-out {
  background: var(--ink);
  color: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 3px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(24, 166, 132, 0.35);
}
.feature-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 12px 0 10px;
  letter-spacing: -0.01em;
}
.feature-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ==========================================================================
   使用指南
   ========================================================================== */

.how {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: how;
}
.how-step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 30px 30px;
}
.how-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--mint);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(43, 51, 71, 0.22);
}
.how-step h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
}
.how-step p {
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ==========================================================================
   下载
   ========================================================================== */

.download {
  background: var(--paper);
}
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.dl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  align-items: center;
}
.dl-card-featured {
  border: 2px solid var(--mint-deep);
  box-shadow: 0 18px 50px rgba(24, 166, 132, 0.16);
  position: relative;
}
.dl-card-featured::before {
  content: '推荐';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mint-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 999px;
}
.dl-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--mint-deep);
  margin-bottom: 4px;
}
.dl-card h3 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.dl-card > p:not(.dl-note) {
  color: var(--ink-soft);
  font-size: 14.5px;
  min-height: 3.4em;
}
.dl-card .btn {
  margin-top: auto;
  margin-bottom: 6px;
}
.dl-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.dl-qr {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dl-qr canvas {
  border-radius: 8px;
}
.dl-qr-tip {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ==========================================================================
   常见问题
   ========================================================================== */

.faq {
  background: #fff;
  border-top: 1px solid var(--line);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] {
  border-color: rgba(24, 166, 132, 0.4);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 500;
  color: var(--mint-deep);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  padding: 0 22px 20px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ==========================================================================
   底部 CTA 横幅
   ========================================================================== */

.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 88px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  right: -140px;
  top: -140px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 237, 172, 0.28), rgba(100, 237, 172, 0) 60%);
}
.cta-inner {
  position: relative;
  text-align: center;
}
.cta-inner h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.cta-inner p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  margin-bottom: 34px;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ==========================================================================
   页脚
   ========================================================================== */

.site-footer {
  background: var(--ink-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.6);
  max-width: 24em;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 6px;
}
.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.66);
  transition: color 0.18s ease;
}
.footer-col a:hover {
  color: var(--mint);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 22px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.42);
}

/* ==========================================================================
   滚动显现动画（仅在 JS 生效，JS 失效时内容保持可见，fail-open）
   ========================================================================== */

.js-gate .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-gate .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-gate .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   关键帧动画
   ========================================================================== */

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .phone-online,
  .typing span,
  .float-card {
    animation: none;
  }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta,
  .hero-trust {
    justify-content: center;
  }
  .feature-lead {
    grid-template-columns: 1fr;
    padding: 30px;
  }
  .feature-grid,
  .how-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dl-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }
  .nav-links {
    display: none;
  }
  .nav-actions .btn {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .feature-grid,
  .how-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .float-card {
    display: none;
  }
}
