:root {
  --bg: #0b0b14;
  --bg-2: #12121f;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4fb;
  --muted: #9a9ab3;
  --p1: #a78bfa;
  --p2: #60a5fa;
  --grad: linear-gradient(135deg, var(--p1), var(--p2));
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

.container { width: min(1180px, 92%); margin-inline: auto; }
.narrow { width: min(780px, 92%); }

/* Background */
.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(167, 139, 250, .25), transparent 60%),
    radial-gradient(500px circle at 85% 30%, rgba(96, 165, 250, .18), transparent 60%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 0%, #000 30%, transparent 75%);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; font-weight: 600; cursor: pointer; border: 0;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #0b0b14; box-shadow: 0 10px 30px -10px rgba(167,139,250,.7); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(167,139,250,.9); }
.btn-ghost { background: var(--card); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

/* Navbar */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 11, 20, .75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 500; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 34px; }
.nav-links a { color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Language */
.lang { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .85rem;
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  list-style: none; min-width: 170px; padding: 6px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .2s;
}
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: .92rem;
}
.lang-menu button:hover, .lang-menu button.active { background: rgba(167,139,250,.15); }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* Hero */
.hero { padding: 150px 0 60px; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: var(--p1); background: rgba(167,139,250,.1); border: 1px solid rgba(167,139,250,.3);
}
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); line-height: 1.1; margin: 24px 0 20px; letter-spacing: -.02em; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 1.2rem; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; justify-content: center; }

.stats { display: flex; gap: 50px; margin-top: 60px; flex-wrap: wrap; justify-content: center; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: 1.4rem; }
.stats span { color: var(--muted); font-size: .9rem; }

/* Mockup */
.mockup {
  margin: 70px auto 0; max-width: 960px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-2);
  box-shadow: 0 40px 100px -30px rgba(167,139,250,.45);
}
.mockup-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.mockup-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a52; }
.mockup-bar i:nth-child(1) { background: #ff5f57; }
.mockup-bar i:nth-child(2) { background: #febc2e; }
.mockup-bar i:nth-child(3) { background: #28c840; }
.mockup-bar span { margin-left: 10px; color: var(--muted); font-size: .8rem; }
.mockup-body { display: flex; height: 380px; }
.mockup-body aside { width: 70px; border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.m-item { height: 44px; border-radius: 12px; background: rgba(255,255,255,.05); }
.m-item.active { background: var(--grad); }
.m-main { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.m-hero { flex: 1; border-radius: 14px; background: linear-gradient(135deg, rgba(167,139,250,.35), rgba(96,165,250,.2)), repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 10px, transparent 10px 20px); }
.m-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.m-row div { height: 70px; border-radius: 12px; background: rgba(255,255,255,.05); }
.m-play {
  position: absolute; right: 40px; bottom: 120px;
  padding: 14px 44px; border-radius: 12px; font-weight: 800; letter-spacing: .1em;
  background: var(--grad); color: #0b0b14; box-shadow: 0 10px 30px -5px rgba(167,139,250,.7);
}

/* Sections */
.section { padding: 110px 0; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 1.1rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  padding: 30px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  transition: transform .25s, border-color .25s, background .25s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(167,139,250,.4); background: rgba(167,139,250,.06); }
.icon {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem;
  border-radius: 14px; background: rgba(167,139,250,.12); margin-bottom: 18px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--muted); }

/* Download */
.download-box {
  text-align: center; padding: 64px 40px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(167,139,250,.14), rgba(96,165,250,.08));
  border: 1px solid rgba(167,139,250,.25);
}
.download-box h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.download-box > p { color: var(--muted); margin-top: 8px; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.dl-btn {
  display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 22px 24px; border-radius: 16px;
  background: rgba(11,11,20,.6); border: 1px solid var(--border);
  transition: .25s;
}
.dl-btn:hover { border-color: var(--p1); transform: translateY(-4px); }
.dl-btn svg { color: var(--p1); flex-shrink: 0; }
.dl-btn strong { display: block; font-size: 1.1rem; }
.dl-btn span { color: var(--muted); font-size: .85rem; }
.dl-note { margin-top: 26px; color: var(--muted); font-size: .9rem; }

/* FAQ */
.faq {
  border: 1px solid var(--border); background: var(--card);
  border-radius: 14px; margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  padding: 20px 24px; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--p1); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 24px 20px; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* 404 */
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 20px; }
.notfound h1 { font-size: 7rem; line-height: 1; }

/* Responsive */
@media (max-width: 900px) {
  .grid, .dl-grid { grid-template-columns: 1fr 1fr; }
  .mockup-body { height: 280px; }
  .m-play { bottom: 100px; right: 24px; padding: 10px 28px; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(11,11,20,.97); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .nav-links a { padding: 16px 6%; border-top: 1px solid var(--border); }
  .nav-links.open { max-height: 300px; }
  .burger { display: block; }
  .nav-right .btn-sm { display: none; }
  .grid, .dl-grid { grid-template-columns: 1fr; }
  .stats { gap: 28px; }
  .mockup-body aside { display: none; }
  .download-box { padding: 44px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= v2 additions ================= */

/* Scroll progress */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100;
  background: var(--grad); box-shadow: 0 0 12px rgba(167,139,250,.8);
}

/* Floating cubes */
.cubes { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cubes i {
  position: absolute; bottom: -80px; display: block;
  width: 34px; height: 34px; border-radius: 6px;
  border: 1px solid rgba(167,139,250,.35);
  background: linear-gradient(135deg, rgba(167,139,250,.12), rgba(96,165,250,.05));
  animation: floatUp 22s linear infinite;
}
.cubes i:nth-child(1) { left: 6%;  animation-delay: 0s;   width: 26px; height: 26px; }
.cubes i:nth-child(2) { left: 18%; animation-delay: 6s;   animation-duration: 28s; }
.cubes i:nth-child(3) { left: 32%; animation-delay: 12s;  width: 18px; height: 18px; }
.cubes i:nth-child(4) { left: 47%; animation-delay: 3s;   animation-duration: 30s; width: 44px; height: 44px; }
.cubes i:nth-child(5) { left: 61%; animation-delay: 9s;   width: 22px; height: 22px; }
.cubes i:nth-child(6) { left: 74%; animation-delay: 15s;  animation-duration: 26s; }
.cubes i:nth-child(7) { left: 86%; animation-delay: 5s;   width: 30px; height: 30px; }
.cubes i:nth-child(8) { left: 94%; animation-delay: 18s;  width: 16px; height: 16px; }
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: .6; }
  100% { transform: translateY(-115vh) rotate(540deg); opacity: 0; }
}

/* Badge dot */
.badge { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* Big download button */
.btn-download { padding: 14px 30px 14px 24px; position: relative; overflow: hidden; }
.btn-download::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-100%); animation: shine 3.5s infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.btn-text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.btn-text b { font-size: 1.05rem; }
.btn-text small { font-size: .75rem; font-weight: 500; opacity: .75; }

.stats { gap: 56px; }
.stats div { align-items: center; }

/* Mockup v2 */
.mockup { transform: perspective(1400px) rotateX(8deg); transition: transform .6s ease; }
.mockup.tilt-off, .mockup:hover { transform: perspective(1400px) rotateX(0deg); }
.m-logo { width: 46px; height: 46px; border-radius: 12px; background: url("/assets/favicon.svg") center/cover; margin-bottom: 8px; }
.m-hero { position: relative; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.m-title { width: 46%; height: 22px; border-radius: 6px; background: rgba(255,255,255,.55); }
.m-sub { width: 30%; height: 12px; border-radius: 6px; background: rgba(255,255,255,.25); }
.m-row { grid-template-columns: repeat(4, 1fr); }
.m-bottom { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.m-select { padding: 12px 18px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.m-play { position: static; }

/* Section eyebrow */
.eyebrow {
  display: inline-block; margin-bottom: 12px; font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--p1);
}

/* Card glow follows mouse */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(167,139,250,.18), transparent 60%);
}
.card:hover::before { opacity: 1; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; }
.step {
  padding: 34px 28px; border-radius: var(--radius); text-align: center;
  background: var(--card); border: 1px solid var(--border);
}
.num {
  display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px;
  border-radius: 50%; font-size: 1.3rem; font-weight: 800; color: #0b0b14; background: var(--grad);
  box-shadow: 0 10px 30px -8px rgba(167,139,250,.7);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); }
.notice {
  display: flex; gap: 12px; align-items: flex-start; margin: 26px auto 0; max-width: 760px;
  padding: 16px 20px; border-radius: 14px;
  background: rgba(250,204,21,.07); border: 1px solid rgba(250,204,21,.25); color: #fde68a;
}

/* Download v2 */
.dl-btn { position: relative; }
.dl-btn .arrow { margin-left: auto; color: var(--muted); transition: .25s; }
.dl-btn:hover .arrow { color: var(--p1); transform: translateY(3px); }
.dl-btn.disabled { opacity: .5; cursor: not-allowed; }
.dl-btn.disabled:hover { transform: none; border-color: var(--border); }

/* CTA */
.cta-section { padding-top: 20px; }
.cta {
  text-align: center; padding: 70px 30px; border-radius: 28px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(167,139,250,.35), transparent 70%), var(--bg-2);
  border: 1px solid rgba(167,139,250,.25);
}
.cta h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.cta p { color: var(--muted); margin: 10px 0 30px; font-size: 1.1rem; }

/* Footer links */
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; margin: 6px 0; }
.footer-links a { color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 14px 22px; border-radius: 14px; font-weight: 600;
  background: var(--bg-2); border: 1px solid rgba(167,139,250,.4);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7);
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .m-row { grid-template-columns: repeat(2, 1fr); }
  .m-row div:nth-child(n+3) { display: none; }
}
@media (max-width: 720px) {
  .stats { gap: 26px; }
  .mockup { transform: none; }
  .m-select { display: none; }
  .cubes i:nth-child(n+5) { display: none; }
}
