/* Shared skeleton for product sites. Each product theme sets the tokens below. */
@font-face { font-family: 'Outfit'; src: url('/assets/fonts/outfit.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/assets/fonts/jetbrainsmono.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #fff;
  --bg-2: #f6f7f9;
  --surface: #fff;
  --line: rgba(0, 0, 0, 0.08);
  --text: #0b1220;
  --muted: #5b6676;
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --on-accent: #fff;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --radius: 18px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-display: var(--font);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 650; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, pre, kbd { font-family: var(--mono); }
.lang-zh h1, .lang-zh h2, .lang-zh h3 { letter-spacing: 0; line-break: strict; }
@media (min-width: 641px) { .lang-zh h1, .lang-zh h2 { word-break: keep-all; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--on-accent); border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(80px, 11vw, 140px); position: relative; }
.section--alt { background: var(--bg-2); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow { font: 600 13px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.h2 { font-size: clamp(32px, 4.6vw, 54px); }
.lead { margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 680px; }
.section-head--center .lead { margin-inline: auto; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15.5px; white-space: nowrap; transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn--ghost { border: 1px solid var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 54px; padding: 0 28px; font-size: 16.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.actions--center { justify-content: center; }
.note { margin-top: 16px; font-size: 14px; color: var(--muted); }
.note a { color: var(--accent); }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled, .nav.is-open { background: var(--nav-bg); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; height: 68px; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; flex: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand small { font-weight: 500; font-size: 13px; color: var(--muted); }
.nav__links { display: flex; gap: 26px; margin-inline: auto; font-size: 15px; color: var(--muted); }
.nav__links a:hover { color: var(--text); }
.nav__end { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav__links + .nav__end { margin-left: 0; }
.nav__lang { font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 4px; }
.nav__lang:hover { color: var(--text); }
.nav__burger { display: none; width: 40px; height: 40px; margin-right: -8px; position: relative; }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 1.6px; background: currentColor; transition: transform 0.3s var(--ease); }
.nav__burger span:first-child { top: 16px; }
.nav__burger span:last-child { top: 23px; }
.nav.is-open .nav__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.is-open .nav__burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.drawer { display: none; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* Cards & grids */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-width: 0; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.card__ic svg { width: 22px; height: 22px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stats div { min-width: 0; }
.stats dt { font: 650 clamp(30px, 4vw, 46px)/1 var(--font-display); letter-spacing: -0.02em; color: var(--text); }
.stats dd { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }

/* Code */
.term { border-radius: 16px; background: #0b0f16; color: #d7e0ea; border: 1px solid rgba(255, 255, 255, 0.08); overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.5); min-width: 0; }
.term__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font: 12px var(--mono); color: #7d8a9a; }
.term__bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3240; }
.term__bar i:nth-child(1) { background: #ff5f57; } .term__bar i:nth-child(2) { background: #febc2e; } .term__bar i:nth-child(3) { background: #28c840; }
.term__bar span { margin-left: 8px; }
.term pre { margin: 0; padding: 20px 22px; font-size: 13.5px; line-height: 1.75; overflow-x: auto; white-space: pre; }
.term .c { color: #6b7686; } .term .p { color: var(--accent-2); user-select: none; } .term .s { color: #a5e8c4; } .term .k { color: #8ab4ff; }
.copy { margin-left: auto; font: 600 12px var(--mono); color: #9aa5b4; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; }
.copy:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* Tabs */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { padding: 8px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.tabpanel[hidden] { display: none; }

/* Phone frame */
.phone { position: relative; width: 300px; max-width: 100%; aspect-ratio: 660 / 1434; border-radius: 46px; padding: 11px; background: linear-gradient(145deg, #2b2f36, #0c0e12); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 50px 100px -40px rgba(0, 0, 0, 0.65); }
.phone > img, .phone > video { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; background: #000; }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; width: 30%; height: 26px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 2; }

/* CTA */
.cta { text-align: center; }
.cta .h2 { max-width: 820px; margin-inline: auto; }

/* Footer */
.footer { padding: 64px 0 40px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer__brand p { margin-top: 14px; max-width: 320px; }
.footer__by { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13.5px; }
.footer__by img { width: 20px; height: 20px; }
.footer__by:hover { color: var(--text); }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin-bottom: 14px; font-family: var(--font); }
.footer__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.footer__col a:hover { color: var(--text); }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
.footer__legal a:hover { color: var(--text); }

@media (max-width: 1000px) {
  .grid, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav__links, .nav__end .btn { display: none; }
  .nav__burger { display: block; }
  .nav__end { gap: 6px; }
  .drawer { display: flex; flex-direction: column; padding: 8px var(--pad) 24px; gap: 4px; max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease), padding 0.4s; padding-block: 0; }
  .nav.is-open .drawer { max-height: 480px; padding-block: 8px 24px; }
  .drawer a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .drawer .btn { margin-top: 14px; border-bottom: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid, .grid--2, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .card { padding: 22px; }
  .btn--lg { height: 50px; padding: 0 22px; font-size: 15.5px; }
  .actions .btn { flex: 1 1 auto; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term pre { font-size: 12.5px; padding: 16px; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
