:root {
  --bg: #060606;
  --accent: #ff4d1a;
  --text: #f2efe9;
  --muted: #8d8a85;
  --line: rgba(242, 239, 233, .12);
  --panel: rgba(16, 16, 16, .86);
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- 3D background ---------- */
#cortex { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; opacity: 0; transition: opacity 1.2s; }
#cortex.ready { opacity: 1; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .85)); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 6vw; border-bottom: 1px solid var(--line);
  background: rgba(6, 6, 6, .92);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; letter-spacing: .08em; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .1em; }
.nav-links { display: flex; gap: 36px; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 6px; font: inherit; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: #e63f10; }
.btn-line { border-color: rgba(242, 239, 233, .35); color: var(--text); background: transparent; }
.btn-line:hover { border-color: var(--text); }
.nav-cta { padding: 8px 18px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 2; min-height: 100vh; display: flex; align-items: center; padding: 120px 6vw 80px; }
.hero-inner { max-width: 640px; }
.hero-title { font-size: clamp(64px, 10vw, 136px); font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.hero-sub { margin-top: 28px; font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; line-height: 1.45; }
.hero-desc { margin: 16px 0 40px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- marquee ---------- */
.marquee { position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line); background: rgba(8, 8, 8, .85); padding: 16px 0; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 50s linear infinite; font-size: 16px; color: var(--muted); letter-spacing: .06em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { position: relative; z-index: 2; padding: 130px 6vw; max-width: 1280px; margin: 0 auto; }
.section-head { position: relative; margin-bottom: 56px; }
.section-head::before, .contact-inner::before {
  content: ""; position: absolute; inset: -60px -8%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(6, 6, 6, .85), transparent);
}
.label { font-size: 13px; color: var(--muted); letter-spacing: .12em; margin-bottom: 14px; }
.label em { font-style: normal; font-family: var(--mono); color: var(--accent); margin-right: 10px; }
.section-head h2, .contact h2 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 700; line-height: 1.2; }
.lead { color: var(--muted); font-size: 17px; max-width: 620px; margin-top: 18px; }
.section-head h2, .contact h2, .lead, .steps h4, .steps p { text-shadow: 0 2px 18px rgba(0, 0, 0, .95); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { padding: 32px 28px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); transition: border-color .25s, transform .25s; }
.card:hover { border-color: rgba(255, 77, 26, .6); transform: translateY(-4px); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.card-no { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.card-icon { width: 30px; height: 30px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 23px; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li { font-size: 12px; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--line); color: #cfcac2; }

/* ---------- relay ---------- */
.relay-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.relay-diagram, .terminal { border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.relay-diagram { padding: 16px; display: grid; place-items: center; }
.relay-diagram svg { width: 100%; height: auto; }
.relay-diagram text { font-size: 14px; fill: var(--text); }
.terminal { overflow: hidden; display: flex; flex-direction: column; }
.term-bar { padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.terminal pre { flex: 1; padding: 20px; font-family: var(--mono); font-size: 13px; line-height: 1.75; color: #d6d1c8; white-space: pre-wrap; word-break: break-all; min-height: 300px; }
.terminal .k { color: var(--text); }
.terminal .s { color: #e8c48a; }
.terminal .c { color: #6b6760; }
.terminal .o { color: var(--accent); }
.feature-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }
.feature-list li { padding: 22px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.feature-list b { display: block; margin-bottom: 4px; }
.feature-list span { font-size: 14px; color: var(--muted); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 28px 20px 0 0; }
.steps span { display: block; font-family: var(--mono); font-size: 14px; color: var(--accent); margin-bottom: 14px; }
.steps h4 { font-size: 19px; margin-bottom: 6px; }
.steps p { font-size: 14px; color: var(--muted); }

/* ---------- contact ---------- */
.contact { position: relative; z-index: 2; padding: 150px 6vw; }
.contact-inner { position: relative; isolation: isolate; max-width: 1280px; margin: 0 auto; }
.contact-card {
  margin-top: 40px; max-width: 680px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--panel);
}
.contact-row { display: flex; align-items: center; gap: 24px; padding: 24px 32px; }
.contact-row + .contact-row { border-top: 1px solid var(--line); }
.contact-label { width: 32px; font-size: 14px; color: var(--muted); }
.contact-value { flex: 1; font-family: var(--mono); font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; letter-spacing: .02em; user-select: all; word-break: break-all; }
.contact-mail:hover { color: var(--accent); }
.contact-row .btn { min-width: 124px; }
.footer a:hover { color: var(--text); }
.footer { position: relative; z-index: 2; display: flex; justify-content: space-between; padding: 28px 6vw; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: rgba(6, 6, 6, .85); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in { transition: opacity .7s, transform .25s, border-color .25s; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cards, .relay-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li { display: grid; grid-template-columns: 48px 1fr; padding: 18px 0; border-top: 1px solid var(--line); }
  .steps span { grid-row: span 2; margin: 3px 0 0; }
}
@media (max-width: 680px) {
  .nav { padding: 12px 5vw; }
  .nav-links { display: none; }
  .hero { align-items: flex-end; padding-top: 110px; }
  .section { padding: 96px 5vw; }
  .feature-list { grid-template-columns: 1fr; }
  .contact-row { flex-wrap: wrap; padding: 20px; gap: 10px 16px; }
  .contact-row .btn { width: 100%; }
  .footer { flex-direction: column; gap: 6px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
