:root {
  --void: #0a0c1f;
  --nebula: #151a3d;
  --planet: #a5b4ff;
  --ring-teal: #5eead4;
  --ring-violet: #c792ea;
  --star: #e9ecff;
  --dim: #9097c4;
  --faint: #5b6194;
  --line: rgba(165, 180, 255, 0.14);
  --display: 'Unbounded', 'Hanken Grotesk', system-ui, sans-serif;
  --text: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 78% -10%, #1d2257 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 40%, #14183f 0%, transparent 60%), var(--void);
  color: var(--star);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ring-teal); outline-offset: 3px; border-radius: 6px; }
code { font: 0.88em var(--mono); color: var(--star); }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: linear-gradient(var(--void) 30%, rgba(10, 12, 31, 0));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px var(--display); letter-spacing: 0.01em; }
.nav nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav nav a { text-decoration: none; color: var(--dim); font-weight: 500; font-size: 15px; transition: color 0.2s; }
.nav nav a:hover { color: var(--star); }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; text-decoration: none;
  font: 600 16px var(--text); color: #0a0c1f;
  background: linear-gradient(100deg, #b4c0ff 0%, #a5b4ff 40%, #8be9d6 100%);
  box-shadow: 0 10px 40px -10px rgba(139, 155, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 50px -10px rgba(139, 155, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn-quiet { color: var(--dim); font-weight: 500; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 5px; }
.btn-quiet:hover { color: var(--star); text-decoration-color: var(--star); }
.os-glyph { width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.os-glyph:not([style]) { display: none; }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100vh - 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 24px; padding: 20px var(--gutter) 60px;
}
.hero h1 {
  margin: 0; font: 700 clamp(40px, 5.6vw, 82px)/1.02 var(--display); letter-spacing: -0.035em; max-width: 12ch;
  text-wrap: balance;
}
.lede { max-width: 36em; margin: 28px 0 34px; color: var(--dim); font-size: clamp(17px, 1.35vw, 19px); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.cta-note { margin: 18px 0 0; color: var(--faint); font-size: 14.5px; }
.hero-planet { position: relative; aspect-ratio: 1; width: min(100%, 640px); justify-self: center; }
.planet-svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 30px 80px rgba(75, 57, 214, 0.35)); }
.planet-halo { animation: breathe 9s ease-in-out infinite; transform-origin: center; }
.hero-planet:hover .planet-halo { animation-duration: 4s; }
@keyframes breathe {
  50% { opacity: 0.65; transform: scale(1.06); }
}

/* ---------- product shot ---------- */
.shot { position: relative; padding: 40px var(--gutter) 120px; display: flex; justify-content: center; }
.window {
  position: relative; z-index: 1; margin: 0; width: min(1240px, 100%); border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(165, 180, 255, 0.18);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.8), 0 0 0 8px rgba(165, 180, 255, 0.03), 0 0 120px -20px rgba(93, 80, 230, 0.45);
}
.shot-orbit {
  position: absolute; left: 50%; top: 48%; width: min(1500px, 125vw); aspect-ratio: 3.2; transform: translate(-50%, -50%) rotate(-6deg);
  border: 1px solid var(--line); border-radius: 50%; pointer-events: none;
}
.mini-planet {
  position: absolute; left: 0; top: 0; border-radius: 50%; offset-path: ellipse(50% 50% at 50% 50%); offset-rotate: 0deg;
  animation: around 46s linear infinite;
}
.mp-1 {
  width: 34px; height: 34px; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, #ffd2a8 30%, #e2475f 75%, #5e1424);
  box-shadow: 0 0 30px rgba(255, 143, 160, 0.45);
}
.mp-2 {
  width: 20px; height: 20px; animation-delay: -23s;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, #99f6e4 40%, #0f9b8e);
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.55);
}
@keyframes around { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* ---------- features: orbital system ---------- */
.system { position: relative; height: 560vh; }
.system-stage {
  position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: 40px; padding: 0 var(--gutter);
}
.system-visual { position: relative; aspect-ratio: 1; width: min(100%, 620px); justify-self: center; }
.orbit-path {
  position: absolute; left: 4%; right: 4%; top: 31%; bottom: 31%; border-radius: 50%;
  border: 1.5px solid transparent;
  background: linear-gradient(var(--void), var(--void)) padding-box,
    linear-gradient(90deg, rgba(94, 234, 212, 0.55), rgba(157, 184, 255, 0.35), rgba(199, 146, 234, 0.55)) border-box;
  transform: rotate(-14deg);
}
.core { position: absolute; left: 50%; top: 50%; width: 46%; transform: translate(-50%, -50%); z-index: 10; }
.core img { width: 100%; filter: drop-shadow(0 20px 60px rgba(91, 75, 224, 0.45)); }
.moons { position: absolute; inset: 0; }
.moon-body {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center; color: #0a0c1f; cursor: pointer; border: 0; padding: 0;
  background: radial-gradient(circle at 34% 28%, #fff 0 9%, var(--c) 46%, color-mix(in oklab, var(--c), #05061a 62%) 100%);
  box-shadow: 0 0 34px -4px var(--c);
  transition: box-shadow 0.3s, filter 0.3s;
  will-change: transform;
}
.moon-body svg { width: 42%; height: 42%; opacity: 0.85; }
.moon-body[aria-current='true'] { box-shadow: 0 0 0 4px rgba(233, 236, 255, 0.12), 0 0 60px 2px var(--c); }
.system-copy { position: relative; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; }
/* every feature sits in the same grid cell: the list is as tall as the longest one */
.feature-list li {
  grid-area: 1 / 1; max-width: 34em; opacity: 0; transform: translateY(14px); visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}
.feature-list li.active { transition: opacity 0.4s ease 0.12s, transform 0.4s ease 0.12s, visibility 0s; visibility: visible; }
.feature-list li.active { opacity: 1; transform: none; pointer-events: auto; }
.feature-list h2 { margin: 0 0 18px; font: 600 clamp(28px, 3vw, 44px)/1.08 var(--display); letter-spacing: -0.025em; color: var(--accent, var(--star)); text-wrap: balance; }
.feature-list p { margin: 0; color: var(--dim); font-size: clamp(17px, 1.3vw, 19px); }
.progress { display: flex; gap: 8px; margin-top: 32px; }
.progress button { width: 28px; height: 4px; border-radius: 2px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: background 0.3s, width 0.3s; }
.progress button[aria-current='true'] { width: 48px; background: var(--accent, var(--star)); }

/* live status replica, same behaviour as the app */
.status-demo { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.demo-tab {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 10px 10px 4px 4px;
  background: #10132c; box-shadow: inset 0 2px 0 rgba(165, 180, 255, 0.5); font-size: 14px;
}
.demo-tab b { font-weight: 500; }
.demo-tab em { font-style: normal; font-weight: 700; font-size: 12.5px; color: #f5c26b; }
.ind { position: relative; width: 20px; height: 20px; display: inline-block; }
.ind i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 10%, #a5b4ff 38%, #5b4be0 80%); box-shadow: 0 0 6px rgba(139, 155, 255, 0.6); }
.ind s, .ind u { position: absolute; left: 50%; top: 50%; width: 19px; height: 7px; margin: -3.5px 0 0 -9.5px; transform: rotate(-22deg); }
.ind s { border-radius: 50%; border: 1.3px solid rgba(157, 184, 255, 0.85); border-left-color: #5eead4; }
.ind u::after {
  content: ''; position: absolute; width: 4.5px; height: 4.5px; margin: -2.25px; border-radius: 50%; background: #99f6e4; box-shadow: 0 0 4px #5eead4;
  offset-path: path('M 0 3.5 A 9.5 3.5 0 1 0 19 3.5 A 9.5 3.5 0 1 0 0 3.5'); offset-rotate: 0deg; animation: around 0.7s linear infinite;
}
.ind.deep i { background: radial-gradient(circle at 35% 30%, #fff 0 10%, #ffb4c0 32%, #e2475f 75%); box-shadow: 0 0 6px rgba(255, 107, 129, 0.6); }
.ind.deep s { border-color: rgba(255, 143, 160, 0.85); border-left-color: #ffb478; }
.ind.deep u::after { background: #ffd2a8; box-shadow: 0 0 4px #ff8fa0; animation-duration: 4.5s; }
.ind.waiting i { width: 8px; height: 8px; margin: -4px; background: #f5c26b; box-shadow: 0 0 9px rgba(245, 194, 107, 0.9); animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 2px rgba(245, 194, 107, 0.4); } }

/* ---------- download ---------- */
.download { padding: 120px var(--gutter) 100px; max-width: 1180px; margin: 0 auto; }
.download-title { margin: 0; font: 700 clamp(34px, 4.4vw, 60px)/1.05 var(--display); letter-spacing: -0.03em; }
.download-sub { margin: 14px 0 44px; color: var(--dim); font-size: 18px; }
.detected {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 26px 30px; margin-bottom: 40px;
  border-radius: 22px; background: linear-gradient(120deg, rgba(139, 155, 255, 0.14), rgba(94, 234, 212, 0.07));
  border: 1px solid rgba(165, 180, 255, 0.22);
}
.detected-for { margin: 0; font: 600 21px var(--display); letter-spacing: -0.01em; }
.detected-file { margin: 4px 0 0; color: var(--dim); font-size: 15px; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.platform { padding: 28px 28px 8px 0; }
.platform + .platform { padding-left: 28px; border-left: 1px solid var(--line); }
.platform h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 600 19px var(--display); }
.platform ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.platform a {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; margin: 0 -12px; border-radius: 10px;
  text-decoration: none; color: var(--star); transition: background 0.2s;
}
.platform a:hover { background: rgba(165, 180, 255, 0.08); }
.platform a[data-size]::after { content: attr(data-size); color: var(--faint); font-size: 14px; white-space: nowrap; }
.platform a.mine { background: rgba(94, 234, 212, 0.1); }
.first-run { margin: 16px 0 0; color: var(--faint); font-size: 14px; line-height: 1.5; }

.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 36px var(--gutter) 48px;
  border-top: 1px solid var(--line); color: var(--faint); font-size: 14.5px;
}
.foot span { margin-right: auto; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--star); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 30px; }
  .hero-planet { order: -1; width: min(78vw, 420px); }
  .hero h1 { max-width: 14ch; }
  .shot { padding-bottom: 70px; }
  .system { height: auto; }
  .system-stage { position: static; height: auto; grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .system-visual { display: none; }
  .system-copy { min-height: 0; }
  .feature-list { display: grid; gap: 44px; }
  .feature-list li { grid-area: auto; opacity: 1; transform: none; visibility: visible; }
  .progress { display: none; }
  .detected { grid-template-columns: 1fr; text-align: left; }
  .detected img { width: 52px; }
  .platforms { grid-template-columns: 1fr; }
  .platform, .platform + .platform { padding: 24px 0 8px; border-left: 0; }
  .platform + .platform { border-top: 1px solid var(--line); }
  .nav nav a:not(:last-child) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .planet-halo, .mini-planet, .ind u::after, .ind.waiting i { animation: none; }
  .feature-list li { transition: none; }
}
