/* ===== The Hideout — Bustville (MidEvils-style single-scene site) ===== */
/* Palette: CONMEN brand tokens (Brand Guide/colors.json) */

:root {
  --underworld: #1A1A1D;
  --underworld-shade: #0E0E10;
  --slate: #232329;
  --concrete: #3A3A42;
  --loot-gold: #FFC93C;
  --gold-shade: #D9A21F;
  --money-green: #2EC27E;
  --alarm-red: #E63946;
  --bone: #F5F5F2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--underworld-shade);
  font-family: 'Anton', Impact, sans-serif;
}

/* ===== Scene fills the viewport ===== */
.scene-wrap { position: fixed; inset: 0; }
#scene { width: 100%; height: 100%; display: block; }

/* ===== Top UI ===== */
.ui-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  z-index: 30;
  pointer-events: none;
}
.ui-left, .ui-right {
  display: flex;
  gap: 14px;
  align-items: center;
  pointer-events: auto;
}
.ui-btn {
  background: none;
  border: none;
  color: var(--loot-gold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transition: transform .15s ease, color .15s ease;
}
.ui-btn:hover { transform: scale(1.12); color: #FFD96B; }

#menuBtn { flex-direction: column; gap: 6px; }
#menuBtn span {
  display: block;
  width: 30px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}

.sound-btn .mute-x { display: none; }
.sound-btn .wave   { display: initial; }
.sound-btn.muted .mute-x { display: initial; }
.sound-btn.muted .wave   { display: none; }

.social { color: var(--loot-gold); text-decoration: none; }

/* ===== Slide-out menu ===== */
.menu-panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(420px, 88vw);
  background: var(--slate);
  border-right: 5px solid #000;
  z-index: 50;
  transform: translateX(-102%);
  transition: transform .35s cubic-bezier(.22,.9,.3,1);
  display: flex;
  flex-direction: column;
  padding: 26px 34px;
}
.menu-panel.open { transform: translateX(0); }

.menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
}
.menu-label {
  font-family: 'Luckiest Guy', 'Anton', sans-serif;
  color: var(--money-green);
  font-size: 22px;
  letter-spacing: 2px;
}
#menuClose { font-size: 34px; line-height: 1; color: var(--loot-gold); }

.menu-links { list-style: none; }
.menu-links a {
  font-family: 'Luckiest Guy', 'Anton', sans-serif;
  display: inline-block;
  color: var(--bone);
  text-decoration: none;
  font-size: clamp(22px, 3.4vh, 32px);
  letter-spacing: 1px;
  padding: 7px 0;
  transition: color .15s ease, transform .15s ease;
}
.soon-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 3px 10px 0;
  background: var(--alarm-red);
  color: var(--bone);
  font-size: 14px;
  letter-spacing: 2px;
  border-radius: 6px;
  transform: rotate(-4deg);
}
.mint-soon { opacity: .85; }
.menu-links a:hover,
.menu-links a.active { color: var(--loot-gold); transform: translateX(6px); }
.menu-links a.active { text-decoration: underline; text-underline-offset: 8px; }

.menu-foot {
  margin-top: auto;
  color: var(--money-green);
  font-family: 'Anton', sans-serif;
  font-size: 15px;
  letter-spacing: .5px;
  opacity: .85;
}

.menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.menu-scrim.show { opacity: 1; pointer-events: auto; }

/* ===== Bottom hint ===== */
.hint {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--bone);
  opacity: .5;
  font-family: 'Anton', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  z-index: 20;
  pointer-events: none;
  white-space: nowrap;
}

/* ===== SVG text styles ===== */
#scene text { stroke: none; }

.sign-text-big {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 46px;
  letter-spacing: 2px;
  fill: var(--loot-gold);
}
.sign-text-small {
  font-family: 'Anton', sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  fill: var(--bone);
  opacity: .85;
}
.plan-title {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 38px;
  letter-spacing: 2px;
  fill: var(--underworld);
}
.plan-sub {
  font-family: 'Anton', sans-serif;
  font-size: 17px;
  letter-spacing: 1px;
  fill: var(--alarm-red);
}
.bubble-text {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  fill: var(--underworld);
}
.tv-caption {
  font-family: 'Anton', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  fill: var(--loot-gold);
}
.wanted-title {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 31px;
  letter-spacing: 1px;
  fill: var(--loot-gold);
}
.poster-question {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 52px;
  fill: var(--loot-gold);
}
.poster-soon {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  fill: var(--bone);
}
.watch-title {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 24px;
  letter-spacing: 1px;
  fill: var(--underworld);
}
.watch-sub {
  font-family: 'Anton', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  fill: var(--alarm-red);
}
.watch-row {
  font-family: 'Anton', sans-serif;
  font-size: 14px;
  fill: var(--underworld);
}
.watch-score {
  font-family: 'Anton', sans-serif;
  font-size: 14px;
  fill: var(--gold-shade);
}
.watch-note {
  font-family: 'Anton', sans-serif;
  font-size: 11px;
  letter-spacing: .5px;
  fill: var(--money-green);
}
.wanted-sub {
  font-family: 'Anton', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  fill: var(--bone);
  opacity: .8;
}
.wanted-note {
  font-family: 'Anton', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  fill: var(--money-green);
}
.poster-rank {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 17px;
  fill: var(--alarm-red);
}
.poster-name {
  font-family: 'Anton', sans-serif;
  font-size: 12px;
  fill: var(--underworld);
}
.poster-score {
  font-family: 'Anton', sans-serif;
  font-size: 12px;
  fill: var(--gold-shade);
}
.duffel-label {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  fill: var(--money-green);
}

/* ===================================================== */
/* ================  SCENE ANIMATIONS  ================= */
/* ===================================================== */

#scene .eye,
#scene .bob,
#scene .drool,
#scene .steam,
#scene .coin,
#scene .loose-note,
#scene .jetpuff,
#scene .tvflicker,
#scene .tvexhaust,
#scene .chase,
#scene .bulbglass {
  transform-box: fill-box;
  transform-origin: center;
}

/* blinking */
@keyframes blink {
  0%, 91%, 100% { transform: scaleY(1); }
  93%, 95%      { transform: scaleY(0.08); }
}
.eye { animation: blink 5.2s infinite; }
#boss .eye    { animation-duration: 4.6s; }
#maniac .eye  { animation-duration: 2.9s; }
#jesse .eye   { animation-duration: 6.4s; }

/* idle breathing */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.bob       { animation: bob 3.2s ease-in-out infinite; }
.bob.slow  { animation-duration: 4.1s; }
.bob.slow2 { animation-duration: 5s; }

/* hanging bulb: pendulum swing, whole rig rotates around ceiling anchor */
@keyframes bulbswing {
  0%, 100% { transform: rotate(-2.4deg); }
  50%      { transform: rotate(2.4deg); }
}
.bulb-swing {
  transform-box: view-box;
  transform-origin: 870px 172px;
  animation: bulbswing 4.6s ease-in-out infinite;
}
@keyframes bulbflick {
  0%, 100% { opacity: 1; }
  46%      { opacity: 1; }
  48%      { opacity: .55; }
  50%      { opacity: 1; }
  83%      { opacity: 1; }
  84%      { opacity: .7; }
  85%      { opacity: 1; }
}
.bulbglass, .lightcone { animation: bulbflick 7s linear infinite; }

/* sign sway */
@keyframes sway {
  0%, 100% { transform: rotate(-0.6deg); }
  50%      { transform: rotate(0.6deg); }
}
.sign-board {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: sway 6s ease-in-out infinite;
}

/* loose corkboard note dangles */
@keyframes dangle {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(7deg); }
}
.loose-note {
  transform-origin: 20% 0%;
  animation: dangle 3.8s ease-in-out infinite;
}

/* drool drip */
@keyframes drip {
  0%   { transform: translateY(0) scaleY(.4); opacity: 0; }
  30%  { opacity: .8; }
  80%  { transform: translateY(26px) scaleY(1.2); opacity: .7; }
  100% { transform: translateY(34px) scaleY(.6); opacity: 0; }
}
.drool { animation: drip 2.6s ease-in infinite; }

/* sleeping cat: slow breathing */
@keyframes catbreathe {
  0%, 100% { transform: scale(1, 1); }
  50%      { transform: scale(1.015, 1.05); }
}
.catbreathe {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: catbreathe 3.4s ease-in-out infinite;
}

/* floating Z's, staggered */
@keyframes zfloat {
  0%   { opacity: 0; transform: translate(0, 6px); }
  30%  { opacity: .9; }
  100% { opacity: 0; transform: translate(8px, -26px); }
}
.z {
  transform-box: fill-box;
  transform-origin: center;
  animation: zfloat 4.2s ease-out infinite;
}
.z.z2 { animation-delay: 1.4s; }
.z.z3 { animation-delay: 2.8s; }

/* coins glint */
@keyframes glint {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}
.coin.c1 { animation: glint 2.4s ease-in-out infinite; }
.coin.c2 { animation: glint 2.4s ease-in-out infinite .5s; }
.coin.c3 { animation: glint 2.4s ease-in-out infinite 1s; }

/* TV screen flicker + chase loop */
@keyframes tvflick {
  0%, 100% { opacity: 1; }
  50%      { opacity: .85; }
  52%      { opacity: .95; }
  54%      { opacity: .8; }
}
.tvflicker { animation: tvflick 1.6s linear infinite; }
@keyframes chase {
  0%   { transform: translateX(-90px); }
  100% { transform: translateX(230px); }
}
.chase { animation: chase 5s linear infinite; }
@keyframes exhaust {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}
.tvexhaust { animation: exhaust .3s linear infinite; }

/* police light sweep through the window, every ~28s */
@keyframes sweepred {
  0%, 86%, 100% { opacity: 0; transform: translateX(0); }
  88%  { opacity: .18; transform: translateX(150px); }
  92%  { opacity: .3;  transform: translateX(600px); }
  96%  { opacity: .14; transform: translateX(1100px); }
  99%  { opacity: 0;   transform: translateX(1500px); }
}
@keyframes sweepblue {
  0%, 87%, 100% { opacity: 0; transform: translateX(0); }
  89%  { opacity: .16; transform: translateX(150px); }
  93%  { opacity: .28; transform: translateX(620px); }
  97%  { opacity: .12; transform: translateX(1120px); }
  99.5%{ opacity: 0;   transform: translateX(1500px); }
}
.sweep.red  { animation: sweepred 28s linear infinite; }
.sweep.blue { animation: sweepblue 28s linear infinite; }

/* ===== Character hover: speech bubbles ===== */
.char { cursor: pointer; }
.char .bubble {
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.char:hover .bubble { opacity: 1; }
.char:hover .bob { animation-play-state: paused; }

#tvLink { cursor: pointer; }

/* ===== Safe alarm easter egg ===== */
@keyframes alarmflash {
  0%, 100% { opacity: 0; }
  15%, 45%, 75% { opacity: .28; }
  30%, 60%, 90% { opacity: .05; }
}
body.alarm #alarmwash { animation: alarmflash 2.4s linear; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 3px); }
  40% { transform: translate(5px, -4px); }
  60% { transform: translate(-4px, -3px); }
  80% { transform: translate(4px, 3px); }
}
body.alarm #scene { animation: shake .5s linear 3; }

/* ===== Small screens ===== */
@media (max-width: 640px) {
  .hint { font-size: 11px; }
  .menu-panel { padding: 20px 24px; }
}
