/* Besta marketing landing page.
   Design tokens lifted verbatim from the approved prototype; the prototype
   used inline styles throughout, which cannot express media queries or be
   maintained across two languages, so it is rebuilt here as one stylesheet. */

:root {
  --ink: #14131A;
  --paper: #F4F2ED;
  --paper-soft: #FAF9F6;
  --white: #FFFFFF;
  --accent: #4B3BFF;
  --accent-dark: #3A2BD6;
  --accent-light: #7C6FFF;
  --lavender: #E9E6FF;
  --pink: #FF4D6D;
  --dark-card: #1D1B26;
  --dark-line: #2C2937;
  --line: #E4E1D9;
  --line-strong: #D8D4CA;
  --body: #4A475A;
  --muted: #6E6A7E;
  --dim: #9B97AD;
  --on-dark: #C9C4D6;
  --on-dark-dim: #C9C4BA;
  --shell: 1240px;
  --gutter: clamp(20px, 3vw, 40px);
  /* --cjk is injected per page; English ships no CJK webfont at all. */
  --cjk: "PingFang SC";
  --font: "Space Grotesk", var(--cjk), system-ui, -apple-system, "PingFang SC", "Hiragino Sans", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }

/* ---- skip link (a11y) ---- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 242, 237, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .shell {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 32px;
  padding-block: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.brand-name span { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.site-nav { display: flex; gap: 26px; font-size: 14.5px; font-weight: 500; color: var(--body); }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang-switch { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.lang-switch:hover { color: var(--ink); background: rgba(20, 19, 26, .05); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, transform .12s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #26242F; }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { font-size: 15px; padding: 14px 26px; border-radius: 14px; }
.btn-block { width: 100%; }
:where(a, button).btn:focus-visible,
.site-nav a:focus-visible, .lang-switch:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- hero ---- */
.hero { padding: clamp(48px, 6vw, 84px) 0 72px; }
.hero .shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--lavender); color: var(--accent);
  font-size: 12px; font-weight: 600;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  margin: 22px 0 0;
  font-size: clamp(34px, 4.6vw, 58px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.12;
}
.hero h1 .accent { color: var(--accent); }
.hero-lede { margin-top: 20px; font-size: 16px; line-height: 1.7; color: var(--body); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.audience { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 30px; font-size: 12.5px; color: var(--muted); }
.audience .dot { color: var(--line-strong); }

/* hero visual */
.browser {
  background: var(--paper-soft); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(20, 19, 26, .08);
}
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.browser-bar span { margin-left: 8px; font-size: 11.5px; color: var(--dim); }
.browser img { width: 100%; height: auto; }
.clip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.clip {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--paper-soft); aspect-ratio: 9 / 16;
}
.clip video, .clip img { width: 100%; height: 100%; object-fit: cover; }
.clip figcaption {
  position: absolute; left: 8px; bottom: 8px;
  padding: 4px 9px; border-radius: 7px;
  background: rgba(20, 19, 26, .72); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}

/* ---- section chrome ---- */
.section { padding: clamp(60px, 6vw, 96px) 0; }
.section-dark { background: var(--ink); color: var(--white); }
.section-white { background: var(--white); }
.kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.section-dark .kicker { color: var(--accent-light); }
.section h2 { margin-top: 10px; font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.section-head p { max-width: 30em; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.section-dark .section-head p { color: var(--on-dark-dim); }
.section-center { text-align: center; }
.section-center .section-head { flex-direction: column; align-items: center; }
.section-center p { text-align: center; }

/* ---- step cards ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.step {
  background: linear-gradient(#2C2937, #23212D);
  border: 1px solid var(--dark-line);
  border-radius: 18px; padding: 26px;
}
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-no { padding: 4px 9px; border-radius: 7px; background: var(--white); color: var(--ink); font-size: 11.5px; font-weight: 700; }
.step-tag { font-size: 11.5px; color: var(--dim); }
.step h3 { margin: 18px 0 10px; font-size: 20px; font-weight: 700; }
.step p { font-size: 13.5px; line-height: 1.7; color: var(--on-dark); }
.step-detail { margin-top: 18px; display: grid; gap: 8px; }
.kv {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(20, 19, 26, .45); border: 1px solid var(--dark-line);
  font-size: 12.5px; color: var(--on-dark);
}
.kv b { color: var(--dim); font-weight: 600; font-size: 11.5px; min-width: 34px; }
.roles { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.role { padding: 5px 10px; border-radius: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; background: var(--dark-line); color: var(--on-dark); }
.role-hook { background: var(--pink); color: #fff; }
.role-hero { background: var(--accent); color: #fff; }
.lang-tiles { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lang-tile {
  aspect-ratio: 9 / 16; border-radius: 10px;
  background: rgba(20, 19, 26, .45); border: 1px solid var(--dark-line);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font-size: 10.5px; font-weight: 600; color: var(--dim);
}

/* ---- capability cards ---- */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
.cap { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.cap-no { font-size: 12px; font-weight: 700; color: var(--accent); }
.cap h3 { margin: 12px 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.cap p { font-size: 13.5px; line-height: 1.7; color: var(--muted); }

/* ---- pricing ---- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; align-items: start; }
.plan {
  position: relative; background: var(--white);
  border: 1px solid var(--line); border-radius: 18px; padding: 30px 26px;
  display: flex; flex-direction: column; gap: 6px;
}
.plan-featured {
  background: var(--ink); color: var(--white); border-color: var(--ink);
  box-shadow: 0 22px 60px rgba(20, 19, 26, .22);
}
.plan-badge {
  position: absolute; top: 22px; right: 22px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 11px; font-weight: 700;
}
.plan h3 { font-size: 21px; font-weight: 700; }
.plan-for { font-size: 12.5px; color: var(--muted); }
.plan-featured .plan-for { color: var(--dim); }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 4px; }
.plan-price b { font-size: 42px; font-weight: 700; letter-spacing: -.03em; }
.plan-price span { font-size: 13px; color: var(--muted); }
.plan-featured .plan-price span { color: var(--dim); }
.plan-note { font-size: 12px; color: var(--muted); min-height: 18px; }
.plan-featured .plan-note { color: var(--dim); }
.plan ul { list-style: none; display: grid; gap: 10px; margin: 20px 0 24px; }
.plan li { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.5; color: var(--body); }
.plan-featured li { color: var(--on-dark); }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 700; flex: none; }
.plan-featured li::before { color: var(--accent-light); }
.plan .btn { margin-top: auto; }

/* billing cycle toggle */
.cycle { display: inline-flex; gap: 4px; padding: 4px; margin-top: 26px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.cycle button {
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
}
.cycle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cycle .save { margin-left: 6px; font-size: 11px; font-weight: 700; color: #16a34a; }
.cycle button[aria-pressed="true"] .save { color: #6ee7a8; }

/* ---- closing CTA ---- */
.cta-band { padding: 0 0 clamp(60px, 6vw, 96px); background: var(--white); }
.cta-inner {
  background: var(--lavender); border-radius: 24px;
  padding: clamp(36px, 4vw, 64px) clamp(28px, 4vw, 56px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px;
}
.cta-inner h2 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.02em; }
.cta-inner p { margin-top: 12px; font-size: 14.5px; color: var(--body); }
.cta-side { text-align: center; }
.cta-side small { display: block; margin-top: 10px; font-size: 11.5px; color: var(--muted); }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: var(--on-dark); padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr) auto; gap: 32px 40px; }
.site-footer .brand-name b { color: #fff; }
.site-footer .brand-name span { color: var(--dim); }
.footer-col h4 { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: var(--dim); margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-legal { font-size: 12px; color: var(--dim); align-self: start; text-align: right; }
.footer-legal a { color: var(--dim); }
.footer-legal a:hover { color: #fff; }
.footer-legal .row { margin-top: 10px; display: flex; gap: 14px; justify-content: flex-end; }

/* ---- responsive ---- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; text-align: left; }
  .footer-legal .row { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .hero .shell { grid-template-columns: 1fr; }
  .grid-3, .plans { grid-template-columns: 1fr; }
  .plan-featured { order: -1; }
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  /* 三个动作按钮在 390px 下挤爆一行，让它们独占第二行并让主 CTA 撑开 */
  .header-actions { width: 100%; margin-left: 0; }
  /* 语言菜单此时贴在行首，right:0 会把 132px 宽的面板推出屏幕左侧，改为左对齐 */
  .lang-list { left: 0; right: auto; }
  .header-actions .btn-dark { flex: 1; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: stretch; }
  .cta-side { text-align: left; }
  .clip-row { gap: 10px; }
}

/* ---- 语言菜单（四语）---- */
.lang-menu { position: relative; }
.lang-menu .lang-switch { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.lang-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 132px;
  display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); box-shadow: 0 12px 30px rgba(20,19,26,.14);
}
.lang-list[hidden] { display: none; }
.lang-list a { padding: 8px 12px; border-radius: 8px; font-size: 13.5px; color: var(--body); white-space: nowrap; }
.lang-list a:hover { background: var(--paper); color: var(--ink); }
.lang-list a[aria-current="true"] { color: var(--accent); font-weight: 600; }
