:root {
  --bg: #0b0918;
  --bg2: #141029;
  --card: #1a1533;
  --border: #2c2550;
  --text: #f2f0ff;
  --muted: #a9a3c9;
  --accent: #7c5cff;
  --accent2: #b3a3ff;
  --good: #3ddc97;
  --radius: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(1200px 700px at 50% -10%, #2a1d6b 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent2); }
a:hover { color: #fff; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---- nav */
nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
nav .links { display: flex; gap: 22px; font-size: 15px; }
nav .links a { color: var(--muted); text-decoration: none; }
nav .links a:hover { color: var(--text); }

/* ---- hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 40px 0 70px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(61, 220, 151, 0.12); border: 1px solid rgba(61, 220, 151, 0.35);
  color: var(--good); font-size: 14px; font-weight: 600;
}
h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.05; letter-spacing: -0.03em; margin: 18px 0 18px; }
h1 .grad { background: linear-gradient(90deg, var(--accent2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 20px; color: var(--muted); max-width: 34ch; margin: 0 0 30px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 16px; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: linear-gradient(90deg, var(--accent), #5b3fd9); color: #fff; box-shadow: 0 10px 30px rgba(124, 92, 255, .35); }
.btn.ghost { border: 1px solid var(--border); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn small { font-weight: 500; opacity: .75; }

/* ---- buddy scene */
.scene { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.scene svg { width: 100%; height: 100%; overflow: visible; }
.buddy { animation: rise 3.2s ease-in-out infinite; transform-origin: 50% 100%; transform-box: fill-box; }
.eyes { animation: blink 4.5s infinite; transform-origin: center; transform-box: fill-box; }
.star { animation: twinkle 3s ease-in-out infinite; }
.star:nth-child(2n) { animation-delay: 1.1s; }
.star:nth-child(3n) { animation-delay: 2.1s; }
@keyframes rise { 0%, 100% { transform: translateY(6px); } 50% { transform: translateY(-10px); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---- sections */
section { padding: 60px 0; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 34px; max-width: 60ch; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: linear-gradient(180deg, var(--card), var(--bg2)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card .ic {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(124, 92, 255, .16); color: var(--accent2); margin-bottom: 14px;
}
.card .ic svg { width: 24px; height: 24px; fill: currentColor; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- offline band */
.offline {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: linear-gradient(135deg, rgba(61, 220, 151, .1), rgba(124, 92, 255, .08));
  border: 1px solid rgba(61, 220, 151, .3); border-radius: 28px; padding: 36px;
}
.offline .shield { width: 84px; height: 84px; color: var(--good); }
.offline ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.offline li { color: var(--muted); font-size: 15px; }
.offline li::before { content: "✓"; color: var(--good); font-weight: 700; margin-right: 8px; }

/* ---- versions */
.versions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.version h3 { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 8px; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(124, 92, 255, .2); color: var(--accent2); }
.pill.green { background: rgba(61, 220, 151, .15); color: var(--good); }
.version p { color: var(--muted); margin: 0 0 18px; }

/* ---- footer */
footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 30px 0 50px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
footer a { color: var(--muted); }

/* ---- long text (privacy) */
.doc { max-width: 720px; margin: 0 auto; padding: 30px 20px 40px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); }
.doc .meta { color: var(--muted); margin-top: -6px; }
.doc h2 { font-size: 24px; margin-top: 40px; }
.doc p, .doc li { color: #d9d5f2; }
.doc .tldr { background: rgba(61, 220, 151, .1); border: 1px solid rgba(61, 220, 151, .3); border-radius: 18px; padding: 18px 22px; color: var(--text); }
.doc dl { display: grid; gap: 12px; }
.doc dt { font-weight: 600; }
.doc dd { margin: 2px 0 0; color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 10px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .ctas { justify-content: center; }
  .scene { max-width: 300px; grid-row: 1; }
  .grid { grid-template-columns: 1fr 1fr; }
  .versions, .offline ul { grid-template-columns: 1fr; }
  .offline { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 28px 20px; }
  .offline ul { text-align: left; }
  nav .links a.hide-sm { display: none; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .buddy, .eyes, .star { animation: none; }
  .btn { transition: none; }
}
