:root {
  --bg: #0a0a0f;
  --fg: #e8e4dc;
  --accent: #f0c040;
  --accent2: #ff6b35;
  --muted: #3a3a4a;
  --grain-opacity: 0.04;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Mono", monospace;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  pointer-events: none;
  z-index: 100;
}

/* Animated grid background */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 192, 64, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 192, 64, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(60px, 60px);
  }
}

/* Floating orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  left: -100px;
  animation-duration: 14s;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent2);
  bottom: -80px;
  right: -80px;
  animation-duration: 18s;
  animation-delay: -4s;
}
.orb-3 {
  width: 200px;
  height: 200px;
  background: #6b5bff;
  top: 50%;
  left: 60%;
  animation-duration: 10s;
  animation-delay: -7s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* Main container */
.container {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

/* Rotating cog */
.cog-container {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.cog {
  width: 100px;
  height: 100px;
  animation: cogSpin 8s linear infinite;
}

.cog path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: cogDraw 3s ease forwards;
}

@keyframes cogSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cogDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* WIP badge */
.badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.5s forwards;
}

/* Headline */
.headline {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 1s ease 0.8s forwards;
}

.headline .line {
  display: block;
  overflow: hidden;
}

.headline .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: lineReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.headline .line:nth-child(1) span {
  animation-delay: 1s;
}
.headline .line:nth-child(2) span {
  animation-delay: 1.15s;
}
.headline .line:nth-child(3) span {
  animation-delay: 1.3s;
}

@keyframes lineReveal {
  to {
    transform: translateY(0);
  }
}

.headline .accent-word {
  color: var(--accent);
  position: relative;
}

.headline .accent-word::after {
  content: "";
  position: absolute;
  bottom: 0.05em;
  left: 0;
  width: 100%;
  height: 0.08em;
  background: var(--accent2);
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineGrow 0.8s ease 2s forwards;
}

@keyframes underlineGrow {
  to {
    transform: scaleX(1);
  }
}

/* Subtext */
.subtext {
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: #8a8a9a;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 1.6s forwards;
}

/* Progress bar */
.progress-wrapper {
  max-width: 400px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 1.9s forwards;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.progress-percent {
  color: var(--accent);
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 3px;
  background: var(--muted);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 10px;
  animation: progressGrow 3s cubic-bezier(0.16, 1, 0.3, 1) 2.2s forwards;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}

@keyframes progressGrow {
  to {
    width: 62%;
  }
}

/* Ticker tape */
.ticker-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  border-top: 1px solid rgba(240, 192, 64, 0.1);
  padding: 0.7rem 0;
  opacity: 0;
  animation: fadeIn 1s ease 2.5s forwards;
}

.ticker {
  display: flex;
  width: max-content;
  animation: tickerScroll 30s linear infinite;
}

.ticker span {
  white-space: nowrap;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 2rem;
}

.ticker span .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 1.5rem;
  vertical-align: middle;
  animation: blink 2s ease-in-out infinite;
}

@keyframes tickerScroll {
  to {
    transform: translateX(-50%);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

/* Corner decorations */
.corner {
  position: fixed;
  width: 60px;
  height: 60px;
  opacity: 0;
  animation: fadeIn 1s ease 2.8s forwards;
}

.corner-tl {
  top: 24px;
  left: 24px;
  border-top: 1px solid var(--muted);
  border-left: 1px solid var(--muted);
}
.corner-tr {
  top: 24px;
  right: 24px;
  border-top: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
}
.corner-bl {
  bottom: 50px;
  left: 24px;
  border-bottom: 1px solid var(--muted);
  border-left: 1px solid var(--muted);
}
.corner-br {
  bottom: 50px;
  right: 24px;
  border-bottom: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
}

/* Status dots */
.status-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 2.2s forwards;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.active {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.pending {
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite 0.5s;
}

.status-dot.queued {
  background: var(--muted);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

/* Shared animations */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Floating particles */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) scale(1);
  }
}

/* Build number */
.build-number {
  position: fixed;
  top: 30px;
  right: 90px;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 1s ease 3s forwards;
}

.build-number span {
  color: var(--accent);
}
