:root {
  --ink: #1e1c1a;
  --muted: #716b64;
  --paper: #f7f3ec;
  --card: #fffdf9;
  --line: #ded7cc;
  --accent: #d85832;
  --accent-soft: #f4d6c8;
  --sage: #667868;
  --shadow: 0 18px 45px rgba(52, 42, 32, .09);
  --radius: 24px;
  --pointer-x: 50vw;
  --pointer-y: 30vh;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; background: radial-gradient(260px circle at var(--pointer-x) var(--pointer-y), rgba(216, 88, 50, .075), transparent 70%); mix-blend-mode: multiply; }
button, a { font: inherit; }
a { color: inherit; }
::selection { background: var(--accent-soft); }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px); background: rgba(247, 243, 236, .86);
  border-bottom: 1px solid rgba(222, 215, 204, .7);
}
.nav-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; text-decoration: none; }
.brand-mark, .agent-mark {
  min-width: 42px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center;
  border-radius: 50%; color: #fff; background: var(--accent); font-weight: 800;
}
.brand-mark { border-radius: 11px; font-size: 12px; letter-spacing: .08em; }
.agent-mark { border-radius: 999px; font-size: 11px; }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--accent); }

.hero { padding: 112px 0 88px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  right: -200px; top: -180px; background: rgba(216, 88, 50, .08); filter: blur(2px); z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 72px; align-items: center; }
.kicker, .eyebrow { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 16px; }
h1 { font-size: clamp(44px, 7vw, 82px); line-height: 1.06; letter-spacing: -.055em; margin: 0; max-width: 780px; }
h1 em { color: var(--accent); font-style: normal; }
.lead { font-size: clamp(18px, 2.3vw, 23px); color: #4d4842; max-width: 700px; margin: 28px 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 999px; text-decoration: none; font-weight: 750; border: 1px solid var(--ink); }
.btn-primary { color: #fff; background: var(--ink); }
.btn-secondary { background: transparent; }
.btn:hover { transform: translateY(-2px); }
.trust-line { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.trust-line span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; color: var(--muted); background: rgba(255,255,255,.35); font-size: 13px; }

.profile-card { background: var(--card); border: 1px solid var(--line); border-radius: 32px; padding: 30px; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.profile-card { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease; }
.profile-card:hover { transform: rotate(0) translateY(-8px); box-shadow: 0 28px 60px rgba(52, 42, 32, .14); }
.profile-top { display: flex; align-items: center; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.avatar { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 22px; background: var(--accent); color: #fff; font-size: 20px; letter-spacing: .06em; font-weight: 900; box-shadow: 8px 8px 0 var(--accent-soft); }
.profile-top h2 { margin: 0; font-size: 20px; }
.profile-top p { color: var(--muted); margin: 3px 0 0; }
.profile-list { margin: 24px 0 0; display: grid; gap: 16px; }
.profile-list div { display: flex; justify-content: space-between; gap: 20px; }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; text-align: right; font-weight: 700; }
.profile-state { color: var(--sage); }
.scroll-cue { width: max-content; margin: 68px auto 0; display: flex; flex-direction: column; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; text-decoration: none; letter-spacing: .08em; }
.scroll-cue i { display: block; width: 20px; height: 32px; border: 1px solid var(--line); border-radius: 999px; position: relative; }
.scroll-cue i::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); top: 7px; left: 7px; animation: scrollDown 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--accent); }

.section { padding: 96px 0; }
.section.alt { background: #eee8de; }
.section-head { max-width: 700px; margin-bottom: 42px; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 54px); letter-spacing: -.04em; line-height: 1.12; margin: 0 0 16px; }
.section-head p { font-size: 18px; color: var(--muted); margin: 0; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value-card { border-top: 2px solid var(--ink); padding: 24px 0; }
.value-card { transition: transform .3s ease, border-color .3s ease; }
.value-card:hover { transform: translateY(-7px); border-color: var(--accent); }
.value-card h3, .workflow h3, .boundary h3 { transition: color .25s ease, letter-spacing .25s ease; }
.value-card:hover h3, .workflow article:hover h3, .boundary:hover h3 { color: var(--accent); letter-spacing: .015em; }
.value-card strong { font-family: Georgia, serif; font-size: 36px; color: var(--accent); }
.value-card h3 { font-size: 21px; margin: 12px 0 8px; }
.value-card p { color: var(--muted); margin: 0; }

.demo-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.demo-tabs { display: grid; gap: 8px; }
.demo-tab { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-align: left; background: transparent; color: var(--muted); cursor: pointer; transition: .2s ease; }
.demo-tab span { display: block; color: inherit; font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.demo-tab strong { color: var(--ink); }
.demo-tab:hover, .demo-tab.is-active { background: var(--ink); color: #c9c3ba; border-color: var(--ink); transform: translateX(5px); }
.demo-tab.is-active strong { color: #fff; }
.demo-panel { outline: none; min-height: 620px; padding: 34px; border-radius: 28px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); opacity: .6; transform: translateY(5px); transition: .28s ease; }
.demo-panel.is-visible { opacity: 1; transform: none; }
.demo-head { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.demo-head h3 { font-size: clamp(25px, 3vw, 36px); line-height: 1.18; margin: 0; max-width: 620px; }
.status { white-space: nowrap; background: #e2ebe3; color: #39533e; font-size: 12px; font-weight: 800; padding: 7px 11px; border-radius: 999px; }
.message { margin: 28px 0 18px 14%; border-radius: 20px 20px 4px 20px; padding: 18px 20px; background: #eee9e1; }
.message span { font-size: 12px; font-weight: 800; color: var(--muted); }
.message p { margin: 5px 0 0; }
.thinking { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; margin: 21px 0; }
.thinking i { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; animation: pulse 1.2s infinite alternate; }
.thinking i:nth-child(2) { animation-delay: .2s; }
.thinking i:nth-child(3) { animation-delay: .4s; margin-right: 5px; }
.agent-output { border-left: 2px solid var(--accent); padding-left: 22px; }
.agent-label { display: flex; align-items: center; gap: 10px; }
.agent-label small { color: var(--muted); }
.agent-output ol { list-style: none; counter-reset: item; padding: 0; margin: 20px 0; display: grid; gap: 11px; }
.agent-output li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.agent-output li b { color: var(--accent); }
.agent-output li p { margin: 0; }
.agent-output aside { padding: 15px 17px; border-radius: 12px; background: #f4eee5; color: #554e47; }
.demo-disclaimer { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

.workflow { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.workflow article { min-height: 170px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.2); }
.workflow article { transition: transform .28s ease, background .28s ease, box-shadow .28s ease; }
.workflow article:hover { position: relative; z-index: 2; transform: translateY(-6px) scale(1.015); background: var(--card); box-shadow: var(--shadow); }
.workflow span { color: var(--accent); font-family: Georgia, serif; font-size: 24px; }
.workflow h3 { font-size: 16px; margin: 22px 0 5px; }
.workflow p { color: var(--muted); font-size: 13px; margin: 0; }

.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.boundary { border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); background: var(--card); }
.boundary { transition: transform .32s ease, box-shadow .32s ease; }
.boundary:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.boundary.no { background: #282522; color: #fff; border-color: #282522; }
.boundary h3 { margin: 0 0 22px; font-size: 25px; }
.boundary ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.boundary li { position: relative; padding-left: 28px; }
.boundary li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
.boundary.no li::before { content: "—"; color: #f0aa91; }
.boundary.no li { color: #d3cec8; }
.boundary-quote { font-family: Georgia, "Songti SC", serif; font-size: clamp(28px, 4vw, 46px); line-height: 1.25; text-align: center; margin: 58px auto 0; max-width: 880px; }
.boundary-quote em { color: var(--accent); font-style: normal; }

.case { display: grid; grid-template-columns: .72fr 1.28fr; gap: 64px; align-items: start; }
.case-intro { position: sticky; top: 105px; }
.case-intro h2 { font-size: clamp(36px, 4.5vw, 54px); line-height: 1.12; margin: 0 0 18px; }
.case-intro p { color: var(--muted); }
.timeline { border-left: 1px solid var(--line); padding-left: 32px; display: grid; gap: 28px; }
.timeline article { position: relative; }
.timeline article { transition: transform .25s ease; }
.timeline article:hover { transform: translateX(8px); }
.timeline article::before { content: ""; position: absolute; left: -39px; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline small { color: var(--accent); font-weight: 800; }
.timeline h3 { margin: 4px 0 7px; }
.timeline p { margin: 0; color: var(--muted); }
.human-agent { display: inline-flex; gap: 8px; margin-top: 12px; font-size: 12px; }
.human-agent span { background: #eee8de; border-radius: 999px; padding: 5px 9px; }

.privacy-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-radius: 30px; background: var(--ink); color: #fff; padding: 48px; }
.privacy-card h2 { font-size: clamp(34px, 4.5vw, 52px); line-height: 1.12; margin: 0; }
.privacy-card h2 em { color: #f3a78d; font-style: normal; }
.privacy-card p { color: #d0cbc5; }
.privacy-list { display: grid; gap: 12px; margin-top: 25px; }
.privacy-list div { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 11px; border-bottom: 1px solid #49433e; }
.privacy-list span { color: #aba49d; }
.privacy-list strong { color: #b9d1bd; }

.contact-section { padding-top: 20px; }
.contact-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; border-top: 1px solid var(--line); padding-top: 64px; }
.contact-card h2 { font-size: clamp(34px, 4vw, 50px); line-height: 1.1; margin: 0 0 14px; }
.contact-card p { color: var(--muted); margin: 0; }
.wechat-card { min-width: 290px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.wechat-card { transition: transform .3s ease, box-shadow .3s ease; }
.wechat-card:hover { transform: translateY(-7px) rotate(-.5deg); box-shadow: 0 26px 55px rgba(52, 42, 32, .14); }
.wechat-card span, .wechat-card small { display: block; color: var(--muted); }
.wechat-card strong { display: block; margin: 4px 0; font-size: 26px; letter-spacing: .02em; }
.qr-peek { max-height: 0; opacity: 0; overflow: hidden; transform: translateY(10px); transition: max-height .48s cubic-bezier(.2,.8,.2,1), opacity .3s ease, transform .4s ease, margin .4s ease; margin-top: 0; }
.qr-peek img { display: block; width: 210px; max-width: 100%; height: auto; margin: 0 auto; border-radius: 14px; background: #fff; }
.qr-peek em { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-style: normal; text-align: center; }
.wechat-card:hover .qr-peek, .wechat-card:focus-within .qr-peek { max-height: 310px; opacity: 1; transform: none; margin-top: 16px; }
.qr-open { width: 100%; margin-top: 18px; padding: 11px 14px; border: 0; border-radius: 12px; color: #fff; background: var(--ink); cursor: pointer; font-weight: 750; text-align: left; display: flex; justify-content: space-between; align-items: center; transition: background .2s ease, transform .2s ease; }
.qr-open:hover { background: var(--accent); transform: translateY(-2px); }
.qr-open b { font-size: 18px; }

.qr-dialog { width: min(480px, calc(100% - 28px)); max-height: calc(100dvh - 36px); padding: 0; border: 0; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 30px 100px rgba(20, 16, 12, .3); overflow: auto; }
.qr-dialog::backdrop { background: rgba(24, 20, 17, .68); backdrop-filter: blur(7px); }
.qr-dialog[open] { animation: modalIn .28s cubic-bezier(.2,.8,.2,1); }
.qr-modal { padding: 24px; }
.qr-modal-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.qr-modal-head h2 { font-size: 27px; margin: 0 0 14px; }
.qr-close { width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font-size: 24px; line-height: 1; }
.qr-close:hover { color: #fff; border-color: var(--accent); background: var(--accent); transform: rotate(8deg); }
.qr-modal img { display: block; width: 100%; height: auto; max-height: 68dvh; object-fit: contain; border-radius: 18px; background: #fff; }
.qr-modal > p { margin: 14px 0 0; color: var(--muted); text-align: center; }

.agent-signal { position: fixed; right: 22px; bottom: 20px; z-index: 30; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 7px; min-width: 230px; padding: 12px 16px 12px 14px; border: 1px solid rgba(222, 215, 204, .85); border-radius: 16px; background: rgba(255, 253, 249, .88); backdrop-filter: blur(12px); box-shadow: 0 12px 35px rgba(52, 42, 32, .12); pointer-events: none; }
.agent-signal i { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.agent-signal span { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.agent-signal strong { max-width: 190px; font-size: 13px; transition: opacity .13s ease, transform .13s ease; }
.agent-signal strong.is-changing { opacity: 0; transform: translateY(4px); }

footer { padding: 44px 0; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.reveal { opacity: 0; transform: translateY(18px); transition: .7s ease; }
.reveal.revealed { opacity: 1; transform: none; }
@keyframes pulse { to { transform: translateY(-3px); opacity: .35; } }
@keyframes scrollDown { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding-top: 74px; }
  .hero-grid, .demo-layout, .case, .privacy-card, .contact-card { grid-template-columns: 1fr; }
  .profile-card { transform: none; max-width: 620px; }
  .scroll-cue { margin-top: 48px; }
  .values { grid-template-columns: 1fr; }
  .demo-tabs { grid-template-columns: 1fr 1fr; }
  .demo-tab:hover, .demo-tab.is-active { transform: none; }
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .case-intro { position: static; }
}

@media (max-width: 580px) {
  .shell { width: min(100% - 28px, 1120px); }
  .hero { padding: 58px 0 68px; }
  h1 { font-size: 47px; }
  .section { padding: 70px 0; }
  .demo-tabs, .boundary-grid { grid-template-columns: 1fr; }
  .demo-panel { padding: 22px 18px; min-height: 650px; }
  .demo-head { display: block; }
  .status { display: inline-flex; margin-top: 15px; }
  .message { margin-left: 5%; }
  .agent-output li { grid-template-columns: 1fr; gap: 3px; }
  .workflow { grid-template-columns: 1fr; }
  .workflow article { min-height: 130px; }
  .privacy-card { padding: 30px 24px; }
  .wechat-card { min-width: 0; width: 100%; }
  .agent-signal { right: 12px; bottom: 12px; min-width: 0; max-width: calc(100% - 24px); }
  .footer-inner { display: block; }
}

@media (hover: none) {
  .qr-peek { max-height: 310px; opacity: 1; transform: none; margin-top: 16px; }
  body::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  body::before { display: none; }
}
