/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-color: #050505;
  --pink-neon: #eb055a;
  --blue-neon: #4632f0;
  --purple-glow: #8e15d8;
  --cyan-accent: #00f2fe;
  
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-highlight: rgba(255, 255, 255, 0.35);
  --glass-blur: 24px;
  
  --text-main: #f5f5f7;
  --text-muted: rgba(245, 245, 247, 0.55);
  --text-dim: rgba(245, 245, 247, 0.35);
  
  --font-grotesk: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  font-family: var(--font-sans);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Canvas & Noise Layers
   ========================================================================== */
#space-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Floating Liquid Gradient Blobs (Weightlessness)
   ========================================================================== */
.blob-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  filter: blur(80px);
  transform: translateZ(0);
}

.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform, border-radius;
  opacity: 0.65;
  mix-blend-mode: screen;
}

/* Blob 1: Neon Pink (#eb055a) */
.blob-1 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle at 35% 35%, #ff2b7a, #eb055a 60%, rgba(235, 5, 90, 0) 80%);
  top: 15%;
  left: 18%;
  animation: 
    floatBlob1 24s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate,
    morphBlob1 14s ease-in-out infinite alternate;
}

/* Blob 2: Blue-Purple (#4632f0) */
.blob-2 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle at 60% 40%, #6854ff, #4632f0 55%, rgba(70, 50, 240, 0) 80%);
  bottom: 10%;
  right: 15%;
  animation: 
    floatBlob2 28s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate,
    morphBlob2 16s ease-in-out infinite alternate;
}

/* Blob 3: Accent Purple Glow */
.blob-3 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(142, 21, 216, 0.8), rgba(235, 5, 90, 0.4) 50%, rgba(70, 50, 240, 0) 75%);
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: 
    floatBlob3 20s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate,
    morphBlob1 18s ease-in-out infinite alternate;
  opacity: 0.45;
}

/* Blob 4: Deep ambient glow */
.blob-4 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(70, 50, 240, 0.5), rgba(0, 242, 254, 0.15) 60%, transparent 80%);
  top: 5%;
  right: 30%;
  animation: floatBlob1 32s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse;
  opacity: 0.35;
}

@keyframes floatBlob1 {
  0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
  33% { transform: translate(140px, -90px) scale(1.12) rotate(45deg); }
  66% { transform: translate(-80px, 120px) scale(0.92) rotate(90deg); }
  100% { transform: translate(100px, 80px) scale(1.05) rotate(135deg); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
  33% { transform: translate(-150px, 70px) scale(0.9) rotate(-40deg); }
  66% { transform: translate(90px, -110px) scale(1.15) rotate(-90deg); }
  100% { transform: translate(-100px, -60px) scale(1.02) rotate(-140deg); }
}

@keyframes floatBlob3 {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-30%, -70%) scale(1.2) rotate(60deg); }
  100% { transform: translate(-70%, -30%) scale(0.85) rotate(-60deg); }
}

@keyframes morphBlob1 {
  0% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  50% { border-radius: 70% 30% 46% 54% / 30% 29% 71% 70%; }
  100% { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
}

@keyframes morphBlob2 {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 35% 65% 60% 40% / 55% 45% 55% 45%; }
  100% { border-radius: 50% 50% 70% 30% / 40% 60% 40% 60%; }
}

/* ==========================================================================
   Central Levitating Scene & Glass Card
   ========================================================================== */
.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  perspective: 1200px;
  padding: 24px;
}

.card-float-wrapper {
  animation: levitationFloat 7.5s ease-in-out infinite;
  will-change: transform;
}

/* Levitation Oscillation */
@keyframes levitationFloat {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  35% {
    transform: translateY(-18px) rotate(-0.5deg);
  }
  70% {
    transform: translateY(12px) rotate(0.6deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Levitating Glass Card */
.glass-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  padding: 44px 48px;
  overflow: hidden;
  box-shadow: 
    0 30px 80px -15px rgba(0, 0, 0, 0.75),
    0 0 50px -10px rgba(70, 50, 240, 0.18),
    0 0 35px -10px rgba(235, 5, 90, 0.15),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  transform-style: preserve-3d;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 
    0 40px 100px -20px rgba(0, 0, 0, 0.85),
    0 0 65px -5px rgba(70, 50, 240, 0.28),
    0 0 50px -5px rgba(235, 5, 90, 0.24),
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.35);
}

/* Glass Reflection Highlight following cursor */
.glass-reflection {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 30%), rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  transition: opacity 0.5s ease;
  opacity: 0.8;
  z-index: 1;
}

/* Glass Rupture/Crack Overlay on Glitch */
.glass-crack-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  mix-blend-mode: overlay;
  background: 
    linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.4) 49%, rgba(235, 5, 90, 0.6) 50%, rgba(70, 50, 240, 0.6) 51%, transparent 60%);
  transition: opacity 0.1s ease;
}

.title-container:hover ~ .glass-crack-effect,
.glass-card.ruptured .glass-crack-effect {
  opacity: 0.85;
  animation: glassFracturePulse 0.4s steps(2, start) infinite;
}

@keyframes glassFracturePulse {
  0% {
    clip-path: polygon(0% 15%, 100% 25%, 100% 45%, 0% 35%);
    transform: translate(-3px, 2px);
  }
  50% {
    clip-path: polygon(0% 55%, 100% 45%, 100% 75%, 0% 85%);
    transform: translate(3px, -2px);
  }
  100% {
    clip-path: polygon(0% 30%, 100% 20%, 100% 60%, 0% 70%);
    transform: translate(-1px, 1px);
  }
}

/* ==========================================================================
   Card Content & Typography
   ========================================================================== */
.card-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-family: var(--font-grotesk);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ffaa;
  box-shadow: 0 0 10px #00ffaa, 0 0 20px #00ffaa;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.coordinates {
  color: var(--text-dim);
}

.card-body {
  position: relative;
  z-index: 5;
  margin-bottom: 40px;
}

.tagline {
  font-family: var(--font-grotesk);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.title-container {
  display: inline-block;
  cursor: pointer;
  margin-bottom: 20px;
  position: relative;
}

/* Modern Thin/Clean Grotesk Headline */
.glitch-title {
  font-family: var(--font-grotesk);
  font-size: clamp(38px, 6.2vw, 64px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #ffffff;
  position: relative;
  display: inline-block;
  user-select: none;
  transition: color 0.15s ease;
}

/* Individual Asynchronous Glitch Characters */
.glitch-char {
  display: inline-block;
  position: relative;
  white-space: pre;
  will-change: transform, text-shadow;
  transition: transform 0.1s ease;
}

.glitch-char::before,
.glitch-char::after {
  content: attr(data-char);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  opacity: 0;
}

/* Glitch Trigger on Hover & Ambient Pulse: Asynchronous per character */
.title-container:hover .glitch-char,
.glitch-char.active-glitch {
  animation: charJitter var(--dur, 0.32s) var(--del, 0s) steps(1) infinite;
}

.title-container:hover .glitch-char::before,
.glitch-char.active-glitch::before {
  opacity: 1;
  color: #ffffff;
  left: var(--shift-x1, -2px);
  text-shadow: 2px 0 var(--pink-neon);
  animation: charSliceTop var(--dur-top, 0.38s) var(--del-top, 0s) infinite;
}

.title-container:hover .glitch-char::after,
.glitch-char.active-glitch::after {
  opacity: 1;
  color: #ffffff;
  left: var(--shift-x2, 2px);
  text-shadow: -2px 0 var(--blue-neon);
  animation: charSliceBottom var(--dur-bot, 0.44s) var(--del-bot, 0s) infinite reverse;
}

/* Sharp Asynchronous Keyframes per Character */
@keyframes charJitter {
  0% {
    transform: translate(0, 0);
    text-shadow: -1px -1px 0 var(--pink-neon), 1px 1px 0 var(--blue-neon);
  }
  20% {
    transform: translate(var(--jitter-x1, -2px), var(--jitter-y1, 1px));
  }
  40% {
    transform: translate(var(--jitter-x2, 2px), var(--jitter-y2, -2px));
    text-shadow: 2px -1px 0 var(--pink-neon), -2px 1px 0 var(--blue-neon);
  }
  60% {
    transform: translate(var(--jitter-x1, -1px), var(--jitter-y2, 2px));
  }
  80% {
    transform: translate(var(--jitter-x2, 1px), var(--jitter-y1, -1px));
    text-shadow: -2px 1px 0 var(--pink-neon), 2px -1px 0 var(--blue-neon);
  }
  100% {
    transform: translate(0, 0);
    text-shadow: -1px -1px 0 var(--pink-neon), 1px 1px 0 var(--blue-neon);
  }
}

@keyframes charSliceTop {
  0% {
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
    transform: translate(-3px, -1px);
  }
  25% {
    clip-path: polygon(0 15%, 100% 15%, 100% 55%, 0 55%);
    transform: translate(3px, 1px);
  }
  50% {
    clip-path: polygon(0 5%, 100% 5%, 100% 30%, 0 30%);
    transform: translate(-2px, 0);
  }
  75% {
    clip-path: polygon(0 25%, 100% 25%, 100% 70%, 0 70%);
    transform: translate(2px, -1px);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
    transform: translate(0, 0);
  }
}

@keyframes charSliceBottom {
  0% {
    clip-path: polygon(0 45%, 100% 45%, 100% 100%, 0 100%);
    transform: translate(3px, 1px);
  }
  25% {
    clip-path: polygon(0 35%, 100% 35%, 100% 80%, 0 80%);
    transform: translate(-3px, -1px);
  }
  50% {
    clip-path: polygon(0 60%, 100% 60%, 100% 95%, 0 95%);
    transform: translate(2px, 1px);
  }
  75% {
    clip-path: polygon(0 40%, 100% 40%, 100% 75%, 0 75%);
    transform: translate(-1px, -1px);
  }
  100% {
    clip-path: polygon(0 45%, 100% 45%, 100% 100%, 0 100%);
    transform: translate(0, 0);
  }
}

.description {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 540px;
  font-weight: 300;
}

/* ==========================================================================
   Glass Action Buttons
   ========================================================================== */
.card-actions {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  font-family: var(--font-grotesk);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.glass-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.glass-btn:hover::before {
  transform: translateX(100%);
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px -2px rgba(255, 255, 255, 0.15);
}

.primary-btn {
  background: rgba(235, 5, 90, 0.12);
  border-color: rgba(235, 5, 90, 0.35);
  box-shadow: 0 0 20px -5px rgba(235, 5, 90, 0.3);
}

.primary-btn:hover {
  background: rgba(235, 5, 90, 0.25);
  border-color: rgba(235, 5, 90, 0.7);
  box-shadow: 0 10px 30px -5px rgba(235, 5, 90, 0.5), 0 0 25px rgba(70, 50, 240, 0.4);
}

.btn-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.primary-btn:hover .btn-icon {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Card Footer & Specs
   ========================================================================== */
.card-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-grotesk);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.spec-divider {
  opacity: 0.4;
}

.v-link {
  color: var(--cyan-accent);
  text-decoration: none;
  transition: text-shadow 0.2s ease;
}

.v-link:hover {
  text-shadow: 0 0 10px var(--cyan-accent);
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 768px) {
  .glass-card {
    padding: 32px 24px;
    border-radius: 22px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 28px;
  }
  
  .card-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .blob-1, .blob-2 {
    width: 380px;
    height: 380px;
  }
}
