/* UnderText site. Product-page layout: alternating light and dark full-width sections,
   large tight headlines, one accent (the app's amber). */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
          "Helvetica Neue", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --paper: #f5f5f7;
  --white: #ffffff;
  --night: #000000;
  --night-2: #101114;
  --night-3: #1c1d21;
  --mist: #a1a1a6;
  --amber: #f4b440;
  --amber-2: #ff8a3d;
  --blue: #0071e3;
  --blue-l: #2997ff;
  --teal: #3cc8b4;
  --grey-word: #6c7587;
  --radius: 28px;
  --wrap: 980px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 52px; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue-l); outline-offset: 3px; border-radius: 6px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 22, 23, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: #e8e8ed;
}
.nav-in {
  max-width: var(--wrap); margin: 0 auto; height: 48px; padding: 0 22px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: #2a2f3b; display: grid; align-content: center; gap: 3px; padding: 0 5px; }
.mark i { display: block; height: 3px; border-radius: 2px; background: #e9edf3; }
.mark i + i { width: 75%; background: var(--amber); }
.nav nav { display: flex; gap: 26px; margin-left: auto; font-size: 13px; }
.nav nav a { text-decoration: none; opacity: 0.82; transition: opacity 0.2s; }
.nav nav a:hover { opacity: 1; }
.nav-end { display: flex; align-items: center; gap: 18px; }
.nav nav + .nav-end { margin-left: 0; }
.lang { font-size: 13px; text-decoration: none; opacity: 0.82; }
.lang:hover { opacity: 1; }

/* ---------- buttons, links ---------- */
.btn {
  display: inline-block; background: var(--blue); color: #fff; text-decoration: none;
  padding: 10px 22px; border-radius: 980px; font-size: 16px; font-weight: 500; transition: background 0.2s;
}
.btn:hover { background: #0077ed; }
.btn-sm { padding: 5px 13px; font-size: 13px; }
.link { color: var(--blue-l); text-decoration: none; font-size: 17px; }
.light .link { color: var(--blue); }
.link::after { content: " ›"; }
.link:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; color: var(--blue-l); font: inherit; font-size: 15px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.cta { display: flex; gap: 30px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ---------- sections ---------- */
section { padding: 72px 22px; text-align: center; overflow: hidden; }
.dark { background: var(--night); color: #f5f5f7; }
.light { background: var(--paper); color: var(--ink); }
section h2 {
  font-size: clamp(30px, 4.2vw, 48px); line-height: 1.1; font-weight: 700; letter-spacing: -0.015em;
  max-width: 900px; margin: 0 auto;
}
h1, h2 { text-wrap: balance; }
.nw { white-space: nowrap; }
.lede { text-wrap: pretty; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; max-width: 720px; margin: 14px auto 0; color: var(--ink-2); font-weight: 500; }
.dark .lede { color: var(--mist); }
.fine { font-size: 13px; color: var(--ink-2); margin-top: 16px; line-height: 1.6; }
.dark .fine { color: #86868b; }

/* ---------- hero ---------- */
.hero { padding-top: 56px; padding-bottom: 56px; }
.hero-name { font-size: 21px; font-weight: 600; color: #f5f5f7; letter-spacing: -0.01em; }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 68px); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em;
  margin-top: 8px;
}
.glow {
  background: linear-gradient(92deg, #ffd36e 0%, var(--amber) 45%, var(--amber-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.screen {
  max-width: 1040px; margin: 40px auto 0; border-radius: 18px; overflow: hidden;
  background: #0b0e14; border: 1px solid #2a2d35;
  box-shadow: 0 40px 120px rgba(244, 180, 64, 0.08), 0 30px 80px rgba(0, 0, 0, 0.6);
}
.screen video { width: 100%; aspect-ratio: 1600 / 564; object-fit: cover; }
.caption { font-size: 13px; color: #86868b; margin-top: 12px; }

/* ---------- pillars ---------- */
.bento {
  max-width: var(--wrap); margin: 40px auto 0; display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr); text-align: left;
}
.tile { background: var(--white); border-radius: 22px; padding: 28px 30px 30px; }
.tile-dark { background: var(--night); color: #f5f5f7; }
.kicker { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.tile-dark .kicker { color: var(--amber); }
.big { font-size: clamp(40px, 4.6vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 10px 0 2px; white-space: nowrap; }
.big-note { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 14px; }
.tile-dark .big-note { color: var(--amber); }
#free .big { color: var(--ink); }
#realtime .big { background: linear-gradient(92deg, var(--amber-2), #e5484d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile-text { font-size: 15px; line-height: 1.55; color: var(--ink-2); font-weight: 500; }
.tile-dark .tile-text { color: var(--mist); }

/* ---------- live overlay demo ---------- */
.overlay {
  max-width: 900px; margin: 36px auto 0; text-align: left;
  background: rgba(20, 26, 38, 0.92); border: 1px solid #262d3c; border-radius: 18px; padding: 24px 28px 26px;
  min-height: 160px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.para { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; align-items: start; }
.spk {
  display: inline-block; font-size: 15px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  background: var(--amber); color: #141a26; margin-top: 6px;
}
.spk.s2 { background: #7cc4ff; }
.spk.s3 { background: #b18cff; }
.texts .en { font-size: clamp(14px, 1.5vw, 17px); line-height: 1.45; color: #aeb7c4; min-height: 1.45em; }
.texts .zh { font-size: clamp(20px, 2.2vw, 27px); line-height: 1.4; font-weight: 600; color: #f5f7fa; margin-top: 6px; min-height: 1.4em; }
.texts .g { color: var(--grey-word); }
.texts .zh .g { color: #6f7889; }
.texts .new { animation: pop 0.35s ease-out; }
@keyframes pop { from { opacity: 0.2; } to { opacity: 1; } }
.legend { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 18px; font-size: 14px; color: var(--mist); flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.dot.white { background: #f5f7fa; }
.dot.grey { background: var(--grey-word); }

/* ---------- three translations ---------- */
.steps { max-width: var(--wrap); margin: 36px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.step { background: var(--white); border-radius: 20px; padding: 24px 24px 26px; }
.num { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.step:nth-child(2) .num, .step:nth-child(3) .num { background: var(--amber); color: #141a26; }
.step h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-top: 14px; }
.model { font-size: 13px; color: var(--ink-2); margin: 2px 0 10px; font-weight: 500; }
.step p:last-child { font-size: 15px; line-height: 1.55; color: #424245; }

/* ---------- pipeline ---------- */
.flow { max-width: 1080px; margin: 40px auto 0; display: flex; align-items: stretch; justify-content: center; gap: 0; }
.stage {
  flex: 1 1 0; min-width: 0; background: var(--night-3); border: 1px solid #2c2e35; border-radius: 16px;
  padding: 16px 12px; text-align: center;
}
.stage.accent { border-color: rgba(244, 180, 64, 0.6); box-shadow: 0 0 40px rgba(244, 180, 64, 0.12); }
.s-name { font-size: 15px; font-weight: 700; }
.stage.accent .s-name { color: var(--amber); }
.s-role { font-size: 13px; color: #c7c7cc; margin-top: 6px; line-height: 1.4; }
.s-meta { font-size: 12px; color: #86868b; margin-top: 6px; }
.arrow { flex: 0 0 28px; align-self: center; height: 2px; background: linear-gradient(90deg, #3a3d45, #6e6e73); position: relative; }
.arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid #6e6e73; border-right: 0; }
.facts { max-width: 820px; margin: 36px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.f-big { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -0.02em; color: #f5f5f7; }
.fact p:last-child { color: var(--mist); font-size: 14px; margin-top: 2px; }

/* ---------- speakers ---------- */
.split { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; text-align: left; }
.split h2, .split .lede { margin-left: 0; }
.chat { background: #141a26; border-radius: 20px; padding: 24px 24px; display: grid; gap: 16px; box-shadow: 0 30px 70px rgba(20, 26, 38, 0.25); }
.c-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.c-row .spk { margin-top: 3px; }
.c-en { color: #aeb7c4; font-size: 13px; }
.c-zh { color: #f5f7fa; font-size: 18px; font-weight: 600; margin-top: 2px; }

/* ---------- performance ---------- */
.chart-card { max-width: 900px; margin: 36px auto 0; background: var(--night-2); border: 1px solid #23252b; border-radius: 20px; padding: 22px 24px 14px; text-align: left; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-head p { font-size: 15px; font-weight: 600; }
.keys { display: flex; gap: 18px; font-size: 14px; color: var(--mist); }
.k::before { content: ""; display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.k-normal::before { background: #ff6b5b; }
.k-saving::before { background: var(--teal); }
#perfChart .grid line { stroke: #26282f; }
#perfChart text { fill: #86868b; font-size: 13px; font-family: var(--font); }
#perfChart .l { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
#perfChart .l-normal { stroke: #ff6b5b; }
#perfChart .l-saving { stroke: var(--teal); }
.numbers { max-width: 900px; margin: 32px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: left; }
.n-big { font-size: clamp(34px, 3.6vw, 46px); font-weight: 700; letter-spacing: -0.02em; color: var(--teal); }
.n-big small { font-size: 0.42em; letter-spacing: 0; color: #c7c7cc; font-weight: 600; }
.n p:last-child { color: var(--mist); font-size: 14px; margin-top: 4px; line-height: 1.5; }

/* ---------- features ---------- */
.grid { max-width: var(--wrap); margin: 36px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.feat { background: var(--white); border-radius: 18px; padding: 22px 22px 24px; }
.feat h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.005em; }
.feat p { font-size: 14px; color: #424245; margin-top: 6px; line-height: 1.55; }

/* ---------- download ---------- */
.app-icon { margin: 0 auto 18px; width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 20px 60px rgba(244, 180, 64, 0.18); }
.install { list-style: none; max-width: 640px; margin: 30px auto 0; display: grid; gap: 10px; text-align: left; }
.install li { display: flex; align-items: center; gap: 18px; background: var(--night-3); border-radius: 14px; padding: 13px 18px; font-size: 16px; }
.install span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--amber); color: #141a26; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.install code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; color: var(--amber); }

/* ---------- FAQ ---------- */
.qa { max-width: 760px; margin: 28px auto 0; text-align: left; }
.qa details { border-bottom: 1px solid #d2d2d7; }
.qa summary {
  list-style: none; cursor: pointer; padding: 16px 36px 16px 0; font-size: 17px; font-weight: 600; position: relative;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 26px; font-weight: 300; color: var(--ink-2); transition: transform 0.25s; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { font-size: 15px; color: #424245; padding: 0 36px 18px 0; line-height: 1.6; }

/* ---------- footer ---------- */
.foot { background: var(--paper); border-top: 1px solid #d2d2d7; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 26px 22px 40px; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.foot a { color: var(--ink); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .texts .new { animation: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  section { padding: 56px 18px; }
  .nav nav { display: none; }
  .nav-in { justify-content: space-between; }
  .bento { grid-template-columns: 1fr; }
  .steps, .grid, .numbers, .facts { grid-template-columns: 1fr; }
  .flow { flex-direction: column; align-items: stretch; max-width: 420px; }
  .arrow { flex: 0 0 26px; width: 2px; height: 26px; align-self: center; background: linear-gradient(180deg, #3a3d45, #6e6e73); }
  .arrow::after { right: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top: 7px solid #6e6e73; border-bottom: 0; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .tile { padding: 24px 22px 26px; }
  .overlay { padding: 18px 16px 20px; }
  .screen { margin-top: 30px; border-radius: 12px; }
  .install li { font-size: 15px; }
}

