:root {
  --sky-1: #1a1408;
  --sky-2: #2e2410;
  --accent: #d9a441;       /* hexallo gold */
  --accent-2: #b9792a;     /* darker bronze */
  --accent-light: #f3cf7a; /* light gold highlight */
  --ground: #3a2c12;
}

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

html, body {
  height: 100%;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: #fff;
  background: linear-gradient(160deg, var(--sky-1), var(--sky-2));
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 16px;
  position: relative;
}

/* ---------- Floating background blobs ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .35;
  animation: float 12s ease-in-out infinite;
}
.b1 { width: 320px; height: 320px; background: #d9a441; top: -60px; left: -60px; }
.b2 { width: 280px; height: 280px; background: #b9792a; bottom: -80px; right: -40px; animation-delay: -4s; }
.b3 { width: 220px; height: 220px; background: #f3cf7a; top: 40%; left: 60%; animation-delay: -8s; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-40px) translateX(20px) scale(1.1); }
}

/* ---------- Header ---------- */
.top {
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.logo {
  display: block;
  width: clamp(110px, 18vw, 160px);
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 8px 24px rgba(217,164,65,.45));
  animation: logoIn .8s ease-out both, logoFloat 4s ease-in-out 1s infinite;
}
@keyframes logoIn {
  from { opacity: 0; transform: translateY(-20px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-2));
  color: #2a1d05;
  font-weight: bold;
  padding: 6px 16px;
  border-radius: 999px;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(217,164,65,.35);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.title {
  font-size: clamp(28px, 5vw, 52px);
  margin-top: 14px;
  text-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.title span {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle { margin-top: 8px; opacity: .85; font-size: clamp(14px, 2.2vw, 18px); }

/* ---------- Scene ---------- */
.scene {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 320px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* The running product */
.product {
  position: absolute;
  bottom: 46px;
  left: 6%;
  text-align: center;
  animation: productRun 11s linear infinite;
  z-index: 5;
}
.product-face {
  font-size: 54px;
  animation: bob 0.7s ease-in-out infinite alternate;
}
.product-label {
  font-size: 11px;
  font-weight: bold;
  background: #fff;
  color: #222;
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 2px;
  letter-spacing: 1px;
}
.dust {
  position: absolute;
  bottom: 4px; left: -18px;
  width: 14px; height: 14px;
  background: rgba(255,255,255,.4);
  border-radius: 50%;
  filter: blur(3px);
  animation: dust .8s ease-out infinite;
}
@keyframes productRun {
  0%   { left: 4%;  }
  50%  { left: 78%; }
  50.01% { left: 4%; opacity: 0; }
  52%  { opacity: 1; }
  100% { left: 78%; }
}
@keyframes dust {
  0% { transform: scale(1) translateX(0); opacity: .6; }
  100% { transform: scale(.2) translateX(-20px); opacity: 0; }
}

/* The chasing team */
.team {
  display: flex;
  align-items: flex-end;
  gap: clamp(6px, 2vw, 26px);
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}

.worker {
  position: relative;
  text-align: center;
  animation: chase 1.1s ease-in-out infinite;
}
/* stagger the bounce so they look like they're scrambling */
.designer  { animation-delay: 0s;    }
.frontend  { animation-delay: .12s;  }
.backend   { animation-delay: .24s;  }
.qa        { animation-delay: .36s;  }
.pm        { animation-delay: .1s;   }

@keyframes chase {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}

.character { position: relative; width: 60px; }
.head { font-size: 38px; line-height: 1; }
.body {
  width: 34px; height: 40px;
  margin: -4px auto 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent-2));
  border-radius: 14px 14px 8px 8px;
}
.designer .body { background: linear-gradient(180deg, #f6d98c, #c9952f); }
.frontend .body { background: linear-gradient(180deg, #f3cf7a, #b9792a); }
.backend  .body { background: linear-gradient(180deg, #e8b860, #9c6620); }
.qa       .body { background: linear-gradient(180deg, #d9a441, #8a5a1e); }
.pm       .body { background: linear-gradient(180deg, #ff7a7a, #d63f3f); } /* PM stays red — he's furious */

.tool {
  position: absolute;
  right: -6px; top: 30px;
  font-size: 20px;
  animation: toolWave .9s ease-in-out infinite alternate;
}
@keyframes toolWave {
  from { transform: rotate(-18deg); }
  to   { transform: rotate(18deg); }
}

.legs { display: flex; justify-content: center; gap: 6px; margin-top: -2px; }
.legs span {
  width: 7px; height: 16px;
  background: #2a2a3a;
  border-radius: 0 0 4px 4px;
  transform-origin: top center;
  animation: step .55s ease-in-out infinite;
}
.legs span:last-child { animation-delay: .27s; }
@keyframes step {
  0%,100% { transform: rotate(-20deg); }
  50%     { transform: rotate(20deg); }
}

/* Angry PM extras */
.pm .character.angry { animation: shake .45s linear infinite; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}
.arm-up {
  position: absolute;
  left: -10px; top: 6px;
  font-size: 20px;
  animation: fist .7s ease-in-out infinite alternate;
}
@keyframes fist {
  from { transform: translateY(0) rotate(-10deg); }
  to   { transform: translateY(-8px) rotate(10deg); }
}

/* Speech bubbles */
.speech {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #fff;
  color: #222;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 9px;
  border-radius: 10px;
  margin-bottom: 8px;
  opacity: 0;
  animation: talk 9s ease-in-out infinite;
}
.speech::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}
.designer .speech { animation-delay: 0s; }
.frontend .speech { animation-delay: 1.8s; }
.backend  .speech { animation-delay: 3.6s; }
.qa       .speech { animation-delay: 5.4s; }
.pm       .speech { animation-delay: 7.2s; }

@keyframes talk {
  0%, 20%, 100% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.9); }
  5%, 15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.speech.shout {
  background: #ff3b3b;
  color: #fff;
  font-size: 14px;
  animation: shoutTalk 3s ease-in-out infinite;
}
.speech.shout::after { border-top-color: #ff3b3b; }
@keyframes shoutTalk {
  0%,100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50%     { opacity: 1; transform: translateX(-50%) scale(1.12); }
}

/* Ground */
.ground {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 46px;
  background: linear-gradient(180deg, #4a3a5e, var(--ground));
  border-top: 4px dashed rgba(255,255,255,.25);
}
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }

/* ---------- Footer / progress ---------- */
.bottom { width: 100%; max-width: 520px; text-align: center; z-index: 2; }
.progress-bar {
  width: 100%; height: 16px;
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-light));
  border-radius: 999px;
  transition: width .4s ease;
}
.progress-text { margin-top: 10px; font-size: 15px; }
.progress-text em { opacity: .8; font-size: 13px; }
.eta { margin-top: 12px; opacity: .8; font-size: 14px; }

@media (max-width: 560px) {
  .scene { height: 280px; }
  .head { font-size: 30px; }
  .body { width: 28px; height: 34px; }
  .speech { font-size: 10px; }
}
