/* ==========================================================================
   锦囊 Scrip 官网样式
   配色 / 间距 / 圆角等规范见 refer/WebsiteGuide.zh-CN.md 第 1 节
   ========================================================================== */

:root {
  --color-primary: #3A57E8;
  --color-primary-dark: #2C43C4;
  --color-ink: #1C1C1E;
  --color-gray: #6E6E73;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F5F7;
  --color-accent: #34C7A8;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.06);
  --section-padding: 96px;
  --section-padding-mobile: 56px;
  --max-width: 1200px;
  --font-sans: 'Inter', 'PingFang SC', 'Hiragino Sans', 'Apple SD Gothic Neo', 'Source Han Sans SC', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--section-padding) 0; }
.section--alt { background: var(--color-bg-alt); }
.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn--secondary { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn--secondary:hover { background: rgba(58, 87, 232, 0.08); transform: translateY(-2px); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}
.btn--disabled:hover { transform: none; box-shadow: none; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; flex-shrink: 0; }
.brand__icon { width: 36px; height: 36px; object-fit: contain; border-radius: 9px; flex-shrink: 0; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a { font-weight: 500; color: var(--color-ink); }
.site-nav a:hover { color: var(--color-primary); }
.site-nav__download { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch { position: relative; }
.lang-switch__current {
  display: flex; align-items: center; gap: 6px;
  background: var(--color-bg-alt);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 6px;
  display: none;
  min-width: 140px;
  max-height: 60vh;
  overflow-y: auto;
}
.lang-switch.is-open .lang-switch__menu,
.lang-switch:focus-within .lang-switch__menu { display: block; }
.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--color-ink);
  text-decoration: none;
}
.lang-option:hover { background: var(--color-bg-alt); }
.lang-option.is-active { color: var(--color-primary); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle__bar { display: block; width: 24px; height: 2px; background: var(--color-ink); margin: 5px 0; transition: transform 0.2s ease, opacity 0.2s ease; }

/* ---------------- Hero ---------------- */
.hero { padding: 160px 0 var(--section-padding); }
.hero-inner { display: flex; align-items: center; gap: 64px; }
.hero-text { flex: 1; max-width: 560px; }
.hero-media { flex: 1; display: flex; justify-content: center; }
.hero-media img { width: 100%; max-width: 280px; border-radius: 24px; box-shadow: var(--shadow-soft); }
.hero-text h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.hero-text__subtitle { margin-top: 20px; font-size: 18px; color: var(--color-gray); }
.hero-text__actions { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-text__trust { margin-top: 24px; font-size: 14px; color: var(--color-accent); font-weight: 500; }
.hero-text__status { margin-top: 10px; font-size: 13px; color: var(--color-gray); }

/* ---------------- Cards / Grid ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
}
.section--alt .card { background: #fff; }
.card__title { font-size: 20px; font-weight: 700; margin-top: 16px; }
.card__desc { margin-top: 8px; color: var(--color-gray); font-size: 15px; }
.pain-card__icon { width: 48px; height: 48px; }

/* ---------------- Feature rows ---------------- */
.feature-rows { display: flex; flex-direction: column; gap: 96px; }
.feature-row { display: flex; align-items: center; gap: 64px; }
.feature-row--reverse { flex-direction: row-reverse; }
.feature-row__text { flex: 1; max-width: 480px; }
.feature-row__media { flex: 1; display: flex; justify-content: center; }
.feature-row__media img { max-width: 260px; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.feature-row__subtitle { display: inline-block; color: var(--color-primary); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.feature-row__title { font-size: 26px; font-weight: 700; margin-top: 8px; }
.feature-row__desc { margin-top: 12px; color: var(--color-gray); font-size: 16px; }

/* ---------------- Steps ---------------- */
.step-card { position: relative; text-align: center; padding: 32px 24px; }
.step-card__badge {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-soft);
}
.step-card__img { margin: 16px auto 0; max-width: 170px; border-radius: var(--radius-sm); box-shadow: var(--shadow-soft); }

/* ---------------- Privacy section ---------------- */
.privacy-inner { display: flex; align-items: center; gap: 64px; }
.privacy-inner__media { flex: 0 0 260px; display: flex; justify-content: center; }
.privacy-inner__media img { max-width: 220px; }
.privacy-inner__content { flex: 1; }
.privacy-list__item { padding: 20px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.privacy-list__item:last-child { border-bottom: none; }

/* ---------------- Multi language ---------------- */
.multi-lang-inner { display: flex; align-items: center; gap: 64px; }
.multi-lang-inner__text { flex: 1; max-width: 480px; }
.multi-lang-inner__media { flex: 1; }
.multi-lang-inner__media img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }

/* ---------------- Testimonials ---------------- */
.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  font-size: 16px;
  color: var(--color-ink);
  font-style: normal;
  margin: 0;
}

/* ---------------- FAQ ---------------- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item__question {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item__question::after {
  content: '+';
  font-size: 20px;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}
.faq-item.is-open .faq-item__question::after { transform: rotate(45deg); }
.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  background: var(--color-bg-alt);
  padding: 0 24px;
}
.faq-item__answer p { padding: 0 0 0 0; color: var(--color-gray); }
.faq-item.is-open .faq-item__answer { max-height: 320px; padding: 16px 24px; }

/* ---------------- CTA ---------------- */
.cta {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  text-align: center;
  padding: var(--section-padding) 0;
}
.cta h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.cta__desc { margin-top: 16px; opacity: 0.9; }
.cta__status { margin-top: 14px; font-size: 13px; opacity: 0.85; }
.cta .btn--primary { background: #fff; color: var(--color-primary); margin-top: 32px; }
.cta .btn--primary:hover { background: var(--color-bg-alt); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--color-ink); color: rgba(255,255,255,0.8); padding: 64px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand { max-width: 280px; }
.footer-brand .brand { color: #fff; }
.footer-brand__slogan { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-nav__col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer-nav__col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer-beian {
  display: none;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
}
.footer-beian:hover { color: rgba(255,255,255,0.8); }
.footer-beian__icon { width: 16px; height: 16px; display: block; }
html[data-locale="zh-Hans"] .footer-beian { display: inline-flex; }

/* ---------------- Legal pages ---------------- */
.legal-page { padding: 140px 0 var(--section-padding); }
.legal-page__header { text-align: center; margin-bottom: 48px; }
.legal-page__header h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.legal-page__header p { margin-top: 8px; color: var(--color-gray); }
.legal-section { max-width: 760px; margin: 0 auto 32px; }
.legal-section__heading { font-size: 20px; font-weight: 700; }
.legal-section__body { margin-top: 8px; color: var(--color-gray); }

/* ---------------- Fade-in animation ---------------- */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  :root { --section-padding: var(--section-padding-mobile); }
  .header-inner { gap: 8px; }
  .brand { font-size: 17px; gap: 6px; }
  .brand__icon { width: 40px; height: 40px; }
  .header-actions { gap: 8px; }
  .header-actions .btn--sm { display: none; }
  .lang-switch__current { padding: 6px 10px; font-size: 13px; gap: 4px; }
  .nav-toggle { padding: 8px 4px; }
  .site-nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    box-shadow: var(--shadow-soft);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .site-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .site-nav a { padding: 10px 0; width: 100%; }
  .site-nav__download { display: block; color: var(--color-primary); font-weight: 700; }
  .nav-toggle { display: block; }

  .hero { padding: 120px 0 var(--section-padding-mobile); }
  .hero-inner { flex-direction: column; }
  .hero-media { order: -1; }

  .grid-3 { grid-template-columns: 1fr; }

  .feature-row, .feature-row--reverse { flex-direction: column; }

  .privacy-inner, .multi-lang-inner { flex-direction: column; text-align: center; }

  .footer-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; }
}
