:root {
  --bg: #0a0a14;
  --bg-soft: #11111e;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f1f1f6;
  --text-dim: #a4a4b8;
  --text-mute: #6b6b80;
  --accent: #7c5cff;
  --accent-2: #b14bff;
  --accent-glow: rgba(124, 92, 255, 0.45);
  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- background aurora ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(1200px 800px at 80% -20%, rgba(177, 75, 255, 0.18), transparent 60%),
              radial-gradient(900px 600px at -10% 30%, rgba(124, 92, 255, 0.16), transparent 60%),
              var(--bg);
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
}
.aurora-1 { width: 520px; height: 520px; top: -120px; left: -120px; background: #7c5cff; }
.aurora-2 { width: 460px; height: 460px; top: 40%; right: -100px; background: #b14bff; opacity: 0.4; }
.aurora-3 { width: 380px; height: 380px; bottom: -120px; left: 40%; background: #5cd0ff; opacity: 0.18; }
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 32px;
  max-width: var(--maxw);
  margin: 0 auto;
  backdrop-filter: blur(14px);
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,20,0.85), rgba(10,10,20,0.5) 70%, transparent);
  z-index: -1;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.foot-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  color: var(--text-dim);
  margin: auto;
}
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--text); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.lang-btn[data-active="true"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

/* ---------- hero ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

.hero {
  padding: 80px 0 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
  font-family: 'JetBrains Mono', monospace;
}
.title {
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 22px;
  max-width: 900px;
}
.title .grad {
  background: linear-gradient(135deg, #b14bff 10%, #7c5cff 50%, #5cd0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 48px;
}

/* ---------- download card ---------- */
.download-card {
  width: 100%;
  max-width: 760px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(8px);
  position: relative;
  box-shadow: 0 30px 80px -30px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.05) inset;
}
.dl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.dl-head h2 {
  font-size: 22px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dl-sub {
  color: var(--text-mute);
  font-size: 14px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
}
.tab:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.tab[data-active="true"] {
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(177,75,255,0.18));
  border-color: rgba(124,92,255,0.5);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(124,92,255,0.35), 0 8px 24px -8px var(--accent-glow);
}
.tab[data-soon="true"]::after {
  content: attr(data-soon-label);
  position: absolute;
  top: -8px; right: -6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-2);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.dl-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .15s;
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 16px 40px -10px var(--accent-glow); }
.btn-primary[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--text-mute);
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}
.note { color: var(--text-mute); font-size: 13px; }

/* ---------- android arch selector ---------- */
.arch-select {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.arch-select[hidden] { display: none; }
.arch-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 158px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .18s;
}
.arch-opt:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.arch-opt[data-active="true"] {
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(177,75,255,0.18));
  border-color: rgba(124,92,255,0.5);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(124,92,255,0.35), 0 8px 24px -8px var(--accent-glow);
}
.arch-title { font-size: 14px; font-weight: 600; }
.arch-sub { font-size: 11px; color: var(--text-mute); }
.arch-opt[data-active="true"] .arch-sub { color: rgba(255,255,255,0.72); }

/* ---------- sections ---------- */
.section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.02em;
  font-weight: 700;
  text-align: center;
  margin: 0 0 48px;
}

.features { padding: 100px 0 60px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .2s, border-color .2s, background .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(124,92,255,0.25), rgba(177,75,255,0.18));
  border: 1px solid rgba(124,92,255,0.35);
  border-radius: 12px;
  font-size: 22px;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- steps ---------- */
.how { padding: 80px 0; }
.steps {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.steps li {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.1em;
}
.steps h3 { font-size: 18px; margin: 0 0 8px; font-weight: 600; }
.steps p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---------- faq ---------- */
.faq { padding: 80px 0; }
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq details {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 22px;
  transition: background .15s, border-color .15s;
}
.faq details[open] { background: var(--surface-2); border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px;
  color: var(--accent);
  font-weight: 300;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- CTA ---------- */
.cta {
  margin: 80px 0 100px;
  padding: 64px 32px;
  text-align: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 20%, rgba(124,92,255,0.35), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(177,75,255,0.3), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
}
.cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.cta p { margin: 0 0 28px; color: var(--text-dim); }
.btn-cta { padding: 16px 32px; font-size: 16px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 32px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text-mute);
  font-size: 13px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(3, 1fr); }
  main { padding: 0 20px; }
  .topbar { padding: 16px 20px; }
  .download-card { padding: 22px; }
  .hero { padding: 56px 0 40px; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(2, 1fr); }
  .dl-action { flex-direction: column; align-items: stretch; }
  .btn-primary { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* iOS / TestFlight modal */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 12, 0.7);
  backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 30px 24px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-card h3 { margin: 0 0 8px; font-size: 20px; color: var(--text); }
.modal-sub { margin: 0 0 20px; font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.qr-wrap {
  width: 220px;
  height: 220px;
  margin: 0 auto 20px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.qr-wrap img { width: 100%; height: 100%; display: block; }
.modal-cta { width: 100%; justify-content: center; margin-bottom: 12px; }
.modal-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-mute);
  text-decoration: none;
  word-break: break-all;
}
.modal-link:hover { color: var(--accent); }
