/**
 * Landing page styles — marketing/index.html
 *
 * Reuses base.css tokens (colors, radii, shadows) so light/dark themes follow
 * the app. Adds landing-only layout: top nav, hero, feature grid, pricing
 * compare, FAQ, footer.
 *
 * Same conventions as the rest of the codebase: no hardcoded hex outside the
 * token file; no Tailwind; no CSS-in-JS.
 */

/* ----- Reset-ish additions on top of base.css ------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body { background: var(--bg-page); color: var(--text-primary); }

/* Selection + focus come from base.css */

/* Inline links inside marketing copy get accent underline */
.landing-body a:not(.btn):not(.nav-link):not(.footer-link):not(.brand-link) {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent-ring);
  text-underline-offset: 3px;
}
.landing-body a:not(.btn):not(.nav-link):not(.footer-link):not(.brand-link):hover {
  text-decoration-color: var(--accent);
}

/* ----- Skip link (a11y) ------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ----- Top nav ---------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border);
}
.site-nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-gradient);
  display: inline-grid;
  place-items: center;
  color: var(--accent-fg);
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow-raise);
}
.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
  list-style: none;
  padding: 0;
}
.nav-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--text-primary); background: var(--accent-soft); }
.nav-link--cta {
  background: var(--accent);
  color: var(--accent-fg);
  margin-left: 4px;
  box-shadow: var(--shadow-raise);
}
.nav-link--cta:hover { background: var(--accent-strong); color: var(--accent-fg); }

/* Language switch + theme toggle share one inline group */
.nav-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* Language switch: segmented pill, matches .nav-link metrics */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-elevated);
}

.lang-switch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 10px;
  min-width: 34px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.lang-switch__btn:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.lang-switch__btn.is-active {
  background: var(--accent);
  color: var(--accent-fg);
}

.lang-switch__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-select {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}
.theme-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text-secondary);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.theme-btn:hover { color: var(--text-primary); background: var(--accent-soft); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .theme-icon--light { display: none; }
.theme-btn .theme-icon--dark { display: block; }
:root[data-theme="dark"] .theme-btn .theme-icon--light { display: block; }
:root[data-theme="dark"] .theme-btn .theme-icon--dark { display: none; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-grid; }
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    margin: 0;
    transform: translateY(-110%);
    transition: transform .25s ease;
    gap: 4px;
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-link { padding: 12px; font-size: 15px; }
  .nav-link--cta { text-align: center; margin-left: 0; margin-top: 8px; }
  .nav-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
}

/* ----- Hero ------------------------------------------------------------- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero__copy { max-width: 540px; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent-soft-strong);
  margin-bottom: 24px;
}
.hero__eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft-strong);
}
.hero__title {
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--text-primary);
  /* 中日韩文本：允许在标点后断行，但不在词组内部硬断 */
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.hero__title em {
  font-style: normal;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* 强调片段整体换行，避免被拆成半句 */
  white-space: nowrap;
}
.hero__lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 480px;
}
.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-faint);
  font-size: 13px;
}
.hero__meta-item { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta-item svg { width: 14px; height: 14px; color: var(--success); }

.hero__visual {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft-strong), transparent 60%), var(--bg-page-2);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.hero__visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid var(--border-strong);
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 56px 24px 48px; }
  .hero__visual { order: -1; }
}

/* ----- Buttons (shared) ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-raise);
}
.btn--primary:hover { background: var(--accent-strong); box-shadow: var(--shadow-raise-hover); color: var(--accent-fg); }
.btn--secondary {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn--secondary:hover { border-color: var(--border-strong); background: var(--bg-page-1); }
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--accent-soft); border-color: var(--accent-soft-strong); }
.btn--lg { padding: 14px 24px; font-size: 16px; }

/* ----- Section shells --------------------------------------------------- */
.section {
  padding: 80px 24px;
}
.section__inner {
  max-width: 1180px;
  margin: 0 auto;
}
.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 14px;
}
.section__title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text-primary);
}
.section__lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ----- Trust strip (logos / "open source") ----------------------------- */
.trust-strip {
  padding: 24px 24px 48px;
}
.trust-strip__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 36px;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 13px;
}
.trust-strip__inner strong {
  color: var(--text-secondary);
  font-weight: 600;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
}
.trust-pill svg { width: 14px; height: 14px; color: var(--accent); }

/* ----- Features grid ---------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-raise);
}
.feature-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
}
.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card__title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-primary);
}
.feature-card__body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 880px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .features-grid { grid-template-columns: 1fr; } }

/* ----- Showcase / "How it works" ---------------------------------------- */
.showcase {
  background: var(--bg-page-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.showcase-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.showcase-step {
  position: relative;
  padding-left: 0;
  counter-increment: step;
}
.showcase-step__num {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-raise);
}
.showcase-step__num::before { content: counter(step); }
.showcase-step__title {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-primary);
}
.showcase-step__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
@media (max-width: 880px) { .showcase-steps { grid-template-columns: 1fr; gap: 28px; } }

/* ----- Pricing ---------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}
.price-card {
  position: relative;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.price-card--featured {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, var(--accent-soft-strong), transparent 40%),
    var(--surface-elevated);
  box-shadow: var(--shadow-raise);
}
.price-card__badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-raise);
}
.price-card__name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.price-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.price-card__price-amount {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.price-card__price-period {
  font-size: 15px;
  color: var(--text-secondary);
}
.price-card__sub {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0 0 22px;
}
.price-card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.price-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.price-card__list li svg {
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--success);
  margin-top: 1px;
}
.price-card__list li strong { color: var(--text-primary); font-weight: 600; }
.price-card__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.price-card__cta-row .btn {
  flex: 1 1 140px;
}
.price-card__fineprint {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ----- FAQ -------------------------------------------------------------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-top: -3px;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.faq-item__body {
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
}
.faq-item__body p { margin: 0; }

/* ----- Final CTA -------------------------------------------------------- */
.final-cta {
  text-align: center;
  padding: 96px 24px;
  background: linear-gradient(180deg, transparent, var(--accent-soft));
  border-top: 1px solid var(--border);
}
.final-cta__inner {
  max-width: 720px;
  margin: 0 auto;
}
.final-cta__title {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--text-primary);
}
.final-cta__body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 28px;
}
.final-cta__row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- Footer ----------------------------------------------------------- */
.site-footer {
  padding: 48px 24px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-page-1);
}
.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}
.footer-brand {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}
.footer-brand strong { color: var(--text-primary); font-weight: 600; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-link {
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: color .15s ease;
}
.footer-link:hover { color: var(--text-primary); }
.site-footer__legal-links {
  display: inline-flex;
  gap: 14px;
}
.site-footer__legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-footer__legal-links a:hover { color: var(--text-primary); }
.site-footer__legal {
  max-width: 1180px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
}
@media (max-width: 760px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 480px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* ----- Reveal-on-scroll (subtle, no flicker) ---------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
