/* BaoBao Lab — one stylesheet for the corporate site, the app landing page
   and the guides. No frameworks, no webfonts: the fastest page wins the
   Core Web Vitals half of SEO, and system fonts render instantly. */

:root {
  --cream:      #fbf8f0;
  --cream-2:    #f3eee0;
  --surface:    #ffffff;
  --ink:        #24301f;
  --ink-soft:   #55634c;
  --ink-mute:   #7b8a6e;
  --bamboo:     #4e7c4a;
  --bamboo-600: #3f6a3c;
  --bamboo-50:  #eef5ea;
  --mandarin:   #e8963c;
  --border:     #e4ddc9;
  --radius:     18px;
  --shadow:     0 2px 0 rgba(36,48,31,.07), 0 12px 30px rgba(36,48,31,.07);
  --wrap:       1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--bamboo-600); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 900; }
h3 { font-size: 1.15rem; font-weight: 800; }
p  { margin: 0 0 1.1em; }

.lead { font-size: 1.15rem; color: var(--ink-soft); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .74rem;
  font-weight: 800; color: var(--bamboo); margin-bottom: .8em;
}

/* ── header ─────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251,248,240,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 62px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; text-decoration: none; color: var(--ink); font-size: 1.02rem;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.nav a {
  text-decoration: none; color: var(--ink-soft);
  font-weight: 700; font-size: .93rem;
}
.nav a:hover { color: var(--bamboo-600); }
/* `.nav a` would otherwise win over `.btn` and grey out the button label. */
.nav a.btn { color: #fff; }
.nav a.btn:hover { color: #fff; }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* ── buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 24px; border-radius: 14px; text-decoration: none;
  font-weight: 800; font-size: 1rem; border: 0; cursor: pointer;
  background: var(--bamboo); color: #fff;
  box-shadow: 0 3px 0 var(--bamboo-600);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover  { transform: translateY(-1px); box-shadow: 0 4px 0 var(--bamboo-600); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--bamboo-600); }
.btn-orange { background: var(--mandarin); box-shadow: 0 3px 0 #c97c28; }
.btn-orange:hover  { box-shadow: 0 4px 0 #c97c28; }
.btn-orange:active { box-shadow: 0 1px 0 #c97c28; }
.btn-ghost {
  background: transparent; color: var(--ink); box-shadow: none;
  border: 2px solid var(--border);
}
.btn-ghost:hover { border-color: var(--bamboo); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { font-size: .85rem; color: var(--ink-mute); }

/* ── sections ───────────────────────────────────────────────────────── */
section { padding: 74px 0; }
section.tight { padding: 52px 0; }
.band  { background: var(--cream-2); }
.band-white { background: var(--surface); }

.hero { padding: 68px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px;
  align-items: center;
}
.hero-shot { justify-self: center; max-width: 300px; }
.hero-shot img {
  border-radius: 26px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-shot { max-width: 250px; }
}

/* ── cards / grids ──────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { border-color: var(--bamboo); }
.icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid;
  place-items: center; background: var(--bamboo-50); font-size: 1.3rem;
  margin-bottom: 14px;
}

/* screenshots strip */
.shots {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  align-items: start;
}
.shots figure { margin: 0; }
.shots img {
  border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.shots figcaption {
  font-size: .82rem; color: var(--ink-mute); font-weight: 700;
  margin-top: 10px; text-align: center;
}
@media (max-width: 940px) { .shots { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .shots { grid-template-columns: repeat(2, 1fr); } }

/* numbered steps */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 38px; height: 38px; border-radius: 50%;
  background: var(--bamboo); color: #fff; font-weight: 900;
  display: grid; place-items: center;
}
.step h3 { margin-bottom: .2em; }
.step p { margin: 0; color: var(--ink-soft); }

/* facts row */
.facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li {
  background: var(--bamboo-50); color: var(--bamboo-600);
  border-radius: 999px; padding: 7px 15px; font-weight: 800; font-size: .87rem;
}

/* FAQ */
details.faq {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 4px 20px; margin-bottom: 12px;
}
details.faq summary {
  cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--bamboo); font-size: 1.4rem; font-weight: 700; }
details.faq[open] summary::after { content: "–"; }
details.faq .answer { padding-bottom: 18px; color: var(--ink-soft); }
details.faq .answer p:last-child { margin-bottom: 0; }

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--bamboo) 0%, var(--bamboo-600) 100%);
  color: #fff; border-radius: 26px; padding: 52px 40px; text-align: center;
}
.cta h2 { color: #fff; }
.cta p  { color: rgba(255,255,255,.9); max-width: 60ch; margin-inline: auto; }
.cta .btn { background: #fff; color: var(--bamboo-600); box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.cta .btn-row { justify-content: center; }

/* article */
.article { padding: 44px 0 70px; }
.article h2 { margin-top: 1.8em; }
.article h3 { margin-top: 1.5em; }
.article ul, .article ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.article li { margin: .4em 0; }
.crumbs { font-size: .85rem; color: var(--ink-mute); margin-bottom: 1.5em; }
.crumbs a { color: var(--ink-mute); text-decoration: none; }
.crumbs a:hover { color: var(--bamboo-600); }
.callout {
  background: var(--bamboo-50); border-left: 4px solid var(--bamboo);
  border-radius: 0 14px 14px 0; padding: 18px 22px; margin: 1.6em 0;
}
.callout p:last-child { margin-bottom: 0; }
.toc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px; margin: 0 0 2em;
}
.toc ul { margin: 0; padding-left: 1.1em; }
.hanzi { font-size: 1.35em; font-weight: 700; }

table.tbl { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
table.tbl th, table.tbl td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
table.tbl th { font-weight: 800; background: var(--cream-2); }
.scroll-x { overflow-x: auto; }

/* footer */
.site-foot {
  background: var(--ink); color: #cfd6c8; padding: 52px 0 34px; font-size: .93rem;
}
.site-foot a { color: #cfd6c8; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 9px; }
.foot-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.13);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: #9daa93; font-size: .85rem;
}

.legal-body { padding: 44px 0 70px; }
.legal-body h2 { margin-top: 1.9em; }
.updated { color: var(--ink-mute); font-size: .9rem; }

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