/* ==========================================================================
   HAPTAGS LLP — ANIMATIONS & DYNAMIC EFFECTS (Antigravity Parity)
   ========================================================================== */

/* Antigravity Particle Canvas */
#antigravity-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
  opacity: 0.95;
  mix-blend-mode: multiply;
}

[data-theme="dark"] #antigravity-canvas {
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* Antigravity Floating Background Glows */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  will-change: transform, opacity;
  animation: floatAmbient 12s ease-in-out infinite alternate;
  max-width: 100vw;
  overflow: hidden;
}

.glow-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0) 70%);
  top: -10%;
  right: -5%;
}

.glow-purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, rgba(124, 58, 237, 0) 70%);
  top: 35%;
  left: -10%;
  animation-delay: -4s;
}

.glow-amber {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, rgba(217, 119, 6, 0) 70%);
  bottom: 5%;
  right: 15%;
  animation-delay: -7s;
}

@media (max-width: 768px) {
  .ambient-glow {
    width: 260px !important;
    height: 260px !important;
    filter: blur(50px) !important;
    opacity: 0.3 !important;
  }
  .glow-blue {
    top: -5% !important;
    right: 0 !important;
  }
  .glow-purple {
    top: 30% !important;
    left: -5% !important;
  }
  .glow-amber {
    bottom: 5% !important;
    right: 0 !important;
  }
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.08); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Custom Antigravity Interactive Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.custom-cursor.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34A853;
  box-shadow: 0 0 8px #34A853;
}

/* Floating Badges & Cards */
.floating-element {
  animation: floatUpDown 6s ease-in-out infinite;
}

.floating-element-delayed {
  animation: floatUpDown 7s ease-in-out infinite;
  animation-delay: -3s;
}

@keyframes floatUpDown {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* Card Hover Glow Spotlight */
.interactive-card {
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.interactive-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  transform: translate(-50%, -50%);
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.interactive-card:hover::before {
  opacity: 1;
}

.interactive-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

/* Infinite Brand Ribbon Marquee */
.marquee-wrapper {
  overflow: hidden;
  user-select: none;
  display: flex;
  gap: 32px;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 32px;
  min-width: 100%;
  animation: scrollMarquee 30s linear infinite;
}

.marquee-wrapper:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* Stardust subtle background pattern */
.stardust-bg {
  background-image: radial-gradient(rgba(16, 20, 26, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

[data-theme="dark"] .stardust-bg {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
