:root {
  --bg: #0b0b1e;
  --bg-2: #12122b;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #ecebfa;
  --muted: #a3a1c2;
  --violet: #a855f7;
  --indigo: #6366f1;
  --moon: #f3d9a4;
  --grad: linear-gradient(135deg, var(--violet), var(--indigo));
  --radius: 20px;
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

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

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }

.muted { color: var(--muted); }
.center { text-align: center; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Starry background */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(168, 85, 247, 0.18), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(99, 102, 241, 0.14), transparent 60%),
    var(--bg);
}
.sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff8, transparent),
    radial-gradient(1px 1px at 70% 20%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #fff7, transparent),
    radial-gradient(1px 1px at 85% 60%, #fff5, transparent),
    radial-gradient(1px 1px at 10% 85%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 55% 45%, #fff4, transparent),
    radial-gradient(1px 1px at 92% 90%, #fff6, transparent),
    radial-gradient(1px 1px at 30% 10%, #fff5, transparent);
  background-size: 420px 420px;
  opacity: 0.8;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 30px -10px rgba(168, 85, 247, 0.7);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 34px -10px rgba(168, 85, 247, 0.9); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn--small { padding: 9px 18px; font-size: 15px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 11, 30, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav__links a:not(.btn):hover { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
}
.hero h1 { font-size: clamp(40px, 6vw, 68px); }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 32px; }
.lead--narrow { max-width: 520px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }

.stats { display: flex; gap: 40px; margin: 0; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-family: var(--font-head); font-size: 32px; font-weight: 700; }
.stats dd { margin: 0; color: var(--muted); font-size: 14px; }

/* Lens visual */
.hero__visual { display: grid; place-items: center; }
.lens { position: relative; width: min(420px, 80vw); aspect-ratio: 1; }
.lens__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.lens__ring--1 { background: radial-gradient(circle, #1c1c3a 55%, #0e0e22 100%); box-shadow: 0 40px 120px -30px rgba(168, 85, 247, 0.5); }
.lens__ring--2 { inset: 9%; border: 2px dashed rgba(168, 85, 247, 0.35); animation: spin 40s linear infinite; }
.lens__ring--3 { inset: 16%; background: #08081a; border: 6px solid #22223f; }
.lens__glass {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #2a2357, #0b0b24 70%);
  box-shadow: inset 0 0 40px rgba(99, 102, 241, 0.45);
}
.lens__glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.18), transparent 40%);
}
.moon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background:
    radial-gradient(circle at 30% 35%, rgba(0, 0, 0, 0.12) 0 8%, transparent 9%),
    radial-gradient(circle at 62% 58%, rgba(0, 0, 0, 0.1) 0 12%, transparent 13%),
    radial-gradient(circle at 45% 75%, rgba(0, 0, 0, 0.08) 0 6%, transparent 7%),
    radial-gradient(circle at 40% 40%, #fff3d6, var(--moon) 60%, #c9a865);
  box-shadow: 0 0 30px rgba(243, 217, 164, 0.5);
}
.lens__readout {
  position: absolute;
  left: 50%;
  bottom: 4%;
  translate: -50% 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--grad);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 72px;
  text-align: center;
}
@keyframes spin { to { rotate: 360deg; } }

/* Sections */
.section { padding: 88px 0; }
.section__title { font-size: clamp(30px, 4vw, 44px); }

/* Featured */
.featured__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.04) 60%), var(--bg-2);
  border: 1px solid var(--border);
}
.app-head { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.app-head h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 4px; }
.app-head p { margin: 0; }
.app-icon { border-radius: 22%; flex-shrink: 0; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.app-icon--lg { width: 96px; height: 96px; }

.rating { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px !important; font-size: 15px; }
.stars {
  --pct: calc(var(--r) / 5 * 100%);
  display: inline-block;
  font-size: 16px;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #fbbf24 var(--pct), rgba(255, 255, 255, 0.2) var(--pct));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stars::before { content: "★★★★★"; }

.features { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 12px; }
.features li { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.features span {
  flex-shrink: 0;
  width: 52px;
  padding: 4px 0;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--violet);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px 10px 18px;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.1;
  transition: transform 0.2s, border-color 0.2s;
}
.store-badge:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.5); }
.store-badge small { display: block; font-size: 11px; font-weight: 500; font-family: var(--font-body); }

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  align-self: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.shots img {
  width: 220px;
  height: auto;
  flex-shrink: 0;
  border-radius: 18px;
  border: 1px solid var(--border);
  scroll-snap-align: start;
}

/* App grid */
.app-grid {
  list-style: none;
  padding: 0;
  margin: 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.app-grid a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  height: 100%;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.app-grid a:hover { background: var(--surface-2); border-color: rgba(168, 85, 247, 0.4); transform: translateY(-2px); }
.app-grid .app-icon { width: 60px; height: 60px; }
.app-grid strong { display: block; font-size: 15px; line-height: 1.3; }
.app-grid small { color: var(--muted); font-size: 13px; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0 56px; }
.pillar {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.pillar h3 { font-size: 20px; }
.pillar p { color: var(--muted); margin: 0; }
.pillar__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad);
  margin-bottom: 20px;
}
.pillar__icon svg { width: 24px; height: 24px; fill: #fff; }

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.steps li { padding: 24px; display: flex; flex-direction: column; gap: 2px; }
.steps li + li { border-left: 1px solid var(--border); }
.steps span { font-family: var(--font-head); font-weight: 700; color: var(--violet); font-size: 14px; }
.steps small { color: var(--muted); font-size: 14px; }

/* CTA */
.cta {
  text-align: center;
  padding: 72px 32px;
  border-radius: 28px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(168, 85, 247, 0.3), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border);
}
.cta h2 { font-size: clamp(28px, 4vw, 42px); }
.cta p { color: var(--muted); max-width: 520px; margin: 0 auto 28px; }
.cta .btn { word-break: break-all; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; translate: 0 24px; transition: opacity 0.7s ease, translate 0.7s ease; }
.reveal.is-visible { opacity: 1; translate: 0 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero__grid, .featured__card { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .lens { width: min(320px, 72vw); }
  .featured__card { padding: 32px; }
  .pillars { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(3) { border-left: 0; }
  .steps li:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links a:not(.btn) { display: none; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 64px 0; }
  .featured__card { padding: 24px 20px; gap: 32px; }
  .app-head { flex-direction: column; align-items: flex-start; }
  .app-icon--lg { width: 80px; height: 80px; }
  .shots img { width: 180px; }
  .stats { gap: 28px; }
  .stats dt { font-size: 26px; }
  .app-grid { grid-template-columns: 1fr; }
  .cta { padding: 48px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lens__ring--2 { animation: none; }
  .reveal { opacity: 1; translate: 0 0; transition: none; }
  .btn, .app-grid a, .store-badge { transition: none; }
}
