/* ==========================================================================
   Thal Nexus Technologies — Enterprise Animation & Motion Design System
   ========================================================================== */

/* --- Keyframe Animations --- */
@keyframes tn-float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(2deg);
  }
}

@keyframes tn-float-slow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-24px) rotate(-3deg) scale(1.02);
  }
}

@keyframes tn-float-fast {
  0%, 100% {
    transform: translateY(0px) translateZ(0);
  }
  50% {
    transform: translateY(-10px) translateZ(0);
  }
}

@keyframes tn-pulse-glow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.4));
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.8));
  }
}

@keyframes tn-radar-ping {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

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

@keyframes tn-marquee-reverse {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0%);
  }
}

@keyframes tn-text-shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes tn-aurora-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.15);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes tn-border-beam {
  0% {
    offset-distance: 0%;
  }
  100% {
    offset-distance: 100%;
  }
}

@keyframes tn-grid-drift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 60px;
  }
}

/* --- Reveal Utility Classes --- */
.tn-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.tn-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure core prose, breadcrumbs, and single article content are immediately visible */
.tn-content-prose,
.tn-single-article,
.tn-single-post,
.tn-breadcrumbs {
  opacity: 1 !important;
  transform: none !important;
}

.tn-reveal--left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tn-reveal--left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.tn-reveal--right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tn-reveal--right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.tn-reveal--scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tn-reveal--scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger Delays */
.tn-reveal-delay-1 { transition-delay: 0.1s; }
.tn-reveal-delay-2 { transition-delay: 0.2s; }
.tn-reveal-delay-3 { transition-delay: 0.3s; }
.tn-reveal-delay-4 { transition-delay: 0.4s; }
.tn-reveal-delay-5 { transition-delay: 0.5s; }

/* Floating animation hooks */
.tn-float {
  animation: tn-float 6s ease-in-out infinite;
}

.tn-float-slow {
  animation: tn-float-slow 9s ease-in-out infinite;
}

.tn-float-fast {
  animation: tn-float-fast 4s ease-in-out infinite;
}

/* Radar pulse badge */
.tn-radar-dot {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
  animation: tn-radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Interactive Card Spotlight Effect */
.tn-spotlight-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.tn-spotlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    650px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 242, 254, 0.14),
    rgba(139, 92, 246, 0.08) 25%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 1;
}

.tn-spotlight-card:hover::before {
  opacity: 1;
}

.tn-spotlight-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 254, 0.35) !important;
  box-shadow: 0 20px 40px -15px rgba(0, 242, 254, 0.18), 0 0 25px rgba(139, 92, 246, 0.12);
}

/* Infinite Marquee Track */
.tn-marquee-container {
  overflow: hidden;
  position: relative;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.tn-marquee-track {
  display: flex;
  width: max-content;
  animation: tn-marquee 30s linear infinite;
}

.tn-marquee-track:hover {
  animation-play-state: paused;
}

.tn-marquee-track--reverse {
  animation: tn-marquee-reverse 32s linear infinite;
}

/* Glowing Neon Shimmer Text */
.tn-gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #00f2fe 45%, #a855f7 85%, #ec4899 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: tn-text-shimmer 8s linear infinite;
}

.tn-cyan-text {
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tn-purple-text {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glow button with moving light sweep */
.tn-btn-glow {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tn-btn-glow::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transform: rotate(25deg) translateX(-100%);
  transition: transform 0.75s ease;
  z-index: -1;
}

.tn-btn-glow:hover::after {
  transform: rotate(25deg) translateX(100%);
}

.tn-btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -5px rgba(0, 242, 254, 0.5), 0 0 20px rgba(139, 92, 246, 0.35);
}

/* Subtle Interactive 3D Tilt Card */
.tn-tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}
