/*
 * Chinese typography uses MiSans, provided by Xiaomi and embedded under the
 * MiSans Font Intellectual Property License Agreement.
 * Source and license: https://hyperos.mi.com/font/en/download/
 */
@font-face {
  font-family: "MiSans Web";
  src: url("./assets/fonts/MiSansVF-zh-CN.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070806;
  --surface: #0d0f0b;
  --surface-2: #12150f;
  --line: rgba(238, 245, 225, 0.14);
  --line-strong: rgba(238, 245, 225, 0.28);
  --text: #eef5e1;
  --muted: #9ca395;
  --faint: #656b60;
  --signal: #c8ff3d;
  --signal-dim: rgba(200, 255, 61, 0.12);
  --max: 1360px;
  --pad: clamp(22px, 4vw, 64px);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--bg); background: var(--signal); }

.page-noise {
  position: fixed;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 99; padding: 10px 14px; background: var(--signal); color: var(--bg); }
.skip-link:focus { top: 12px; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 200ms ease, border-color 200ms ease;
}
.site-header.is-scrolled { background: rgba(7, 8, 6, 0.84); backdrop-filter: blur(18px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 20px; }
.brand-mark { font: 700 15px/1 var(--mono); letter-spacing: -0.05em; border: 1px solid var(--line-strong); padding: 9px 8px; }
.brand-status { color: var(--muted); font: 10px/1 var(--mono); letter-spacing: 0.12em; }
.brand-status i, .now-label i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 16px var(--signal); }
.header-actions { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); }
.nav { display: flex; gap: clamp(20px, 3vw, 44px); font: 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.nav a { color: var(--muted); transition: color 160ms ease; }
.nav a:hover, .nav a:focus-visible { color: var(--signal); }
.language-switch { display: flex; align-items: center; gap: 7px; padding-left: 20px; border-left: 1px solid var(--line); color: var(--faint); font: 10px/1 var(--mono); letter-spacing: .08em; }
.language-switch a { color: var(--faint); transition: color 160ms ease; }
.language-switch a[aria-current="page"], .language-switch a:hover, .language-switch a:focus-visible { color: var(--signal); }

html[lang="zh-CN"] {
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", "MiSans Web", monospace;
}
html[lang="zh-CN"] body {
  font-family: "MiSans Web", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 350;
}
html[lang="zh-CN"] h1, html[lang="zh-CN"] h2 {
  font-weight: 450;
  letter-spacing: -.02em;
  line-height: 1.12;
}
html[lang="zh-CN"] h3 { font-weight: 450; }
html[lang="zh-CN"] .hero-intro,
html[lang="zh-CN"] .card-body > p:not(.card-kicker),
html[lang="zh-CN"] .capability p,
html[lang="zh-CN"] .section-heading > p:last-child,
html[lang="zh-CN"] .system-copy > p:last-child,
html[lang="zh-CN"] .now-grid p,
html[lang="zh-CN"] .build-log p { font-weight: 330; line-height: 1.75; }

main { overflow: hidden; }
.hero {
  min-height: 100svh;
  max-width: var(--max);
  margin: 0 auto;
  padding: 150px var(--pad) 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 28px; color: var(--muted); font: 11px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.eyebrow span { color: var(--signal); margin-right: 14px; }
h1, h2 { margin: 0; font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
h1 { font-size: clamp(52px, 5.5vw, 94px); }
h2 { font-size: clamp(40px, 4.4vw, 72px); }
html[lang="zh-CN"] h1 { font-size: clamp(48px, 4.8vw, 82px); }
html[lang="zh-CN"] h2 { font-size: clamp(38px, 3.9vw, 64px); }
h1 em, h2 em { color: var(--signal); font-style: normal; }
.hero-intro { max-width: 650px; margin: 32px 0 0; color: var(--muted); font-size: clamp(16px, 1.15vw, 19px); line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; margin-top: 42px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 34px; min-height: 52px; padding: 0 18px; border: 1px solid var(--line-strong); font: 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; transition: 180ms ease; }
.button-primary { color: var(--bg); background: var(--signal); border-color: var(--signal); }
.button-primary:hover { background: var(--text); border-color: var(--text); transform: translateY(-2px); }
.button-ghost:hover { color: var(--signal); border-color: var(--signal); transform: translateY(-2px); }

.signal-stage { position: relative; width: min(35vw, 480px); aspect-ratio: 1; justify-self: end; border: 1px solid var(--line); overflow: hidden; --mx: 0px; --my: 0px; }
.signal-grid { position: absolute; inset: -35%; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; transform: translate(var(--mx), var(--my)); transition: transform 120ms ease-out; mask-image: radial-gradient(circle, black 0%, transparent 72%); }
.signal-stage::before, .signal-stage::after { content: ""; position: absolute; background: var(--signal); opacity: 0.6; }
.signal-stage::before { width: 1px; top: 9%; bottom: 9%; left: 50%; }
.signal-stage::after { height: 1px; left: 9%; right: 9%; top: 50%; }
.signal-orbit { position: absolute; left: 50%; top: 50%; border: 1px solid var(--line-strong); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 62%; height: 62%; }
.orbit-two { width: 87%; height: 87%; border-style: dashed; animation: spin 24s linear infinite; }
.signal-core { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; color: var(--bg); background: var(--signal); box-shadow: 0 0 80px rgba(200,255,61,.25); transform: translate(calc(-50% + var(--mx)), calc(-50% + var(--my))); transition: transform 90ms ease-out; }
.signal-core span { font: 800 23px/1 var(--mono); letter-spacing: -0.09em; }
.signal-node { position: absolute; color: var(--muted); font: 9px/1 var(--mono); letter-spacing: 0.12em; }
.signal-node i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border: 1px solid var(--signal); border-radius: 50%; }
.node-a { left: 11%; top: 26%; }.node-b { right: 8%; top: 40%; }.node-c { left: 20%; bottom: 19%; }
.signal-readout { position: absolute; right: 18px; bottom: 18px; display: grid; grid-template-columns: auto auto; gap: 5px 14px; padding: 12px; background: rgba(7,8,6,.72); border: 1px solid var(--line); font: 8px/1 var(--mono); letter-spacing: .1em; }
.signal-readout span { color: var(--faint); }.signal-readout b { color: var(--text); font-weight: 500; }
.stage-hint { position: absolute; left: 15px; top: 13px; margin: 0; color: var(--faint); font: 8px/1 var(--mono); letter-spacing: .11em; }
.hero-foot { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,1fr); margin-top: 48px; border-top: 1px solid var(--line); }
.hero-foot span { padding: 20px 0; color: var(--muted); font: 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.section { max-width: var(--max); margin: 0 auto; padding: 128px var(--pad); }
.section-heading { display: grid; grid-template-columns: .7fr 1.75fr .8fr; gap: 42px; align-items: end; margin-bottom: 68px; }
.section-heading .eyebrow { align-self: start; }
.section-heading h2 { grid-column: 2; max-width: 760px; }
.section-heading > p:last-child { grid-column: 3; margin: 0; color: var(--muted); font-size: 15px; }
.proof-section { border-top: 1px solid var(--line); }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.work-card { position: relative; min-height: 560px; display: flex; flex-direction: column; padding: 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; background: linear-gradient(150deg, rgba(255,255,255,.018), transparent 45%); transition: background 240ms ease; }
.work-card:hover { background: var(--surface); }
.card-meta { display: flex; justify-content: space-between; color: var(--faint); font: 10px/1 var(--mono); letter-spacing: .1em; }
.project-sigil { position: relative; height: 210px; margin: 34px 0 24px; display: grid; place-items: center; border: 1px solid var(--line); background-image: radial-gradient(circle at center, var(--signal-dim), transparent 48%); overflow: hidden; }
.project-sigil span { z-index: 1; color: var(--signal); font: 500 54px/1 var(--mono); letter-spacing: -.1em; }
.project-sigil i { position: absolute; border: 1px solid var(--line-strong); border-radius: 50%; }
.mandate-sigil i:nth-of-type(1) { width: 90px; height: 90px; }.mandate-sigil i:nth-of-type(2) { width: 160px; height: 160px; }.mandate-sigil i:nth-of-type(3) { width: 250px; height: 250px; border-style: dashed; }
.whale-sigil i { width: 230px; height: 86px; border-radius: 50%; transform: rotate(-17deg); box-shadow: 0 0 0 35px rgba(200,255,61,.03), 0 0 0 70px rgba(200,255,61,.02); }
.product-sigil i:nth-of-type(1) { width: 1px; height: 100%; border: 0; background: var(--line-strong); }.product-sigil i:nth-of-type(2) { width: 100%; height: 1px; border: 0; background: var(--line-strong); }
.crm-sigil i { width: 18px; height: 18px; background: var(--surface); }.crm-sigil i:nth-of-type(1) { left: 18%; top: 28%; }.crm-sigil i:nth-of-type(2) { right: 18%; top: 30%; }.crm-sigil i:nth-of-type(3) { left: 47%; bottom: 16%; }
.card-body { margin-top: auto; }
.card-kicker { margin: 0 0 9px; color: var(--signal); font: 10px/1.2 var(--mono); letter-spacing: .12em; }
.card-body h3 { margin: 0 0 14px; font-size: clamp(28px, 2.35vw, 38px); font-weight: 520; letter-spacing: -.04em; }
.card-body > p:not(.card-kicker) { max-width: 590px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.tag-list { display: flex; gap: 7px; flex-wrap: wrap; padding: 0; margin: 24px 0 0; list-style: none; }
.tag-list li { padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font: 9px/1 var(--mono); text-transform: uppercase; }
.work-card footer { display: flex; justify-content: space-between; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font: 9px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.status-dot::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: var(--signal); }

.capabilities-section { border-top: 1px solid var(--line); }
.capability-list { border-top: 1px solid var(--line); }
.capability { display: grid; grid-template-columns: 80px 1fr auto; gap: 24px; align-items: start; padding: 34px 0; border-bottom: 1px solid var(--line); }
.cap-index { color: var(--signal); font: 10px/1 var(--mono); }
.capability h3 { margin: 0 0 9px; font-size: clamp(25px, 2.35vw, 36px); font-weight: 500; letter-spacing: -.035em; }
.capability p { max-width: 700px; margin: 0; color: var(--muted); }
.cap-symbol { color: var(--faint); font: 32px/1 var(--mono); transition: color 180ms ease, transform 180ms ease; }
.capability:hover .cap-symbol { color: var(--signal); transform: rotate(12deg); }

.system-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8vw; align-items: start; border-top: 1px solid var(--line); }
.system-copy h2 { font-size: clamp(42px, 4.25vw, 68px); }
.system-copy > p:last-child { max-width: 480px; margin: 32px 0 0; color: var(--muted); }
.system-flow { position: relative; padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.system-flow::before { content: ""; position: absolute; left: 28px; top: 44px; bottom: 44px; width: 1px; background: linear-gradient(var(--signal), var(--line)); }
.system-flow li { position: relative; display: grid; grid-template-columns: 58px 1fr; gap: 18px; min-height: 100px; align-items: center; border-bottom: 1px solid var(--line); }
.system-flow li > span { z-index: 1; display: grid; place-items: center; width: 56px; height: 26px; color: var(--bg); background: var(--signal); font: 9px/1 var(--mono); }
.system-flow b { display: block; margin-bottom: 4px; font-size: 22px; font-weight: 500; }
.system-flow small { color: var(--faint); font: 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

.now-section { border-top: 1px solid var(--line); }
.now-panel { padding: clamp(30px, 5vw, 76px); border: 1px solid var(--line-strong); background: var(--surface); }
.now-label { color: var(--muted); font: 10px/1 var(--mono); letter-spacing: .12em; }
.now-panel h2 { max-width: 900px; margin-top: 52px; font-size: clamp(40px, 4.8vw, 76px); }
.now-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 78px; background: var(--line); border: 1px solid var(--line); }
.now-grid > div { min-height: 190px; padding: 24px; background: var(--surface); }
.now-grid span, .build-log span { color: var(--signal); font: 9px/1 var(--mono); letter-spacing: .12em; }
.now-grid p { margin: 28px 0 0; color: var(--muted); line-height: 1.9; }
.build-log { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 1px; padding: 20px 24px; border: 1px solid var(--line); }
.build-log p { margin: 0; color: var(--muted); }

.contact-section { max-width: var(--max); margin: 0 auto; padding: 128px var(--pad) 70px; border-top: 1px solid var(--line); }
.contact-section h2 { max-width: 900px; }
.contact-links { margin-top: 94px; border-top: 1px solid var(--line); }
.contact-links a { display: flex; justify-content: space-between; align-items: center; min-height: 86px; border-bottom: 1px solid var(--line); transition: padding 180ms ease, color 180ms ease; }
.contact-links a:hover { color: var(--signal); padding: 0 12px; }
.contact-links span { font-size: 21px; }
.contact-links b { color: var(--muted); font: 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.site-footer { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.25fr 1.25fr auto auto; align-items: center; gap: clamp(24px, 4vw, 72px); padding: 28px var(--pad) 38px; color: var(--faint); font: 8px/1.35 var(--mono); letter-spacing: .1em; }
.site-footer a:hover { color: var(--signal); }
.police-registration { display: inline-flex; align-items: center; gap: 5px; }
.police-registration img { display: block; flex: 0 0 auto; width: 18px; height: 20px; object-fit: contain; }
.floating-back-to-top { position: fixed; right: clamp(16px, 2.4vw, 38px); bottom: clamp(24px, 4vw, 56px); z-index: 9; width: 76px; min-height: 82px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); color: var(--muted); background: rgba(7, 8, 6, .86); backdrop-filter: blur(16px); font: 8px/1.2 var(--mono); letter-spacing: .08em; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px); transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease, color 180ms ease, border-color 180ms ease, background 180ms ease; }
.floating-back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.floating-back-to-top:hover, .floating-back-to-top:focus-visible { color: var(--signal); border-color: var(--signal); background: rgba(13, 15, 11, .96); }
.floating-back-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(200, 255, 61, .48); border-radius: 50%; color: var(--signal); background: var(--signal-dim); box-shadow: 0 0 18px rgba(200, 255, 61, .08); }
.floating-back-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; transition: transform 180ms ease; }
.floating-back-to-top:hover .floating-back-icon svg, .floating-back-to-top:focus-visible .floating-back-icon svg { transform: translateY(-2px); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; }
  .signal-stage { width: min(100%, 580px); justify-self: start; }
  .hero-foot { grid-template-columns: repeat(2, 1fr); }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading h2, .section-heading > p:last-child { grid-column: 1; }
  .section-heading > p:last-child { max-width: 520px; }
  .system-section { grid-template-columns: 1fr; }
  .now-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-header { height: 64px; }
  .brand-status, .nav { display: none; }
  .header-actions { gap: 0; }
  .language-switch { padding-left: 0; border-left: 0; }
  .hero { padding-top: 108px; }
  h1, html[lang="zh-CN"] h1 { font-size: clamp(44px, 12vw, 62px); }
  h2, html[lang="zh-CN"] h2 { font-size: clamp(36px, 10vw, 52px); }
  .signal-stage { width: 100%; }
  .hero-foot { grid-template-columns: 1fr; margin-top: 22px; }
  .hero-foot span { border-bottom: 1px solid var(--line); }
  .section, .contact-section { padding-top: 100px; padding-bottom: 100px; }
  .section-heading { margin-bottom: 48px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card { min-height: 560px; }
  .project-sigil { height: 200px; }
  .capability { grid-template-columns: 42px 1fr; }
  .cap-symbol { display: none; }
  .now-panel h2 { margin-top: 38px; }
  .now-grid { margin-top: 48px; }
  .build-log { align-items: flex-start; flex-direction: column; }
  .contact-links a { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
  .site-footer { display: flex; align-items: center; flex-direction: column; line-height: 1.5; }
  .floating-back-to-top { right: 14px; bottom: 18px; width: 66px; min-height: 70px; gap: 5px; }
  .floating-back-icon { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
