:root {
  --bg: #0f1216;
  --panel: #161a20;
  --line: #262c35;
  --text: #d5dae2;
  --muted: #8b94a3;
  --accent: #5fb3ff;
  --accent-ink: #07131f;
  color-scheme: dark;
}
/* The website's only stylesheet. Colors come from deploy/brand.json (prepended by build.mjs). One font, Inter, served
   from this site (the same font the editor uses). No JavaScript: the demo is CSS animation. */
@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --deep: #0b0e13;
  --ok: #58c28a;
  --font: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  /* The demo: five editor frames of 3 s, then the in-game scene for 5 s. */
  --loop: 20s;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, .button:focus-visible, summary:focus-visible, .demo:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code { font: .88em var(--mono); background: var(--deep); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 800; margin: .25em 0 .35em; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; margin: 0 0 .6em; text-wrap: balance; }
h3 { font-size: 1.08rem; font-weight: 700; margin: 0 0 .35em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(15, 18, 22, .92); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.brand svg { flex: none; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.button) { color: var(--text); text-decoration: none; font-weight: 550; }
.nav-links a:not(.button):hover { color: var(--accent); }

/* buttons: chunky, like a block, pressed on click */
.button {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-weight: 700; text-decoration: none; line-height: 1.2;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .28); transition: transform .08s, filter .15s, border-color .15s;
}
.button:hover { border-color: var(--accent); }
.button:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .28); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { filter: brightness(1.08); }
.button.small { padding: 7px 14px 9px; font-size: .92rem; }
.button.big { padding: 14px 22px 17px; font-size: 1.08rem; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.cta.center { justify-content: center; }

/* hero */
.hero {
  position: relative; overflow: hidden; padding: 56px 0 0;
  background:
    radial-gradient(900px 480px at 82% 0%, rgba(95, 179, 255, .16), transparent 70%),
    linear-gradient(var(--deep), var(--bg) 70%);
}
/* A few pixel stars. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(#cfe6ff, #cfe6ff), linear-gradient(#cfe6ff, #cfe6ff), linear-gradient(#cfe6ff, #cfe6ff), linear-gradient(#cfe6ff, #cfe6ff);
  background-size: 4px 4px; background-repeat: no-repeat;
  background-position: 3% 5%, 44% 3%, 63% 7%, 97% 4%;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 44px; align-items: center; padding-bottom: 72px; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-weight: 650; font-size: .95rem; }
.pill { display: inline-block; padding: 3px 10px 4px; border-radius: 6px; background: var(--ok); color: #06170e; font-weight: 800; font-size: .85rem; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.lead { font-size: 1.2rem; color: var(--text); max-width: 34em; margin: 0; }
.lead b { color: var(--ok); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 0; color: var(--muted); font-size: .95rem; }
.facts li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 7px; }

/* the ground: a row of the editor's own cubes */
.ground { display: flex; justify-content: center; height: 34px; position: relative; overflow: hidden; }
.ground img { width: 48px; height: 48px; margin: 0 -2px; flex: none; image-rendering: pixelated; }
.ground img:nth-child(odd) { transform: translateY(5px); }

/* the demo: a browser window with editor frames that fade one into the next, then the game */
.demo { margin: 0; outline: none; }
.demo-window { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); box-shadow: 0 28px 70px rgba(0, 0, 0, .5), 0 0 0 6px rgba(95, 179, 255, .06); }
.demo-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #1b2027; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.demo-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.demo-bar > span { margin: 0 auto; padding: 1px 12px; border-radius: 6px; background: var(--deep); }
.demo-stage { position: relative; aspect-ratio: 1040 / 680; background: var(--bg); }
.demo-frame { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: show3 var(--loop) infinite; }
.demo-frame.f1 { opacity: 1; animation-name: show3first; }
.demo-frame.f2 { animation-delay: 3s; }
.demo-frame.f3 { animation-delay: 6s; }
.demo-frame.f4 { animation-delay: 9s; }
.demo-frame.f5 { animation-delay: 12s; }
.demo-frame.f6 { animation-name: show5; animation-delay: 15s; }
.scene { display: block; width: 100%; height: 100%; }
@keyframes show3first { 0%, 15% { opacity: 1; } 17%, 98% { opacity: 0; } 100% { opacity: 1; } }
@keyframes show3 { 0% { opacity: 0; } 2%, 15% { opacity: 1; } 17%, 100% { opacity: 0; } }
@keyframes show5 { 0% { opacity: 0; } 2%, 24% { opacity: 1; } 26%, 100% { opacity: 0; } }
/* In game (the scene's 5 s): the cow leaves the paper, flies in an arc, lands, boom. */
.scene-cow { transform: translate(330px, 330px); animation: cow var(--loop) 15s infinite; }
.scene-boom { opacity: 0; transform: translate(830px, 470px) scale(.2); transform-box: view-box; animation: boom var(--loop) 15s infinite; }
@keyframes cow {
  0%, 4% { transform: translate(330px, 330px) rotate(0deg); opacity: 1; }
  9% { transform: translate(560px, 160px) rotate(12deg); }
  14% { transform: translate(830px, 450px) rotate(40deg); opacity: 1; }
  15%, 100% { transform: translate(830px, 450px) rotate(40deg); opacity: 0; }
}
@keyframes boom {
  0%, 13.5% { opacity: 0; transform: translate(830px, 470px) scale(.2); }
  15% { opacity: 1; transform: translate(830px, 460px) scale(1); }
  21% { opacity: 0; transform: translate(830px, 440px) scale(1.6); }
  100% { opacity: 0; }
}
.demo-caption { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.demo-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; list-style: none; margin: 0; padding: 0; counter-reset: s; flex: 1; }
.demo-steps li { counter-increment: s; padding: 3px 8px 4px; border-radius: 8px; color: var(--muted); font-size: .82rem; font-weight: 600; border: 1px solid transparent; animation: cap var(--loop) infinite; }
.demo-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 4px; background: var(--line); color: var(--text); font-size: .75rem; }
.demo-steps .s1 { animation-name: cap6first; }
.demo-steps .s2 { animation-name: cap6; animation-delay: 6s; }
.demo-steps .s3 { animation-name: cap3; animation-delay: 12s; }
.demo-steps .s4 { animation-name: cap5; animation-delay: 15s; }
@keyframes cap6first { 0%, 29% { color: var(--text); border-color: var(--accent); } 30%, 100% { color: var(--muted); border-color: transparent; } }
@keyframes cap6 { 0%, 29% { color: var(--text); border-color: var(--accent); } 30%, 100% { color: var(--muted); border-color: transparent; } }
@keyframes cap3 { 0%, 14% { color: var(--text); border-color: var(--accent); } 15%, 100% { color: var(--muted); border-color: transparent; } }
@keyframes cap5 { 0%, 24% { color: var(--text); border-color: var(--accent); } 25%, 100% { color: var(--muted); border-color: transparent; } }
/* Pause / Play: a checkbox, so it needs no script. */
.demo-pause { position: absolute; opacity: 0; width: 1px; height: 1px; }
.demo-pause-label { flex: none; cursor: pointer; padding: 0 9px 1px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .75rem; font-weight: 700; line-height: 20px; }
.demo-pause-label:hover { border-color: var(--accent); }
.demo-pause:focus-visible ~ .demo-window .demo-pause-label { outline: 3px solid var(--accent); outline-offset: 2px; }
.demo-pause-label .when-playing::before { content: "❚❚ "; font-size: .7em; vertical-align: 1px; }
.demo-pause-label .when-paused::before { content: "▶ "; font-size: .8em; }
.when-paused, .demo-pause:checked ~ .demo-window .when-playing { display: none; }
.demo-pause:checked ~ .demo-window .when-paused { display: inline; }
.demo-pause:checked ~ .demo-window *, .demo-pause:checked ~ .demo-caption li { animation-play-state: paused; }
/* A real recording, when brand.json has one, replaces the frames. */
.demo-media { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.demo-media ~ .demo-window, .demo-media ~ .demo-caption { display: none; }
@media (prefers-reduced-motion: reduce) {
  /* No motion: the applied script, still. */
  .demo-frame, .demo-steps li, .scene-cow, .scene-boom { animation: none; }
  .demo-frame.f1 { opacity: 0; }
  .demo-frame.f5 { opacity: 1; }
  .demo-pause-label { display: none; }
}

/* sections */
.section { padding: 88px 0; }
.section.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 6px; color: var(--accent); font-weight: 800; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.section-lead { color: var(--muted); font-size: 1.08rem; max-width: 40em; margin: -.2em 0 32px; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* how it works */
.steps { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.steps p { color: var(--muted); margin: 0; }
.steps h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.step-art { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; height: 104px; margin-bottom: 16px; padding: 14px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line); background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 16px 16px; }
.step-art .blk { font-size: .88rem; padding: 6px 12px; }
.step-art .blk.in { margin-left: 16px; }
.fake-apply { align-self: center; padding: 10px 30px 13px; border-radius: 8px; background: var(--ok); color: #06170e; font-weight: 800; font-size: 1.1rem; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22); }
.fake-live { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-weight: 650; }
.fake-live i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(88, 194, 138, .2); }
.setup { display: flex; gap: 14px; align-items: center; margin: 0; padding: 16px 20px; border-radius: var(--radius); border: 1px dashed var(--line); color: var(--muted); }
.setup img { flex: none; }
.setup b { color: var(--text); }

/* examples (the editor's own templates and their blocks) */
.examples { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.examples-more { display: none; margin: 16px 0 0; color: var(--muted); }
.example { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.example-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.example-head img { flex: none; image-rendering: pixelated; }
.example-head h3 { margin: 0 0 2px; }
.example > p { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 650; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; margin-right: 4px; }
.mini-blocks { list-style: none; padding: 10px; margin: auto 0 0; border-radius: 8px; background: var(--deep); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-blocks li { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.mini-blocks .d1 { margin-left: 12px; }
.mini-blocks .d2 { margin-left: 24px; }
.mini-blocks .d3 { margin-left: 36px; }
.mini-blocks .slot { flex: none; color: var(--muted); font-size: .7rem; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-blocks .more { color: var(--muted); font-size: .72rem; padding-left: 4px; }
.blk { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px 3px; border-radius: 5px; color: #fff; font-size: .72rem; font-weight: 650; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }

/* works on your server */
.server-facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.server-facts li { display: flex; gap: 14px; align-items: flex-start; }
.server-facts img { flex: none; image-rendering: pixelated; margin-top: 2px; }
.server-facts p { margin: 0; color: var(--muted); }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); margin: 0 0 10px; }
summary { cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: 1.04rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 800; }
details[open] summary::after { content: "–"; }
details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* the closing band */
.closing { background: radial-gradient(700px 300px at 50% 100%, rgba(88, 194, 138, .12), transparent 70%); }

/* legal pages */
.legal { padding: 40px 20px 64px; }
.legal h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.legal li { margin: .3em 0; }
.draft { background: #2b2410; border: 1px solid #6b5520; color: #f3e2b0; border-radius: 10px; padding: 14px 16px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 24px; background: var(--panel); }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { list-style: none; display: flex; gap: 12px 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-footer > p { margin-top: 24px; }

@media (max-width: 1080px) {
  .examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 56px; }
  .steps, .server-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav-links .opt { display: none; }
}
@media (max-width: 600px) {
  .hero { padding-top: 32px; }
  .section { padding: 56px 0; }
  .steps, .server-facts, .examples { grid-template-columns: minmax(0, 1fr); }
  /* Four examples are enough on a phone; the rest are a click away in the editor. */
  .example:nth-child(n+5) { display: none; }
  .examples-more { display: block; }
  .lead { font-size: 1.08rem; }
  .cta .button { flex: 1 1 auto; justify-content: center; }
  .demo-steps li { font-size: .8rem; padding: 3px 7px 4px; }
  .setup { align-items: flex-start; }
  .nav { min-height: 58px; }
}

/* The block colors of the examples (from the editor's gallery). */
.c-7c4dff { background: #7c4dff; }
.c-5f9300 { background: #548100; }
.c-c4650a { background: #b45d09; }
.c-0d8f6f { background: #0c8466; }
.c-1e7ae0 { background: #1c73d3; }
.c-c2337a { background: #c2337a; }
.c-d43d3d { background: #d43d3d; }
.c-8a5a12 { background: #8a5a12; }
