/* YX Unlimited — landing page
   Single-file stylesheet, no build step. */

:root {
  --bg: #08080a;
  --bg-2: #0c0c0f;
  --panel: #121216;
  --panel-2: #17171c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f3f5;
  --text-2: #b7b7c0;
  --text-3: #8a8a95;
  --accent: #4b3fe3;
  --accent-2: #6d5cff;
  --accent-text: #9a8cff;
  --accent-soft: rgba(75, 63, 227, 0.16);
  --green: #22c55e;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1120px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }

p { margin: 0; }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }

.narrow { max-width: 760px; }

/* ---------- background ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 70% -10%, rgba(75, 63, 227, 0.28), transparent 60%),
    radial-gradient(700px 420px at 10% 5%, rgba(109, 92, 255, 0.12), transparent 60%),
    radial-gradient(600px 600px at 50% 110%, rgba(75, 63, 227, 0.1), transparent 60%);
}

.bg-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

main, .nav, .footer { position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(8, 8, 10, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.nav.scrolled { border-bottom-color: var(--line); background: rgba(8, 8, 10, 0.88); }

.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.01em; }

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

.brand-name { font-size: 15.5px; }

.brand-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  border: 1px solid rgba(109, 92, 255, 0.35);
  padding: 2px 6px;
  border-radius: 5px;
}

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

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

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

.nav-cta { margin-left: 4px; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span { display: block; height: 1.5px; background: var(--text-2); margin: 4px 0; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #372fae 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(75, 63, 227, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgba(75, 63, 227, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.2); }

.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); color: var(--text); }

.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.24); }

.btn-sm { padding: 9px 15px; font-size: 13.5px; border-radius: 8px; }

.btn-lg { padding: 15px 24px; font-size: 15.5px; }

.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding: 74px 0 46px; }

.hero-grid { display: grid; grid-template-columns: 1.02fr 1.05fr; gap: 56px; align-items: center; }

.hero-copy, .hero-visual { min-width: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 6px 12px;
}

.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14); }

.hero h1 { font-size: clamp(40px, 5vw, 62px); margin: 22px 0 20px; letter-spacing: -0.035em; }

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #b9aeff 0%, #6d5cff 45%, #4b3fe3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: 17px; color: var(--text-2); max-width: 34em; }

.hero-actions { display: flex; gap: 12px; margin: 30px 0 16px; flex-wrap: wrap; }

.meta { font-size: 12.5px; color: var(--text-3); }

/* ---------- app mockup ---------- */
.hero-visual { position: relative; }

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -8% -6%;
  background: radial-gradient(closest-side, rgba(75, 63, 227, 0.32), transparent 72%);
  filter: blur(28px);
  z-index: -1;
}

.app-window {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #0f0f12;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 100%;
  transform: perspective(1400px) rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.hero-visual:hover .app-window { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg) translateY(-4px); }

.app-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  background: #131317;
}

.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }

.app-title { margin-left: 10px; font-size: 11px; color: var(--text-3); letter-spacing: 0.01em; }

.app-body { display: flex; height: 402px; }

.app-side { width: 42px; border-right: 1px solid var(--line); background: #0d0d10; display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 10px; }

.side-item { width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); }

.side-item.active { background: rgba(109, 92, 255, 0.32); box-shadow: inset 0 0 0 1px rgba(154, 140, 255, 0.5); }

.side-spacer { flex: 1; }

.app-canvas { position: relative; flex: 1; overflow: hidden; background: #0a0a0c; display: flex; align-items: center; justify-content: center; }

.stage { position: absolute; left: 50%; top: 50%; width: 560px; height: 402px; transform: translate(-50%, -50%); transform-origin: center; }

.app-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
}

.wires { position: absolute; inset: 0; width: 100%; height: 100%; }

.wires path { fill: none; stroke: rgba(154, 140, 255, 0.5); stroke-width: 1.6; stroke-dasharray: 5 5; }

.node {
  position: absolute;
  width: 172px;
  background: #141419;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.node.small { width: 150px; }

.node-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }

.node-kind { font-size: 8px; color: var(--accent-text); border: 1px solid rgba(154, 140, 255, 0.35); border-radius: 4px; padding: 0 4px; line-height: 14px; }

.node-name { font-size: 9.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.node p { font-size: 9px; line-height: 1.55; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.node-image img { border-radius: 6px; height: 76px; width: 100%; object-fit: cover; }

.node-params { display: flex; gap: 4px; margin-top: 6px; }

.chip { font-size: 8px; color: var(--text-3); background: rgba(255, 255, 255, 0.05); border-radius: 4px; padding: 1px 5px; line-height: 14px; }

.chip.accent { margin-left: auto; background: rgba(75, 63, 227, 0.3); color: #cfc8ff; }

.node-foot { margin-top: 6px; }

.video-frame {
  height: 62px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1c2a3a, #0f1520 60%, #2a1b3d);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play { width: 0; height: 0; border-left: 10px solid rgba(255, 255, 255, 0.75); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }

.app-composer {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 10px 13px;
  background: #101014;
  font-size: 10.5px;
  color: var(--text-3);
}

.composer-ic { color: var(--accent-text); }

.composer-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.composer-send {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}

/* ---------- logos ---------- */
.logos { padding: 18px 0 8px; }

.logos-title { text-align: center; font-size: 12px; color: var(--text-3); letter-spacing: 0.06em; }

.logos-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
  opacity: 0.85;
}

.logos-row span { position: relative; }

.logos-row span + span::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-3);
  transform: translateY(-50%);
}

/* ---------- sections ---------- */
.section { padding: 96px 0; }

.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018) 18%, rgba(255, 255, 255, 0.018) 82%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

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

.kicker { display: inline-block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }

.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }

.section-head p { color: var(--text-2); margin-top: 14px; font-size: 15.5px; }

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

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card:hover { border-color: rgba(154, 140, 255, 0.35); transform: translateY(-3px); background: linear-gradient(180deg, rgba(109, 92, 255, 0.08), rgba(255, 255, 255, 0.015)); }

.card-ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(154, 140, 255, 0.28);
  color: var(--accent-text);
  font-size: 18px;
  margin-bottom: 18px;
}

.card h3 { font-size: 17px; margin-bottom: 8px; }

.card p { font-size: 14px; color: var(--text-2); }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }

.steps li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  background: rgba(255, 255, 255, 0.02);
}

.steps li::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 42px;
  color: rgba(154, 140, 255, 0.55);
  font-size: 18px;
  z-index: 1;
}

.steps li:last-child::after { display: none; }

.step-no { display: block; font-size: 12px; letter-spacing: 0.12em; color: var(--accent-text); margin-bottom: 16px; }

.steps h3 { font-size: 18px; margin-bottom: 8px; }

.steps p { font-size: 14px; color: var(--text-2); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.gallery figure { position: relative; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--panel); }

.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }

.gallery figure:hover img { transform: scale(1.04); }

.gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 14px 12px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

/* ---------- download ---------- */
.download-grid { display: grid; grid-template-columns: 1fr 420px; gap: 56px; align-items: center; }

.download-copy h2 { font-size: clamp(28px, 3.4vw, 40px); }

.download-copy p { color: var(--text-2); margin-top: 14px; font-size: 15.5px; }

.checks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }

.checks li { position: relative; padding-left: 26px; }

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: var(--green);
  font-size: 11px;
  display: grid;
  place-items: center;
  margin-top: 3px;
}

.download-card {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.dc-head { display: flex; align-items: center; gap: 13px; }

.dc-head img { border-radius: 10px; }

.dc-head strong { display: block; font-size: 15px; }

.dc-head span { display: block; font-size: 12.5px; color: var(--text-3); }

.dc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 20px 0 22px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.dc-meta div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }

.dc-meta dt { color: var(--text-3); }

.dc-meta dd { margin: 0; color: var(--text-2); }

.dc-note { margin-top: 12px; font-size: 12px; color: #fbbf24; text-align: center; }

.sha { margin-top: 16px; font-size: 12px; color: var(--text-3); }

.sha summary { cursor: pointer; user-select: none; }

.sha code { display: block; margin-top: 10px; padding: 10px; border-radius: 8px; background: #0a0a0c; border: 1px solid var(--line); font-size: 11px; line-height: 1.5; word-break: break-all; color: var(--text-2); }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }

.faq details { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); overflow: hidden; }

.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-size: 15px; font-weight: 550; display: flex; justify-content: space-between; gap: 16px; }

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after { content: "+"; color: var(--accent-text); font-size: 18px; line-height: 1; transition: transform 0.2s ease; }

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { padding: 0 20px 18px; color: var(--text-2); font-size: 14px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; }

.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.footer-brand { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; }

.footer-brand img { border-radius: 6px; }

.footer-links { display: flex; gap: 20px; font-size: 13px; color: var(--text-3); margin-left: auto; }

.footer-links a:hover { color: var(--text); }

.footer-note { width: 100%; font-size: 12px; color: var(--text-3); }

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

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

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 52px; }
  .hero-visual { max-width: 620px; }
  .app-window { transform: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .download-grid { grid-template-columns: 1fr; gap: 36px; }
  .download-card { max-width: 480px; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    background: rgba(10, 10, 13, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .section { padding: 68px 0; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .app-body { height: 300px; }
  .stage { transform: translate(-50%, -50%) scale(0.68); }
  .footer-links { margin-left: 0; }
}

@media (max-width: 440px) {
  .stage { transform: translate(-50%, -50%) scale(0.52); }
  .app-body { height: 250px; }
  .hero-actions .btn { width: 100%; }
  .hero-actions { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .app-window, .card, .gallery img { transition: none; }
}
