:root {
  --bg-top: #1a1426;
  --bg-bottom: #0d0a17;
  --accent: #a854f7;
  --accent-glow: #c287fc;
  --accent-deep: #7d3aed;
  --ember: #f5c742;
  --ember-deep: #e88c3d;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-raised: #241f34;
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-active: rgba(194, 135, 252, 0.65);
  --text-primary: rgba(255, 255, 255, 0.94);
  --text-secondary: rgba(255, 255, 255, 0.62);
  --text-tertiary: rgba(255, 255, 255, 0.40);
  --max-width: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-glow); }
a:hover { color: var(--accent); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

header.site {
  padding: 22px 0;
  border-bottom: 1px solid var(--stroke);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
}

.wordmark .dot {
  color: var(--accent-glow);
}

nav.site a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-left: 22px;
}

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

main {
  padding: 64px 0 40px;
}

.hero {
  text-align: center;
  padding: 40px 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-glow);
  background: rgba(168, 84, 247, 0.14);
  border: 1px solid var(--stroke-active);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.lede {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
  box-shadow: 0 8px 24px rgba(168, 84, 247, 0.35);
}

.btn-primary:hover { color: #fff; opacity: 0.94; }

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--stroke);
}

.btn-secondary:hover { color: var(--text-primary); border-color: var(--stroke-active); }

.section {
  padding: 48px 0;
  border-top: 1px solid var(--stroke);
}

.section h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.section .section-sub {
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 560px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 22px;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-primary);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.badge .swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
}

footer.site {
  border-top: 1px solid var(--stroke);
  padding: 32px 0 48px;
  margin-top: 40px;
}

footer.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

footer.site nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  margin-right: 18px;
}

footer.site nav a:hover { color: var(--text-primary); }

.fine {
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Legal pages */
.legal h1 { font-size: 30px; margin-bottom: 4px; }
.legal .updated { color: var(--text-tertiary); font-size: 13px; margin-bottom: 36px; }
.legal h2 {
  font-size: 19px;
  margin: 36px 0 10px;
  color: var(--text-primary);
}
.legal p, .legal li {
  color: var(--text-secondary);
  font-size: 15px;
}
.legal ul { padding-left: 20px; }
.legal a { word-break: break-word; }

/* app.html redirect page */
.redirect-card {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 40px 32px;
}

.redirect-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent-deep), var(--ember-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 10px 30px rgba(168, 84, 247, 0.35);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.store-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 520px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  nav.site a { margin-left: 14px; }
}
