:root {
  --ink: #1E1B3A;       /* dusk violet: text, dark bands */
  --ink-2: #2A2651;     /* raised surface on dark */
  --pearl: #F6F5FB;     /* page */
  --haze: #ECE8F7;      /* tinted sections */
  --line: #D6D0EC;      /* rules */
  --muted: #58557A;     /* secondary text on light */
  --gold: #D9A847;      /* phoenix gold: actions, live dot */
  --gold-deep: #7E5B10; /* gold as text on light */
  --sea: #86CDC4;       /* translation, on dark */
  --sea-deep: #2C6B65;  /* translation, on light */

  --serif: "Literata", "Noto Serif TC", "PingFang TC", "Songti TC", Georgia, serif;
  --sans: "Manrope", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pearl);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}
body.loc-zh { line-height: 1.8; }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--pearl); padding: 8px 12px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); margin-bottom: 0.6em; }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 1.5rem; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(30, 27, 58, 0.94);
  backdrop-filter: blur(8px);
  color: var(--pearl);
}
.top-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 500; letter-spacing: 0.01em; }
.mark { width: 34px; height: 24px; color: var(--gold); }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 0.93rem; }
.nav a { text-decoration: none; opacity: 0.8; }
.nav a:hover { opacity: 1; }
.locales { display: flex; border: 1px solid rgba(246, 245, 251, 0.25); border-radius: 999px; padding: 3px; font-size: 0.85rem; }
.locales a { text-decoration: none; padding: 4px 11px; border-radius: 999px; opacity: 0.75; }
.locales a:hover { opacity: 1; }
.locales a[aria-current] { background: var(--pearl); color: var(--ink); opacity: 1; }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: var(--pearl); padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 0.92rem; color: rgba(246, 245, 251, 0.78); margin: 0 0 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(217, 168, 71, 0.2); flex: none; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 14ch; }
.loc-zh h1 { max-width: none; line-height: 1.25; letter-spacing: 0; word-break: keep-all; line-break: strict; }
.loc-ru h1, .loc-es h1 { max-width: 16ch; }
.lede { font-size: 1.15rem; color: rgba(246, 245, 251, 0.82); max-width: 44ch; margin: 24px 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 0.98rem/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #E6B85A; }
.btn-quiet { border-color: rgba(246, 245, 251, 0.35); color: var(--pearl); }
.btn-quiet:hover { border-color: var(--pearl); }

/* the interpreted conversation */
.demo {
  background: var(--ink-2);
  border: 1px solid rgba(214, 208, 236, 0.16);
  border-radius: 20px;
  padding: 22px 22px 18px;
  min-height: 430px;
  display: flex; flex-direction: column;
}
.demo-head { display: flex; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid rgba(214, 208, 236, 0.14); }
.who { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; font-size: 0.92rem; }
.who small { grid-column: 2; color: rgba(246, 245, 251, 0.55); font-size: 0.8rem; }
.who .avatar { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(246, 245, 251, 0.3); transition: border-color .3s, box-shadow .3s; }
.who-host .avatar { background: #3A3570; }
.who-client { text-align: right; grid-template-columns: auto auto; }
.who-client .avatar { order: 2; grid-column: 2; grid-row: 1 / span 2; background: #26494A; }
.who-client span:not(.avatar), .who-client small { grid-column: 1; }
.who.on .avatar { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 168, 71, 0.18); }

.demo-feed { list-style: none; margin: 0; padding: 18px 0 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; overflow: hidden; }
.turn { max-width: 88%; }
.turn.client { align-self: flex-end; text-align: right; }
.turn .orig { font-size: 0.98rem; color: var(--pearl); margin: 0; }
.turn .tr { font-family: var(--serif); font-size: 1.12rem; line-height: 1.45; color: var(--sea); margin: 4px 0 0; min-height: 1.45em; }
.turn .tr:empty { display: none; }
.turn.pause { align-self: center; max-width: 100%; font-size: 0.82rem; color: rgba(246, 245, 251, 0.55); text-align: center; }
.turn.pause::before { content: ""; display: block; width: 48px; height: 1px; margin: 0 auto 8px; background: rgba(246, 245, 251, 0.3); }
.turn.enter { animation: rise .45s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.demo-state { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 0.82rem; color: rgba(246, 245, 251, 0.6); min-height: 1.4em; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--sea); opacity: 0; }
.demo-state.live .pulse { opacity: 1; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--haze); }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.sub-h { font-size: 1.3rem; margin: clamp(40px, 6vw, 64px) 0 20px; }

.modes { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.mode { padding: 28px 32px 32px 0; }
.mode + .mode { padding-left: 32px; border-left: 1px solid var(--line); }
.mode-kind { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
.mode h4 { font-size: 1.45rem; margin-bottom: 10px; }
.mode p { margin: 0; max-width: 46ch; }
.mode-fig { width: 220px; height: 40px; margin-top: 22px; }
.mode-fig rect { fill: var(--ink); opacity: 0.8; }
.mode-fig rect.tr { fill: var(--sea-deep); opacity: 0.55; }

.steps { list-style: none; counter-reset: step; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--gold-deep); margin-bottom: 14px; }
.steps h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }

.features { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 80px); margin: 16px 0 0; }
.features > div { padding: 22px 0; border-top: 1px solid var(--line); }
.features dt { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: 6px; }
.features dd { margin: 0; color: var(--muted); max-width: 52ch; }
.features > div:first-child { grid-column: 1 / -1; }
.features > div:first-child dt { font-size: 1.55rem; }
.features > div:first-child dd { color: var(--ink); font-size: 1.1rem; max-width: 70ch; }

.langs { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.langs li { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.4rem); padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--pearl); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.shot, .video { margin: 0; }
.shot img, .shot .placeholder { aspect-ratio: 16 / 10; width: 100%; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.placeholder { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--haze) 0 12px, #E4DFF3 12px 24px); color: var(--muted); font-size: 0.9rem; text-align: center; padding: 16px; }
.video { margin-top: 40px; max-width: 880px; }
.video video, .video iframe, .video .placeholder { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--line); background: var(--ink); }
.video .placeholder { background: var(--ink-2); color: rgba(246, 245, 251, 0.7); border-color: transparent; }

.req { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0; }
.req > div { border-top: 2px solid var(--ink); padding-top: 14px; }
.req dt { color: var(--muted); font-size: 0.95rem; }
.req dd { margin: 4px 0 0; font-family: var(--serif); font-size: 1.6rem; }

.audience { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; margin: 32px 0 12px; }
.audience h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.audience ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.audience li { font-family: var(--serif); font-size: 1.35rem; }
.features-future > div:first-child dt { font-size: 1.25rem; }
.features-future > div:first-child dd { font-size: inherit; color: var(--muted); }
.features-future > div:first-child { grid-column: auto; }

/* ---------- sign-up ---------- */
.signup { background: var(--ink); color: var(--pearl); padding: clamp(64px, 9vw, 104px) 0; }
.signup-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: end; }
.signup h2 { margin-bottom: 12px; }
.signup p { margin: 0; color: rgba(246, 245, 251, 0.8); max-width: 44ch; }
.signup-form label { display: block; font-size: 0.92rem; margin-bottom: 8px; color: rgba(246, 245, 251, 0.8); }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1 1 220px; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(246, 245, 251, 0.3); background: var(--ink-2); color: var(--pearl);
  font: 400 1rem var(--sans);
}
.field input::placeholder { color: rgba(246, 245, 251, 0.4); }
.field input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.signup .fine { font-size: 0.85rem; margin-top: 12px; color: rgba(246, 245, 251, 0.55); }
.form-msg { margin-top: 10px !important; min-height: 1.4em; }
.form-msg.ok { color: var(--sea) !important; }
.form-msg.bad { color: #F2B8A0 !important; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- footer ---------- */
.foot { background: #17142E; color: rgba(246, 245, 251, 0.7); padding: 36px 0; font-size: 0.9rem; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot-inner p { margin: 0; }
.foot-inner p:last-child { margin-left: auto; }
.foot .brand { color: var(--pearl); font-size: 1.1rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .locales { margin-left: auto; }
  .hero-grid, .two-col, .signup-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .brand span { display: none; }
  .locales a { padding: 4px 8px; }
  .modes, .features, .steps, .shots, .req { grid-template-columns: 1fr; }
  .mode { padding-right: 0; }
  .mode + .mode { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .demo { min-height: 400px; padding: 18px 16px 14px; }
  .foot-inner p:last-child { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .turn.enter, .demo-state.live .pulse { animation: none; }
}
.modes-single { grid-template-columns: 1fr; max-width: 640px; }
