/* ==========================================================================
   CLAMP MEDIA - ANIMATIONS & CURSOR STYLESHEET
   GSAP integration hooks, keyframes, glowing streaks, and custom cursor
   ========================================================================== */

/* --- Keyframe Animations --- */
@keyframes pulseGlow {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

@keyframes floatEmblem {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(1deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes floatBadge {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

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

@keyframes rotateRing {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes streakGlow {
  0% {
    opacity: 0.3;
    transform: translateX(-10px) scaleX(0.9);
  }
  50% {
    opacity: 1;
    transform: translateX(0px) scaleX(1.1);
  }
  100% {
    opacity: 0.3;
    transform: translateX(-10px) scaleX(0.9);
  }
}

/* Background animated light streaks */
.hero-streak {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF6A00, #FFA34D, transparent);
  border-radius: 2px;
  filter: drop-shadow(0 0 8px #FF6A00);
  animation: streakGlow 3s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-streak-1 {
  width: 140px;
  top: 35%;
  left: -20px;
  animation-delay: 0s;
}

.hero-streak-2 {
  width: 220px;
  top: 48%;
  left: -60px;
  animation-delay: 0.8s;
}

.hero-streak-3 {
  width: 160px;
  top: 62%;
  left: -30px;
  animation-delay: 1.5s;
}

/* Rotating light ring behind 3D logo */
.hero-rotating-ring {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 106, 0, 0.3);
  animation: rotateRing 40s linear infinite;
  pointer-events: none;
}

.hero-rotating-ring::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--color-primary);
}

/* --- Floating Embers & Sparks Canvas --- */
#particles-canvas {
  position: absolute;
  inset: -100px;
  width: calc(100% + 200px);
  height: calc(100% + 200px);
  pointer-events: none;
  z-index: 1;
}

/* --- CUSTOM INTERACTIVE CURSOR --- */
.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, opacity 0.2s ease;
  box-shadow: 0 0 8px var(--color-primary);
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255, 106, 0, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.25s ease,
              border-color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #FFFFFF;
  text-transform: uppercase;
}

/* Cursor States */
.cursor-hover .custom-cursor-ring {
  width: 54px;
  height: 54px;
  border-color: var(--color-primary);
  background-color: rgba(255, 106, 0, 0.15);
}

.cursor-view .custom-cursor-ring {
  width: 76px;
  height: 76px;
  background-color: rgba(255, 106, 0, 0.9);
  border-color: transparent;
  color: #FFFFFF;
}

.cursor-view .custom-cursor-ring::after {
  content: 'VIEW';
}

.cursor-view .custom-cursor-dot {
  opacity: 0;
}

.cursor-drag .custom-cursor-ring {
  width: 80px;
  height: 80px;
  background-color: rgba(18, 18, 18, 0.9);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cursor-drag .custom-cursor-ring::after {
  content: '← DRAG →';
  font-size: 0.6rem;
}

.cursor-drag .custom-cursor-dot {
  opacity: 0;
}

/* Mobile & Touch: Disable Custom Cursor */
@media (hover: none) and (pointer: coarse), (max-width: 1024px) {
  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }
}

/* --- Lenis Smooth Scrolling Base --- */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* --- Reveal Animations on Scroll --- */
[data-reveal="fade-up"] {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal="fade-up"].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="scale-in"] {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal="scale-in"].is-revealed {
  opacity: 1;
  transform: scale(1);
}
