/* 隐思 product site. No external fonts or CDNs: it must load fast from mainland China too. */
:root {
  --bg: #f6f4ef;
  --bg-2: #efece4;
  --card: #fffdf9;
  --ink: #1b1a17;
  --ink-2: #4a4740;
  --muted: #7a766c;
  --line: #e2ddd1;
  --accent: #d4573f;
  --accent-ink: #ffffff;
  --accent-soft: #f6dfd6;
  --night: #15121f;
  --shadow: 0 1px 2px rgba(27, 26, 23, .04), 0 8px 24px rgba(27, 26, 23, .06);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, system-ui, sans-serif;
  --r: 20px;
  --max: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141310; --bg-2: #1c1a16; --card: #1f1d19; --ink: #f2efe8; --ink-2: #cfcabe; --muted: #9a958a;
    --line: #34312a; --accent: #e8735b; --accent-soft: #3a241e; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141310; --bg-2: #1c1a16; --card: #1f1d19; --ink: #f2efe8; --ink-2: #cfcabe; --muted: #9a958a;
  --line: #34312a; --accent: #e8735b; --accent-soft: #3a241e; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; height: 64px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.lang { border: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 4px 12px; font: 13px var(--sans); cursor: pointer; }
.lang:hover { color: var(--ink); border-color: var(--muted); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover::after, .nav-links a.on::after { transform: scaleX(1); }
.nav-links a.on { color: var(--ink); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; position: relative; cursor: pointer; }
.menu-btn i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-btn i:first-child { top: 15px; } .menu-btn i:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] i:first-child { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-child { top: 19px; transform: rotate(-45deg); }
@media (max-width: 860px) {
  .nav .wrap { gap: 10px; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    padding: 8px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -20px rgba(0,0,0,.25); }
  .nav-links.open { display: flex; animation: drop .35s var(--ease); }
  .nav-links a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .lang { margin-left: auto; } .menu-btn { display: block; } .nav .nav-cta { display: none; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- type */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0; }
/* Chinese headlines break at punctuation, never inside a word (自 / 己); long runs still wrap. */
h1, h2, h3, .faq summary { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.12; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.2; }
h3 { font-size: 21px; line-height: 1.35; }
.eyebrow { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 640px; }
.muted { color: var(--muted); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; font: 500 16px var(--sans);
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn svg { width: 18px; height: 18px; }

/* ---------- hero */
.hero { padding: 96px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero .lead { margin: 26px 0 36px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }
/* Three facts under the call to action, quiet and scannable. */
.trust { list-style: none; margin: 40px 0 0; padding: 22px 0 0; display: flex; gap: 36px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.trust li { display: grid; gap: 2px; }
.trust b { font: 500 26px/1.1 var(--serif); }
.trust span { font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .trust { gap: 18px; justify-content: space-between; flex-wrap: nowrap; } .trust b { font-size: 21px; } .trust span { font-size: 12px; } }
@media (max-width: 900px) { .hero { padding: 56px 0 40px; } .hero .wrap { grid-template-columns: 1fr; } }

.stage { position: relative; aspect-ratio: 1 / 1.08; border-radius: 32px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #3a2b52 0%, #241c35 45%, var(--night) 100%); box-shadow: var(--shadow); }
.stage .orb { position: absolute; left: 50%; top: 36%; width: 78%; transform: translate(-50%, -50%); filter: drop-shadow(0 20px 60px rgba(142, 197, 255, .25)); animation: float 7s ease-in-out infinite; }
.stage .glow { position: absolute; inset: auto -20% -30% -20%; height: 60%; background: radial-gradient(closest-side, rgba(255, 143, 163, .28), transparent); }
.bubbles { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 82%; padding: 11px 15px; border-radius: 18px; font-size: 15px; line-height: 1.5; opacity: 0; transform: translateY(8px); animation: rise .7s ease forwards; }
.bubble.me { align-self: flex-end; background: rgba(255, 255, 255, .92); color: #1b1a17; border-bottom-right-radius: 6px; animation-delay: .5s; }
.bubble.ai { align-self: flex-start; background: rgba(255, 255, 255, .12); color: #f7f3ff; border: 1px solid rgba(255, 255, 255, .14); border-bottom-left-radius: 6px; animation-delay: 1.6s; }
.bubble.ai.second { animation-delay: 3.4s; }
/* "TA 正在输入…" between the first answer and the remembered follow-up. */
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .14); opacity: 0; animation: typing 1.2s ease 2.2s forwards; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #f7f3ff; opacity: .5; animation: dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0% { opacity: 0; } 15%, 85% { opacity: 1; } 100% { opacity: 0; height: 0; padding: 0; margin: -10px 0 0; border-width: 0; } }
@keyframes dot { 50% { opacity: 1; transform: translateY(-2px); } }
.stage { transition: transform .8s var(--ease); }
.live { position: absolute; top: 18px; left: 18px; display: flex; align-items: center; gap: 8px; color: #f7f3ff; font-size: 13px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); padding: 6px 12px; border-radius: 999px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #7fe0c4; box-shadow: 0 0 0 4px rgba(127, 224, 196, .2); }
@keyframes float { 50% { transform: translate(-50%, -54%); } }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .stage .orb, .bubble { animation: none; opacity: 1; transform: none; } .stage .orb { transform: translate(-50%, -50%); } .typing { display: none; } }

/* ---------- sections */
section { padding: 96px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head .lead { margin-top: 18px; }
.band { background: var(--bg-2); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 30px; box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(27, 26, 23, .04), 0 22px 44px -18px rgba(27, 26, 23, .18); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 22px; }
.card .icon svg { width: 22px; height: 22px; }
.card p { margin: 12px 0 0; color: var(--ink-2); }
.card ul { margin: 16px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 15px; }
.card li { padding: 6px 0; border-top: 1px dashed var(--line); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* county towns and villages */
.rural { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rural-card h3 { margin-top: 18px; font-size: 26px; }
.rural-top { display: flex; justify-content: space-between; align-items: center; }
.rural-top .who { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.rural-top .who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rural-top .hot { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips span { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.rural-card:nth-child(2) { transition-delay: .08s; } .rural-card:nth-child(3) { transition-delay: .16s; }
@media (max-width: 900px) { .rural { grid-template-columns: 1fr; } }

/* companions */
.roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .roster { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
/* Each companion as a video-call tile: breathing and slight head motion always; the tile that is
   "speaking" gets a glow, voice bars, a talking bob and a line of what it says. */
.tile { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 50% 10%, #3a2b52, #15121f); box-shadow: var(--shadow);
  transition: box-shadow .5s, transform .5s; }
.tile .av { position: absolute; inset: 0; }
.tile .av-svg { width: 100%; height: 100%; display: block; }
.tile .av-fig { transform-box: view-box; transform-origin: 50% 100%; animation: breathe 6.5s ease-in-out infinite; }
.tile:nth-child(2) .av-fig { animation-delay: -1.3s; } .tile:nth-child(3) .av-fig { animation-delay: -2.6s; }
.tile:nth-child(4) .av-fig { animation-delay: -3.9s; } .tile:nth-child(5) .av-fig { animation-delay: -5.2s; } .tile:nth-child(6) .av-fig { animation-delay: -.7s; }
.tile .av-head { transform-box: view-box; transform-origin: 50% 62%; animation: tilt 9s ease-in-out infinite; }
.tile:nth-child(even) .av-head { animation-duration: 11s; animation-delay: -4s; }
.tile .av-eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; }
.tile:nth-child(2) .av-eyes { animation-delay: -1.7s; } .tile:nth-child(3) .av-eyes { animation-delay: -3.1s; animation-duration: 6.1s; }
.tile:nth-child(4) .av-eyes { animation-delay: -.9s; animation-duration: 4.6s; } .tile:nth-child(5) .av-eyes { animation-delay: -2.4s; }
.tile:nth-child(6) .av-eyes { animation-delay: -4.2s; animation-duration: 5.8s; }
.tile:nth-child(7) .av-fig { animation-delay: -2s; } .tile:nth-child(8) .av-fig { animation-delay: -4.4s; } .tile:nth-child(9) .av-fig { animation-delay: -.3s; }
.tile:nth-child(7) .av-eyes { animation-delay: -3.6s; } .tile:nth-child(8) .av-eyes { animation-delay: -1.2s; animation-duration: 6.4s; }
.tile:nth-child(9) .av-eyes { animation-delay: -2.9s; animation-duration: 4.9s; }
.tile:hover { transform: translateY(-4px); }
.tile .av-open { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform .08s linear; }
.tile .av-closed { transition: opacity .08s; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(14, 10, 20, .66) 0%, rgba(14, 10, 20, .1) 20%, transparent 30%); }
.tile figcaption { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; color: #fff; }
.tile figcaption b { display: block; font-size: 18px; font-weight: 600; }
.tile figcaption span { display: block; font-size: 13px; color: rgba(255, 255, 255, .78); margin-top: 1px; }
.tile .voice { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; gap: 3px; align-items: center; height: 26px;
  padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-4px); transition: opacity .35s, transform .35s; }
.tile .voice i { width: 3px; height: 6px; border-radius: 2px; background: #7fe0c4; }
.tile .say { position: absolute; left: 14px; right: 14px; bottom: 72px; z-index: 2; margin: 0; padding: 10px 13px; border-radius: 16px 16px 16px 6px;
  background: rgba(255, 255, 255, .94); color: #1b1a17; font-size: 14px; line-height: 1.5; opacity: 0; transform: translateY(6px);
  transition: opacity .35s, transform .35s; }
.tile.speaking { box-shadow: 0 0 0 2px var(--accent), 0 18px 50px -12px color-mix(in srgb, var(--accent) 55%, transparent); }
.tile.speaking .av-head { animation: tilt 9s ease-in-out infinite, talk .9s ease-in-out infinite; }
.tile.speaking .voice, .tile.speaking .say { opacity: 1; transform: none; }
.tile.speaking .voice i { animation: bar .8s ease-in-out infinite; }
.tile .voice i:nth-child(2) { animation-delay: -.2s !important; } .tile .voice i:nth-child(3) { animation-delay: -.45s !important; }
.tile .voice i:nth-child(4) { animation-delay: -.65s !important; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.012) translateY(-3px); } }
@keyframes tilt { 0%, 100% { rotate: 0deg; } 30% { rotate: 1.6deg; } 70% { rotate: -1.2deg; } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes talk { 0%, 100% { translate: 0 0; } 25% { translate: 0 -2px; } 50% { translate: 0 1px; } 75% { translate: 0 -1px; } }
@keyframes bar { 0%, 100% { height: 5px; } 50% { height: 16px; } }
@media (prefers-reduced-motion: reduce) { .tile .av-fig, .tile .av-head, .tile .av-eyes, .tile.speaking .av-head, .tile.speaking .voice i { animation: none; } }
/* Small tiles: the line goes at the top so it never covers the moving mouth. */
@media (max-width: 760px) { .tile .say { font-size: 12px; top: 46px; bottom: auto; left: 10px; right: 10px; padding: 8px 10px; border-radius: 6px 14px 14px 14px; }
  .tile .voice { top: 10px; left: 10px; } .tile figcaption { left: 12px; bottom: 10px; } .tile figcaption b { font-size: 16px; } .tile figcaption span { font-size: 12px; } }
.roster-note { margin-top: 36px; color: var(--muted); font-size: 15px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 30px 28px 0 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step .n { font: 500 15px var(--serif); color: var(--accent); }
.step h3 { margin: 10px 0 8px; }
.step p { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .step, .step + .step { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); } }

/* safety */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.check b { display: block; margin-bottom: 4px; }
.check span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 560px) { .checks { grid-template-columns: 1fr; } }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { display: flex; flex-direction: column; }
.plan .price { font: 500 44px/1 var(--serif); margin: 18px 0 4px; }
.plan .price small { font: 400 15px var(--sans); color: var(--muted); }
.plan.featured { border-color: var(--ink); }
.plan .tag { align-self: flex-start; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* faq */
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { cursor: pointer; list-style: none; font: 500 19px/1.4 var(--serif); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 24px/1 var(--sans); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; color: var(--ink-2); }
.faq .ans { overflow: hidden; }
.faq summary:hover { color: var(--accent); }

/* download */
.download { text-align: center; }
.download h2 { max-width: 760px; margin: 0 auto; }
.download .lead { margin: 20px auto 34px; }
.download .cta { justify-content: center; }
.soon { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer a { text-decoration: none; color: var(--ink-2); }
footer a:hover { color: var(--ink); }
.fine { flex-basis: 100%; font-size: 13px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Content rises gently into view (only with JS: without it everything is simply there). */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease), box-shadow .5s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover { transform: translateY(-4px); }
.steps .step:nth-child(2), .checks .check:nth-child(even), .plans .plan:nth-child(2) { transition-delay: .08s; }
.steps .step:nth-child(3), .plans .plan:nth-child(3) { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .card, .tile { transition: none; } .card:hover, .tile:hover { transform: none; } }
