:root {
  color-scheme: dark;
  --bg-top: #120818;
  --bg-mid: #241047;
  --bg-bottom: #3b1578;
  --text: #f4ecff;
  --muted: #c9b6ef;
  --accent: #b56cff;
  --accent-soft: #7b3fe4;
  --panel: rgba(18, 8, 32, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(181, 108, 255, 0.18), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(123, 63, 228, 0.22), transparent 30%),
    linear-gradient(160deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
}

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}

.glow-a {
  width: 28rem;
  height: 28rem;
  top: 10%;
  left: -8%;
  background: #6f2fd8;
  animation: drift 12s ease-in-out infinite;
}

.glow-b {
  width: 24rem;
  height: 24rem;
  bottom: 5%;
  right: -6%;
  background: #9b4dff;
  animation: drift 14s ease-in-out infinite reverse;
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  background: linear-gradient(90deg, #ffffff 0%, #d8b4ff 55%, #b56cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 1rem auto 2.5rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.scene {
  position: relative;
  width: min(100%, 22rem);
  height: 16rem;
  margin: 0 auto;
  border-radius: 1.5rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.workbench {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  width: 9rem;
  height: 2.4rem;
  transform: translateX(-50%);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.block {
  position: absolute;
  bottom: 0.45rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.35rem;
  background: linear-gradient(145deg, #c084fc, #7c3aed);
  opacity: 0;
  transform: translateY(1rem);
  animation: stack 2.4s ease-in-out infinite;
}

.block-1 {
  left: 1.2rem;
  animation-delay: 0s;
}

.block-2 {
  left: 3.6rem;
  animation-delay: 0.8s;
}

.block-3 {
  left: 6rem;
  animation-delay: 1.6s;
}

.spark {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #ffe066;
  opacity: 0;
  animation: spark 2.4s ease-in-out infinite;
}

.spark-1 {
  left: 2.2rem;
  bottom: 2.8rem;
}

.spark-2 {
  left: 5.4rem;
  bottom: 3rem;
  animation-delay: 1.2s;
}

.robot {
  position: absolute;
  left: 50%;
  bottom: 3.4rem;
  width: 11rem;
  transform: translateX(-50%);
  overflow: visible;
}

.robot-shadow {
  fill: rgba(0, 0, 0, 0.35);
  animation: shadow 2.4s ease-in-out infinite;
}

.robot-head,
.robot-body,
.robot-leg,
.arm rect,
.arm-tool,
.robot-antenna,
.robot-antenna-tip {
  fill: #d8c7ff;
}

.robot-body {
  fill: #b79cff;
}

.robot-eye {
  fill: #120818;
  animation: blink 4.5s infinite;
}

.robot-antenna-tip {
  fill: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.arm-left {
  transform-origin: 68px 115px;
  animation: hammer-left 2.4s ease-in-out infinite;
}

.arm-right {
  transform-origin: 152px 115px;
  animation: hammer-right 2.4s ease-in-out infinite;
}

.robot {
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-0.25rem);
  }
}

@keyframes hammer-left {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25%,
  35% {
    transform: rotate(-18deg);
  }
}

@keyframes hammer-right {
  0%,
  100% {
    transform: rotate(0deg);
  }
  55%,
  65% {
    transform: rotate(18deg);
  }
}

@keyframes stack {
  0%,
  20% {
    opacity: 0;
    transform: translateY(1rem);
  }
  35%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spark {
  0%,
  24%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }
  30% {
    opacity: 1;
    transform: scale(1.4);
  }
}

@keyframes shadow {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.22;
  }
}

@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.15);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
