:root {
  --space-top: #1e1248;
  --space-mid: #2a1860;
  --space-deep: #120a2e;
  --surface: #140f24;
  --surface-2: #1c1630;
  --line: rgba(255,255,255,0.08);
  --text: #f4f2ff;
  --text-dim: rgba(244,242,255,0.72);
  --text-muted: rgba(244,242,255,0.45);
  --blue: #6ec8ff;
  --blue-hot: #4db8ff;
  --gold: #ffc100;
  --gold-dim: #c9a227;
  --ribbon: #d2554a;
  --ribbon-text: #fff;
  --planet: #3d7fd4;
  --sans: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--surface);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── top ribbon ── */
.ribbon {
  background: var(--ribbon);
  color: var(--ribbon-text);
  text-align: center;
  font-size: 0.82rem;
  padding: 9px 16px;
}
.ribbon a { color: #fff; font-weight: 600; }

/* ── cosmic hero ── */
.cosmos {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--space-top) 0%, var(--space-mid) 55%, #241454 100%);
  min-height: 520px;
  padding-bottom: 90px;
}
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 250px 160px, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 400px 60px, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 550px 140px, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 680px 40px, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 820px 120px, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 950px 200px, rgba(255,255,255,.5), transparent);
  background-size: 1000px 240px;
  opacity: 0.7;
  pointer-events: none;
}
.moon {
  position: absolute;
  left: 4%;
  top: 28%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8dce8, #8a909e 55%, #5c6270);
  box-shadow: inset -12px -8px 20px rgba(0,0,0,.25);
  opacity: 0.85;
}
.moon::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(80,85,95,.35);
  top: 28%; left: 22%;
  box-shadow: 22px 12px 0 -2px rgba(80,85,95,.25), 40px 32px 0 -4px rgba(80,85,95,.2);
}
.planet-ring {
  position: absolute;
  right: 6%;
  top: 22%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #9b6fd4, #5a3d8a);
  box-shadow: inset -6px -4px 12px rgba(0,0,0,.3);
}
.planet-ring::before {
  content: "";
  position: absolute;
  left: -18px; top: 50%;
  width: 106px; height: 22px;
  border: 2px solid rgba(180,140,255,.45);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-18deg);
}
.horizon {
  position: absolute;
  left: 50%;
  bottom: -120px;
  width: 140%;
  height: 260px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, #5eb0ff 0%, #3d7fd4 25%, #2a5a9e 50%, transparent 72%);
  opacity: 0.95;
  pointer-events: none;
}

.cosmos-inner {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* nav */
.cosmos-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 36px;
  flex-wrap: wrap;
}
.cosmos-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cosmos-brand:hover { text-decoration: none; opacity: 0.92; }
.cosmos-brand img { height: 36px; width: auto; }
.cosmos-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cosmos-links a {
  color: rgba(255,255,255,.82);
  font-size: 0.88rem;
  padding: 7px 12px;
  border-radius: 3px;
  text-decoration: none;
}
.cosmos-links a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.cosmos-social {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.social-item {
  text-align: center;
  color: rgba(255,255,255,.75);
  font-size: 0.72rem;
  text-decoration: none;
}
.social-item:hover { color: #fff; text-decoration: none; }
.social-item svg { display: block; margin: 0 auto 4px; width: 18px; height: 18px; fill: currentColor; }

/* hero copy */
.cosmos-hero {
  text-align: center;
  padding: 20px 0 0;
  max-width: 680px;
  margin: 0 auto;
}
.cosmos-hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
  color: #fff;
}
.cosmos-hero .sub {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-dl:hover {
  background: rgba(255,255,255,.16);
  border-color: #fff;
  text-decoration: none;
}
.btn-dl svg { width: 18px; height: 18px; fill: currentColor; }
.version-line {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.version-line strong { color: var(--text-dim); font-weight: 600; }
.pill-new {
  display: inline-block;
  background: #7b5cff;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.04em;
}

/* gradient divider + chevron */
.divider {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-hot), #a855f7, transparent);
  max-width: 1080px;
  margin: 0 auto;
}
.divider::after {
  content: "⌄";
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  line-height: 32px;
  text-align: center;
  background: var(--surface);
  color: var(--blue);
  font-size: 1.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
}

/* sub nav */
.subnav-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.subnav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.subnav a {
  display: block;
  padding: 14px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* content sections */
.main { background: var(--surface); }
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px;
  border-bottom: 1px solid var(--line);
}
.section h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 300;
  margin-bottom: 36px;
  color: var(--text);
}
.section-alt { background: var(--surface-2); }

/* why block — grav award style */
.why-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  text-align: center;
}
@media (max-width: 760px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-center { order: -1; }
}
.why-side {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.why-side em {
  font-style: normal;
  color: var(--blue);
  font-weight: 600;
}
.why-center {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.award {
  width: 100px;
  padding: 16px 10px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
}
.award::before {
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: inherit;
}
.award-red {
  background: linear-gradient(180deg, #e74c3c, #c0392b);
  color: #fff;
  border-bottom: 6px solid #922b21;
}
.award-blue {
  background: linear-gradient(180deg, #3498db, #2980b9);
  color: #fff;
  border-bottom: 6px solid #1f618d;
}
.award span { display: block; font-size: 1.4rem; margin-bottom: 4px; }

/* feature columns */
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 768px) { .cols-3 { grid-template-columns: 1fr; } }
.col h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gold);
}
.col p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; }

/* code block */
.code-panel {
  background: #0a0812;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #b8e986;
  overflow-x: auto;
}

/* table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
td { color: var(--text-dim); }
td:first-child { color: var(--text); }
.hi { color: var(--gold); font-weight: 600; }
.ok { color: #6dd47e; }

/* screenshots */
.shot-wrap {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #0e0e10;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #17171a;
  border-bottom: 1px solid var(--line);
}
.shot-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #3a3a42;
}
.shot-bar i:nth-child(1) { background: #5c4a32; }
.shot-bar span {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.shot-cap {
  padding: 14px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.shot-cap strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.shot-cap span { font-size: 0.84rem; color: var(--text-dim); }
.shots-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
@media (max-width: 700px) { .shots-2 { grid-template-columns: 1fr; } }

/* footer */
.site-foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-ph {
  display: inline-flex;
  padding: 14px 28px;
  background: #da552f;
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
}
.btn-ph:hover { background: #e06038; text-decoration: none; }

.ph-hero-extra { padding-bottom: 40px; }
