:root {
  color-scheme: dark;
  --background: #080c12;
  --surface: #0f1923;
  --text: #eef4f7;
  --body-text: #b9c7d2;
  --muted: #8ea3b2;
  --accent: #89e8ef;
  --orange: #ffad62;
  --line: #8eb8cc33;
  --gutter: clamp(20px, 5vw, 88px);
  --header: 72px;
  --display: clamp(2.75rem, 6.4vw, 6rem);
  --heading: clamp(1.875rem, 3.2vw, 3rem);
  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); scrollbar-color: #476576 var(--background); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--body-text); font: 400 1.0625rem/1.85 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 600; text-wrap: balance; }
p { margin: 0; }
p + p { margin-top: 1em; }
::selection { color: var(--background); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip-link { position: fixed; left: 16px; top: -64px; z-index: 20; padding: 10px 14px; background: var(--surface); color: var(--accent); }
.skip-link:focus { top: 12px; }

.icon { display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor; mask: center / contain no-repeat; -webkit-mask: center / contain no-repeat; }
.icon-arrow { mask-image: url('/icons/arrow.svg'); -webkit-mask-image: url('/icons/arrow.svg'); }
.icon-copy { mask-image: url('/icons/copy.svg'); -webkit-mask-image: url('/icons/copy.svg'); }
[data-copied] .icon-copy { mask-image: url('/icons/check.svg'); -webkit-mask-image: url('/icons/check.svg'); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--orange); color: var(--background); font: 500 .9375rem/1 var(--font); white-space: nowrap; cursor: pointer; touch-action: manipulation; transition: background-color 200ms, color 200ms, border-color 200ms, transform 200ms var(--ease); }
.button:hover { background: #ffbb7d; }
.button:active { transform: scale(.97); }
.button-small { min-height: 38px; padding: 0 18px; font-size: .875rem; }
.button-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.button-ghost:hover { background: #89e8ef14; color: var(--accent); }
.text-link { display: inline-flex; align-items: center; min-height: 48px; color: var(--text); font-size: .9375rem; border-bottom: 1px solid var(--line); transition: color 200ms, border-color 200ms; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* Header: transparent over the hero, solid once reading starts. */
.site-header { position: fixed; inset: 0 0 auto; z-index: 10; height: var(--header); padding: 0 var(--gutter); display: flex; align-items: center; gap: 32px; border-bottom: 1px solid transparent; transition: background-color 300ms, border-color 300ms, backdrop-filter 300ms; }
[data-scrolled] .site-header { background: #080c12d9; border-bottom-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: flex-start; gap: 4px; flex: none; }
.brand img { width: 150px; height: auto; }
.brand sup { font-size: 9px; line-height: 1; color: #fff; }
.site-nav { display: flex; gap: clamp(20px, 3vw, 40px); margin-left: auto; font-size: .875rem; }
.site-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--body-text); transition: color 200ms; }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }
.site-nav a[aria-current]::after { transform: scaleX(1); }

/* The star ring is a fixed stage behind every chapter. */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--background); }
.scene canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 900ms; }
.scene canvas[data-ready=true] { opacity: 1; }
main, .site-footer { position: relative; z-index: 1; }

.eyebrow { margin-bottom: 20px; color: var(--accent); font-size: .875rem; letter-spacing: .12em; }

.hero { min-height: 100svh; display: grid; place-items: center; padding: calc(var(--header) + 24px) var(--gutter) 64px; text-align: center; }
.hero-copy { max-width: 760px; }
.hero h1 { font-size: var(--display); line-height: 1.12; letter-spacing: -.03em; text-shadow: 0 2px 40px #080c12; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--accent); }
.hero-intro { max-width: 30em; margin: 28px auto 0; text-shadow: 0 0 10px #080c12, 0 0 24px #080c12; }
.actions { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 36px; flex-wrap: wrap; }

.chapter { position: relative; display: flex; padding: clamp(96px, 14vh, 160px) var(--gutter); }
.chapter-copy { position: relative; width: min(100%, 620px); }
.chapter-end { justify-content: flex-end; }
.chapter-center { justify-content: center; }
/* Keep copy legible where the ring passes behind it. */
.chapter::before { content: ''; position: absolute; inset: 0; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.chapter h2 span { display: block; }
.chapter-start::before { background: linear-gradient(90deg, #080c12f0 0%, #080c12c0 42%, #080c1200 64%); }
.chapter-end::before { background: linear-gradient(270deg, #080c12f0 0%, #080c12c0 42%, #080c1200 64%); }
.chapter-center::before { background: radial-gradient(ellipse 60% 70% at 50% 50%, #080c12e6 0%, #080c12a8 55%, #080c1200 100%); }
.chapter h2 { font-size: var(--heading); line-height: 1.32; letter-spacing: -.02em; margin-bottom: 32px; }

.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 40px; margin: 40px 0 0; padding: 24px 0; border-block: 1px solid var(--line); font-size: .875rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 4px 0 0; color: var(--text); }
.principles { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; }
.principles li { display: grid; grid-template-columns: 7.5em 1fr; gap: 20px; }
.principles h3, .capabilities h3 { font-size: 1.0625rem; line-height: 1.85; }
.principles p { font-size: 1rem; }

#founder blockquote { margin: 0; }
#founder blockquote p { color: var(--text); font-size: clamp(1.625rem, 2.6vw, 2.375rem); font-weight: 600; line-height: 1.55; letter-spacing: -.015em; }
#founder blockquote footer { margin-top: 24px; color: var(--muted); font-size: .875rem; }
.founder-practice { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }

.product-brand { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; }
.product-brand img { width: 96px; height: 96px; padding: 12px; background: #f6f2ee; border-radius: 22px; flex: none; }
.product-brand h2 { margin: 0 0 4px; font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1.15; }
.product-intro { color: var(--text); font-size: 1.125rem; }
.capabilities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.capabilities li { padding-top: 20px; border-top: 1px solid var(--line); }
.capability-key { display: block; margin-bottom: 6px; color: var(--accent); font-size: .8125rem; letter-spacing: .12em; }
.capabilities p { margin-top: 8px; font-size: .9375rem; line-height: 1.8; }
.launch { margin-top: 40px; color: var(--orange); font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.note { margin-top: 8px; color: var(--muted); font-size: .875rem; max-width: 34em; }

.contact-panel { width: min(100%, 760px); text-align: center; }
.contact-intro { max-width: 34em; margin: 0 auto; }
.mailbox { margin: 44px 0 0; }
.mailbox-address { display: inline-block; color: var(--text); font-size: clamp(1.125rem, 2.6vw, 1.875rem); font-weight: 500; letter-spacing: .01em; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); transition: color 200ms, border-color 200ms; }
.mailbox-address:hover { color: var(--accent); border-color: var(--accent); }
.mailbox-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.directions { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); text-align: left; }
.directions a { display: block; height: 100%; padding: 20px 22px; background: #0a1118f2; transition: background-color 200ms; }
.directions a:hover { background: #12232e; }
.directions strong { display: flex; justify-content: space-between; color: var(--text); font-weight: 500; }
.directions strong::after { content: '写邮件'; color: var(--muted); font-size: .8125rem; font-weight: 400; transition: color 200ms; }
.directions a:hover strong::after { color: var(--accent); }
.directions span { display: block; margin-top: 6px; font-size: .875rem; line-height: 1.75; }

.site-footer { padding: 0 var(--gutter) 28px; background: var(--background); font-size: .8125rem; color: var(--muted); }
.home .site-footer { background: linear-gradient(#080c1200, var(--background) 40%); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-name { color: var(--text); font-size: 1rem; }
.footer-links, .footer-filings { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; justify-content: flex-end; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.site-footer a:hover { color: var(--accent); }

/* Documents share the header and footer, without the ring. */
.document { background: radial-gradient(ellipse 80% 50% at 80% 0%, #12273566, transparent 70%) var(--background); }
[data-scrolled] .document .site-header { background: #080c12d9; }
.legal { max-width: 760px; margin: 0 auto; padding: calc(var(--header) + 72px) var(--gutter) 96px; box-sizing: content-box; }
.legal-header h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.2; margin-bottom: 20px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; color: var(--muted); font-size: .875rem; }
.legal-meta div { display: flex; gap: 8px; }
.legal-meta dd { margin: 0; color: var(--body-text); }
.legal-preface { margin-top: 40px; }
.legal-preface strong, .legal-body strong { color: var(--text); font-weight: 600; }
.legal-toc { margin-top: 40px; padding: 24px 28px; background: #0f1923b3; border: 1px solid var(--line); border-radius: 12px; }
.legal-toc > p { color: var(--text); font-weight: 600; margin-bottom: 8px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; font-size: .9375rem; }
.legal-toc a { display: inline-block; padding: 4px 0; color: var(--body-text); }
.legal-toc a:hover { color: var(--accent); }
.legal-body h3 { margin: 20px 0 8px; font-size: 1.0625rem; }
.legal-body li + li { margin-top: 6px; }
.legal-body section { scroll-margin-top: calc(var(--header) + 16px); }
.legal-body { margin-top: 32px; }
.legal-body section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-body h2 { font-size: 1.25rem; margin-bottom: 12px; }
.legal-body ul { margin: 12px 0 0; padding-left: 1.3em; }
.legal-body a:not(.text-link) { color: var(--accent); }
.legal-back { margin-top: 32px; }
.not-found { min-height: 60vh; }

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .chapter, .chapter-end { justify-content: flex-start; }
  .chapter-start::before, .chapter-end::before { background: #080c12b8; }
  .capabilities { grid-template-columns: 1fr; gap: 0; }
  .capabilities li { padding: 20px 0; }
}

@media (max-width: 700px) {
  :root { --header: 60px; --heading: 1.75rem; }
  body { font-size: 1rem; }
  .site-nav { display: none; }
  .site-header { justify-content: space-between; }
  .brand img { width: 124px; }
  .hero { padding-bottom: 48px; }
  .hero-intro { margin-top: 22px; }
  .actions { gap: 20px; margin-top: 30px; }
  .chapter { padding-block: 88px; }
  .facts { grid-template-columns: 1fr; gap: 12px; }
  .facts > div { display: grid; grid-template-columns: 5.5em 1fr; }
  .facts dd { margin: 0; }
  .principles li { grid-template-columns: 1fr; gap: 4px; }
  .product-brand { gap: 18px; }
  .product-brand img { width: 76px; height: 76px; padding: 10px; border-radius: 18px; }
  .directions { grid-template-columns: 1fr; }
  .contact-panel { text-align: left; }
  .contact-intro { margin: 0; }
  .mailbox-actions { justify-content: flex-start; }
  .footer-inner { display: block; }
  .legal-toc ol { columns: 1; }
  .legal-toc { padding: 20px; }
  .footer-links, .footer-filings { justify-content: flex-start; margin-top: 12px; }
}
