/* The new home page: a dark stage that plays the story in order (clip, line, clip, line), then the sign-up. */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #12202f;
  --muted: #566879;
  --line: #dbe3ec;
  --accent: #1b5fd3;
  --accent-ink: #ffffff;
  --stage: #0b1522;
  --stage-ink: #ffffff;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1824; --surface: #14212f; --ink: #e8eef5; --muted: #9db0c2; --line: #263647;
    --accent: #6ea3ff; --accent-ink: #0b1522; --stage: #060d16;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--font); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; }
a { color: var(--accent); }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.brand-logo { height: 32px; max-width: 160px; width: auto; display: block; object-fit: contain; }
.actions { display: flex; gap: 8px; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.lg { padding: 12px 24px; font-size: 17px; }
button.btn { font: inherit; font-weight: 500; cursor: pointer; }

.stage-wrap { padding-block: 8px 20px; }
.stage { container-type: inline-size; position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--stage); color: var(--stage-ink); }
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s ease; }
.clip.off { opacity: 0; pointer-events: none; }
.foot { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; z-index: 1; background: linear-gradient(to top, rgba(6, 13, 22, .92), rgba(6, 13, 22, .55) 55%, rgba(6, 13, 22, 0)); pointer-events: none; }
.captions { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 5% 5%; display: flex; flex-direction: column; align-items: center; gap: .15em; text-align: center; pointer-events: none; min-height: 3.4em; justify-content: flex-end; }
.captions span { font-size: clamp(17px, 3.1vw, 32px); font-weight: 700; line-height: 1.35; text-shadow: 0 2px 10px rgba(0, 0, 0, .75); text-wrap: balance; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ending { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: .3em; padding: 6%; text-align: center; background: rgba(6, 13, 22, .96); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .5s ease, visibility .5s; }
.ending.show { opacity: 1; visibility: visible; pointer-events: auto; }
.ending b { display: block; font-size: clamp(20px, 4.2vw, 46px); font-weight: 900; line-height: 1.3; text-wrap: balance; }
.ending b em { font-style: normal; color: #7fb0ff; }
.ending .sub { margin: .6em 0 0; font-size: clamp(15px, 2.2vw, 24px); color: rgba(255, 255, 255, .86); text-wrap: balance; }
.ending .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 1.1em; }
.ending .btn { color: var(--ink); }
.ending .btn.primary { color: var(--accent-ink); }
.ctl { position: absolute; right: 10px; top: 10px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(6, 13, 22, .72); color: #fff; cursor: pointer; display: grid; place-items: center; }
.ctl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ctl svg { width: 14px; height: 14px; fill: currentColor; }
.ctl[hidden] { display: none; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 5; background: rgba(255, 255, 255, .18); }
.bar[hidden] { display: none; }
.bar i { display: block; height: 100%; width: 0; background: #7fb0ff; }
.what { margin: 18px auto 0; max-width: 40em; text-align: center; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.7; text-wrap: balance; }
.what strong { font-weight: 700; }

section.block { padding-block: 40px 56px; }
h2 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.3; font-weight: 700; text-wrap: balance; }
.cta { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 40px 20px; }
.cta p { margin: 0 0 20px; color: var(--muted); }
footer.site { padding-block: 28px 40px; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }
footer.site a { color: var(--muted); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .captions span { animation: none; } .ending { transition: none; } .clip { transition: none; } }

/* Words drawn over the second clip, for languages whose clip still shows Chinese on the phone: the code's label (first second),
   then the phone's chat. Sizes are in cqw (a hundredth of the stage's width) and positions follow the 640x360 picture of the clip. */
.pl { position: absolute; z-index: 0; left: 44.2cqw; width: 11.6cqw; top: 31cqw; height: 3.6cqw; display: grid; place-items: center; background: #efeeea; color: #4c4c4c; border-radius: .4cqw; font-size: 1.1cqw; line-height: 1; white-space: nowrap; }
.pl[hidden], .pu[hidden] { display: none; }
.pu { position: absolute; z-index: 0; inset: 0; pointer-events: none; transform-origin: 49.5cqw 11cqw; --dy: 0cqw; --pu-bg: rgb(155, 166, 170); --pu-bubble: rgb(159, 170, 174); font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1d2a35; }
.pu-back { position: absolute; left: 26.5cqw; width: 46cqw; top: calc(12.7cqw + var(--dy)); height: 80cqw; background: var(--pu-bg); }
.pu-title { position: absolute; left: 26.5cqw; width: 46cqw; top: calc(14.2cqw + var(--dy)); height: 2.6cqw; display: grid; place-items: center; font-size: 2.1cqw; line-height: 1; font-weight: 500; white-space: nowrap; }
.pu-title i { position: absolute; left: 3.2cqw; font-style: normal; font-size: 3.4cqw; color: #3d8bf2; line-height: .8; }
.pu-bubble { position: absolute; left: 28.4cqw; width: 41.5cqw; top: calc(20.6cqw + var(--dy)); height: 80cqw; background: var(--pu-bubble); border-radius: 2cqw; padding: 1.8cqw 1.9cqw; }
.pu-bubble p { margin: 0; font-size: 2.35cqw; line-height: 1.5; }
.pu-tag { display: inline-block; margin-top: 1.1cqw; padding: .55cqw 1.3cqw; border-radius: 1cqw; background: rgba(0, 0, 0, .06); font-size: 1.8cqw; line-height: 1.2; color: #4a5a66; }
.pu-tag[hidden] { display: none; }
