/* goblynz — the pit: the homepage hero. a physics pile of goblyn heads (logic in assets/js/pit.js) */
.pit {
  position: relative; height: 100svh; min-height: 500px; overflow: hidden; isolation: isolate;
  background: #e4ff3a; color: var(--ink); user-select: none; -webkit-user-select: none;
}
/* sunburst behind everything, flat bands */
.burst { position: absolute; left: 50%; top: 40%; width: 260vmax; height: 260vmax; transform: translate(-50%, -50%); z-index: -3;
  background: repeating-conic-gradient(from 0deg, #e4ff3a 0deg 9deg, #d6f02c 9deg 18deg); animation: burst-spin 120s linear infinite; }
@keyframes burst-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
/* the marquee right after the pit lies flat under the hazard stripe, so none of it peeks above the fold */
.pit + .marquee { transform: none; margin-top: 0; }
.floorline { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: var(--ink); z-index: 6; }

/* the logo: each letter is a solid object in the physics world */
.logo-wrap { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; pointer-events: none; }
.logo-wrap svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(8px 9px 0 rgba(23, 18, 13, .9)); }
.logo-wrap path { fill: #17120d; fill-rule: evenodd; transform-box: fill-box; transform-origin: 50% 100%; }
.logo-wrap .rim path { fill: #fffdf3; stroke: #fffdf3; stroke-width: 34px; stroke-linejoin: round; }

.plaque {
  position: absolute; left: 50%; transform: translateX(-50%) rotate(-1.5deg); z-index: 3;
  background: #fffdf3; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink);
  padding: 16px 22px 18px; text-align: center; width: min(760px, calc(100vw - 32px));
}
.plaque h1 { margin: 0; font: 800 clamp(1.45rem, 2.6vw, 2.2rem)/1.05 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; }
.plaque h1 em { font-style: normal; display: inline-block; background: var(--ink); color: #e4ff3a; padding: 0 .22em .06em; border-radius: 10px; transform: rotate(-3deg); }
.plaque p { margin: 6px 0 14px; font: 700 1.2rem/1.2 "Gaegu", cursive; }
.plaque .ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.plaque .btn { font-size: .95rem; padding: .6em 1.05em; box-shadow: 4px 4px 0 var(--ink); }
.plaque .btn.hot { --bg: #ff6a1f; }
.plaque .more { display: inline-block; margin-top: 12px; font: 700 .95rem "Bricolage Grotesque", sans-serif; }
/* the buy button: dark, so it reads apart from the three toys next to it */
.plaque .btn.buy { --bg: var(--ink); color: #e4ff3a; }

.hud { position: absolute; z-index: 8; right: clamp(16px, 3vw, 40px); top: 96px; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.hud div { background: var(--ink); color: #fffdf3; border-radius: 10px; padding: 6px 12px; font: 700 12px "Space Mono", monospace; letter-spacing: .12em; text-transform: uppercase; box-shadow: 4px 4px 0 rgba(23, 18, 13, .25); }
.hud b { color: #e4ff3a; font-size: 15px; margin-left: 6px; display: inline-block; min-width: 2ch; text-align: right; }
.hud .warn { background: #ff3d2e; transform: rotate(2deg); }
.hint { position: absolute; z-index: 8; left: clamp(16px, 3vw, 40px); top: 100px; font: 700 1.35rem/1.05 "Gaegu", cursive; transform: rotate(-4deg); pointer-events: none; }
.hint svg { display: block; width: 70px; margin: 4px 0 0 30px; }

/* goblyn heads: real DOM images driven by the physics bodies */
.head { position: absolute; left: 0; top: 0; z-index: 5; will-change: transform; touch-action: none; cursor: grab; }
.head img { display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(5px 6px 0 rgba(23, 18, 13, .35)); -webkit-user-drag: none; }
.head.grabbed { cursor: grabbing; z-index: 7; }
.head.grabbed img { filter: drop-shadow(12px 16px 0 rgba(23, 18, 13, .3)); }
.head.leaving { transition: opacity .35s, scale .35s; opacity: 0; scale: .2; }

.say { position: absolute; z-index: 9; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap;
  background: #fffdf3; border: 3px solid var(--ink); border-radius: 16px; padding: 5px 12px; font: 700 1.2rem/1.1 "Gaegu", cursive; box-shadow: 4px 4px 0 var(--ink);
  animation: say 1.9s forwards; }
.say::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 14px; height: 14px; background: #fffdf3; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.say.small { font-size: 1rem; padding: 3px 9px; animation-duration: 1.1s; }
@keyframes say { 0% { opacity: 0; scale: .5; } 10% { opacity: 1; scale: 1.06; } 18% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; translate: 0 -14px; } }

.trapdoor { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; z-index: 6; background: repeating-linear-gradient(-45deg, #ffd21f 0 18px, #17120d 18px 36px); transform-origin: 0 0; transition: transform .25s cubic-bezier(.5, 0, .75, 0); }
.trapdoor.open { transform: rotate(14deg) translateY(30px); }

.plaque sup { font: 800 .8em "Bricolage Grotesque", sans-serif; color: #ff3d2e; }
.fine { display: block; margin: 10px auto 0; max-width: 100%; background: none; border: 0; border-top: 2px dashed rgba(23, 18, 13, .25); padding: 9px 4px 0;
  font: 700 .78rem/1.35 "Space Mono", monospace; color: #6d6656; cursor: pointer; }
.fine::before { content: "* "; color: #ff3d2e; }
.fine i { font-style: normal; color: var(--ink); }
.fine:hover span { color: var(--ink); }
/* pressure gauge */
.hud .gauge { display: flex; align-items: center; gap: 8px; transition: background .2s; }
.gauge i { display: block; width: 96px; height: 11px; border: 2px solid #fffdf3; border-radius: 6px; overflow: hidden; }
.hud .gauge i b { display: block; height: 100%; width: 0; margin: 0; min-width: 0; background: #e4ff3a; transition: width .25s; }
.hud .gauge.warm i b { background: #ffb02e; }
.hud .gauge.crit { background: #ff3d2e; animation: crit .3s steps(1) infinite; }
.hud .gauge.crit i b { background: #fffdf3; }
@keyframes crit { 50% { transform: rotate(-2deg) scale(1.05); } }
.hud .corny { background: #fff3d6; color: var(--ink); }
.hud .corny b { color: #c66b22; }
.rumble { animation: rumble .07s linear infinite; }
@keyframes rumble { 0% { transform: translate(0, 0); } 25% { transform: translate(-4px, 2px); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, -3px); } }

/* things: what the den turns into. physics pieces like the heads, but you click them */
.thing { position: absolute; left: 0; top: 0; z-index: 5; will-change: transform; touch-action: none; cursor: pointer; }
.thing img { display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(4px 5px 0 rgba(23, 18, 13, .3)); -webkit-user-drag: none; transition: scale .15s; }
.thing.k-bubble img { filter: none; }
.thing:hover img { scale: 1.1; }
.thing.grabbed { z-index: 7; }
.pit-puff { position: absolute; z-index: 6; border-radius: 50%; background: #fffdf3; pointer-events: none; }
.ringfx { position: absolute; z-index: 8; border-radius: 50%; border: 4px solid var(--ink); pointer-events: none; }
.stink { position: absolute; z-index: 8; border-radius: 50%; background: #9ccf3a; opacity: .8; pointer-events: none; transform: translate(-50%, -50%); }
.drop { position: absolute; z-index: 8; width: 9px; height: 9px; border-radius: 50%; background: #bfeeff; border: 2px solid var(--ink); pointer-events: none; }
.pebble { position: absolute; z-index: 8; width: 13px; height: 11px; border-radius: 40% 55% 45% 50%; background: #9a948a; border: 2.5px solid var(--ink); pointer-events: none; }

/* easter eggs */
.hud .clicky { pointer-events: auto; cursor: pointer; transition: transform .15s; }
.hud .clicky:hover { transform: translateX(-4px) rotate(-1deg); }
.hud .secrets { background: #6b3bd1; }
.logo-wrap .ink path { pointer-events: visiblePainted; cursor: pointer; }
.btn.broken { --bg: #c9c3b3 !important; transform: rotate(-8deg) translateY(4px); }
.disco .burst { animation: burst-spin 3s linear infinite, disco-hue 1.68s steps(4) infinite; }
@keyframes disco-hue { to { filter: hue-rotate(360deg); } }
.achv { position: fixed; z-index: 500; left: 50%; top: 92px; transform: translate(-50%, -140%); display: flex; gap: 12px; align-items: center;
  background: var(--ink); color: #fffdf3; border: 3px solid #e4ff3a; border-radius: 16px; padding: 10px 18px 10px 12px; box-shadow: 6px 6px 0 rgba(23, 18, 13, .35); max-width: calc(100vw - 24px); }
.achv-cup { font-size: 2rem; line-height: 1; }
.achv small { display: block; font: 700 10px "Space Mono", monospace; letter-spacing: .16em; color: #e4ff3a; text-transform: uppercase; }
.achv b { display: block; font: 800 1.15rem/1.1 "Bricolage Grotesque", sans-serif; }
.achv i { display: block; font: 700 1rem/1.1 "Gaegu", cursive; font-style: normal; opacity: .8; }
.secret-card { display: block !important; width: min(560px, 100%) !important; padding: 26px 26px 22px; }
.secret-card h2 { margin: 0 0 4px; font: 800 1.9rem/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; }
.secret-card > p { margin: 0 0 14px; font: 700 1.15rem "Gaegu", cursive; }
.secret-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.secret-card li { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 10px; background: #ece2c8; font-size: .95rem; }
.secret-card li b { flex: none; font: 800 .95rem "Bricolage Grotesque", sans-serif; }
.secret-card li span { font: 700 1.05rem/1.2 "Gaegu", cursive; opacity: .75; }
.secret-card li.got { background: #e4ff3a; }
.secret-card li.got span { opacity: 1; }
.shred, .crumb { position: absolute; z-index: 8; pointer-events: none; }
.shred { background: #a9c93a; border: 2.5px solid var(--ink); }
.crumb { width: 10px; height: 9px; border-radius: 50%; background: #fff3d6; border: 2px solid var(--ink); }
.popword { position: absolute; z-index: 9; pointer-events: none; white-space: nowrap; transform: translate(-50%, -50%);
  font: italic 800 2.6rem/1 "Bricolage Grotesque", sans-serif; color: #ff3d2e; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; letter-spacing: -.02em; }
.popword.yum { font: 700 1.7rem/1 "Gaegu", cursive; color: #fffdf3; -webkit-text-stroke: 6px var(--ink); }

.grainy { position: absolute; inset: 0; pointer-events: none; z-index: 20; opacity: .26; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.shake { animation: pit-shake .5s; }
@keyframes pit-shake { 10%, 50%, 90% { transform: translate(-8px, 4px); } 30%, 70% { transform: translate(8px, -4px); } }

@media (max-width: 760px) {
  .hint { display: none; }
  .hud { top: 92px; }
  .hud div { font-size: 10px; padding: 5px 9px; }
  .hud .m-hide, .hud #poppedRow, .hud > div:first-child { display: none !important; }
  .hud { gap: 6px; }
  .gauge i { width: 64px; }
  .popword { font-size: 2rem; }
  .plaque { padding: 12px 14px 14px; border-radius: 18px; }
  .plaque p { font-size: 1.05rem; margin-bottom: 10px; }
  .plaque .btn { font-size: .85rem; padding: .5em .85em; }
  /* phones: the menu bar already shows the buy button, keep the plaque short */
  .plaque .btn.buy { display: none; }
}
