:root {
  --bg: #030108;
  --fg: #f4f0ff;
  --muted: rgba(244, 240, 255, 0.68);
  --purple: #a855f7;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --glass: rgba(12, 8, 28, 0.55);
  --glassBorder: rgba(168, 85, 247, 0.28);
  --glow: 0 0 40px rgba(168, 85, 247, 0.35);
  --gradient: linear-gradient(
    135deg,
    var(--purple) 0%,
    var(--blue) 45%,
    var(--cyan) 100%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#introStage {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 1;
}

#introStage.intro-done {
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 600ms ease;
}

#staticCanvas,
#matrixCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#staticCanvas {
  z-index: 1;
  opacity: 1;
  filter: contrast(1.35) brightness(1.1);
}

#matrixCanvas {
  z-index: 2;
  opacity: 0;
}

#introScanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px
  );
  opacity: 0.35;
  mix-blend-mode: multiply;
  pointer-events: none;
}

body.phase-tv #introStage {
  animation: tvPowerOn 1s ease-out both;
}

@keyframes tvPowerOn {
  0% {
    transform: scaleX(1) scaleY(0.02);
    filter: brightness(2) contrast(2) saturate(0);
  }
  40% {
    transform: scaleX(1.08) scaleY(0.04);
    filter: brightness(1.5) contrast(2) saturate(0.3);
  }
  100% {
    transform: scaleX(1) scaleY(1);
    filter: none;
  }
}

#bgCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

body.ready #bgCanvas {
  opacity: 1;
}

#cursorHalo {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  transition: opacity 1000ms ease;
  --hx: 50%;
  --hy: 42%;
  --haloScale: 1;
  --haloGlow: 0.72;
}

body.ready #cursorHalo {
  opacity: 1;
}

.haloCore,
.haloRing,
.haloPulse {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform, left, top;
}

.haloCore {
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  left: calc(var(--hx) - min(26vw, 260px));
  top: calc(var(--hy) - min(26vw, 260px));
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, calc(0.34 * var(--haloGlow))) 0%,
    rgba(59, 130, 246, calc(0.18 * var(--haloGlow))) 28%,
    rgba(6, 182, 212, calc(0.08 * var(--haloGlow))) 48%,
    transparent 68%
  );
  filter: blur(28px);
  mix-blend-mode: screen;
  transform: scale(var(--haloScale));
}

.haloRing {
  width: min(78vw, 780px);
  height: min(78vw, 780px);
  left: calc(var(--hx) - min(39vw, 390px));
  top: calc(var(--hy) - min(39vw, 390px));
  background: radial-gradient(
    circle,
    transparent 38%,
    rgba(6, 182, 212, calc(0.14 * var(--haloGlow))) 52%,
    rgba(168, 85, 247, calc(0.2 * var(--haloGlow))) 58%,
    transparent 72%
  );
  filter: blur(18px);
  mix-blend-mode: screen;
  transform: scale(calc(var(--haloScale) * 1.06));
}

.haloPulse {
  width: min(34vw, 340px);
  height: min(34vw, 340px);
  left: calc(var(--hx) - min(17vw, 170px));
  top: calc(var(--hy) - min(17vw, 170px));
  background: radial-gradient(
    circle,
    rgba(244, 240, 255, calc(0.16 * var(--haloGlow))) 0%,
    rgba(6, 182, 212, calc(0.1 * var(--haloGlow))) 35%,
    transparent 62%
  );
  filter: blur(12px);
  mix-blend-mode: plus-lighter;
  transform: scale(calc(var(--haloScale) * 0.92));
}

#aurora {
  position: absolute;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms ease;
  background:
    radial-gradient(
      900px 600px at 20% 30%,
      rgba(168, 85, 247, 0.22),
      transparent 60%
    ),
    radial-gradient(
      700px 500px at 80% 20%,
      rgba(59, 130, 246, 0.18),
      transparent 55%
    ),
    radial-gradient(
      800px 700px at 50% 90%,
      rgba(6, 182, 212, 0.14),
      transparent 60%
    );
  animation: auroraDrift 12s ease-in-out infinite alternate;
  filter: blur(40px);
}

@keyframes auroraDrift {
  0% {
    transform: translate(-2%, -1%) scale(1);
  }
  100% {
    transform: translate(3%, 2%) scale(1.06);
  }
}

#gridFloor {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms ease;
  background:
    linear-gradient(to top, rgba(3, 1, 8, 0.95) 0%, transparent 45%),
    repeating-linear-gradient(
      90deg,
      rgba(168, 85, 247, 0.04) 0,
      rgba(168, 85, 247, 0.04) 1px,
      transparent 1px,
      transparent 80px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(6, 182, 212, 0.05) 0,
      rgba(6, 182, 212, 0.05) 1px,
      transparent 1px,
      transparent 80px
    );
  transform: perspective(600px) rotateX(62deg) scale(2.2);
  transform-origin: center 115%;
  mask-image: linear-gradient(to top, black 15%, transparent 70%);
}

body.ready #aurora,
body.ready #gridFloor {
  opacity: 1;
}

body.ready #gridFloor {
  opacity: 0.45;
}

.hero {
  position: relative;
  z-index: 10;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(16px, 3vw, 32px);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 1200ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.ready .hero {
  opacity: 1;
  transform: none;
}

.topBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: clamp(36px, 5vw, 48px);
  height: clamp(36px, 5vw, 48px);
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.55));
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.45));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(6, 182, 212, 0.65));
    transform: scale(1.04);
  }
}

.brandName {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 2.4vw, 24px);
  letter-spacing: 0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brandName .dot {
  opacity: 0.85;
}

.tgPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.08);
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.tgPill:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.65);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.25);
}

.tgDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: blink 1.4s ease-in-out infinite;
}

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

.heroCore {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(14px, 2.5vw, 24px);
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 0;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: rgba(168, 85, 247, 0.85);
  text-transform: uppercase;
}

.headline {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.line {
  display: block;
  font-family: "Syne", sans-serif;
  line-height: 1.05;
}

.line.kill {
  font-size: clamp(42px, 9vw, 96px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-transform: lowercase;
  filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.25));
}

.line.moon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 1.5vw, 14px);
  font-size: clamp(18px, 3.2vw, 32px);
  font-weight: 700;
  color: var(--fg);
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.subline {
  margin: 0;
  max-width: 680px;
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(6px, 1.2vw, 10px);
}

.iconCluster {
  display: inline-flex;
  align-items: center;
  gap: clamp(4px, 0.8vw, 8px);
  vertical-align: middle;
}

.spaceCluster {
  margin-left: 2px;
}

.rocketRow {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -4px 0 2px;
}

.rocketRow .rocketIcon {
  width: clamp(32px, 5vw, 48px);
  height: clamp(44px, 6.5vw, 66px);
}

.spaceIcon {
  width: clamp(28px, 4.5vw, 40px);
  height: clamp(28px, 4.5vw, 40px);
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.45));
}

.rocketIcon {
  width: clamp(24px, 3.8vw, 34px);
  height: clamp(32px, 5vw, 46px);
  animation: rocketFloat 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(6, 182, 212, 0.5));
}

.planetIcon {
  animation: planetDrift 4.5s ease-in-out infinite;
}

.planetIcon--b {
  animation-delay: -1.6s;
}

.badgeIcon {
  width: clamp(22px, 3.2vw, 28px);
  height: clamp(22px, 3.2vw, 28px);
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.35));
}

.trophyIcon {
  height: clamp(26px, 3.6vw, 32px);
  filter: drop-shadow(0 2px 10px rgba(168, 85, 247, 0.4));
}

.starIcon {
  animation: starPulse 2.4s ease-in-out infinite;
}

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

@keyframes planetDrift {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(6deg);
  }
}

@keyframes starPulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.35));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.65));
  }
}

.countdownCard {
  position: relative;
  width: min(820px, calc(100vw - 32px));
  padding: clamp(20px, 3vw, 28px) clamp(14px, 2.5vw, 32px);
  border-radius: 24px;
  border: 1px solid var(--glassBorder);
  background:
    linear-gradient(
      160deg,
      rgba(168, 85, 247, 0.12) 0%,
      rgba(59, 130, 246, 0.06) 40%,
      rgba(6, 182, 212, 0.08) 100%
    ),
    var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    var(--glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.countdownCard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    120deg,
    rgba(168, 85, 247, 0.5),
    rgba(59, 130, 246, 0.3),
    rgba(6, 182, 212, 0.5),
    rgba(168, 85, 247, 0.2)
  );
  background-size: 200% 100%;
  animation: borderFlow 4s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.countdownLabel {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(6, 182, 212, 0.9);
  margin-bottom: 16px;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 12px);
  flex-wrap: nowrap;
  width: 100%;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
}

.num {
  font-family: "Syne", sans-serif;
  font-size: clamp(28px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 20%, rgba(168, 85, 247, 0.85));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 120ms ease;
}

.num.tick {
  transform: scale(1.06);
}

.lbl {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 240, 255, 0.45);
}

.sep {
  font-family: "Syne", sans-serif;
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 800;
  color: rgba(168, 85, 247, 0.5);
  margin-top: -18px;
  flex-shrink: 0;
}

.targetDate {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(244, 240, 255, 0.4);
}

.ctaRow {
  margin-top: 4px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.cta.primary {
  color: #030108;
  background: var(--gradient);
  box-shadow:
    0 12px 40px rgba(168, 85, 247, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.cta.primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 16px 50px rgba(6, 182, 212, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(244, 240, 255, 0.38);
  letter-spacing: 0.06em;
}

.footerGlow {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

#bootFlash {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #fff 0%, transparent 70%);
  opacity: 0;
  transition: opacity 280ms ease;
}

body.booting #bootFlash {
  opacity: 0.85;
  animation: bootFlash 420ms ease-out forwards;
}

@keyframes bootFlash {
  0% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 560px) {
  .countdown {
    gap: clamp(2px, 1.2vw, 8px);
  }

  .num {
    font-size: clamp(22px, 6.5vw, 36px);
  }

  .sep {
    font-size: clamp(18px, 4.5vw, 28px);
    margin-top: -14px;
  }

  .lbl {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .footer {
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
