/* Palette sampled from the OverlayNode avatar */
:root {
  --cobalt: #326fe9;
  --cobalt-deep: #2559cf;
  --cobalt-dark: #1a41a0;
  --ink: #0c0f18;
  --peach: #fbc4a3;
  --blush: #dfa08c;
  --brown: #433033;
  --cream: #fff1e2;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --display: "Fraunces", Georgia, serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --hand: "Caveat Brush", "Comic Sans MS", cursive;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--cream); font-family: var(--body); line-height: 1.55;
  background:
    radial-gradient(60rem 40rem at 85% -5%, #4a82f2 0%, transparent 60%),
    radial-gradient(50rem 36rem at -10% 60%, #2a62d8 0%, transparent 60%),
    var(--cobalt);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
/* gouache grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.1 0 0 0 0 0.3 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 4px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 700; line-height: .98; margin: 0; letter-spacing: -.02em; }
em { font-style: italic; color: var(--peach); }
.hand { font-family: var(--hand); font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--peach); margin: 0 0 .6rem; transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.hand.dark { color: var(--cobalt-dark); }

/* ---------- header ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; padding: 1.4rem var(--pad); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-dot { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 3px solid var(--cream); box-shadow: 3px 4px 0 var(--ink); display: block; }
.brand-dot img { width: 100%; height: 100%; transform: scale(1.12); }
.brand-word { font: 700 1.5rem var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; }
.brand-word b { color: var(--peach); font-weight: 700; }
.top nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); font-weight: 700; }
.top nav a { text-decoration: none; padding: .2rem 0; background: linear-gradient(var(--peach), var(--peach)) 0 100% / 0 3px no-repeat; transition: background-size .35s var(--ease); }
.top nav a:hover { background-size: 100% 3px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100svh, 58rem); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(1rem, 4vw, 4rem); padding: 8rem var(--pad) 5rem; }
.hero h1 { font-size: clamp(3.1rem, 8.4vw, 7.4rem); color: var(--cream); }
.brush { position: relative; display: inline-block; white-space: nowrap; }
.brush svg { position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .3em; overflow: visible; }
.brush path { fill: none; stroke: var(--peach); stroke-width: 11; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; filter: url(#chalk); transition: stroke-dashoffset 1.1s .5s var(--ease); }
.in .brush path, .brush.in path { stroke-dashoffset: 0; }
.lede { max-width: 33rem; margin: 2rem 0 0; font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.btn { display: inline-flex; align-items: center; gap: .65rem; padding: .95rem 1.7rem; border-radius: 14px; border: 3px solid var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; box-shadow: 5px 6px 0 var(--ink); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { transform: translate(-2px, -3px); box-shadow: 8px 10px 0 var(--ink); }
.btn:active { transform: translate(3px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.btn.solid { background: var(--cream); color: var(--ink); }
.btn.line { background: var(--cobalt-deep); color: var(--cream); }

.host { position: relative; justify-self: center; width: clamp(15rem, 33vw, 29rem); aspect-ratio: 1; }
.host::before { content: ""; position: absolute; inset: -9% -7% -6% -10%; background: var(--peach); border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; transform: rotate(-8deg); filter: url(#rough); box-shadow: 0 0 0 0 transparent; }
.portrait { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 8px solid var(--cream); box-shadow: 12px 14px 0 var(--ink); transition: transform .25s ease-out; will-change: transform; }
.portrait img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.sparks { position: absolute; inset: -14%; width: 128%; height: 128%; z-index: 2; pointer-events: none; }
.sp { stroke: var(--cream); stroke-width: 11; stroke-dasharray: 60; animation: spark 2.8s var(--ease) infinite; filter: url(#chalk); }
.sp:nth-child(2n) { animation-delay: -.7s; } .sp:nth-child(3n) { animation-delay: -1.4s; } .sp:nth-child(5n) { animation-delay: -2.1s; }
@keyframes spark { 0%, 100% { stroke-dashoffset: 0; opacity: 1; } 55% { stroke-dashoffset: 40; opacity: .25; } }

/* ---------- the wall ---------- */
.wall-sec { padding: clamp(3rem, 8vw, 7rem) var(--pad); }
.wall-head h2 { font-size: clamp(2.4rem, 6vw, 5rem); max-width: 14ch; }
.note { margin: 1rem 0 0; font-weight: 700; color: var(--peach); }
.wall { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 2rem); margin-top: clamp(3rem, 7vw, 6rem); align-items: start; }

.print { position: relative; display: block; padding: 12px 12px 4.4rem; color: var(--ink); text-decoration: none; transform: rotate(var(--r, 0deg)); transition: transform .55s var(--ease); filter: drop-shadow(9px 11px 0 var(--cobalt-dark)); }
.print:hover { transform: rotate(0deg) translateY(-8px) scale(1.025); z-index: 3; }
.paper { position: absolute; inset: 0; background: var(--cream); filter: url(#rough); border-radius: 3px; }
.blank { border: 3px dashed var(--peach); }
.screen { display: block; position: relative; border-radius: 4px; padding: clamp(.9rem, 2.2vw, 1.5rem); }
.screen.dark { background: radial-gradient(120% 140% at 25% 15%, #232739 0%, #0c0e16 72%); }
.screen.soft { background: linear-gradient(140deg, #f1e8f3, #dde6f6); }
.screen.bare { padding: 0; }
.print img, .print video, .print .blank { position: relative; width: 100%; height: auto; border-radius: 4px; }
.print .screen img { display: block; }
.print video { aspect-ratio: 1; object-fit: cover; background: #0b2a8a; }
.tape { position: absolute; z-index: 2; top: -15px; left: 50%; width: 112px; height: 32px; transform: translateX(-50%) rotate(-5deg); background: repeating-linear-gradient(90deg, #fbc4a3dd 0 9px, #f6b690dd 9px 11px); filter: url(#chalk); }
.tape.alt { background: repeating-linear-gradient(90deg, #dfa08ccc 0 9px, #d4917bcc 9px 11px); transform: translateX(-50%) rotate(4deg); }
.tag { position: absolute; left: 16px; right: 16px; bottom: 12px; display: block; font-family: var(--hand); font-size: 1.45rem; line-height: 1.1; color: var(--brown); }
.tag b { display: block; font: 700 1.2rem var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--ink); }
.tag i { position: absolute; right: 0; bottom: 2px; font: 700 .82rem var(--body); font-style: normal; background: var(--cobalt); color: var(--cream); padding: .22rem .65rem; border-radius: 99px; }
.print:hover .tag i { background: var(--ink); }
.blank { aspect-ratio: 16 / 10; box-sizing: border-box; display: grid; place-items: center; background: repeating-linear-gradient(135deg, #fff1e2 0 14px, #fbe6d0 14px 28px); }
.blank span { font: 700 5rem var(--display); color: var(--peach); font-variation-settings: "SOFT" 100, "WONK" 1; }
.soon { cursor: default; }
.soon:hover { transform: rotate(var(--r, 0deg)); }

.p1 { grid-column: 1 / span 6; grid-row: 1; --r: -2.5deg; }
.p2 { grid-column: 7 / span 5; grid-row: 1; margin-top: 3rem; --r: 2deg; }
.p5 { grid-column: 8 / span 5; grid-row: 3; margin-top: 3rem; --r: -1.5deg; }
.p3 { grid-column: 1 / span 6; grid-row: 2; margin-top: 1rem; --r: 1.5deg; }
.p4 { grid-column: 7 / span 6; grid-row: 2; margin-top: 4rem; --r: -2deg; }
.p6 { grid-column: 1 / span 7; grid-row: 3; margin-top: 0; --r: 1.2deg; }
.p7 { grid-column: 8 / span 4; grid-row: 3; margin-top: 26rem; --r: 1.5deg; }
.aside { grid-column: 11 / span 2; grid-row: 3; margin-top: 6rem; font-size: 2rem; line-height: 1.05; }
.scribble { position: absolute; width: 6.5rem; right: 17%; bottom: 9rem; fill: none; stroke: var(--peach); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: url(#chalk); transform: scaleX(-1) rotate(8deg); }

/* ---------- how ---------- */
.how { padding: clamp(3rem, 8vw, 7rem) var(--pad); }
.how h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.steps { list-style: none; margin: clamp(2.5rem, 6vw, 5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 4rem); counter-reset: s; }
.steps li { position: relative; background: var(--peach); color: var(--ink); padding: 2.4rem 1.6rem 1.8rem; border-radius: 4px; box-shadow: 8px 10px 0 var(--cobalt-dark); transform: rotate(var(--r, 0deg)); }
.steps li:nth-child(1) { --r: -1.5deg; } .steps li:nth-child(2) { --r: 1.2deg; margin-top: 2.5rem; } .steps li:nth-child(3) { --r: -.8deg; margin-top: 5rem; }
.num { position: absolute; top: -1.6rem; left: 1.2rem; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; background: var(--cobalt); color: var(--cream); border: 3px solid var(--ink); border-radius: 50%; font: 700 1.7rem var(--display); box-shadow: 3px 4px 0 var(--ink); }
.steps h3 { font-size: 1.7rem; }
.steps p { margin: .7rem 0 0; font-weight: 700; color: var(--brown); }

/* ---------- discord ---------- */
.discord { padding: clamp(3rem, 8vw, 7rem) var(--pad) clamp(4rem, 9vw, 8rem); }
.stub { position: relative; max-width: 62rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem); color: var(--ink); transform: rotate(-.6deg); filter: drop-shadow(12px 14px 0 var(--cobalt-dark)); }
.paper.big { background: var(--peach); border-radius: 6px; }
.stub > :not(.paper) { position: relative; }
.stub h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); max-width: 14ch; }
.stub h2 em { color: var(--cobalt-deep); }
.support { margin: 1.6rem 0 0; max-width: 38rem; font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 700; }
.support strong { background: linear-gradient(transparent 55%, #fff1e2 55%); }
.perks { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .6rem; font-size: 1.08rem; color: var(--brown); }
.perks li { padding-left: 2rem; position: relative; }
.perks li::before { content: "✓"; position: absolute; left: 0; top: -.15rem; font: 1.7rem var(--hand); color: var(--cobalt-deep); }
.perks b { color: var(--ink); }
.discord-btn { margin-top: 2.2rem; background: var(--ink); color: var(--cream); box-shadow: 5px 6px 0 var(--cobalt-dark); }
.discord-btn:hover { box-shadow: 8px 10px 0 var(--cobalt-dark); }

/* ---------- footer ---------- */
.foot { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem 3rem; align-items: center; padding: 2.5rem var(--pad) 3rem; background: var(--cobalt-dark); font-size: .9rem; }
.made { display: flex; align-items: center; gap: .8rem; font-family: var(--hand); font-size: 1.4rem; color: var(--peach); }
.made img { border-radius: 50%; border: 2px solid var(--cream); }
.made b { color: var(--cream); font-weight: 400; }
.legal { margin: 0; max-width: 46rem; opacity: .85; }
.foot nav { display: flex; gap: 1.4rem; font-weight: 700; }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .print.reveal { transform: translateY(40px) rotate(var(--r, 0deg)); }
.js .print.reveal.in { transform: rotate(var(--r, 0deg)); }
.js .print.reveal.in:hover { transform: rotate(0deg) translateY(-8px) scale(1.025); }
.js .stub.reveal { transform: translateY(40px) rotate(-.6deg); }
.js .stub.reveal.in { transform: rotate(-.6deg); }

/* ---------- responsive ---------- */
@media (max-width: 62rem) {
  .hero { grid-template-columns: 1fr; padding-top: 7rem; min-height: 0; }
  .host { order: -1; width: clamp(12rem, 52vw, 18rem); justify-self: start; margin-bottom: 1rem; }
  .wall { grid-template-columns: 1fr 1fr; }
  .p1, .p2, .p3, .p4, .p5, .p6, .p7 { grid-column: auto; grid-row: auto; margin-top: 0; }
  .p1, .p3, .p6 { grid-column: 1 / span 2; }
  .p2 { margin-top: 1rem; } .p4 { grid-column: 1 / span 2; } .p5 { margin-top: 1.5rem; }
  .aside, .scribble { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps li:nth-child(2), .steps li:nth-child(3) { margin-top: 0; }
  .foot { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  .top nav a:not(:last-child) { display: none; }
  .wall { grid-template-columns: 1fr; }
  .p1, .p2, .p3, .p4, .p5, .p6, .p7 { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sp { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .print.reveal { transform: rotate(var(--r, 0deg)); }
  .brush path { stroke-dashoffset: 0; transition: none; }
}

/* ---------- socials ---------- */
.elsewhere { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin: 2.4rem 0 0; }
.elsewhere .hand { margin: 0; font-size: 1.6rem; }
.elsewhere a { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; text-decoration: none; padding: .35rem .8rem; border: 2px solid var(--cream); border-radius: 99px; transition: background .25s, color .25s, transform .25s var(--ease); }
.elsewhere a:hover { background: var(--cream); color: var(--ink); transform: translateY(-2px) rotate(-2deg); }
.foot nav { flex-wrap: wrap; }

/* ---------- brawl: free vs premium ---------- */
.versions { position: relative; display: grid; gap: 1rem; }
.ver { display: grid; gap: .5rem; }
.vlabel { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .8rem; color: var(--ink); }
.vlabel b { font: 700 1.25rem var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; }
.vlabel i { font: normal 700 .9rem var(--body); color: var(--brown); }
.screen.blue { background: linear-gradient(160deg, #3c7af0, #1f50c2); padding: clamp(1rem, 2.4vw, 1.8rem); }
.print.p6 { padding: 1.6rem 12px 4.6rem; }
@media (max-width: 62rem) { .p6 { grid-column: 1 / span 2; } .p7 { grid-column: 1 / span 2; grid-row: auto; } }

/* ---------- real animated clips ---------- */
.print .clip, .print video.clip { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 4px; background: transparent; }
.print .clip.tall { max-height: 22rem; width: auto; max-width: 100%; margin-inline: auto; }
.pair { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: clamp(.6rem, 1.6vw, 1.2rem); align-items: center; }
.stack2 { display: grid; gap: clamp(.6rem, 1.6vw, 1rem); }
.screen.soft { background: #e8e4f1; }

/* Brawl previews share the free Discord entry point. */
.ver { text-decoration: none; border-radius: 4px; }
.ver:hover .vaction { background: var(--ink); }
.vaction { justify-self: start; padding: .35rem .8rem; border-radius: 99px; background: var(--cobalt); color: var(--cream); font: 700 .9rem var(--body); }

.donate-spot { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px dashed var(--ink, #10121c); }
.donate-spot h3 { font: 600 clamp(1.4rem, 3vw, 2rem)/1.15 "Fraunces", serif; margin: .4rem 0 .8rem; }
.donate-spot p { max-width: 42rem; }
.donate-spot .btn { margin-top: 1rem; }
.donate-note { font-size: .85rem; margin-top: .9rem; }
.donate-pending { opacity: .6; cursor: default; }
[hidden] { display: none !important; }

/* Live Brawl demos share the actual widget, including its maker credit. */
.brawl-preview { pointer-events: none; display: block; width: 100%; height: 240px; border: 0; background: transparent; }
.brawl-preview.tall { width: min(100%, 340px); height: 460px; margin-inline: auto; }
