/* KP Astro Labs — public website (kpastrolabs.com). Dark cosmic theme matching the app. */
:root {
  --bg: #0d0c1f;
  --bg2: #141331;
  --card: rgba(255, 255, 255, 0.045);
  --card-b: rgba(255, 255, 255, 0.09);
  --text: #f3f1ff;
  --muted: #b9b5d6;
  --faint: #8a86a8;
  --gold: #ffc23d;
  --gold2: #e0a100;
  --indigo: #1e1b4b;
  --ok: #4ade80;
  --red: #ff6b6b;
  --radius: 18px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(94, 72, 220, 0.28), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(26, 140, 140, 0.16), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 14px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.grad { background: linear-gradient(90deg, #ffd36a, #ff9f43); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 0.92rem; }
.center { text-align: center; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(13, 12, 31, 0.72); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.links { display: flex; align-items: center; gap: 24px; }
.links a { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.links a:hover { color: var(--text); text-decoration: none; }
.links a.btn-gold, .links a.btn-gold:hover { color: #1b1640; }
.menu-btn { display: none; background: none; border: 1px solid var(--card-b); color: var(--text); border-radius: 10px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 0.98rem; border: 0; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s; font-family: inherit; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, #ffd36a, #ffb300); color: #1b1640; box-shadow: 0 10px 30px rgba(255, 179, 0, 0.25); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--card-b); }
.btn-red { background: var(--red); color: #fff; }
.btn-white { background: #fff; color: #1f1f1f; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.play { display: inline-flex; align-items: center; gap: 12px; background: #000; color: #fff; border: 1px solid #5f5f5f; border-radius: 12px; padding: 9px 18px 9px 14px; }
.play:hover { text-decoration: none; border-color: #999; }
.play small { display: block; font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; line-height: 1.1; }
.play b { display: block; font-size: 1.15rem; font-weight: 600; line-height: 1.15; }
.play svg { width: 26px; height: 26px; }

/* hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; align-items: center; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.badge { font-size: 0.82rem; color: var(--muted); background: var(--card); border: 1px solid var(--card-b); padding: 6px 12px; border-radius: 999px; }
.wheel { overflow: hidden; position: relative; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 1; border-radius: 50%; }
.wheel .bg { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; animation: spin 140s linear infinite; mask-image: radial-gradient(circle, #000 64%, transparent 71%); -webkit-mask-image: radial-gradient(circle, #000 64%, transparent 71%); }
.wheel .logo { position: absolute; left: 50%; top: 50%; width: 42%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); filter: drop-shadow(0 0 30px rgba(255, 190, 60, 0.35)); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wheel .bg { animation: none; } html { scroll-behavior: auto; } }

/* strip */
.strip { border-top: 1px solid rgba(255, 255, 255, 0.06); border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.02); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.stat b { display: block; font-size: 1.35rem; color: var(--gold); font-weight: 700; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* sections */
section { padding: 76px 0; }
.head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.head p { color: var(--muted); }
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 194, 61, 0.12); color: var(--gold); margin-bottom: 14px; }
.ic svg { width: 24px; height: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.chart-box { background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); border: 1px solid var(--card-b); border-radius: 24px; padding: 22px; max-width: 420px; margin: 0 auto; width: 100%; }
.chart-box .chart { width: 100%; height: auto; font-family: "Poppins", sans-serif; }
.chart-box .cap { text-align: center; color: var(--faint); font-size: 0.85rem; margin-top: 12px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; color: var(--muted); }
.ticks li::before { content: "✦"; color: var(--gold); flex: none; }
.steps { counter-reset: s; }
.card.step { position: relative; padding-left: 64px; }
.card.step::before { counter-increment: s; content: counter(s); position: absolute; left: 22px; top: 22px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #1b1640; font-weight: 700; display: grid; place-items: center; font-size: 0.95rem; }
.warn { border-color: rgba(255, 107, 107, 0.35); background: linear-gradient(160deg, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.03)); }
.warn .ic { background: rgba(255, 107, 107, 0.15); color: var(--red); }
.note { border-left: 3px solid var(--gold); padding: 12px 16px; background: rgba(255, 194, 61, 0.07); border-radius: 0 12px 12px 0; color: var(--muted); }

/* faq */
.faq details { background: var(--card); border: 1px solid var(--card-b); border-radius: 14px; padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); }

/* download */
.download { text-align: center; background: radial-gradient(600px 300px at 50% 0%, rgba(255, 194, 61, 0.14), transparent 70%); }
.download img.app { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }

/* footer */
footer { border-top: 1px solid rgba(255, 255, 255, 0.07); padding: 40px 0 34px; color: var(--muted); font-size: 0.93rem; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
footer h4 { color: var(--text); margin: 0 0 10px; font-size: 0.98rem; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--gold); }
footer .copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.06); color: var(--faint); font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.contact { display: inline-flex; align-items: center; gap: 8px; }
.contact svg { width: 16px; height: 16px; flex: none; }

/* legal pages */
.legal { max-width: 820px; margin: 0 auto; padding: 48px 20px 70px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.legal h2 { font-size: 1.3rem; margin-top: 38px; color: var(--gold); }
.legal h3 { margin-top: 22px; }
.legal p, .legal li { color: #d6d3ee; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .meta { color: var(--faint); font-size: 0.92rem; margin-bottom: 26px; }
.legal .toc { background: var(--card); border: 1px solid var(--card-b); border-radius: 14px; padding: 16px 22px; margin: 22px 0; }
.legal .toc ol { margin: 6px 0 0; columns: 2; column-gap: 30px; }
.legal .toc li { margin-bottom: 4px; break-inside: avoid; }
.legal .key { background: linear-gradient(160deg, rgba(255, 194, 61, 0.12), rgba(255, 194, 61, 0.03)); border: 1px solid rgba(255, 194, 61, 0.3); border-radius: 16px; padding: 18px 22px; margin: 18px 0; }
.legal .key li { margin-bottom: 10px; }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.93rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: top; color: #d6d3ee; }
.legal th { color: var(--text); background: rgba(255, 255, 255, 0.04); font-weight: 600; white-space: nowrap; }

/* account deletion */
.panel { background: var(--card); border: 1px solid var(--card-b); border-radius: 20px; padding: 26px; margin: 22px 0; }
.panel .who { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.panel .who .av { width: 48px; height: 48px; border-radius: 50%; background: var(--indigo); display: grid; place-items: center; font-weight: 700; color: var(--gold); font-size: 1.2rem; flex: none; }
.panel input[type="text"] { width: 100%; max-width: 320px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--card-b); background: rgba(0, 0, 0, 0.25); color: var(--text); font-family: inherit; font-size: 1rem; }
.msg { padding: 12px 16px; border-radius: 12px; margin: 14px 0; }
.msg.err { background: rgba(255, 107, 107, 0.12); color: #ffb4b4; }
.msg.ok { background: rgba(74, 222, 128, 0.12); color: #a7f3c4; }
.gbtn svg { width: 20px; height: 20px; }
.hidden { display: none !important; }

/* responsive */
@media (max-width: 960px) {
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; text-align: center; }
  .hero p.lead { margin: 0 auto; }
  .cta, .badges { justify-content: center; }
  .wheel { max-width: 340px; order: -1; }
  .g3 { grid-template-columns: 1fr 1fr; }
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  footer .cols > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .links { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #12112a; border-bottom: 1px solid var(--card-b); padding: 8px 20px 18px; }
  .links.open { display: flex; }
  .links a { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .links .btn { margin-top: 12px; }
  .nav .wrap { position: relative; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  section { padding: 56px 0; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .wrap { padding: 0 16px; }
  .legal { padding: 34px 16px 56px; }
  .legal .toc ol { columns: 1; }
  footer .cols { grid-template-columns: 1fr; }
  .cta .btn, .cta .play { width: 100%; justify-content: center; }
}
