:root {
  --bg: #03060f;
  --bg-2: #060b1a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --border: rgba(56, 189, 248, 0.22);
  --text: #eaf2ff;
  --muted: #8da4c4;
  --accent: #38bdf8;
  --accent-2: #2563eb;
  --accent-3: #0ea5e9;
  --grad: linear-gradient(100deg, #7dd3fc 0%, #2563eb 48%, #0ea5e9 100%);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

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

/* ---------- Background ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 120% at 50% -10%, #0a1530 0%, #03060f 55%); }
.orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5; animation: float 20s ease-in-out infinite; }
.orb-1 { width: 560px; height: 560px; background: #1d4ed8; top: -140px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: #0ea5e9; bottom: -160px; right: -80px; animation-delay: -7s; }
.orb-3 { width: 420px; height: 420px; background: #38bdf8; top: 38%; left: 58%; animation-delay: -13s; opacity: 0.32; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 35%, transparent 100%);
}
.noise {
  position: absolute; inset: 0; opacity: 0.035; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(36px, -46px) scale(1.1); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 6vw;
  background: rgba(3, 6, 15, 0.55);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.18rem; font-family: "Space Grotesk", "Inter", sans-serif; }
.logo { display: inline-flex; filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.6)); }
.brand-name { letter-spacing: -0.02em; }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.nav-links { display: flex; gap: 28px; font-weight: 500; color: var(--muted); }
.nav-links a { position: relative; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width 0.2s ease;
}
.nav-links a:hover::after { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; border-radius: 999px;
  background: var(--grad); color: #fff; cursor: pointer;
  border: none; position: relative; overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}
.btn::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg); transition: left 0.5s ease;
}
.btn:hover::before { left: 130%; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 42px rgba(37, 99, 235, 0.55); }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 120px 6vw 60px; max-width: 1000px; margin: 0 auto; position: relative; }
.tag {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); margin-bottom: 26px;
}
.hero-title {
  font-size: clamp(2.7rem, 6.4vw, 4.9rem); font-weight: 900; line-height: 1.04;
  letter-spacing: -0.03em; margin-bottom: 22px; font-family: "Space Grotesk", "Inter", sans-serif;
}
.grad {
  background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero-sub { font-size: clamp(1rem, 2vw, 1.24rem); color: var(--muted); max-width: 660px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badges span {
  font-size: 0.85rem; color: var(--muted); padding: 8px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.hero-spark {
  position: absolute; left: 50%; top: 40px; width: 320px; height: 320px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(56,189,248,0.18), transparent 60%); filter: blur(20px); z-index: -1;
}

/* ---------- Trust ---------- */
.trust {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--muted); font-weight: 500; padding: 10px 6vw 30px; flex-wrap: wrap;
}
.stars { color: #38bdf8; font-size: 1.1rem; letter-spacing: 2px; text-shadow: 0 0 12px rgba(56,189,248,0.6); }

/* ---------- Sections ---------- */
.section { padding: 84px 6vw; max-width: 1180px; margin: 0 auto; }
.section-title { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; text-align: center; font-family: "Space Grotesk", "Inter", sans-serif; }
.section-sub { text-align: center; color: var(--muted); margin: 14px auto 48px; max-width: 640px; }

/* ---------- Preview / GUI mock ---------- */
.preview { max-width: 1100px; }
.gui-mock {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--border);
  background: rgba(6, 11, 26, 0.7); box-shadow: 0 30px 80px rgba(2, 6, 18, 0.7), 0 0 0 1px rgba(56,189,248,0.06);
  backdrop-filter: blur(8px);
}
.gui-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(13, 22, 44, 0.9); border-bottom: 1px solid var(--border); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.gui-title { margin-left: 10px; font-weight: 700; font-size: 0.9rem; color: var(--muted); letter-spacing: 0.02em; }
.gui-body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }
.gui-col { background: rgba(6, 11, 26, 0.85); padding: 18px 16px; }
.gui-col h5 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 8px; font-size: 0.9rem; color: var(--muted); margin-bottom: 4px; transition: background 0.15s ease; }
.row:hover { background: var(--surface); color: var(--text); }
.sw { width: 34px; height: 18px; border-radius: 999px; background: rgba(255,255,255,0.12); position: relative; transition: background 0.2s ease; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
.row.on .sw { background: var(--grad); }
.row.on .sw::after { transform: translateX(16px); }
.row.on { color: var(--text); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card, .mode {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; position: relative; overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.card::before, .mode::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0; transition: opacity 0.18s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover, .mode:hover { transform: translateY(-4px); background: var(--surface-2); }
.card:hover::before, .mode:hover::before { opacity: 0.8; }
.card-icon { font-size: 1.8rem; margin-bottom: 14px; }
.card h3, .mode h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.card p, .mode p { color: var(--muted); font-size: 0.95rem; }
.mode h4 { color: var(--accent); }
.mode p { font-size: 0.85rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1000px; margin: 40px auto; padding: 40px 6vw;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { text-align: center; }
.stat strong { display: block; font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; font-family: "Space Grotesk", sans-serif; }
.stat span { color: var(--muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Download ---------- */
.download { display: flex; justify-content: center; }
.download-box {
  width: 100%; max-width: 720px; text-align: center; position: relative;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(3, 6, 15, 0.25));
  border: 1px solid var(--border); border-radius: 28px; padding: 56px 40px; overflow: hidden;
}
.download-box::before {
  content: ""; position: absolute; top: -60%; left: -10%; width: 120%; height: 120%;
  background: radial-gradient(circle, rgba(56,189,248,0.18), transparent 55%); pointer-events: none;
}
.download-box > * { position: relative; }
.download-box p { color: var(--muted); margin: 16px 0; }
.download-box code, .note code { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-size: 0.9em; color: var(--accent); }
.reqs { list-style: none; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 20px 0 30px; }
.reqs li { font-size: 0.9rem; color: var(--muted); padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.note { font-size: 0.82rem; margin-top: 18px; opacity: 0.75; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; transition: border-color 0.15s ease; }
.faq details[open] { border-color: rgba(56, 189, 248, 0.55); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); padding: 0 0 16px; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 50px 6vw; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.footer .brand { justify-content: center; margin-bottom: 14px; }

/* ---------- Modules browser ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.tab {
  padding: 9px 18px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: all 0.15s ease;
}
.tab:hover { color: var(--text); border-color: rgba(56, 189, 248, 0.5); }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }

.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.module-card {
  text-align: left; padding: 16px 18px; border-radius: 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: flex; flex-direction: column; gap: 4px;
}
.module-card:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, 0.6); background: var(--surface-2); }
.module-card .mc-name { font-weight: 700; font-size: 0.98rem; }
.module-card .mc-cat { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.module-card .mc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); display: inline-block; margin-right: 8px; vertical-align: middle; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(2, 6, 18, 0.7); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 460px; padding: 34px 32px;
  background: rgba(8, 14, 30, 0.95); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 30px 90px rgba(2, 6, 18, 0.8);
  transform: translateY(12px) scale(0.98); opacity: 0; transition: transform 0.22s ease, opacity 0.22s ease;
}
.modal.open .modal-card { transform: translateY(0) scale(1); opacity: 1; }
.modal-close {
  position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: all 0.15s ease;
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }
.modal-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.modal-card h3 { font-size: 1.7rem; font-weight: 800; margin: 8px 0 14px; font-family: "Space Grotesk", sans-serif; }
.modal-card p { color: var(--muted); font-size: 1rem; line-height: 1.6; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gui-body { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .grid-3, .grid-4, .gui-body, .module-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
