:root {
  --bg: #07060d;
  --bg-soft: #0e0c1a;
  --panel: rgba(22, 18, 40, 0.72);
  --line: rgba(139, 108, 255, 0.22);
  --line-strong: rgba(139, 108, 255, 0.55);
  --fg: #ece9ff;
  --muted: #9a94b8;
  --accent: #8b6cff;
  --accent-bright: #b49dff;
  --cyan: #5ee7ff;
  --green: #3ddc84;
  --radius: 16px;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "SF Mono", monospace;
  --sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  line-height: 1.7;
  color: var(--fg);
  background:
    radial-gradient(900px 600px at 78% -5%, rgba(139, 108, 255, 0.28), transparent 60%),
    radial-gradient(700px 500px at 0% 35%, rgba(94, 231, 255, 0.08), transparent 60%),
    var(--bg);
}

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

img {
  display: block;
  max-width: 100%;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Background layers */
#mesh,
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

#mesh {
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.grid-overlay {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(16px, 5vw, 56px);
  background: rgba(7, 6, 13, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand img {
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--fg);
}

/* Buttons */
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7a5cff, #a07bff 55%, #5ee7ff 140%);
  box-shadow:
    0 0 0 1px rgba(180, 157, 255, 0.4) inset,
    0 10px 36px -8px rgba(139, 108, 255, 0.75);
}

.btn-primary:hover {
  box-shadow:
    0 0 0 1px rgba(180, 157, 255, 0.6) inset,
    0 14px 44px -6px rgba(139, 108, 255, 0.95);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--fg);
  background: rgba(139, 108, 255, 0.08);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: rgba(139, 108, 255, 0.18);
  transform: translateY(-2px);
}

.nav-cta {
  padding: 8px 16px;
  font-size: 14px;
}

/* Shared pieces */
.tag {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-bright);
  letter-spacing: 0.22em;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green);
  animation: pulse 1.8s infinite;
}

.glow-text {
  color: transparent;
  background: linear-gradient(90deg, #b49dff, #5ee7ff 60%, #b49dff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

.corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
}

.corner.tl {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}

.corner.tr {
  top: -2px;
  right: -2px;
  border-bottom: 0;
  border-left: 0;
}

.corner.bl {
  bottom: -2px;
  left: -2px;
  border-top: 0;
  border-right: 0;
}

.corner.br {
  right: -2px;
  bottom: -2px;
  border-top: 0;
  border-left: 0;
}

.scan-line {
  position: absolute;
  right: 0;
  left: 0;
  height: 90px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(139, 108, 255, 0.22) 70%,
    rgba(180, 157, 255, 0.95)
  );
  border-bottom: 1px solid #d9ceff;
  animation: scan 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* Hero */
.hero {
  max-width: 1240px;
  padding: clamp(28px, 5vh, 56px) clamp(16px, 5vw, 56px) 0;
  margin: 0 auto;
  text-align: center;
}

.hero .lead {
  margin-inline: auto;
}

.hero .hero-actions {
  justify-content: center;
}

/* Demo video */
.demo {
  max-width: 1240px;
  padding: clamp(28px, 4.5vh, 48px) clamp(16px, 5vw, 56px) 72px;
  margin: 0 auto;
}

.demo-frame {
  position: relative;
  background: #0c0b14;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 90px -20px rgba(139, 108, 255, 0.7);
}

.demo-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--line);
}

.demo-bar > span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.demo video {
  display: block;
  width: 100%;
  max-height: 78vh;
  background: #000;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.6vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.nowrap {
  white-space: nowrap;
}

.lead {
  max-width: 40em;
  margin: 0 0 28px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 0;
}

.stats > div {
  flex: 1;
  min-width: 130px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stats dt {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
}

.stats small {
  margin-left: 4px;
  font-size: 14px;
  color: var(--accent-bright);
}

.stats dd {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Ticker */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(14, 12, 26, 0.6);
}

.ticker-track {
  display: flex;
  gap: 56px;
  width: max-content;
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.28em;
  animation: ticker 28s linear infinite;
}

.ticker-track span::before {
  margin-right: 56px;
  color: var(--accent);
  content: "◆";
}

/* Sections */
.section {
  max-width: 1240px;
  padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 56px) 0;
  margin: 0 auto;
}

.section-tight {
  padding-top: 40px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.25;
}

.section-head p:not(.tag) {
  margin: 0;
  color: var(--muted);
}

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  padding: 26px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}

.card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 0%),
    rgba(139, 108, 255, 0.2),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 18px 50px -24px rgba(139, 108, 255, 0.8);
  transform: translateY(-4px);
}

.card:hover::before {
  opacity: 1;
}

.card-wide {
  grid-column: span 2;
}

.card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  color: var(--accent-bright);
  place-items: center;
  background: rgba(139, 108, 255, 0.12);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 0 22px -6px var(--accent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.chips li {
  padding: 4px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  background: rgba(94, 231, 255, 0.08);
  border: 1px solid rgba(94, 231, 255, 0.3);
  border-radius: 999px;
}

/* Workflow */
.flow {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.steps {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
}

.step-no {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent-bright);
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.steps p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Product mock */
.mock {
  overflow: hidden;
  font-size: 11px;
  background: #0c0b14;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 30px 90px -30px rgba(139, 108, 255, 0.85);
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
}

.mock-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.mock-bar span {
  margin-right: auto;
}

.mock-bar i {
  width: 9px;
  height: 9px;
  background: #2a2640;
  border-radius: 50%;
}

.mock-body {
  display: grid;
  grid-template-columns: 34% 1fr;
}

.mock-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.mock-side label {
  margin-top: 4px;
  color: var(--muted);
}

.mock-select {
  padding: 6px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #14121f;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.mock-grid b {
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #2b2547, #15131f);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mock-grid b.on {
  border-color: var(--accent-bright);
  box-shadow: 0 0 12px -2px var(--accent);
}

.mock-start {
  padding: 8px;
  margin-top: 8px;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, #7a5cff, #a07bff);
  border-radius: 6px;
}

.mock-view {
  position: relative;
  overflow: hidden;
  background: #15131d;
}

.mock-view img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mock-status {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  color: var(--muted);
}

.mock-status .dot {
  width: 6px;
  height: 6px;
}

/* Specs */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.specs > div {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.specs > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.specs > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.specs span {
  flex: none;
  width: 5em;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-bright);
}

.specs b {
  font-size: 14px;
  font-weight: 500;
}

/* Call to action */
.cta {
  position: relative;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(139, 108, 255, 0.32), transparent 70%), var(--panel);
  border: 1px solid var(--line);
}

.cta p:not(.tag) {
  margin: 0 0 28px;
  color: var(--muted);
}

.cta .hero-actions {
  justify-content: center;
}

.cta small {
  display: block;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 0.25s,
    transform 0.25s;
}

.contact-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.contact-card svg {
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--accent-bright);
}

.contact-card h3 {
  margin: 0 0 2px;
  font-size: 17px;
}

.contact-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.arrow {
  margin-left: auto;
  font-size: 20px;
  color: var(--accent-bright);
  transition: transform 0.25s;
}

.contact-card:hover .arrow {
  transform: translateX(6px);
}

/* Footer */
.footer {
  max-width: 1240px;
  padding: 56px clamp(16px, 5vw, 56px) 40px;
  margin: 72px auto 0;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer .brand {
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--fg);
}

.footer p {
  max-width: 60em;
  margin: 0 0 10px;
}

.copyright {
  font-family: var(--mono);
  font-size: 12px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.mock.reveal.visible {
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
}

/* Animations */
@keyframes scan {
  0% {
    top: -90px;
    opacity: 0;
  }
  12%,
  88% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* Responsive */
@media (max-width: 960px) {
  .flow {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mock,
  .mock.reveal.visible {
    transform: none;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    margin-left: auto;
  }

  .cards,
  .specs,
  .contact {
    grid-template-columns: 1fr;
  }

  .card-wide {
    grid-column: auto;
  }

  .specs > div {
    flex-direction: column;
    gap: 2px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .specs > div:last-child {
    border-bottom: 0 !important;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .scan-line {
    display: none;
  }
}
