:root {
  --bg: #0d0b14;
  --bg-2: #15121f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f1fa;
  --muted: #a8a1b8;
  --magenta: #d946ef;
  --orange: #fb923c;
  --gold: #fcd34d;
  --grad: linear-gradient(120deg, #d946ef, #fb923c 55%, #fcd34d);
  --radius: 18px;
  --max: 1120px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mx: 50vw;
  --my: 30vh;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
.muted { color: var(--muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* Background layers */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.cursor-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(217, 70, 239, 0.16), rgba(251, 146, 60, 0.07) 40%, transparent 70%);
}
.nav, main, .footer { position: relative; z-index: 1; }

/* Nav */
.nav {
  max-width: var(--max); margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); font-size: 0.85rem; white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 56px 24px 96px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
}
.eyebrow {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--orange); font-weight: 600; margin-bottom: 18px;
}
h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); font-weight: 700; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 24px; font-size: 1.12rem; color: var(--muted); max-width: 52ch; }

/* Form */
.notify { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.notify input {
  flex: 1 1 240px; min-width: 0; padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--text);
  font: inherit;
}
.notify input::placeholder { color: #8c8599; }
.notify input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.25); }
.notify button {
  padding: 14px 24px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-weight: 600;
  color: #1a0f1f; background: var(--grad); transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 30px rgba(251, 146, 60, 0.28);
}
.notify button:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(217, 70, 239, 0.35); }
.form-status { flex-basis: 100%; min-height: 1.4em; font-size: 0.92rem; color: var(--gold); }
.form-status.error { color: #fda4af; }

.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-size: 0.85rem; background: rgba(255, 255, 255, 0.03);
}

/* Orb */
.orb-wrap { display: grid; place-items: center; }
.orb { position: relative; width: min(420px, 78vw); aspect-ratio: 1; display: grid; place-items: center; }
.core {
  width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d1, #fcd34d 25%, #fb923c 60%, #d946ef);
  box-shadow: 0 0 60px 10px rgba(251, 146, 60, 0.55), 0 0 160px 50px rgba(217, 70, 239, 0.35);
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.06); box-shadow: 0 0 80px 16px rgba(251, 146, 60, 0.65), 0 0 190px 60px rgba(217, 70, 239, 0.4); } }
.ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.14); }
.r1 { inset: 17%; animation: spin 14s linear infinite; }
.r2 { inset: 6%; animation: spin 26s linear infinite reverse; border-color: rgba(217, 70, 239, 0.35); }
.r3 { inset: -6%; animation: spin 40s linear infinite; border-style: dashed; border-color: rgba(252, 211, 77, 0.22); }
.sat { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; }
.s1 { background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.s2 { background: var(--magenta); box-shadow: 0 0 14px var(--magenta); }
.s3 { background: var(--orange); box-shadow: 0 0 14px var(--orange); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 88px 24px; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2, .split-text h2, .cta h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head .muted { margin-top: 14px; }

/* Cards with cursor spotlight */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; padding: 28px; border-radius: var(--radius); background: var(--bg-2);
  border: 1px solid var(--line); overflow: hidden; transition: transform 0.25s, border-color 0.25s;
  --x: 50%; --y: 50%;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(260px circle at var(--x) var(--y), rgba(251, 146, 60, 0.18), transparent 70%);
}
.card:hover { transform: translateY(-4px); border-color: rgba(251, 146, 60, 0.4); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; position: relative; }
.card p { color: var(--muted); position: relative; font-size: 0.98rem; }

/* Visual scripting split */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.split-text p:not(.eyebrow) { margin-top: 16px; color: var(--muted); }
.code { margin: 26px 0 0; border: 1px solid var(--line); border-radius: 14px; background: #100d19; overflow: hidden; }
.code figcaption { padding: 10px 16px; font-size: 0.78rem; color: var(--muted); border-bottom: 1px solid var(--line); letter-spacing: 0.04em; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 0.9rem; line-height: 1.7; }
.code code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #e7e2f2; }
.code .k { color: #f0abfc; }
.code .f { color: #fdba74; }
.code .s { color: #fcd34d; }

.graph {
  border: 1px solid var(--line); border-radius: 22px; padding: 18px; background:
    radial-gradient(circle at 20% 10%, rgba(217, 70, 239, 0.12), transparent 50%),
    var(--bg-2);
}
.graph svg { width: 100%; height: auto; display: block; }
.node rect { fill: #1d1929; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.2; }
.node.hot rect { stroke: rgba(251, 146, 60, 0.7); fill: #231a2c; }
.t-title { fill: #a8a1b8; font: 600 11px var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.t-sub { fill: #f4f1fa; font: 500 15px var(--display); }
.t-sub.dim { fill: #a8a1b8; font-size: 13px; }
.pin { fill: #0d0b14; stroke: #fcd34d; stroke-width: 2; }
.wire { fill: none; stroke: url(#wire); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 8; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.spark { fill: #fcd34d; }
.spark-halo { fill: rgba(252, 211, 77, 0.25); animation: pulse 2s ease-in-out infinite; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 760px; }
.timeline li {
  display: flex; gap: 22px; align-items: flex-start; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.step { font-family: var(--display); font-weight: 700; font-size: 1.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: 2.2ch; }
.timeline h3 { font-size: 1.15rem; margin-bottom: 4px; }
.timeline p { color: var(--muted); font-size: 0.97rem; }

/* CTA */
.cta { text-align: center; }
.cta .muted { margin-top: 14px; }
.cta .notify { margin: 30px auto 0; justify-content: center; }
.cta .form-status { text-align: center; }

.footer {
  max-width: var(--max); margin: 0 auto; padding: 36px 24px 48px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.9rem;
}

/* Donation page */
.nav-links a.donate-link { color: var(--orange); font-weight: 600; }
.nav-links a[aria-current="page"] { color: var(--text); }
.footer a { color: var(--orange); }
.donate-main { max-width: var(--max); margin: 0 auto; padding: 32px 24px 96px; display: grid; place-items: center; min-height: 70vh; }
.donate-card {
  width: 100%; max-width: 560px; text-align: center; padding: 44px 32px;
  border: 1px solid var(--line); border-radius: 26px; background: var(--bg-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.donate-card h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.donate-card .lead { margin: 20px auto 0; }
.mini-orb {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d1, #fcd34d 25%, #fb923c 60%, #d946ef);
  box-shadow: 0 0 44px 8px rgba(251, 146, 60, 0.5), 0 0 110px 30px rgba(217, 70, 239, 0.25);
  animation: breathe 4s ease-in-out infinite;
}
.btn {
  display: block; margin-top: 30px; padding: 16px 24px; border-radius: 14px; text-decoration: none;
  font-weight: 700; color: #1a0f1f; background: var(--grad);
  box-shadow: 0 10px 34px rgba(251, 146, 60, 0.3); transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 42px rgba(217, 70, 239, 0.38); }
.btn-ghost {
  margin-top: 12px; padding: 12px 20px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 0.92rem;
  color: var(--text); background: transparent; border: 1px solid var(--line); transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--orange); }
.copy-status { text-align: center; margin-top: 8px; }
.donate-points { list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); text-align: left; display: grid; gap: 12px; color: var(--muted); font-size: 0.95rem; }
.donate-points strong { color: var(--text); }
.back { display: inline-block; margin-top: 26px; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.back:hover { color: var(--text); }
@media (max-width: 560px) { .donate-card { padding: 34px 22px; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .orb-wrap { order: -1; }
  .orb { width: min(300px, 70vw); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .nav-links a:not(.donate-link) { display: none; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .section { padding: 64px 20px; }
  .nav { padding: 18px 20px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .notify button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
