/* OhSnap! — white, blue-violet, light yellow. Light mode is the default; dark
   is a data-theme switch, never a media query, because the brief says start
   light. Every animation is CSS and every one is switched off by
   prefers-reduced-motion; the page is complete with nothing moving. */

:root {
  --white: #FFFFFF;
  --paper: #F6F7FB;
  --paper-2: #EEF0FA;
  --ink: #1B1F3B;
  --ink-2: #4A4F6E;
  --ink-3: #8A8FAE;
  --line: #DEE1F1;
  --outline: #14162B;

  --blue: #4B5CE4;
  --blue-deep: #3543B8;
  --blue-soft: #E4E7FC;
  --blue-rgb: 75, 92, 228;

  --yellow: #FFE14D;
  --yellow-light: #FFF0A3;
  --yellow-deep: #F5C400;
  --yellow-rgb: 255, 225, 77;

  --danger: #E4485B;

  --bg: var(--white);
  --surface: var(--white);
  --surface-2: var(--paper);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --text-3: var(--ink-3);

  --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Bangers", Impact, "Arial Black", sans-serif;
  --r: 14px; --r-lg: 22px;
  --shadow: 0 18px 50px -24px rgba(27, 31, 59, .35);
  --shadow-blue: 0 14px 40px -16px rgba(var(--blue-rgb), .55);
  --maxw: 1180px;
  --nav-h: 64px;
}

:root[data-theme="dark"] {
  --bg: #0F1226;
  --surface: #171B38;
  --surface-2: #1E2347;
  --text: #EEF0FA;
  --text-2: #B9BDD9;
  --text-3: #7E83A8;
  --line: #2B3060;
  --blue-soft: #232A63;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 800; }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; word-break: break-all; }
kbd { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: .05em .5em; font-weight: 700; }
.muted { color: var(--text-3); }
.small { font-size: .9rem; }
.hl { color: var(--blue); }
.hl-y { color: var(--yellow-deep); text-shadow: 0 0 0 var(--outline); }
:root[data-theme="dark"] .hl-y { color: var(--yellow); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 48px; position: relative; z-index: 1; overflow-x: clip; }

/* Ambient layer: blobs drift, motes rise. Cheap, and gone under reduced motion. */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob-a { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: var(--blue-soft); animation: drift 26s ease-in-out infinite alternate; }
.blob-b { width: 38vw; height: 38vw; right: -10vw; top: 18vh; background: var(--yellow-light); animation: drift 31s ease-in-out infinite alternate-reverse; }
.blob-c { width: 30vw; height: 30vw; left: 30vw; bottom: -18vw; background: var(--blue-soft); animation: drift 37s ease-in-out infinite alternate; }
:root[data-theme="dark"] .blob { opacity: .22; }
.mote { position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); opacity: 0; animation: rise 14s linear infinite; }
.mote:nth-child(even) { background: var(--blue); width: 7px; height: 7px; }
.m1 { left: 8%; animation-delay: -2s; } .m2 { left: 21%; animation-delay: -9s; } .m3 { left: 33%; animation-delay: -5s; }
.m4 { left: 47%; animation-delay: -12s; } .m5 { left: 58%; animation-delay: -1s; } .m6 { left: 69%; animation-delay: -7s; }
.m7 { left: 81%; animation-delay: -10s; } .m8 { left: 93%; animation-delay: -4s; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vw, 4vh, 0) scale(1.12); } }
@keyframes rise { 0% { transform: translateY(0) ; opacity: 0; } 10% { opacity: .7; } 90% { opacity: .5; } 100% { transform: translateY(-110vh); opacity: 0; } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 5; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.25rem; }
.brand:hover { text-decoration: none; }
.brand-word em { font-style: normal; color: var(--yellow-deep); }
.links { display: flex; align-items: center; gap: 18px; font-weight: 700; }
.links a { color: var(--text-2); }
.links a[aria-current="page"] { color: var(--blue); }
.pill { display: inline-block; background: var(--blue-soft); color: var(--blue-deep); border-radius: 999px; padding: .15em .7em; font-weight: 800; font-size: .85rem; white-space: nowrap; }
:root[data-theme="dark"] .pill { color: #C9CEFF; }
.pill.big { font-size: 1.1rem; padding: .25em .9em; }
.theme { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .moon { display: inline; }
:root[data-theme="dark"] .theme .sun { display: none; }
@media (max-width: 640px) { .links { gap: 10px; font-size: .9rem; } .version-pill, .brand-word { display: none; } }

/* Burst logo */
.burst { display: block; overflow: visible; }
.burst-small { width: 40px; height: 40px; }
.burst-hero { width: clamp(180px, 26vw, 300px); position: absolute; right: -6%; bottom: -12%; filter: drop-shadow(0 18px 30px rgba(27,31,59,.25)); animation: bob 5s ease-in-out infinite; }
.burst-nf { width: 220px; margin: 0 auto 20px; }
.burst-rays { transform-origin: 100px 100px; animation: throb 2.8s ease-in-out infinite; }
.burst-text { transform-origin: 100px 100px; }
@keyframes throb { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.06) rotate(2deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(3deg); } }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.kicker { color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin-bottom: 12px; }
.lede { font-size: 1.15rem; color: var(--text-2); max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 18px; }
.btn { display: inline-flex; align-items: center; gap: .5em; border-radius: 999px; padding: .75em 1.4em; font-weight: 800; border: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 1rem; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-xl { font-size: 1.15rem; padding: .9em 1.7em; }
.btn-sub { background: rgba(255,255,255,.22); border-radius: 999px; padding: .1em .6em; font-size: .8em; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-weight: 600; }
.ticks li::before { content: "✓ "; color: var(--yellow-deep); font-weight: 900; }
.hero-art { position: relative; min-height: 320px; }

/* The stage demo: a tiny animated booth, pure CSS. */
.stage-demo { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); box-shadow: var(--shadow); border: 6px solid var(--outline); }
.stage-bg { position: absolute; inset: 0; background: linear-gradient(135deg, var(--blue) 0%, #7A6BFF 45%, var(--yellow) 100%); background-size: 300% 300%; animation: bgshift 9s ease-in-out infinite; }
.stage-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: clamp(5rem, 12vw, 9rem); color: #fff; text-shadow: 0 6px 0 var(--outline); }
.stage-count span { grid-area: 1 / 1; opacity: 0; animation: count 6s linear infinite; }
.stage-count span:nth-child(2) { animation-delay: 1s; }
.stage-count span:nth-child(3) { animation-delay: 2s; }
.stage-flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash 6s linear infinite; }
.stage-frame { position: absolute; inset: 14px; border: 4px solid rgba(255,255,255,.7); border-radius: 12px; pointer-events: none; }
.stage-wm { position: absolute; right: 22px; bottom: 18px; background: rgba(255,255,255,.85); color: var(--ink); font-weight: 800; padding: .2em .7em; border-radius: 8px; font-size: .8rem; }
@keyframes bgshift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes count { 0% { opacity: 0; transform: scale(1.6); } 3% { opacity: 1; transform: scale(1); } 14% { opacity: 1; } 17% { opacity: 0; } 100% { opacity: 0; } }
@keyframes flash { 0%, 49% { opacity: 0; } 51% { opacity: 1; } 58% { opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 28px; overflow: clip; padding-bottom: 30px; } .hero-art { padding-bottom: 40px; min-height: 0; } .burst-hero { right: 4px; bottom: 0; width: 150px; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0 50px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-blue); }
.card p { color: var(--text-2); margin: 0; }
.card-art { height: 120px; border-radius: var(--r); margin: -22px -22px 18px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; gap: 14px; overflow: hidden; position: relative; }
.key { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 12px; background: var(--surface); border: 2px solid var(--outline); border-bottom-width: 6px; font-weight: 900; color: var(--blue); animation: keypress 2.4s ease-in-out infinite; }
.key:nth-child(2) { animation-delay: .8s; color: var(--yellow-deep); }
.key:nth-child(3) { animation-delay: 1.6s; color: var(--danger); }
@keyframes keypress { 0%, 30%, 100% { transform: translateY(0); border-bottom-width: 6px; } 15% { transform: translateY(4px); border-bottom-width: 2px; } }
.art-bg span { position: absolute; inset: 0; opacity: 0; animation: bgcycle 7.5s ease-in-out infinite; }
.art-bg span:nth-child(1) { background: linear-gradient(120deg, var(--blue), #7A6BFF); }
.art-bg span:nth-child(2) { background: linear-gradient(120deg, var(--yellow), var(--yellow-light)); animation-delay: 2.5s; }
.art-bg span:nth-child(3) { background: repeating-linear-gradient(45deg, var(--blue-soft) 0 12px, var(--surface) 12px 24px); animation-delay: 5s; }
@keyframes bgcycle { 0%, 28%, 100% { opacity: 0; } 5%, 23% { opacity: 1; } }
.art-brand { background: linear-gradient(135deg, var(--blue-soft), var(--surface-2)); }
.art-brand .wm { width: 46%; height: 34%; border: 3px dashed var(--blue); border-radius: 8px; position: absolute; animation: wmmove 6s ease-in-out infinite; }
@keyframes wmmove { 0%, 100% { left: 8%; top: 10%; } 33% { left: 46%; top: 12%; } 66% { left: 44%; top: 54%; } }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* How */
.how { padding: 10px 0 40px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; color: var(--text-2); }
.steps strong { color: var(--text); display: block; margin: 8px 0 4px; }
.n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--outline); font-weight: 900; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Download strip + page */
.dl-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(120deg, var(--blue-soft), var(--yellow-light)); border-radius: var(--r-lg); padding: 28px; margin: 10px 0 30px; }
:root[data-theme="dark"] .dl-strip { background: linear-gradient(120deg, #232A63, #3A3A1F); }
.dl-strip h2 { margin-bottom: .2em; } .dl-strip p { margin: 0; color: var(--text-2); }
@media (max-width: 640px) { .dl-strip { flex-direction: column; align-items: flex-start; } }
.dl, .log, .docs, .nf { padding: 40px 0 10px; }
.release-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); margin: 10px 0 30px; }
.release-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.gate label { display: block; font-weight: 700; margin-bottom: 10px; }
.gate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gate input { flex: 1 1 220px; font: inherit; padding: .7em 1em; border-radius: 999px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); }
.gate input:focus { outline: none; border-color: var(--blue); }
.error { color: var(--danger); font-weight: 700; margin: 10px 0 0; }
.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.notes { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.box { background: var(--surface-2); border-radius: var(--r-lg); padding: 22px; }
.box ol, .box ul { padding-left: 1.2em; color: var(--text-2); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* Changelog + docs */
.entry { border-left: 3px solid var(--yellow); padding-left: 18px; margin: 0 0 26px; }
.entry h2 { display: flex; gap: 12px; align-items: center; font-size: 1.2rem; }
.entry ul { color: var(--text-2); }
.chords { border-collapse: collapse; width: 100%; margin-bottom: 24px; }
.chords td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.chords td:first-child { white-space: nowrap; }
@media (max-width: 640px) { .chords td:first-child { white-space: normal; } .chords kbd { font-size: .8em; } }
.docs ol, .docs ul { color: var(--text-2); }
.nf { text-align: center; }

/* Reveal: content first, effect second. Without JS nothing is hidden. */
html.js-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js-ready .reveal.in { opacity: 1; transform: none; }

/* Footer */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 24px 16px 40px; text-align: center; color: var(--text-2); font-size: .95rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-bottom: 6px; }
.sep { color: var(--text-3); }

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