:root {
  --bg: #05090d;
  --surface: #091319;
  --surface-raised: #0c1921;
  --ink: #effbff;
  --ink-soft: #91aab5;
  --line: #19343f;
  --line-bright: #2b7388;
  --cyan: #20d8ff;
  --cyan-deep: #0c9cbc;
  --cyan-pale: #b9f4ff;
  --white: #ffffff;
  --radius: 4px;
  --space-1: 12px;
  --space-2: 20px;
  --space-3: 32px;
  --space-4: 56px;
  --space-5: 96px;
  --serif: "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, serif;
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 30; padding: 10px 14px; background: var(--cyan); color: #031116; font-size: 14px; font-weight: 800; transform: translateY(-160%); transition: transform 160ms ease; }
.skip-link:focus { transform: translateY(0); }

.site-shell { min-width: 320px; overflow: hidden; }

.site-header,
.hero,
.capabilities,
.path-section,
.start-section,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand span {
  margin-left: 8px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.primary-nav { display: flex; gap: 28px; color: var(--ink-soft); font-size: 14px; }
.primary-nav a { position: relative; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: -8px; left: 0; height: 1px; background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.primary-nav a:hover { color: var(--ink); }
.primary-nav a:hover::after { transform: scaleX(1); }
.primary-nav a.is-current { color: var(--cyan); }
.primary-nav a.is-current::after { transform: scaleX(1); }
.header-action { justify-self: end; color: var(--cyan); font-size: 14px; font-weight: 800; }
.header-action:hover { color: var(--white); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(430px, 1.12fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
  min-height: 720px;
  padding: var(--space-5) 0;
}

.section-label {
  margin: 0 0 var(--space-2);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: 0; }
h1 { max-width: 9ch; margin-bottom: var(--space-2); font-size: 74px; line-height: 1.04; }
h2 { margin-bottom: var(--space-2); font-size: 44px; line-height: 1.18; }
h3 { margin-bottom: 8px; font-size: 19px; line-height: 1.35; }

.hero-summary { max-width: 31ch; margin-bottom: var(--space-3); color: var(--ink-soft); font-size: 18px; }
.hero-actions, .start-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-note { margin: var(--space-3) 0 0; color: var(--ink-soft); font-size: 13px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--cyan); color: #031116; }
.button-primary:hover { background: var(--cyan-pale); }
.button-secondary { border-color: var(--line-bright); color: var(--ink); background: transparent; }
.button-secondary:hover { border-color: var(--cyan); color: var(--cyan); }
.button-light { background: var(--bg); color: var(--cyan); }
.button-light:hover { background: var(--white); color: #031116; }

.signal-field {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: var(--surface);
}

.signal-grid {
  position: absolute;
  inset: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  opacity: .64;
}

.signal-grid i { border-right: 1px solid #12333e; border-bottom: 1px solid #12333e; }
.signal-grid i:nth-child(4n) { border-right: 0; }
.signal-grid i:nth-last-child(-n + 4) { border-bottom: 0; }

.signal-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid #1d5260;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.signal-orbit-one { width: 370px; height: 210px; border-color: #2b8295; }
.signal-orbit-two { width: 280px; height: 390px; transform: translate(-50%, -50%) rotate(56deg); }
.signal-orbit-three { width: 430px; height: 300px; border-style: dashed; opacity: .75; transform: translate(-50%, -50%) rotate(-28deg); }

.signal-marker {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid #245462;
  background: #071218;
  color: var(--cyan-pale);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.signal-marker-api { top: 18%; left: 17%; }
.signal-marker-account { top: 25%; right: 13%; }
.signal-marker-usage { right: 15%; bottom: 20%; }
.signal-marker-key { bottom: 18%; left: 16%; }

.signal-trace {
  position: absolute;
  z-index: 1;
  height: 1px;
  background: var(--cyan);
  transform-origin: left;
}

.signal-trace-one { top: 40%; left: 10%; width: 31%; }
.signal-trace-two { right: 10%; bottom: 37%; width: 28%; transform: rotate(180deg); }

.signal-core {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 176px;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--cyan);
  background: #081c24;
  text-align: center;
  transform: translate(-50%, -50%);
}

.signal-core::before,
.signal-core::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.signal-core::before { top: 9px; left: 9px; border-top: 1px solid var(--cyan-pale); border-left: 1px solid var(--cyan-pale); }
.signal-core::after { right: 9px; bottom: 9px; border-right: 1px solid var(--cyan-pale); border-bottom: 1px solid var(--cyan-pale); }
.signal-core span { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.signal-core strong { margin: 10px 0 4px; font-family: var(--serif); font-size: 31px; letter-spacing: 0; }
.signal-core small { color: var(--ink-soft); font-size: 11px; }
.signal-caption { position: absolute; z-index: 2; right: 28px; bottom: 23px; left: 28px; margin: 0; color: var(--ink-soft); font-size: 13px; text-align: center; }

.capabilities { padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 220px 1fr; align-items: start; margin-bottom: var(--space-4); }
.section-heading h2 { max-width: 13ch; margin-bottom: 0; }
.capability-list { border-top: 1px solid var(--line-bright); }
.capability-item { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-3); padding: 30px 0; border-bottom: 1px solid var(--line); transition: background-color 180ms ease, transform 180ms ease; }
.capability-item::before { content: ""; position: absolute; top: 0; bottom: 0; left: -14px; width: 2px; background: var(--cyan); opacity: 0; transform: scaleY(.45); transition: opacity 180ms ease, transform 180ms ease; }
.capability-item:hover { background: var(--surface); transform: translateX(8px); }
.capability-item:hover::before { opacity: 1; transform: scaleY(1); }
.capability-item p, .path-aside p, .steps p, .site-footer p { margin: 0; color: var(--ink-soft); }
.capability-number { color: var(--cyan); font-family: var(--serif); font-size: 30px; font-weight: 700; }

.path-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(48px, 9vw, 128px); padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.path-aside { max-width: 30ch; }
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-bright); }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: var(--space-2); padding: 28px 0; border-bottom: 1px solid var(--line); }
.steps li > span { color: var(--cyan); font-size: 13px; font-weight: 800; }

.start-section { display: flex; justify-content: space-between; align-items: end; gap: var(--space-3); margin-bottom: var(--space-5); padding: 52px; background: var(--cyan); color: #031116; }
.start-section .section-label { color: #075970; }
.start-section h2 { max-width: 11ch; margin-bottom: 0; }
.text-link { color: #031116; font-weight: 800; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.text-link:hover { color: var(--white); }

.site-footer { display: flex; justify-content: space-between; gap: var(--space-3); padding: 0 0 var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-4); }
.site-footer .brand { display: inline-block; margin-bottom: 8px; }
.footer-meta { display: flex; flex-direction: column; align-items: end; gap: 6px; color: var(--ink-soft); font-size: 13px; text-align: right; }
.footer-meta a:hover { color: var(--cyan); }
.footer-links { display: flex; gap: 14px; }

.legal-page { width: min(720px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 96px; }
.legal-page .brand { display: inline-block; margin-bottom: 96px; }
.legal-page h1 { max-width: 12ch; font-size: 60px; }
.legal-page h2 { margin-top: 56px; font-size: 28px; }
.legal-page p { max-width: 66ch; color: var(--ink-soft); }
.legal-page .legal-lead { color: var(--ink); font-size: 20px; }
.legal-back { margin-top: 56px; font-weight: 800; }
.legal-back a { color: var(--cyan); border-bottom: 1px solid currentColor; }

.docs-layout { width: min(1180px, calc(100% - 48px)); display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(48px, 8vw, 120px); margin: 0 auto; padding: var(--space-5) 0; }
.docs-nav { position: sticky; top: 108px; min-width: 0; align-self: start; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.docs-nav .section-label { margin-bottom: 10px; }
.docs-nav a { padding: 8px 0; color: var(--ink-soft); font-size: 14px; }
.docs-nav a:hover { color: var(--cyan); }
.docs-content { min-width: 0; max-width: 760px; }
.docs-content p, .docs-content li { overflow-wrap: anywhere; }
.docs-content h1 { max-width: 12ch; margin-bottom: var(--space-3); }
.docs-lead { max-width: 58ch; color: var(--ink-soft); font-size: 19px; }
.docs-section { margin-top: 72px; scroll-margin-top: 112px; }
.docs-section h2 { font-size: 32px; }
.docs-section p { color: var(--ink-soft); }
.docs-section code { color: var(--cyan-pale); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.docs-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.code-block { margin-top: 24px; overflow: hidden; border: 1px solid var(--line-bright); background: #061217; }
.code-block-bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.code-block > code { display: block; padding: 18px; overflow-x: auto; white-space: nowrap; }
.code-block pre { margin: 0; padding: 18px; overflow-x: auto; color: var(--cyan-pale); font-size: 13px; line-height: 1.65; }
.code-block pre code { white-space: pre; }
.copy-button { min-height: 28px; padding: 0 9px; border: 1px solid var(--line-bright); border-radius: 2px; background: transparent; color: var(--cyan); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.copy-button:hover { border-color: var(--cyan); color: var(--white); }
.copy-status { min-width: 0; color: var(--cyan); font-size: 12px; }
.docs-note { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--cyan); }
.docs-checklist { padding-top: 4px; border-top: 1px solid var(--line); }
.docs-checklist ul { margin: 20px 0 0; padding: 0; list-style: none; }
.docs-checklist li { position: relative; padding: 12px 0 12px 24px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.docs-checklist li::before { content: ""; position: absolute; top: 22px; left: 2px; width: 8px; height: 8px; border: 1px solid var(--cyan); }

.motion-ready .hero-copy { animation: hero-copy-in 520ms cubic-bezier(.2, .75, .35, 1) both; }
.motion-ready .signal-field { animation: signal-field-in 640ms 100ms cubic-bezier(.2, .75, .35, 1) both; }
.motion-ready .signal-orbit-one { animation: orbit-one 18s linear infinite; }
.motion-ready .signal-orbit-two { animation: orbit-two 22s linear infinite; }
.motion-ready .signal-orbit-three { animation: orbit-three 28s linear infinite; }
.motion-ready .signal-core { animation: core-settle 3.8s 650ms ease-in-out infinite; }
.motion-ready .signal-trace-one { animation: trace-one 2.6s 800ms ease-in-out infinite; }
.motion-ready .signal-trace-two { animation: trace-two 3.1s 1200ms ease-in-out infinite; }
.motion-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 480ms ease, transform 480ms cubic-bezier(.2, .75, .35, 1); }
.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.motion-ready .capability-item:nth-child(2) { transition-delay: 70ms; }
.motion-ready .capability-item:nth-child(3) { transition-delay: 140ms; }
.motion-ready .steps li:nth-child(2) { transition-delay: 70ms; }
.motion-ready .steps li:nth-child(3) { transition-delay: 140ms; }

@keyframes hero-copy-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes signal-field-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes orbit-one {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit-two {
  from { transform: translate(-50%, -50%) rotate(56deg); }
  to { transform: translate(-50%, -50%) rotate(-304deg); }
}

@keyframes orbit-three {
  from { transform: translate(-50%, -50%) rotate(-28deg); }
  to { transform: translate(-50%, -50%) rotate(332deg); }
}

@keyframes core-settle {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-4px); }
}

@keyframes trace-one {
  0%, 100% { opacity: .2; transform: scaleX(.22); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes trace-two {
  0%, 100% { opacity: .2; transform: rotate(180deg) scaleX(.2); }
  50% { opacity: 1; transform: rotate(180deg) scaleX(1); }
}

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; gap: 14px; padding: 16px 0; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; gap: 22px; flex-wrap: wrap; }
  .hero, .path-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 72px 0; gap: 56px; }
  .hero h1 { font-size: 58px; }
  h2 { font-size: 38px; }
  .section-heading, .capability-item { grid-template-columns: 1fr; gap: 16px; }
  .section-heading { margin-bottom: 36px; }
  .start-section { align-items: start; flex-direction: column; padding: 36px 28px; }
  .site-footer { flex-direction: column; }
  .footer-meta { align-items: start; text-align: left; }
  .legal-page .brand { margin-bottom: 64px; }
  .docs-layout { grid-template-columns: 1fr; gap: 36px; padding: 64px 0; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 22px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
  .docs-nav .section-label { width: 100%; }
  .docs-nav a { padding: 0; }
}

@media (max-width: 520px) {
  .site-header, .hero, .capabilities, .path-section, .start-section, .site-footer { width: min(100% - 32px, 1180px); }
  .primary-nav { gap: 17px; font-size: 13px; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 46px; }
  h2 { font-size: 34px; }
  .hero-summary { font-size: 17px; }
  .signal-field { min-height: 420px; }
  .signal-grid { inset: 14px; }
  .signal-orbit-one { width: 290px; height: 170px; }
  .signal-orbit-two { width: 225px; height: 315px; }
  .signal-orbit-three { width: 340px; height: 235px; }
  .signal-core { width: 142px; min-height: 142px; padding: 16px; }
  .signal-core strong { font-size: 25px; }
  .signal-marker { font-size: 8px; padding: 4px 5px; }
  .signal-marker-api { top: 15%; left: 8%; }
  .signal-marker-account { top: 21%; right: 7%; }
  .signal-marker-usage { right: 8%; bottom: 19%; }
  .signal-marker-key { bottom: 17%; left: 8%; }
  .signal-caption { right: 16px; bottom: 15px; left: 16px; font-size: 12px; }
  .start-section { margin-bottom: 56px; }
  .legal-page h1 { font-size: 44px; }
  .docs-layout { width: min(100% - 48px, 1180px); padding-right: 16px; }
  .docs-content h1 { font-size: 44px; }
  .docs-section { margin-top: 56px; }
  .docs-section h2 { font-size: 28px; }
}

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