:root {
  color-scheme: light dark;
  --bg: #f7f9fc;
  --surface: #fff;
  --surface-tint: #eaf3fe;
  --text: #101c2d;
  --muted: #4c5e73;
  --line: #dce4ee;
  --link: #005cba;
  --button: #075bc0;
  --button-hover: #004b9f;
  --button-text: #fff;
  --header: rgba(247, 249, 252, .94);
  --library: #daeafd;
  --timeline: #d9f1ed;
  --scoring: #e6e8ff;
  --export: #e2effc;
  --shadow: 0 12px 40px rgba(23, 56, 94, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b111b;
    --surface: #121d2c;
    --surface-tint: #172b44;
    --text: #f1f6fc;
    --muted: #acbdd0;
    --line: #29394c;
    --link: #85c4ff;
    --button: #8ac7ff;
    --button-hover: #b4ddff;
    --button-text: #081b2c;
    --header: rgba(11, 17, 27, .94);
    --library: #162c48;
    --timeline: #163633;
    --scoring: #252d50;
    --export: #192e46;
    --shadow: 0 12px 40px rgba(0, 0, 0, .22);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  scroll-padding-top: 6rem;
  -webkit-font-smoothing: antialiased;
}

body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .12em; }

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

[data-lang="zh"] .lang-en, [data-lang="en"] .lang-zh { display: none; }

.container {
  width: min(100% - 3rem, 74rem);
  margin-inline: auto;
}

/* Shared navigation */
.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  min-height: 4.25rem;
  gap: 1.6rem;
}

.brand-link {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: .6rem;
  color: var(--text);
  font-weight: 720;
  text-decoration: none;
}

.brand-link img { border-radius: 8px; }

.nav-links, .footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem 1.4rem;
  font-size: .875rem;
}

.nav-links a, .footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover, .nav-links [aria-current], .footer-links a:hover {
  color: var(--link);
  text-decoration: underline;
}

.lang-btn {
  min-width: 3.35rem;
  min-height: 2.4rem;
  padding: .35rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}

.lang-btn:hover { border-color: var(--link); }

/* Home */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.07fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.8rem, 6vw, 5.6rem);
}

.eyebrow {
  color: var(--link);
  font-size: .875rem;
  font-weight: 720;
}

.hero h1 {
  margin-top: .65rem;
  font-size: clamp(3.25rem, 7vw, 6.5rem);
  font-weight: 780;
  letter-spacing: -.075em;
  line-height: 1;
}

:lang(zh-CN) .hero h1 { letter-spacing: -.04em; }

.hero-tagline {
  margin-top: 1.05rem;
  font-size: clamp(1.35rem, 2.7vw, 2.2rem);
  font-weight: 670;
  letter-spacing: -.035em;
  line-height: 1.22;
  text-wrap: balance;
}

.hero-lead {
  max-width: 32rem;
  margin-top: 1.05rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.5rem;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: .6rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 680;
  text-decoration: none;
}

.btn-primary {
  background: var(--button);
  color: var(--button-text);
}

.btn-primary:hover { background: var(--button-hover); }
.btn-secondary { border-color: var(--line); background: var(--surface); }
.btn-secondary:hover { border-color: var(--link); }

.platforms {
  margin-top: 1.45rem;
  color: var(--muted);
  font-size: .875rem;
}

.platforms span { margin-inline: .15em; color: var(--link); }

.hero-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.08;
  border: 1px solid var(--line);
  border-radius: clamp(1.4rem, 3vw, 2.5rem);
  background: radial-gradient(ellipse at 22% 20%, #a0f4e9, transparent 58%),
              linear-gradient(142deg, #43cce8, #367be0 75%, #1f4c91);
  box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
  .hero-art {
    background: radial-gradient(ellipse at 22% 20%, #176e78, transparent 62%),
                linear-gradient(142deg, #143b67, #15234a 80%);
  }
}

.hero-art::before, .hero-art::after {
  position: absolute;
  z-index: -1;
  inset: 10% 6%;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  content: "";
  transform: rotate(-29deg);
}

.hero-art::after { inset: 17% 12%; }

.phone {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  padding: 3px;
  border: 1px solid #64717f;
  border-radius: 12% / 5.8%;
  background: #10151d;
  box-shadow: 0 0 0 1px #121826, 0 12px 24px rgba(5, 17, 35, .24);
}

.phone::after {
  position: absolute;
  top: 2.1%;
  left: 50%;
  width: 23%;
  height: 2.3%;
  border-radius: 999px;
  background: #080b11;
  content: "";
  transform: translateX(-50%);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 11% / 5.3%;
}

.hero-art .phone { position: absolute; width: 38%; padding: 4px; }
.hero-phone-back { top: 12%; left: 18%; transform: rotate(-13deg); }
.hero-phone-front { top: 7%; right: 17%; transform: rotate(10deg); }

.showcase {
  padding-block: clamp(3.25rem, 7vw, 6rem);
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.section-heading { margin-bottom: clamp(1.5rem, 4vw, 2.45rem); }

.section-heading h2 {
  max-width: 48rem;
  font-size: clamp(1.85rem, 4vw, 3.25rem);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.14;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.section-heading p {
  margin-top: .65rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.showcase-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--bg);
}

.device-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.stage-library { background: var(--library); }
.stage-timeline { background: var(--timeline); }
.stage-scoring { background: var(--scoring); }
.stage-export { background: var(--export); gap: clamp(.6rem, 2.5vw, 1.55rem); }

.device-stage .phone { width: min(67%, 12.75rem); }
.stage-export .phone { width: min(44%, 12.75rem); }
.showcase-card figcaption { padding: clamp(1.15rem, 2.5vw, 1.75rem); }

.showcase-card h3, .company-grid h3 {
  font-size: clamp(1.12rem, 1.85vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -.025em;
}

.showcase-card p, .company-grid p { margin-top: .55rem; color: var(--muted); }

.showcase-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  align-items: stretch;
}

.showcase-wide figcaption { align-self: center; padding: clamp(1.4rem, 4vw, 3.2rem); }
.showcase-wide h3 { font-size: clamp(1.4rem, 3vw, 2.35rem); }

.company-section { padding-block: clamp(3rem, 7vw, 6rem); }

.company-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: start;
  gap: clamp(1.5rem, 5vw, 5rem);
}

.company-services > div { padding-block: 1.1rem; border-top: 1px solid var(--line); }

.contact-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--surface-tint);
  overflow-wrap: anywhere;
}

.contact-card h3 { margin-bottom: 1rem; }

/* Privacy, terms and support */
.doc-wrap {
  width: min(100% - 3rem, 56rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 5vw, 4rem);
}

.doc-card {
  padding: clamp(1.35rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: clamp(1.2rem, 3vw, 2rem);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}

.doc-card h1 {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.15;
  text-wrap: balance;
}

.doc-meta {
  margin-top: .85rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .9375rem;
}

.doc-card h2 {
  margin-block: 1.85rem .45rem;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  line-height: 1.3;
}

.doc-card h3 { margin-block: 1.35rem .35rem; font-size: 1.08rem; line-height: 1.4; }
.doc-card p, .doc-card li { color: var(--muted); }
.doc-card p + p, .doc-card li + li { margin-top: .55rem; }
.doc-card ul, .doc-card ol { margin: .4rem 0 0; padding-inline-start: 1.35rem; }

.highlight-note {
  margin-top: 1.3rem;
  padding: 1.1rem 1.25rem;
  border-radius: .8rem;
  background: var(--surface-tint);
}

.site-footer { border-top: 1px solid var(--line); }

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem 1.5rem;
  padding-block: 1.6rem;
  color: var(--muted);
  font-size: .875rem;
}

@media (max-width: 56rem) {
  .hero { gap: 1.5rem; }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-wide { grid-column: auto; display: flex; }
  .device-stage { aspect-ratio: 1; padding: .75rem; }
  .device-stage .phone { width: min(43%, 10rem); }
  .showcase-wide figcaption { align-self: stretch; padding: clamp(1.15rem, 2.5vw, 1.75rem); }
  .showcase-wide h3 { font-size: clamp(1.12rem, 1.85vw, 1.45rem); }
}

@media (max-width: 42rem) {
  html { scroll-padding-top: 1rem; }
  .site-header { position: static; }
  .container, .doc-wrap { width: calc(100% - 2rem); }
  .nav-inner { grid-template-columns: 1fr auto; gap: .15rem .65rem; padding-top: .6rem; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; padding-block: .45rem .65rem; }
  .lang-btn { grid-column: 2; grid-row: 1; }
  .hero, .company-grid { grid-template-columns: 1fr; }
  .hero { gap: 1.8rem; }
  .hero-art { max-width: 31rem; }
}

@media (max-width: 32rem) {
  .showcase-grid { grid-template-columns: 1fr; }
  .device-stage { aspect-ratio: auto; padding-block: 1rem; }
  .device-stage:not(.stage-export) .phone { width: min(62%, 12rem); }
  .hero-art .phone { padding: 3px; }
}
