/* Petty Bean — palette and type from the studio brand bible (bible/brand.md). */
:root {
  --cream: #fbf1e2; --sage: #eef2e4; --sage2: #e0e9d6; --lav: #cfc6ec; --peach: #f2b49b;
  --ink: #1d1b2e; --teal: #2f6f73; --orange: #ff8a3d; --mustard: #f2c14e; --beanie: #3f8f6b;
  --head: "Archivo Black", "Fira Sans", system-ui, sans-serif;
  --body: "Fira Sans", system-ui, sans-serif;
  --r: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 18px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--teal); }
img { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.05; margin: 0 0 .4em; letter-spacing: -.01em; }
.kicker { font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--teal); margin: 0 0 10px; }
.center { text-align: center; }
.small-print { font-size: 14px; opacity: .75; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row.center { justify-content: center; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(251, 241, 226, .88); backdrop-filter: blur(10px); border-bottom: 2px solid rgba(29, 27, 46, .06); }
.logo { font-family: var(--head); font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.nav nav { display: flex; gap: 18px; margin-left: auto; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.nav nav a:hover { color: var(--teal); }
@media (max-width: 640px) { .nav nav { display: none; } .nav .btn { margin-left: auto; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 800 17px/1 var(--body); padding: 15px 22px; border-radius: 999px; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .hud-btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn.small { padding: 10px 16px; font-size: 15px; }
.btn-yt { background: var(--ink); color: #fff; box-shadow: 0 4px 0 #000; }
.btn-go { background: var(--orange); color: var(--ink); box-shadow: 0 4px 0 #c45f1d; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 0 4px 0 var(--ink); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(16px, 3vw, 40px); align-items: center;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 48px) 24px; max-width: 1400px; margin: 0 auto; }
.hero h1 { font-size: clamp(44px, 6.4vw, 92px); }
.hero h1 span { color: var(--teal); }
.lede { font-size: clamp(18px, 1.6vw, 21px); max-width: 34em; }
.lede.center { margin-left: auto; margin-right: auto; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.psst { font-style: italic; opacity: .7; margin: 0; }
.stage-wrap { position: relative; }
.stage { position: relative; aspect-ratio: 1 / 1; width: 100%; border-radius: 32px; overflow: hidden; background: var(--cream);
  box-shadow: 0 0 0 3px var(--ink), 0 10px 0 var(--ink); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: pointer; }
.hero.playing { grid-template-columns: 1fr; }
.hero.playing .hero-copy { display: none; }
.hero.playing .stage { aspect-ratio: 16 / 9; max-height: calc(100vh - 110px); touch-action: none; }
.hero.playing .stage canvas { cursor: none; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .stage-wrap { order: -1; }
  .stage { aspect-ratio: 4 / 3.4; }
  .hero.playing .stage { aspect-ratio: 3 / 4; max-height: calc(100svh - 90px); }
}

/* speech bubble (Fira Sans, tail points at the speaker) */
.bubble { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 14px)); max-width: min(78%, 320px); width: max-content;
  background: #fff; color: var(--ink); font: 600 17px/1.35 var(--body); padding: 12px 16px; border-radius: 18px;
  box-shadow: 0 0 0 2.5px var(--ink); pointer-events: none; text-align: center; }
.bubble::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -11px; width: 18px; height: 18px; background: #fff;
  transform: translateX(-50%) rotate(45deg); box-shadow: 2.5px 2.5px 0 0 var(--ink); }
.bubble.machine { background: var(--ink); color: #fff; box-shadow: 0 0 0 2.5px var(--orange); font-family: var(--head); font-weight: 400; letter-spacing: .02em; }
.bubble.machine::after { background: var(--ink); box-shadow: 2.5px 2.5px 0 0 var(--orange); }

/* game HUD and overlays */
.hud { position: absolute; inset: 12px 12px auto 12px; z-index: 6; display: flex; align-items: center; gap: 10px; pointer-events: none; white-space: nowrap; }
@media (max-width: 520px) { .hud { inset: 8px 8px auto 8px; gap: 6px; } .hud-score { padding: 6px 12px; font-size: 15px; } .hud-shame { padding: 8px 10px; } .hud-shame i { width: 13px; height: 13px; } .hud-btn { padding: 7px 10px; font-size: 13px; } }
.hud-score { background: #fff; border-radius: 999px; padding: 8px 16px; box-shadow: 0 0 0 2.5px var(--ink); font-weight: 600; }
.hud-score b { font-family: var(--head); font-weight: 400; font-size: 20px; }
.hud-shame { display: flex; gap: 6px; background: #fff; border-radius: 999px; padding: 9px 12px; box-shadow: 0 0 0 2.5px var(--ink); }
.hud-shame i { width: 16px; height: 16px; border-radius: 50%; background: var(--orange); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); transition: background .3s, transform .3s; }
.hud-shame i.used { background: #d9d2c4; transform: scale(.85); }
.hud-btn { pointer-events: auto; margin-left: auto; background: #fff; border: 0; border-radius: 999px; padding: 9px 14px; font: 600 14px var(--body);
  box-shadow: 0 0 0 2.5px var(--ink); cursor: pointer; color: var(--ink); }
.hud-btn + .hud-btn { margin-left: 0; }
.overlay { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 24px; background: rgba(251, 241, 226, .86); backdrop-filter: blur(3px); }
.overlay h2 { font-size: clamp(30px, 5vw, 58px); }
.overlay p { margin: 0 0 12px; font-size: 19px; }
.overlay .big { font-size: 22px; }
.overlay .big b { font-family: var(--head); font-weight: 400; font-size: 1.4em; color: var(--teal); }
.verdict { font-style: italic; max-width: 26em; }
.overlay .row { justify-content: center; margin-top: 8px; }
.nojs { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 28px clamp(16px, 4vw, 48px); max-width: 1304px; background: var(--ink); color: var(--cream);
  border-radius: var(--r); overflow: hidden; }
@media (min-width: 1400px) { .stats { margin-left: auto; margin-right: auto; } }
.stats div { padding: 22px 20px; border-right: 1px solid rgba(255,255,255,.12); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--head); font-weight: 400; font-size: clamp(28px, 3vw, 40px); color: var(--mustard); }
.stats span { font-size: 15px; opacity: .85; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } .stats div:nth-child(2) { border-right: 0; } .stats div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); } }

/* watch */
.watch { max-width: 1304px; margin: 64px auto; padding: 0 clamp(16px, 4vw, 48px); display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; }
@media (max-width: 960px) { .watch { grid-template-columns: 1fr; } }
.ep-card { background: #fff; border-radius: var(--r); box-shadow: 0 0 0 3px var(--ink), 0 8px 0 var(--ink); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
@media (max-width: 680px) { .ep-card { grid-template-columns: 1fr; } }
.thumb { position: relative; background: var(--orange); min-height: 240px; overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-word { position: absolute; left: 16px; bottom: 14px; font-family: var(--head); color: #fff; font-size: clamp(26px, 3vw, 38px); line-height: .95;
  text-shadow: 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink); }
.ep-copy { padding: 26px; }
.ep-copy h2 { font-size: clamp(30px, 3vw, 42px); }
.soon { font-weight: 800; color: var(--teal); }
.press { background: var(--lav); border-radius: var(--r); padding: 26px; }
.press h3 { font-size: 24px; }
.press figure { margin: 0 0 16px; }
.press blockquote { margin: 0; font-family: var(--head); font-size: 26px; }
.press figcaption { font-size: 15px; opacity: .8; }

/* grievances */
.grievances { background: var(--teal); color: var(--cream); padding: clamp(48px, 7vw, 96px) clamp(16px, 4vw, 48px); text-align: center; }
.grievances .kicker { color: var(--mustard); }
.grievance { font-family: var(--head); font-size: clamp(24px, 3.4vw, 44px); line-height: 1.18; max-width: 22em; margin: 0 auto; min-height: 3.6em;
  display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.grievance.fade { opacity: 0; }
.sig { font-style: italic; opacity: .85; margin: 12px 0 26px; }
.grievances .btn-ghost { box-shadow: inset 0 0 0 2px var(--ink), 0 4px 0 var(--ink); }

/* merch */
.merch { max-width: 1304px; margin: 72px auto; padding: 0 clamp(16px, 4vw, 48px); text-align: center; }
.merch h2 { font-size: clamp(32px, 4.6vw, 60px); }
.merch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 30px 0; text-align: left; }
@media (max-width: 1000px) { .merch-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .merch-grid { grid-template-columns: 1fr; } }
.item { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: 0 0 0 3px var(--ink), 0 6px 0 var(--ink); position: relative; }
.item h3 { font-size: 22px; margin-top: 14px; }
.item p { font-size: 16px; margin: 0 0 30px; }
.tag { position: absolute; left: 18px; bottom: 16px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--orange); }
.mock { height: 190px; border-radius: 16px; background: var(--sage); position: relative; display: grid; place-items: center; overflow: hidden; }
/* beanie: dome + rolled brim + bobble, in the canon colours */
.mock-beanie span { width: 150px; height: 84px; background: var(--beanie); border-radius: 80px 80px 10px 10px; position: relative; margin-top: 40px; }
.mock-beanie span::before { content: ""; position: absolute; left: -8px; right: -8px; bottom: -14px; height: 30px; background: #357a5b; border-radius: 14px;
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 6px, transparent 6px 12px); }
.mock-beanie span::after { content: ""; position: absolute; left: 50%; top: -26px; width: 40px; height: 40px; transform: translateX(-50%); background: #f6f2ea; border-radius: 50%;
  box-shadow: inset -4px -5px 0 rgba(0,0,0,.08); }
.mock-mug { background: var(--lav); }
.mock-mug::before { content: ""; position: absolute; width: 120px; height: 132px; background: #fff; border-radius: 10px 10px 26px 26px; box-shadow: inset -10px 0 0 rgba(0,0,0,.05); }
.mock-mug::after { content: ""; position: absolute; width: 46px; height: 64px; border: 12px solid #fff; border-left: 0; border-radius: 0 34px 34px 0; margin-left: 150px; }
.mock-mug img { position: relative; width: 74px; height: 74px; border-radius: 50%; margin-top: -26px; z-index: 1; }
.mug-word { position: absolute; z-index: 1; font-family: var(--head); font-size: 18px; margin-top: 80px; }
.mock-tote { background: var(--peach); }
.mock-tote::before { content: ""; position: absolute; width: 140px; height: 150px; background: #f3ead8; border-radius: 6px; margin-top: 30px; }
.mock-tote::after { content: ""; position: absolute; top: 4px; width: 70px; height: 60px; border: 8px solid #f3ead8; border-bottom: 0; border-radius: 40px 40px 0 0; }
.mock-tote img { position: relative; width: 96px; height: 96px; border-radius: 50%; margin-top: 30px; z-index: 1; }
.mock-light { background: var(--ink); }
.mock-light .beacon { width: 70px; height: 88px; border-radius: 36px 36px 8px 8px; background: var(--orange); position: relative;
  box-shadow: 0 0 40px 14px rgba(255, 138, 61, .55); animation: shame 1.6s ease-in-out infinite; }
.mock-light .beacon::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: -18px; height: 18px; background: #5a5f7a; border-radius: 6px; }
@keyframes shame { 50% { box-shadow: 0 0 70px 26px rgba(255, 138, 61, .8); filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .mock-light .beacon { animation: none; } html { scroll-behavior: auto; } }

/* footer */
.foot { background: var(--ink); color: var(--cream); text-align: center; padding: 40px 20px; }
.foot a { color: var(--mustard); }
.foot p { margin: 6px 0; }

/* 404 */
.lost-hero { min-height: calc(100vh - 200px); }
.lost-path { font-size: 16px; opacity: .8; }
.lost-path code { background: #fff; padding: 2px 8px; border-radius: 8px; box-shadow: 0 0 0 2px var(--ink); word-break: break-all; }

/* the outburst */
.bubble.shout { background: var(--orange); color: var(--ink); font: 400 clamp(22px, 3vw, 30px)/1.1 var(--head); letter-spacing: .01em; padding: 14px 20px; box-shadow: 0 0 0 3px var(--ink); }
.bubble.shout::after { background: var(--orange); box-shadow: 3px 3px 0 0 var(--ink); }
.stage.jolt { animation: jolt .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes jolt { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-6px, 2px); } 40%, 60% { transform: translate(6px, -1px); } }

/* sound toggle: always on the stage, top right (the HUD sits left of it while playing) */
.snd { position: absolute; z-index: 8; top: 12px; right: 12px; margin: 0; }
.hud { right: 140px; }
.hud #quit { margin-left: auto; }
@media (max-width: 520px) { .snd { top: 8px; right: 8px; } .hud { right: 108px; } }
