/* ====== Design tokens ====== */
:root {
  --bg: #f6f4ff;
  --bg-soft: #ece7ff;
  --surface: #ffffff;
  --surface-2: #f8f6ff;
  --ink: #1a1633;
  --ink-2: #3b3560;
  --muted: #6a6489;
  --muted-2: #8b87a8;
  --line: #e6e2f5;
  --line-strong: #d7d1ef;

  --brand: #7c6cf9;
  --brand-2: #a78bfa;
  --brand-3: #b7a3ff;
  --brand-ink: #4b3fd6;
  --brand-soft: #efeaff;

  --accent: #ff8fb1;

  --shadow-sm: 0 2px 8px rgba(80, 60, 180, 0.06);
  --shadow-md: 0 12px 32px rgba(80, 60, 180, 0.10);
  --shadow-lg: 0 30px 60px rgba(80, 60, 180, 0.18);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --grad-brand: linear-gradient(135deg, #a78bfa 0%, #7c6cf9 50%, #6c8bff 100%);
  --grad-brand-soft: linear-gradient(135deg, #ede7ff 0%, #e5e0ff 50%, #dae4ff 100%);

  --container: 1180px;
  --nav-h: 68px;
}

/* ====== Reset ====== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans SC', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
html[lang="zh-CN"] body { font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; }
html[lang="zh-TW"] body { font-family: 'Noto Sans TC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

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

/* ====== Navigation ====== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 255, 0.75);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(246, 244, 255, 0.9); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.brand-name { font-size: 18px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 14.5px; transition: color .2s; }
.nav-links a:hover { color: var(--brand); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-select { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  background: rgba(255,255,255,0.6);
  font-size: 13.5px; font-weight: 500;
  transition: border-color .2s, background .2s, color .2s;
}
.lang-btn:hover { border-color: var(--brand-2); color: var(--brand-ink); background: #fff; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 160px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-md);
  padding: 6px; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 60;
}
.lang-select.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  padding: 9px 12px; border-radius: 10px;
  font-size: 14px; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-menu li:hover, .lang-menu li[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-ink); }

.nav-toggle { display: none; width: 36px; height: 36px; border-radius: 10px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ====== Hero ====== */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 8vw, 96px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.blob-a { width: 480px; height: 480px; background: #c9b8ff; top: -120px; left: -120px; }
.blob-b { width: 420px; height: 420px; background: #b3c8ff; bottom: -160px; right: -80px; opacity: 0.5; }
.blob-c { width: 320px; height: 320px; background: #ffc2d8; top: 40%; left: 40%; opacity: 0.35; }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: center;
}

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.chip img { width: 22px; height: 22px; border-radius: 6px; }

.hero-title {
  margin: 20px 0 18px;
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}
.grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px; line-height: 1.65;
  margin: 0 0 32px;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 8px 22px rgba(124, 108, 249, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(124, 108, 249, 0.45); }
.btn-ghost {
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.7);
}
.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand-ink); background: #fff; }
.btn-outline {
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  background: #fff;
  padding: 10px 16px; font-size: 14px;
}
.btn-outline:hover { border-color: var(--brand-2); color: var(--brand-ink); }

.btn-store span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.btn-store small { font-size: 11px; font-weight: 500; opacity: 0.85; }
.btn-store strong { font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }
.btn-lg { padding: 14px 24px; }

.hero-badges { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 14px; }
.hero-badges li { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--grad-brand); box-shadow: 0 0 0 4px rgba(124, 108, 249, 0.15); }

/* Phone visual */
.hero-visual { position: relative; height: 620px; display: flex; align-items: center; justify-content: center; }
.phone {
  position: relative;
  width: 290px; aspect-ratio: 9 / 19.5;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2543 0%, #12102a 100%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.phone::before {
  content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 24px; background: #0b0a18; border-radius: 999px; z-index: 2;
}
.phone img { border-radius: 32px; width: 100%; height: 100%; object-fit: cover; }
.phone-hero { transform: rotate(-2deg); }
.phone-hero-back {
  position: absolute;
  transform: rotate(6deg) translate(60px, 30px);
  filter: blur(0.2px);
  opacity: 0.9;
  z-index: -1;
}
.sparkle { position: absolute; border-radius: 50%; background: var(--grad-brand); filter: blur(1px); opacity: 0.9; }
.sparkle-1 { width: 14px; height: 14px; top: 10%; left: 15%; box-shadow: 0 0 30px 4px rgba(167,139,250,0.6); }
.sparkle-2 { width: 10px; height: 10px; bottom: 12%; right: 12%; box-shadow: 0 0 30px 4px rgba(108,139,255,0.55); }
.sparkle-3 { width: 8px; height: 8px; top: 40%; right: 5%; background: var(--accent); box-shadow: 0 0 20px 3px rgba(255,143,177,0.55); }

/* ====== Marquee ====== */
.marquee-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; padding: 18px 0; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track {
  display: inline-flex; gap: 32px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 500; font-size: 14.5px;
  letter-spacing: 0.01em;
  animation: scroll 32s linear infinite;
}
.marquee-track span:nth-child(even) { color: var(--brand-3); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ====== Sections ====== */
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, #f2eeff 0%, #f6f4ff 100%); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); }
.eyebrow {
  display: inline-block; padding: 6px 12px;
  background: var(--brand-soft); color: var(--brand-ink);
  border-radius: 999px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15; letter-spacing: -0.02em;
  font-weight: 800; color: var(--ink);
  margin: 0 0 16px;
}
.section-sub { color: var(--muted); font-size: 17px; margin: 0; }

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(500px 200px at 0% 0%, rgba(167, 139, 250, 0.10), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--brand-3); box-shadow: var(--shadow-md); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* Screens scroller */
.screens-scroller { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 8px 4px 24px; margin: 0 -24px; scrollbar-width: none; }
.screens-scroller::-webkit-scrollbar { display: none; }
.screens-track { display: inline-flex; gap: 28px; padding: 0 24px; }
.screen-card { width: 280px; flex: 0 0 auto; scroll-snap-align: center; margin: 0; }
.screen-card .phone { transform: none; width: 100%; }
.screen-card figcaption { margin-top: 20px; text-align: center; padding: 0 6px; }
.screen-card h4 { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.screen-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Privacy card */
.privacy-card {
  background: linear-gradient(140deg, #1a1633 0%, #2a2050 60%, #1f1a3a 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 32px; align-items: center;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.privacy-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 240px at 100% 0%, rgba(167,139,250,0.25), transparent 60%),
              radial-gradient(600px 260px at 0% 100%, rgba(108,139,255,0.20), transparent 60%);
  pointer-events: none;
}
.privacy-card .eyebrow { background: rgba(167,139,250,0.15); color: #d5c5ff; }
.privacy-card .section-title { color: #fff; }
.privacy-card .section-sub { color: rgba(255,255,255,0.72); max-width: 560px; }
.privacy-list { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 12px; }
.privacy-list li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.88); font-size: 15px; }
.privacy-list li svg { color: #b7a3ff; flex-shrink: 0; }
.privacy-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.privacy-actions .btn-outline { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #fff; }
.privacy-actions .btn-outline:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); color: #fff; }

.privacy-visual { position: relative; display: flex; align-items: center; justify-content: center; height: 220px; }
.shield { color: #b7a3ff; position: relative; z-index: 1; filter: drop-shadow(0 10px 30px rgba(167,139,250,0.35)); }
.shield-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(167,139,250,0.35), transparent 60%); filter: blur(20px); }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--brand-3); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600; font-size: 15.5px; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { color: var(--muted); transition: transform .25s ease; flex-shrink: 0; }
.faq-item[open] .chev { transform: rotate(180deg); color: var(--brand); }
.faq-item p { margin: 0 22px 18px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* CTA final */
.cta-final { padding-top: 20px; padding-bottom: clamp(80px, 10vw, 140px); }
.cta-card {
  background: var(--grad-brand);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 90% 20%, rgba(255,255,255,0.25), transparent 60%),
    radial-gradient(400px 200px at 10% 90%, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}
.cta-card h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; font-weight: 800; }
.cta-card p { margin: 0; opacity: 0.9; font-size: 16px; }
.cta-card .btn-primary { background: #fff; color: var(--brand-ink); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
.cta-card .btn-primary:hover { color: var(--brand-ink); }

/* Footer */
.footer { background: #0f0d20; color: rgba(255,255,255,0.75); padding: 64px 0 24px; }
.footer .brand-name { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; }
.footer-tag { color: rgba(255,255,255,0.55); max-width: 320px; font-size: 14px; margin-top: 12px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 12px; font-size: 14px; letter-spacing: 0.02em; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-cols a { color: rgba(255,255,255,0.65); font-size: 14px; transition: color .15s; }
.footer-cols a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; color: rgba(255,255,255,0.4);
}

/* ====== Scroll reveal ====== */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in { opacity: 1; transform: translateY(0); }

/* ====== Responsive ====== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { height: 520px; }
  .phone { width: 260px; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .privacy-card { grid-template-columns: 1fr; text-align: left; }
  .privacy-visual { height: 160px; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.mobile-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; padding: 16px 24px; gap: 12px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cta-card { flex-direction: column; align-items: flex-start; }
  .hero-visual { height: 460px; }
  .phone { width: 230px; }
  .phone-hero-back { transform: rotate(6deg) translate(40px, 20px); }
  .hero-badges { gap: 12px 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
}
