/* Shared TraceBye page chrome: brand tokens, fonts, type, the floating nav,
   buttons, gradient background and footer. Used by the website (site.css) and the
   privacy / terms pages (services/api/legal/legal.css): both builds prepend this file,
   so every page looks the same and links to the others. Edit shared rules only here.
   Brand: iris blue #5B69FF → #2F37D1, ink #121317, ivory #F5F3EE. */
@font-face { font-family: 'Jakarta'; src: url('fonts/PlusJakartaSans-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('fonts/PlusJakartaSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('fonts/PlusJakartaSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --bg: #F6F5FB;
  --surface: #FFFFFF;
  --ink: #121317;
  --ink-2: #4A4D5A;
  --ink-3: #6E7180;
  --ivory: #F5F3EE;
  --hair: rgba(18, 19, 23, .08);
  --iris: #5B69FF;
  --iris-deep: #2F37D1;
  --iris-soft: #B2B9FF;
  --grad: linear-gradient(100deg, #5B69FF 0%, #8A5BFF 45%, #FF6FA0 100%);
  --like: #FF5C8A; --repost: #19B39E; --save: #4F6BE0; --comment: #F2A12E; --post: #8A4FE0; --msg: #1D8FD0; --subs: #F0603F;
  --radius: 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: 'Jakarta', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--ivory); }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--iris); outline-offset: 3px; border-radius: 8px; }

/* ── Display type ─────────────────────────────────────── */
.display { font-weight: 800; text-transform: uppercase; letter-spacing: -.035em; line-height: .92; font-size: clamp(46px, 9.4vw, 128px); }
.display.sm { font-size: clamp(38px, 6.4vw, 84px); }
.display .line { display: block; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.lang-zh .display { letter-spacing: -.01em; line-height: 1.04; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--iris-deep); }
.kicker::before { content: ''; width: 22px; height: 3px; border-radius: 3px; background: var(--grad); }
.lead { max-width: 640px; margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }

/* ── Navigation: floating dark pill ───────────────────── */
.nav-wrap { position: fixed; inset: 14px 0 auto; z-index: 50; padding-inline: var(--gutter); pointer-events: none; }
.nav { pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 1180px; margin: 0 auto; padding: 8px 8px 8px 14px; border-radius: 999px; background: rgba(18, 19, 23, .92); color: var(--ivory); box-shadow: 0 18px 40px rgba(18, 19, 23, .22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a, .nav-lang { white-space: nowrap; padding: 9px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; color: rgba(245, 243, 238, .82); }
.nav-links a:hover, .nav-lang:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-lang { border: 1px solid rgba(255, 255, 255, .16); }
.nav-cta { white-space: nowrap; padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; color: #fff; background: linear-gradient(180deg, #5B69FF, #2F37D1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.nav-cta:hover { filter: brightness(1.08); }

/* ── Pastel gradient blobs ────────────────────────────── */
.blobs { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.blobs i { position: absolute; width: 46vw; height: 46vw; min-width: 340px; min-height: 340px; border-radius: 50%; filter: blur(80px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.blobs .b1 { background: #8D96FF; top: -18%; left: -10%; }
.blobs .b2 { background: #FFB3C9; top: -24%; right: -12%; animation-delay: -6s; }
.blobs .b3 { background: #FFD9A8; top: 26%; right: 18%; opacity: .45; animation-delay: -12s; }
.blobs .b4 { background: #C9B5FF; top: 30%; left: 4%; opacity: .4; animation-delay: -3s; }
@keyframes drift { to { transform: translate3d(4vw, 3vw, 0) scale(1.08); } }

/* ── Buttons ──────────────────────────────────────────── */
.store { white-space: nowrap; display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 26px 0 20px; border-radius: 18px; background: var(--ink); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; box-shadow: 0 14px 30px rgba(18, 19, 23, .22); transition: transform .2s ease, box-shadow .2s ease; }
a.store:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(18, 19, 23, .28); }
.store.is-soon { background: rgba(18, 19, 23, .86); cursor: default; }
.store.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.store-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ── Footer ───────────────────────────────────────────── */
.footer { padding: 70px 0 40px; background: var(--ink); color: rgba(245, 243, 238, .7); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer .brand { color: var(--ivory); }
.footer-brand p { margin-top: 14px; font-weight: 700; color: var(--ivory); text-transform: uppercase; letter-spacing: .02em; }
.footer h3 { margin-bottom: 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(245, 243, 238, .45); }
.footer-grid a, .footer-grid span { display: block; margin-bottom: 8px; text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); display: grid; gap: 6px; font-size: 13px; color: rgba(245, 243, 238, .45); }

/* ── Responsive (shared parts) ────────────────────────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-lang { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .display { font-size: clamp(40px, 11.6vw, 72px); }
  .display.sm { font-size: clamp(32px, 9.2vw, 56px); }
  .lead { margin-top: 16px; }
  .kicker { margin-bottom: 12px; }
  .store { min-height: 54px; font-size: 16px; }
  .footer { padding: 48px 0 calc(28px + env(safe-area-inset-bottom)); }
  .footer-grid { gap: 22px 16px; }
  .footer-base { margin-top: 32px; }
  .brand span { font-size: 17px; }
  .nav { padding: 6px 6px 6px 10px; }
  .nav-cta { padding: 9px 16px; }
  .nav-lang { padding: 8px 12px; }
}
@media (max-width: 360px) {
  .nav .brand span { display: none; }
  .store { padding: 0 18px 0 14px; font-size: 15px; gap: 10px; }
  .nav-lang { padding: 7px 10px; font-size: 14px; }
  .nav-cta { padding: 8px 13px; font-size: 14px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
}
/* Landscape phones: keep content clear of the notch / Dynamic Island. */
@supports (padding: max(0px)) {
  .wrap { width: min(1180px, 100% - 2 * max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right))); }
  .nav-wrap { padding-inline: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right)); }
}
/* Touch screens get no hover lift that would stick after a tap. */
@media (hover: none) {
  a.store:hover { transform: none; box-shadow: 0 14px 30px rgba(18, 19, 23, .22); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* TraceBye home page. Shared chrome (tokens, nav, footer, buttons) lives in chrome.css,
   which build.mjs prepends. Interaction accents reuse the app's type colors. */

/* ── Hero ─────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; padding: clamp(118px, 15vw, 168px) var(--gutter) 0; text-align: center; }
.hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero .lead { margin-inline: auto; }
.pill { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(18, 19, 23, .9); color: var(--ivory); font-size: 14px; font-weight: 600; }
.pill b { padding: 3px 10px; border-radius: 999px; background: var(--grad); font-size: 11px; letter-spacing: .1em; color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: 34px; }
.cta-note { font-size: 15px; font-weight: 600; color: var(--ink-3); }

.stats { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(980px, 100%); margin: 40px auto 0; padding: 0; }
.stats li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; background: rgba(255, 255, 255, .62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 8px 24px rgba(18, 19, 23, .05); text-align: left; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stats b { display: block; font-size: 17px; font-weight: 800; }
.stats small { display: block; font-size: 14px; color: var(--ink-3); line-height: 1.35; }
.stat-icon { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: var(--surface); fill: none; stroke: var(--iris-deep); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; box-shadow: 0 2px 8px rgba(18, 19, 23, .06); }

.phone-stage { position: relative; width: min(320px, 74vw); margin: 48px auto 0; }
.phone { position: relative; aspect-ratio: 9 / 19.5; padding: 12px; border-radius: 54px; background: linear-gradient(160deg, #2A2C35, #0C0D10); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), 0 40px 80px rgba(47, 55, 209, .25), 0 20px 40px rgba(18, 19, 23, .25); }
.phone-video { width: 100%; height: 100%; object-fit: cover; border-radius: 42px; background: #EEF0FF; }
.island { position: absolute; top: 24px; left: 50%; z-index: 2; width: 30%; height: 26px; border-radius: 20px; background: #000; transform: translateX(-50%); }
.float { position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 700; white-space: nowrap; box-shadow: 0 16px 36px rgba(18, 19, 23, .14); animation: bob 5s ease-in-out infinite; }
.float.f1 { top: 22%; left: -46%; }
.float.f2 { bottom: 26%; right: -42%; animation-delay: -2.5s; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--iris)); }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ── Tone helpers ─────────────────────────────────────── */
.tone-like { --c: var(--like); } .tone-repost { --c: var(--repost); } .tone-save { --c: var(--save); } .tone-comment { --c: var(--comment); }
.tone-post { --c: var(--post); } .tone-msg { --c: var(--msg); } .tone-subs { --c: var(--subs); } .tone-ink { --c: var(--ink); }

/* ── Platforms marquee (tilted cards) ─────────────────── */
section { position: relative; }
.platforms { padding: clamp(64px, 8vw, 100px) 0 0; overflow: hidden; }
.marquee { margin-top: 32px; padding: 24px 0 48px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { list-style: none; display: flex; gap: 22px; width: max-content; margin: 0; padding: 0; animation: slide 46s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(calc(-50% - 11px)); } }
.pcard { position: relative; display: flex; flex-direction: column; width: 250px; min-height: 300px; padding: 22px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 18px 40px rgba(18, 19, 23, .08), inset 0 0 0 1px var(--hair); overflow: hidden; }
.pcard:nth-child(odd) { transform: rotate(-3deg) translateY(8px); }
.pcard:nth-child(even) { transform: rotate(2.5deg) translateY(-8px); }
.pcard::before { content: ''; position: absolute; inset: 0 0 auto; height: 120px; background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%); }
.pcard-name { position: relative; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.pcard-count { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; font-size: 16px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 26px 0 0; }
.chips li { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 11%, #F4F4F8); color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-size: 14px; font-weight: 700; }

/* ── How it works ─────────────────────────────────────── */
.how { padding: clamp(56px, 7vw, 90px) 0; background: var(--surface); border-radius: 48px; margin-inline: clamp(0px, 1.5vw, 20px); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 36px 0 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 30px; border-radius: var(--radius); background: var(--bg); }
.step-n { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 24px; border-radius: 50%; background: var(--ink); color: var(--ivory); font-size: 26px; font-weight: 800; }
.steps li:nth-child(2) .step-n { background: var(--grad); color: #fff; }
.steps h3 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.lang-zh .steps h3 { text-transform: none; }
.steps p { margin-top: 10px; color: var(--ink-2); }

/* ── FAQ ──────────────────────────────────────────────── */
.faq { padding: clamp(56px, 7vw, 90px) 0 clamp(64px, 8vw, 100px); }
.faq-list { margin-top: 32px; display: grid; gap: 12px; }
.faq details { border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; font-size: 19px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); font-size: 22px; font-weight: 600; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--ink); color: #fff; }
.faq details p { padding: 0 26px 24px; color: var(--ink-2); }

/* ── 404 page ────────────────────────────────────────── */
.final { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: clamp(100px, 13vw, 170px) var(--gutter); text-align: center; }
.final .lead { margin-inline: auto; }
.final-mark { width: clamp(84px, 10vw, 120px); height: auto; margin-bottom: 34px; border-radius: 26%; box-shadow: 0 24px 50px rgba(47, 55, 209, .35); }
.final-mark .flap { transform-origin: 634.75px 389.25px; animation: peel 4.5s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes peel { 0%, 55%, 100% { transform: none; } 70%, 85% { transform: rotate(-16deg) translate(30px, -26px); } }
.not-found { min-height: 100vh; justify-content: center; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .float.f1 { left: -22%; }
  .float.f2 { right: -20%; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero { padding-top: 104px; }
  .pill { margin-bottom: 20px; }
  .cta-row { margin-top: 26px; gap: 10px; flex-direction: column; }
  /* Three selling points become one compact row. */
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
  .stats li { flex-direction: column; justify-content: flex-start; gap: 8px; padding: 14px 6px; border-radius: 18px; text-align: center; }
  .stats b { font-size: 14px; line-height: 1.25; }
  .stats small { display: none; }
  .stat-icon { width: 36px; height: 36px; padding: 8px; }
  .phone-stage { width: min(250px, 64vw); margin-top: 36px; }
  .phone { padding: 9px; border-radius: 42px; }
  .phone-video { border-radius: 33px; }
  .island { top: 18px; height: 20px; }
  .float { font-size: 13px; padding: 8px 13px; gap: 8px; }
  .float.f1 { left: -14%; top: 14%; }
  .float.f2 { right: -14%; bottom: 16%; }
  .platforms { padding-top: 56px; }
  .marquee { margin-top: 18px; padding: 20px 0 36px; }
  .track { gap: 14px; animation-duration: 36s; }
  @keyframes slide { to { transform: translateX(calc(-50% - 7px)); } }
  .pcard { width: 186px; min-height: 0; padding: 18px; border-radius: 22px; }
  .pcard-name { font-size: 22px; padding-right: 36px; }
  .pcard-count { top: 16px; right: 16px; width: 30px; height: 30px; font-size: 14px; }
  .chips { gap: 6px; padding-top: 18px; }
  .chips li { padding: 4px 10px; font-size: 12.5px; }
  .how { padding: 48px 0; border-radius: 28px; }
  .steps { margin-top: 24px; gap: 10px; }
  .steps li { padding: 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; border-radius: 20px; }
  .step-n { margin: 0; width: 40px; height: 40px; font-size: 18px; grid-row: span 2; align-self: start; }
  .steps h3 { font-size: 20px; }
  .steps p { margin-top: 4px; font-size: 15px; }
  .faq { padding: 48px 0 56px; }
  .faq-list { margin-top: 22px; gap: 8px; }
  .faq details { border-radius: 18px; }
  .faq summary { padding: 16px 18px; font-size: 17px; }
  .faq summary::after { width: 30px; height: 30px; font-size: 20px; }
  .faq details p { padding: 0 18px 18px; font-size: 15px; }
}
@media (max-width: 360px) {
  .stats b { font-size: 13px; }
  .float.f1 { left: -6%; }
  .float.f2 { right: -6%; }
}
@media (hover: none) {
  .marquee:hover .track { animation-play-state: running; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .track { padding-inline: var(--gutter); }
  .track > [aria-hidden="true"] { display: none; }
}
