:root {
  color-scheme: dark;
  --ink: #f8f6ee;
  --muted: #b6b0a4;
  --line: rgba(255, 255, 255, 0.18);
  --yellow: #ffe66b;
  --cyan: #6ff7ff;
  --pink: #ff7ad9;
  --green: #8fff9b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  overflow-x: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  padding: clamp(20px, 4vw, 44px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(18px, 3vw, 34px);
  isolation: isolate;
}

.stage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #000;
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.stage::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 34vh;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(transparent, rgba(255, 230, 107, 0.12));
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 8vw, 112px);
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bot-grid {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: clamp(12px, 2vw, 24px);
  align-items: end;
}

.bot {
  --accent: var(--yellow);
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: clamp(50px, 7vw, 92px);
}

.bot img {
  display: block;
  width: min(100%, 210px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.9));
  animation: chatter 900ms steps(2, end) infinite;
  transform-origin: 50% 88%;
}

.bot strong {
  width: 100%;
  min-height: 22px;
  color: var(--muted);
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.bubble {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(190px, 100%);
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, white 8%);
  border-radius: 8px;
  background: #050505;
  color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 0 26px color-mix(in srgb, var(--accent) 24%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  transform: translateX(-50%) rotate(-2deg);
  animation: yap 700ms steps(2, end) infinite;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  border-right: 1px solid color-mix(in srgb, var(--accent) 55%, white 8%);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 55%, white 8%);
  background: #050505;
  transform: translateX(-50%) rotate(45deg);
}

.bot-two,
.bot-five {
  --accent: var(--cyan);
}

.bot-three {
  --accent: var(--pink);
}

.bot-four {
  --accent: var(--green);
}

.bot-two img,
.bot-five img {
  animation-delay: -160ms;
}

.bot-three img,
.bot-six img {
  animation-delay: -320ms;
}

.bot-four img {
  animation-delay: -480ms;
}

.bot-two .bubble,
.bot-four .bubble,
.bot-six .bubble {
  transform: translateX(-50%) rotate(2deg);
  animation-delay: -240ms;
}

@keyframes chatter {
  0%,
  100% {
    transform: translateY(0) rotate(-0.5deg) scale(1);
  }
  50% {
    transform: translateY(-6px) rotate(0.8deg) scale(1.015);
  }
}

@keyframes yap {
  0%,
  100% {
    opacity: 0.82;
    translate: 0 0;
  }
  50% {
    opacity: 1;
    translate: 0 -4px;
  }
}

@media (max-width: 980px) {
  .bot-grid {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
  }
}

@media (max-width: 560px) {
  .stage {
    min-height: auto;
    padding: 18px 14px 28px;
  }

  .bot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }

  .bot {
    padding-top: 58px;
  }

  .bot img {
    max-width: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bot img,
  .bubble {
    animation: none;
  }
}

