@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #060606;
  --bg2: #0d0d0d;
  --c1: #ff4d1a;
  --c2: #ffb547;
  --c3: #f2efe9;
  --text: #f2efe9;
  --muted: #8d8a85;
  --line: rgba(242, 239, 233, .1);
  --grad: linear-gradient(100deg, #ff4d1a, #ffb547);
  --mono: "JetBrains Mono", "SF 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.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
.mono { font-family: var(--mono); }

/* ---------- ambient layers ---------- */
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 600px; height: 600px; margin: -300px 0 0 -300px;
  border-radius: 50%; pointer-events: none; z-index: 1; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 140, 60, .18), transparent 60%);
  transform: translate3d(var(--x, -999px), var(--y, -999px), 0);
}
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 16px 24px auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 10px 14px 10px 16px; border-radius: 18px;
  background: rgba(14, 14, 14, .55); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { filter: drop-shadow(0 0 10px rgba(255, 77, 26, .6)); animation: spin-pulse 8s ease-in-out infinite; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--mono); letter-spacing: .18em; font-size: 15px; }
.brand-text i { font-style: normal; color: var(--c1); }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .5em; }
.nav-links { display: flex; gap: 32px; font-size: 14px; color: var(--muted); }
.nav-links a { position: relative; transition: color .3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--grad); transform: scaleX(0); transition: transform .3s; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
@keyframes spin-pulse { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(180deg) scale(1.05); } }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: transform .25s, box-shadow .25s; cursor: pointer; isolation: isolate;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 0 30px rgba(255, 140, 60, .5), inset 0 0 0 1px rgba(255, 255, 255, .2); overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .45), transparent 70%);
  transform: translateX(-100%); animation: shine 3s infinite;
}
.btn-primary:hover { box-shadow: 0 0 50px rgba(255, 77, 26, .6), 0 0 90px rgba(255, 181, 71, .35); }
.btn-ghost { border: 1px solid rgba(255, 77, 26, .35); color: var(--c1); background: rgba(255, 77, 26, .05); }
.btn-ghost:hover { background: rgba(255, 77, 26, .12); box-shadow: 0 0 24px rgba(255, 77, 26, .3); }
.nav-cta { padding: 10px 18px; font-size: 14px; }
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ---------- hero ---------- */
.hero { position: relative; background: transparent; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding: 120px 6vw 80px; }
.hero::before {
  content: none; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 75% 45%, rgba(255, 140, 60, .25), transparent 70%),
    radial-gradient(40% 40% at 15% 80%, rgba(255, 77, 26, .12), transparent 70%),
    radial-gradient(30% 30% at 90% 90%, rgba(255, 181, 71, .14), transparent 70%);
}
#cortex { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.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)); }
.scan { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .25; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.grid-floor {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; z-index: 0;
  background-image: linear-gradient(rgba(255, 77, 26, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 77, 26, .22) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(62deg);
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  animation: grid-move 3s linear infinite;
}
@keyframes grid-move { to { background-position: 0 60px; } }
.hero-inner { position: relative; z-index: 2; max-width: 680px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .25em; color: var(--c1); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 12px var(--c1); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.hero-title { font-weight: 900; line-height: 1.05; }
.glitch {
  position: relative; display: inline-block; font-size: clamp(64px, 11vw, 150px); letter-spacing: .04em;
  color: var(--text); letter-spacing: -.02em; mix-blend-mode: difference;
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0;
}
.glitch::before { text-shadow: -3px 0 var(--c3); color: transparent; animation: glitch-a 3.2s infinite steps(1); }
.glitch::after { text-shadow: 3px 0 var(--c1); color: transparent; animation: glitch-b 2.7s infinite steps(1); }
@keyframes glitch-a {
  0%, 88%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  90% { clip-path: inset(20% 0 55% 0); transform: translate(-6px, -2px); }
  93% { clip-path: inset(60% 0 15% 0); transform: translate(5px, 2px); }
  96% { clip-path: inset(40% 0 40% 0); transform: translate(-3px, 0); }
}
@keyframes glitch-b {
  0%, 84%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  86% { clip-path: inset(70% 0 5% 0); transform: translate(6px, 1px); }
  90% { clip-path: inset(10% 0 70% 0); transform: translate(-5px, -1px); }
  94% { clip-path: inset(45% 0 30% 0); transform: translate(4px, 0); }
}
.hero-sub-title { display: block; font-size: clamp(28px, 4.2vw, 54px); margin-top: 10px; letter-spacing: .06em; }
.hero-typing { margin: 28px 0 40px; font-family: var(--mono); font-size: clamp(16px, 1.8vw, 21px); color: var(--muted); }
.prompt { color: var(--c3); margin-right: 6px; }
.typing { color: var(--text); }
.caret { color: var(--c1); animation: blink 1s infinite; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hud { position: absolute; z-index: 2; font-family: var(--mono); font-size: 11px; letter-spacing: .15em; color: rgba(138, 155, 184, .7); padding: 10px 14px; }
.hud em { color: #c6ff3d; font-style: normal; }
.hud-tl { top: 100px; right: 6vw; border-top: 1px solid var(--c1); border-right: 1px solid var(--c1); text-align: right; }
.hud-br { bottom: 40px; right: 6vw; border-bottom: 1px solid var(--c3); border-right: 1px solid var(--c3); text-align: right; }

.scroll-hint { position: absolute; left: 50%; bottom: 28px; z-index: 2; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .3); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--c1); animation: scroll 1.6s infinite; }
@keyframes scroll { to { transform: translateY(14px); opacity: 0; } }

/* ---------- marquee ---------- */
.marquee { position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line); background: rgba(10, 10, 10, .8); padding: 18px 0; transform: skewY(-1.5deg); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 40s linear infinite; font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: .15em; }
.marquee-track span { color: transparent; -webkit-text-stroke: 1px rgba(242, 239, 233, .35); }
.marquee-track span:nth-child(3n) { -webkit-text-stroke: 0; color: var(--c1); text-shadow: 0 0 14px var(--c1); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { position: relative; z-index: 2; padding: 140px 6vw; max-width: 1360px; margin: 0 auto; }
.section-head { position: relative; text-align: center; margin-bottom: 70px; }
.section-head::before, .cta-inner::before {
  content: ""; position: absolute; inset: -60px -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(6, 6, 6, .82), transparent);
}
.section-head h2, .cta h2 { text-shadow: 0 4px 40px rgba(0, 0, 0, .9); }
.section-head .eyebrow { justify-content: center; }
.section-head h2, .cta h2 { font-size: clamp(34px, 5vw, 62px); font-weight: 900; letter-spacing: .02em; line-height: 1.15; }
.lead { color: var(--muted); font-size: 17px; max-width: 620px; margin: 18px auto 0; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; perspective: 1200px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; padding: 40px 32px 36px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, rgba(22, 22, 22, .72), rgba(10, 10, 10, .82));
  border: 1px solid var(--line);
  transform-style: preserve-3d; transition: transform .15s ease-out, border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx) var(--my), rgba(255, 77, 26, .18), transparent 45%);
}
.card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--angle), var(--c1), var(--c2), var(--c3), var(--c1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rotate 4s linear infinite;
}
.card:hover::before, .card:hover::after, .card-hot::after { opacity: 1; }
@keyframes rotate { to { --angle: 360deg; } }
.card-hot { box-shadow: 0 0 60px rgba(255, 181, 71, .15); }
.card-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 28px; background: rgba(255, 77, 26, .08); border: 1px solid rgba(255, 77, 26, .3); box-shadow: 0 0 24px rgba(255, 77, 26, .2) inset; transform: translateZ(40px); }
.card-icon svg { width: 36px; height: 36px; fill: none; stroke: var(--c1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--c1)); }
.card-hot .card-icon { background: rgba(255, 181, 71, .08); border-color: rgba(255, 181, 71, .35); }
.card-hot .card-icon svg { stroke: var(--c3); filter: drop-shadow(0 0 6px var(--c3)); }
.card-no { font-family: var(--mono); font-size: 11px; letter-spacing: .25em; color: var(--c2); }
.card h3 { font-size: 26px; margin: 8px 0 14px; transform: translateZ(30px); }
.card p { color: var(--muted); font-size: 15px; transform: translateZ(20px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li { font-size: 12px; font-family: var(--mono); padding: 5px 10px; border-radius: 8px; background: rgba(255, 140, 60, .12); border: 1px solid rgba(255, 140, 60, .3); color: #ffd2b0; }

/* ---------- relay ---------- */
.relay-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: stretch; }
.relay-diagram, .terminal { border-radius: 22px; border: 1px solid var(--line); background: rgba(14, 14, 14, .75); }
.relay-diagram { padding: 16px; display: grid; place-items: center; }
.relay-diagram svg { width: 100%; height: auto; }
.relay-diagram text { font-family: var(--mono); font-size: 14px; fill: var(--text); }
.terminal { overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.term-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; 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: 320px; }
.terminal .k { color: var(--c3); }
.terminal .s { color: #c6ff3d; }
.terminal .c { color: #6b6760; }
.terminal .o { color: var(--c1); }
.feature-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.feature-list li { padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(14, 14, 14, .6); transition: border-color .3s, transform .3s; }
.feature-list li:hover { border-color: rgba(255, 77, 26, .5); transform: translateY(-4px); }
.feature-list b { display: block; margin-bottom: 6px; }
.feature-list span { font-size: 14px; color: var(--muted); }

/* ---------- stats ---------- */
.stats {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1200px; margin: 0 auto; padding: 50px 6vw; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgba(255, 140, 60, .08), transparent);
}
.stat { text-align: center; }
.stat b { display: block; font-family: var(--mono); font-size: clamp(36px, 5vw, 60px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 14px; letter-spacing: .2em; }

/* ---------- timeline ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.timeline::before { content: ""; position: absolute; left: 5%; right: 5%; top: 34px; height: 2px; background: var(--grad); opacity: .5; box-shadow: 0 0 12px var(--c2); }
.timeline li { position: relative; text-align: center; padding: 0 8px; }
.timeline span {
  position: relative; display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 50%;
  font-family: var(--mono); font-weight: 800; font-size: 20px; color: var(--c1); background: var(--bg2);
  border: 2px solid var(--c1); box-shadow: 0 0 24px rgba(255, 77, 26, .4), inset 0 0 18px rgba(255, 77, 26, .25);
}
.timeline li:nth-child(even) span { color: var(--c3); border-color: var(--c3); box-shadow: 0 0 24px rgba(255, 181, 71, .4), inset 0 0 18px rgba(255, 181, 71, .25); }
.timeline h4 { font-size: 19px; margin-bottom: 6px; }
.timeline p { font-size: 14px; color: var(--muted); }

/* ---------- cta ---------- */
.cta { position: relative; z-index: 2; padding: 160px 6vw; text-align: center; overflow: hidden; }
.cta-ring {
  position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%;
  background: conic-gradient(from var(--angle), transparent, rgba(255, 77, 26, .35), transparent 30%, rgba(255, 181, 71, .35), transparent 60%);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%, #000 60%, transparent 61%);
  mask: radial-gradient(circle, transparent 58%, #000 59%, #000 60%, transparent 61%);
  animation: rotate 6s linear infinite; filter: blur(1px);
}
.cta-inner { position: relative; isolation: isolate; }
.cta-logo { filter: drop-shadow(0 0 30px rgba(255, 77, 26, .7)); margin-bottom: 26px; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }
.contact-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

.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); }
.footer .mono { letter-spacing: .3em; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); filter: blur(6px); transition: opacity .9s, transform .9s cubic-bezier(.2, .8, .2, 1), filter .9s; }
.reveal.in { opacity: 1; transform: none; filter: none; }
.cards .reveal:nth-child(2), .timeline .reveal:nth-child(2) { transition-delay: .12s; }
.cards .reveal:nth-child(3), .timeline .reveal:nth-child(3) { transition-delay: .24s; }
.timeline .reveal:nth-child(4) { transition-delay: .36s; }
.timeline .reveal:nth-child(5) { transition-delay: .48s; }
.card.reveal.in { transition: opacity .9s, transform .15s ease-out, filter .9s, border-color .3s; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cards, .relay-grid { grid-template-columns: 1fr; }
  .feature-list, .stats { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .timeline { grid-template-columns: 1fr; gap: 28px; }
  .timeline::before { left: 34px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline li { display: grid; grid-template-columns: 68px 1fr; column-gap: 20px; text-align: left; align-items: center; }
  .timeline span { grid-row: span 2; margin: 0; }
  .hud { display: none; }
}
@media (max-width: 680px) {
  .nav { inset: 10px 10px auto; }
  .nav-links { display: none; }
  .hero { padding-top: 110px; align-items: flex-end; }
  .hero .eyebrow { letter-spacing: .12em; font-size: 11px; }
  .section { padding: 100px 5vw; }
  .feature-list { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 8px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
.timeline h4, .timeline p, .lead { text-shadow: 0 2px 16px rgba(0, 0, 0, .95), 0 0 4px rgba(0, 0, 0, .8); }
