:root {
  --void: #07080a;
  --panel: #0d100e;
  --panel-2: #121614;
  --line: #1e271e;
  --ink: #e7eee6;
  --muted: #7b8a7b;
  --faint: #4b564b;
  --ph: #7dffa0;
  --ph-dim: #4f9a63;
  --amber: #e0b13a;
  --seal: #c44a4a;
  --stage: #101216;
  --max: 1160px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--void); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
  min-height: 100%;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
button, .btn, a { touch-action: manipulation; }
input, select, textarea { font-size: 16px; }
a { color: var(--ph); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }

#app { min-height: 100vh; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 10, .86);
  backdrop-filter: blur(16px);
}
.top .inner, .wrap { width: min(100% - 36px, var(--max)); margin: 0 auto; }
.top .inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand {
  display: flex; align-items: baseline; gap: 8px;
  font-family: Sora, Inter, sans-serif; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  text-decoration: none !important;
}
.brand i { color: var(--ph); font-style: normal; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .16em; }
nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
nav a { color: var(--muted); font-size: 14px; font-weight: 550; text-decoration: none !important; }
nav a:hover, nav a.on { color: var(--ink); }
.menu-btn {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  font-weight: 650; font-size: 14px; cursor: pointer; z-index: 60;
}
.mobile-cta { display: none; }
.announce {
  background: #10180f; color: var(--ph-dim); font-size: 13px;
  text-align: center; padding: 8px 16px; border-bottom: 1px solid var(--line);
}
.announce a { color: var(--ph); }
body:not(.is-home) .announce { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-weight: 650; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-p { background: var(--ph); color: #061109; }
.btn-g { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-g:hover { border-color: var(--ph-dim); }
.btn-wide { width: 100%; border-radius: 12px; }
.tertiary { margin: 14px 0 0; font-size: 14px; }
.tertiary a { color: var(--muted); }
.tertiary a:hover { color: var(--ph); }
.pill {
  display: inline-flex; align-items: center; align-self: start;
  padding: 8px 12px; border: 1px solid #2a4a32; border-radius: 999px;
  color: var(--ph); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  background: #0a100c; width: max-content;
}

.hero { padding: 72px 0 28px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.kicker { color: var(--ph-dim); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; }
h1, h2, h3 { font-family: Sora, Inter, sans-serif; letter-spacing: -.035em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.02; margin: 0 0 16px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 42ch; margin: 0 0 26px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stage {
  background: radial-gradient(120% 80% at 50% 20%, #171b21, var(--stage) 70%);
  border: 1px solid var(--line); min-height: 380px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.hero-stage img { width: min(78%, 340px); padding-top: 48px; image-rendering: pixelated; filter: drop-shadow(0 20px 40px #000); }
.hero-stage .chip {
  position: absolute; top: 14px; left: 14px; z-index: 2; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ph); border: 1px solid #23432c; padding: 4px 8px; background: #0a100c;
}
.hero-stage .clip-bar {
  width: 100%; display: flex; gap: 6px; padding: 10px; background: #0a0c0b;
  border-top: 1px solid var(--line); overflow-x: auto;
}
.hero-stage .clip-bar button {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 10px 12px; cursor: pointer; font-size: 13px; min-height: 44px;
  flex: 0 0 auto;
}
.hero-stage .clip-bar button.on { color: var(--ph); border-color: #2a4a32; }

.logos { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--faint); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 0 40px; }
.section { padding: 28px 0 56px; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 10px; }
.sub { color: var(--muted); max-width: 52ch; margin: 0 0 24px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card {
  border: 1px solid var(--line); background: var(--panel); padding: 20px;
  transition: border-color .2s, transform .2s var(--ease);
}
.card:hover { border-color: #2c3a2c; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.meta { color: var(--faint); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }

.pipe {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 20px 0 0;
}
.pipe span {
  border: 1px solid var(--line); background: var(--panel); padding: 10px 6px;
  font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); text-align: center;
}
.pipe span em { display: block; color: var(--ph); font-style: normal; font-size: 11px; margin-top: 4px; }

.price { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.price .card { display: flex; flex-direction: column; gap: 10px; }
.price .card.feat { border-color: #2e5a38; box-shadow: 0 0 0 1px #1b3a22 inset; }
.price .amt { font-family: Sora, sans-serif; font-size: 2.2rem; letter-spacing: -.04em; }
.price .amt span { font-size: 14px; color: var(--muted); font-weight: 500; }
.price ul { margin: 0 0 12px; padding: 0 0 0 16px; color: var(--muted); font-size: 14px; flex: 1; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--muted); margin: 8px 0 0; }

.wizard { max-width: 720px; }
.steps { display: flex; gap: 8px; margin: 0 0 28px; }
.steps i {
  flex: 1; height: 3px; background: var(--line); display: block;
}
.steps i.on { background: var(--ph); }
.choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice button, .choice .opt {
  text-align: left; background: var(--panel); border: 1px solid var(--line);
  padding: 16px; cursor: pointer; color: var(--ink);
}
.choice button.on, .choice .opt.on { border-color: var(--ph-dim); color: var(--ph); }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
input, select, textarea {
  background: #0a0c0b; border: 1px solid var(--line); padding: 11px 12px; border-radius: 10px;
}
textarea { min-height: 120px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--ink); }
.checks label { display: flex; gap: 6px; align-items: center; }
.err { color: var(--seal); font-size: 14px; }

.studio { display: grid; grid-template-columns: 220px 1fr 300px; gap: 16px; min-height: calc(100vh - 104px); padding: 20px 0 40px; }
.side, .dock { border: 1px solid var(--line); background: var(--panel); padding: 14px; }
.side button, .dock .anim {
  display: block; width: 100%; text-align: left; background: transparent;
  border: 0; color: var(--muted); padding: 8px 6px; cursor: pointer;
}
.side button.on, .dock .anim.on { color: var(--ph); }
.stage-view {
  background: var(--stage); border: 1px solid var(--line);
  aspect-ratio: 1 / 1; width: 100%; max-width: 560px; margin-inline: auto;
  position: relative; overflow: hidden;
}
.stage-view canvas { width: 100%; height: 100%; display: block; }
.stage-view canvas.pix { image-rendering: pixelated; }
.stage-event {
  position: absolute; top: 10px; right: 10px; pointer-events: none;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ph);
  border: 1px solid #23432c; background: rgba(10, 16, 12, .85); padding: 4px 8px;
  opacity: 0; transition: opacity .25s;
}
.stage-event.show { opacity: 1; }
pre {
  background: #0a0c0b; border: 1px solid var(--line); padding: 12px; overflow: auto;
  font-size: 12px; color: #b7cbb7;
}

.arena-wrap { display: grid; grid-template-columns: 240px 1fr; height: calc(100vh - 64px); height: calc(100dvh - 64px); }
.arena-wrap aside { border-right: 1px solid var(--line); padding: 18px; overflow-y: auto; }
.arena-wrap canvas { width: 100%; height: 100%; display: block; background: var(--stage); min-height: 56vh; touch-action: none; }
.pads { display: none; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.pads button {
  flex: 1; min-width: 64px; min-height: 44px; background: var(--panel);
  border: 1px solid var(--line); color: var(--ink); border-radius: 10px; cursor: pointer;
}
.pads button:active { border-color: var(--ph-dim); color: var(--ph); }

.job-line { list-style: none; padding: 0; margin: 0 0 20px; }
.job-line li {
  display: flex; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); padding: 12px 14px; margin: 0 0 8px;
}
.job-line li.done { color: var(--ph-dim); border-color: #23432c; }
.job-line li.wait { color: var(--amber); border-color: #4a3a12; }
.job-line li.todo { color: var(--muted); }

footer.site {
  margin-top: auto; border-top: 1px solid var(--line); padding: 36px 0 28px; color: var(--muted); font-size: 13.5px;
}
footer.site .inner { width: min(100% - 36px, var(--max)); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 18px; }
footer.site strong { color: var(--ink); display: block; margin-bottom: 8px; }
footer.site a { color: var(--muted); display: block; margin: 4px 0; text-decoration: none; }
footer.site a:hover { color: var(--ph); }

.player {
  background: #050308; border: 1px solid var(--line);
  aspect-ratio: 16 / 9; overflow: hidden;
}
.player video { width: 100%; height: 100%; display: block; background: #050308; }
.steps-how { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.steps-how li {
  border: 1px solid var(--line); background: var(--panel); padding: 14px 16px;
}
.steps-how strong { color: var(--ph); display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.path li {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start;
  border: 1px solid var(--line); background: var(--panel); padding: 16px 18px;
}
.path li span {
  width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: #0a100c; color: var(--ph); font-weight: 700; border: 1px solid #2a4a32;
}
.path li strong { display: block; margin-bottom: 4px; }
.path li p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.path.compact li { padding: 12px 14px; }
.reel {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.reel figure {
  margin: 0; flex: 0 0 46%; max-width: 220px; scroll-snap-align: start;
  background: var(--stage); border: 1px solid var(--line); text-align: center;
}
.reel img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; background: var(--stage); }
.reel figcaption { padding: 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ph); }
.showcase { width: 100%; margin-top: 16px; border: 1px solid var(--line); display: block; }
#stTabs { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; max-width: 560px; margin: 10px auto 0; }
.lib-preview {
  width: 96px; height: 96px; display: block; margin: 0 0 12px;
  background: var(--stage); border: 1px solid var(--line);
  image-rendering: pixelated; object-fit: contain;
}

@media (max-width: 1100px) {
  .studio { grid-template-columns: 220px 1fr; }
  .studio .dock { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
  .dock .meta, .dock pre, .dock .sub, .dock .checks, .dock .btn-p { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero, .g3, .g4, .price, .studio, footer.site .inner { grid-template-columns: 1fr; }
  .g2, .choice { grid-template-columns: 1fr; }
  .pipe { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 20px 0 16px; gap: 18px; }
  .hero .hero-stage { min-height: 240px; }
  .hero .row .btn { flex: 1 1 100%; min-height: 48px; }
  h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .lede { font-size: 1.02rem; }
  .section { padding: 20px 0 36px; }
  .top { padding-top: env(safe-area-inset-top); }
  .top .inner { min-height: 56px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .top nav { display: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .top nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: fixed; inset: 0; z-index: 50;
    background: rgba(7, 8, 10, .98);
    padding: calc(72px + env(safe-area-inset-top)) 22px 28px;
    overflow: auto;
  }
  body.nav-open .top nav a {
    font-size: 20px; color: var(--ink); padding: 14px 4px; min-height: 48px;
    display: flex; align-items: center;
  }
  body.nav-open .top nav .btn { width: 100%; justify-content: center; margin-top: 8px; }
  body.nav-open nav .hide { display: flex; }
  nav .hide { display: none; }
  .mobile-cta {
    display: flex; gap: 8px; position: sticky; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(7, 8, 10, .94); border-top: 1px solid var(--line);
  }
  .mobile-cta .btn { flex: 1; min-height: 48px; }
  body.is-arena .mobile-cta, body.is-create .mobile-cta, body.is-studio .mobile-cta, body.nav-open .mobile-cta { display: none; }
  .page { padding-bottom: 8px; }
  .studio { min-height: 0; padding: 12px 0 24px; gap: 12px; }
  .studio .side { display: none; }
  #stTabs, .hero-stage .clip-bar {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  #stTabs::-webkit-scrollbar, .hero-stage .clip-bar::-webkit-scrollbar { display: none; }
  #stTabs .btn { flex: 0 0 auto; min-height: 44px; }
  .arena-wrap {
    display: flex; flex-direction: column; height: auto;
    min-height: calc(100dvh - 56px - env(safe-area-inset-top));
  }
  .arena-wrap canvas {
    order: -1; width: 100%; height: 46dvh; min-height: 240px; max-height: 52dvh;
  }
  .arena-wrap aside {
    border-right: 0; border-top: 1px solid var(--line);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  #anims { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #anims .btn-wide { width: auto; flex: 0 0 auto; min-width: 76px; min-height: 44px; }
  .pads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .pads button { min-height: 56px; font-size: 16px; font-weight: 650; }
  .pads [data-pad="reset"] { grid-column: 1 / -1; }
  .wizard { max-width: none; }
  .choice button, .choice .opt { min-height: 64px; }
  input, select, textarea { min-height: 48px; border-radius: 12px; }
  textarea { min-height: 140px; }
  .faq summary { min-height: 48px; display: flex; align-items: center; }
}
