/* ===== 视觉方向 A 样稿（第 4 版）设计系统：深色 · 暖白 · 浅金 ===== */
/* 1. Design tokens */
:root {
  color-scheme: dark;
  --bg: #10141b; --surface: #171d27; --surface-soft: #1d2632;
  --ink: #f3f0e9; --muted: #b7bfcc; --accent: #d6ba81; --accent-soft: #e6cea0;
  --line: #353f4d; --control-line: #8994a5;
  --ok: #8fcf9c; --warn: #e5907c;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --wrap: 1184px; --gutter: clamp(20px, 5vw, 72px); --section-space: clamp(72px, 9vw, 128px);
  --ease: cubic-bezier(.2, .7, .2, 1); --t: .4s;
}
/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--anchor-offset, 112px); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.8; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-underline-offset: .25em; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: var(--bg); background: var(--accent); }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; overflow-wrap: anywhere; }
h1 { max-width: 12.5em; font-size: clamp(36px, 5.6vw, 72px); line-height: 1.2; letter-spacing: .01em; }
h2 { max-width: 16em; font-size: clamp(28px, 3.4vw, 48px); line-height: 1.3; }
h3 { font-size: clamp(19px, 1.8vw, 23px); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
p, dt, dd { overflow-wrap: anywhere; }
/* 3. Shared layout */
.wrap { width: min(var(--wrap), calc(100% - var(--gutter) - var(--gutter))); margin-inline: auto; }
.section { padding-block: var(--section-space); }
.section:focus, main:focus { outline: none; }
.section.narrow { width: min(760px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--accent); font-size: 13px; font-weight: 500; letter-spacing: .14em; }
.eyebrow::before { flex: 0 0 28px; height: 1px; background: currentColor; content: ""; }
.lead { max-width: 36em; color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.9; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin-top: 20px; }
.fine a { border-bottom: 1px solid var(--control-line); text-decoration: none; }
.section-head { display: grid; gap: 24px; margin-bottom: 48px; }
.stack { display: grid; gap: 16px; }
/* 4. Controls */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; max-width: 100%; padding: 12px 24px; border: 1px solid var(--control-line); border-radius: 3px; color: var(--ink); background: transparent; font-size: 15px; font-weight: 500; line-height: 1.5; text-align: center; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease); }
.button svg { flex: 0 0 18px; width: 18px; height: 18px; transition: transform var(--t) var(--ease); }
.button-primary { border-color: var(--accent); color: var(--bg); background: var(--accent); }
.button-provider { width: 100%; background: var(--surface-soft); border-color: var(--line); }
.button[disabled] { opacity: .45; cursor: not-allowed; }
.button.small { min-height: 40px; padding: 7px 16px; font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--control-line); background: none; color: var(--ink); font-size: 15px; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; transition: border-color var(--t) var(--ease), color var(--t) var(--ease); }
.text-link svg { flex: 0 0 16px; width: 16px; height: 16px; transition: transform var(--t) var(--ease); }
.text-link[disabled] { opacity: .45; cursor: not-allowed; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; max-width: calc(100% - 24px); padding: 12px 18px; color: var(--bg); background: var(--ink); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: 3px; background: var(--surface); color: var(--ink); font: inherit; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
/* 5. Demonstration notice and header */
.demo-note { padding: 9px var(--gutter); border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface); font-size: 13px; text-align: center; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) { .site-header { background: rgba(16, 20, 27, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); } }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.brand { display: inline-flex; flex-wrap: wrap; align-items: baseline; align-content: center; gap: 4px 12px; min-height: 48px; min-width: 0; padding-block: 8px; text-decoration: none; transition: color var(--t) var(--ease); }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.4; letter-spacing: .12em; overflow-wrap: anywhere; }
.brand-caption { color: var(--muted); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.primary-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 28px; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 2px; color: var(--muted); font-size: 14px; letter-spacing: .04em; text-decoration: none; transition: color var(--t) var(--ease); }
.header-right { display: flex; align-items: center; gap: 20px; min-width: 0; }
.nav-auth { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.user-name { font-size: 14px; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 11px; letter-spacing: .12em; padding: 3px 9px; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; white-space: nowrap; }
.badge.soft { border-color: var(--control-line); color: var(--muted); }
.lang-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; flex: none; }
.lang-seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; font-size: 13px; cursor: pointer; }
.lang-seg button.active { background: var(--surface-soft); color: var(--ink); }
.menu-toggle { display: none; flex: 0 0 auto; }
@media (max-width: 859px) {
  .header-inner { flex-wrap: wrap; gap: 4px 16px; padding-block: 12px; }
  .primary-nav { justify-content: flex-start; width: 100%; gap: 4px 20px; }
  .header-right { width: 100%; justify-content: space-between; }
  .menu-ready .header-inner { flex-wrap: nowrap; }
  .menu-ready .primary-nav { display: none; }
  .menu-ready .header-right { width: auto; }
  .menu-ready .menu-toggle { display: inline-flex; }
}
/* 6. Mobile modal navigation */
.menu-dialog:not([open]) { display: none; }
.menu-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow-y: auto; border: 0; color: var(--ink); background: var(--bg); overscroll-behavior: contain; }
.menu-dialog::backdrop { background: #10141b; }
.menu-shell { display: flex; flex-direction: column; min-height: 100%; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.menu-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.menu-title { color: var(--muted); font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1.5; letter-spacing: .14em; }
.dialog-nav { display: grid; gap: 8px; width: min(100%, 560px); margin: auto; padding-block: 56px; }
.dialog-nav a { display: flex; align-items: baseline; gap: 20px; min-height: 56px; padding: 14px 8px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 5vw, 38px); line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; transition: color var(--t) var(--ease); }
.dialog-nav a small { flex: 0 0 auto; color: var(--accent); font-family: var(--sans); font-size: 13px; letter-spacing: .1em; }
.menu-caption { color: var(--muted); font-size: 13px; }
/* 7. Hero */
.hero { display: flex; flex-direction: column; min-height: min(48rem, 86svh); padding-block: clamp(64px, 8vw, 112px) clamp(32px, 4vw, 48px); }
.hero-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(180px, 1fr) auto; gap: 40px; }
.hero-copy { min-width: 0; }
.hero h1 span { color: var(--accent); }
.hero .lead { margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 40px; }
.hero-bottom { display: flex; flex-wrap: wrap; align-self: end; grid-column: 1 / -1; gap: 16px 32px; color: var(--muted); font-size: 13px; letter-spacing: .06em; }
.hero-bottom > span { flex: 1 1 200px; padding-top: 16px; border-top: 1px solid var(--line); }
.hero-art { position: relative; min-width: 0; min-height: 180px; overflow: hidden; opacity: .55; pointer-events: none; }
.hero-art-inner { position: absolute; inset: 0; opacity: 1; }
.hero-art .glow { position: absolute; inset: -20%; background: radial-gradient(ellipse at 60% 45%, rgba(214, 186, 129, .18), transparent 62%); }
.hero-art .grid-lines { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 80px 80px; opacity: .3; -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 75%); mask-image: radial-gradient(ellipse at center, #000, transparent 75%); }
.hero-art .ring { position: absolute; left: 50%; top: 48%; width: 72%; aspect-ratio: 1; border: 1px solid rgba(214, 186, 129, .46); border-radius: 50%; transform: translate(-50%, -50%); }
.hero-art .ring-2 { left: 60%; top: 62%; width: 44%; border-color: rgba(243, 240, 233, .2); }
.hero-art .bar { position: absolute; left: 50%; top: 8%; bottom: 8%; width: 1px; background: linear-gradient(to bottom, transparent, var(--accent) 35%, var(--accent) 65%, transparent); }
.hero-art .dot { position: absolute; left: 50%; top: 48%; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); }
/* 两个 agent 的对话示意：叠在构图之上 */
.hero-art .chat { position: absolute; inset: 12% 8%; display: grid; gap: 12px; align-content: center; }
.hero-art .msg { max-width: 78%; padding: 10px 14px; border: 1px solid var(--line); background: rgba(23, 29, 39, .92); font-size: 13px; line-height: 1.6; }
.hero-art .msg small { display: block; margin-bottom: 2px; color: var(--accent); font-size: 11px; letter-spacing: .12em; }
.hero-art .msg.b { margin-left: auto; border-color: rgba(214, 186, 129, .6); }
.hero-art .msg.ok { border-color: rgba(143, 207, 156, .6); } .hero-art .msg.ok small { color: var(--ok); }
/* 8. Introduction */
.intro { border-top: 1px solid var(--line); background: var(--surface); }
.intro-grid { display: grid; gap: 32px; }
.intro-copy { display: grid; align-content: start; gap: 20px; }
.principles { display: grid; gap: 32px 28px; margin-top: 64px; padding: 0; list-style: none; }
.principle { min-width: 0; padding-top: 24px; border-top: 1px solid var(--line); }
.principle-number { display: block; margin-bottom: 16px; color: var(--accent); font-family: var(--serif); font-size: 15px; font-weight: 500; letter-spacing: .08em; }
.principle p { margin-top: 12px; color: var(--muted); }
/* 9. Visual studies（三种接入方式） */
.case-grid { display: grid; gap: 48px 28px; }
.case-card { min-width: 0; }
.cover { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line); background: var(--surface); }
.cover::before, .cover::after { position: absolute; content: ""; }
.cover-a { background: linear-gradient(165deg, #1c2535, #10141b 70%); }
.cover-a::before { left: 50%; top: 58%; width: 120%; aspect-ratio: 1; border: 1px solid rgba(214, 186, 129, .5); border-radius: 50%; transform: translateX(-50%); }
.cover-a::after { left: 12%; right: 12%; top: 34%; height: 1px; background: rgba(243, 240, 233, .35); }
.cover-b { background: linear-gradient(200deg, #141a24, #10141b); }
.cover-b::before { left: -20%; right: 30%; top: 20%; bottom: -10%; background: linear-gradient(135deg, rgba(214, 186, 129, .22), transparent 70%); transform: skewY(-12deg); }
.cover-b::after { left: 68%; top: 12%; bottom: 12%; width: 1px; background: linear-gradient(to bottom, transparent, var(--accent), transparent); }
.cover-c { background: radial-gradient(ellipse at 30% 20%, #1e2736, #10141b 70%); }
.cover-c::before { inset: 18%; border: 1px solid rgba(243, 240, 233, .22); }
.cover-c::after { inset: 30%; border: 1px solid rgba(214, 186, 129, .55); background: rgba(214, 186, 129, .04); }
.cover-index { position: absolute; left: 20px; bottom: 16px; z-index: 1; color: var(--muted); font-family: var(--serif); font-size: 14px; font-weight: 500; letter-spacing: .14em; }
.cover-label { position: absolute; right: 20px; top: 16px; z-index: 1; color: var(--accent); font-size: 12px; letter-spacing: .14em; }
.case-content { padding-top: 22px; }
.case-kicker { margin-bottom: 8px; color: var(--accent); font-size: 13px; letter-spacing: .1em; }
.case-description { margin-top: 12px; color: var(--muted); }
.case-meta { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 10px 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.case-meta dt, .case-meta dd { min-width: 0; }
.case-meta dt { color: var(--muted); }
@media (max-width: 399px) { .case-meta { grid-template-columns: minmax(0, 1fr); row-gap: 4px; } .case-meta dd:not(:last-child) { margin-bottom: 12px; } }
/* 10. Method */
.method { border-top: 1px solid var(--line); background: var(--surface); }
.steps { display: grid; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.step { display: grid; gap: 12px 40px; padding-block: 32px; border-bottom: 1px solid var(--line); }
.step-number { color: var(--accent); font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); font-weight: 500; line-height: 1.2; }
.step p { max-width: 40em; color: var(--muted); }
/* 11. Pricing / contact and footer */
.contact { border-top: 1px solid var(--line); }
.contact-panel { display: grid; gap: 32px; padding: clamp(28px, 5vw, 64px); border: 1px solid var(--line); background: radial-gradient(ellipse at 100% 0%, rgba(214, 186, 129, .1), transparent 55%), var(--surface); }
.contact-panel > div { min-width: 0; }
.contact-panel h2 { max-width: 12em; }
.contact-copy { display: grid; justify-items: start; gap: 20px; max-width: 36em; color: var(--muted); }
.price { font-family: var(--serif); font-size: clamp(44px, 5vw, 64px); line-height: 1.1; color: var(--ink); }
.price small { font-family: var(--sans); font-size: 14px; color: var(--muted); letter-spacing: .06em; margin-left: 8px; }
.plan-points { display: grid; gap: 8px; padding-left: 1.1em; color: var(--muted); font-size: 15px; }
.notice { padding: 14px 18px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 15px; }
.notice.ok { border-color: var(--ok); } .notice.warn { border-color: var(--warn); }
.order { border: 1px solid var(--accent); padding: 24px; display: grid; gap: 12px; background: var(--bg); justify-self: stretch; }
.order .no { font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; }
.order img { max-width: 220px; border: 1px solid var(--line); }
.ops, .bind-row { display: flex; gap: 14px 24px; flex-wrap: wrap; align-items: center; }
.site-footer { padding-block: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
/* 账号页 */
.account h3 { margin: 48px 0 16px; }
.id-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.id-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; font-size: 15px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
table.orders { width: 100%; border-collapse: collapse; font-size: 14px; }
table.orders th, table.orders td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.orders th { color: var(--muted); font-weight: 500; }
/* 弹窗与提示 */
dialog.modal { border: 0; padding: 0; background: transparent; max-width: min(460px, calc(100vw - 2rem)); width: 100%; color: inherit; }
dialog.modal::backdrop { background: rgba(8, 10, 14, .72); backdrop-filter: blur(6px); }
.modal-panel { position: relative; background: var(--surface); border: 1px solid var(--line); padding: 44px 36px; }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; width: 40px; height: 40px; }
.login-buttons { display: grid; gap: 12px; margin-top: 24px; }
.login-buttons form { margin: 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--accent); padding: 12px 20px; font-size: 14px; z-index: 200; max-width: min(90vw, 480px); }
/* 12. Responsive layout */
@media (min-width: 600px) {
  .principles, .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { min-height: 240px; }
  .step { grid-template-columns: 5rem minmax(0, 1fr); }
  .step-number { grid-row: 1 / span 2; }
}
@media (min-width: 1000px) {
  .hero-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: minmax(auto, 1fr) auto; column-gap: clamp(32px, 3vw, 48px); row-gap: 64px; }
  .hero-copy { align-self: center; grid-column: 1; grid-row: 1; }
  .hero-art { grid-column: 2; grid-row: 1; min-height: 320px; opacity: 1; }
  .hero-bottom { grid-row: 2; }
  .intro-grid, .section-head { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; }
  .section-head { align-items: end; }
  .principles, .case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; gap: 12px 48px; }
  .step-number { grid-row: auto; }
  .step h3 { padding-top: 6px; }
  .contact-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 64px; }
}
/* 13. Pointer feedback */
@media (hover: hover) and (pointer: fine) {
  .primary-nav a:hover, .dialog-nav a:hover, .brand:hover { color: var(--accent); }
  .button:hover { border-color: var(--accent); background: var(--surface-soft); }
  .button:hover svg, .text-link:hover svg { transform: translateX(4px); }
  .button-primary:hover { border-color: var(--accent-soft); color: var(--bg); background: var(--accent-soft); }
  .text-link:hover { border-color: var(--accent); color: var(--accent); }
}
/* 14. Entrance motion */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
  @keyframes settle { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
  .hero .eyebrow { animation: rise .7s var(--ease) backwards; }
  .hero h1 { animation: rise .9s var(--ease) backwards; }
  .hero .lead { animation: rise 1.1s var(--ease) backwards; }
  .hero-actions { animation: rise 1.3s var(--ease) backwards; }
  .hero-art-inner { animation: settle 1.4s var(--ease) backwards; }
  .modal-panel { animation: rise .4s var(--ease); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (forced-colors: active) { .button, .cover, .contact-panel, .text-link { border-color: ButtonText; } :focus-visible { outline-color: Highlight; } }
/* 下载 / 方案卡片 */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: stretch; }
.plan { border: 1px solid var(--line); background: var(--surface); padding: 36px 32px; display: grid; gap: 14px; align-content: start; justify-items: start; }
.plan.featured { border-color: var(--accent); }
.plan .fine { margin-top: 4px; }
.header-inner .primary-nav { gap: 4px 20px; }
.nav-auth { flex-wrap: nowrap; }
.nav-auth .text-link { min-height: 36px; font-size: 14px; }
@media (max-width: 1279px) { .nav-auth .user-name, .nav-auth .badge { display: none; } }
