/* ============================================================
   AKSHAY AI TOOLS - PREMIUM ENTRANCE ANIMATIONS
   Inspired by Google Gemini, Linear, Vercel
   ============================================================ */

/* ── 1. SPLASH / INTRO SCREEN ── */
/* ── 1. SPLASH / INTRO SCREEN ── */
/* ── 1. SPLASH / INTRO SCREEN (VFX Text) ── */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #02040a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.8, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.8, 0, 0.2, 1);
}

#splash-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 245, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

#splash-screen.exit {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
  filter: blur(8px) brightness(1.5);
}

#splash-screen.gone {
  display: none;
}

/* VFX Text Container */
.splash-vfx-title {
  position: relative;
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  z-index: 2;
  text-align: center;
}

/* The glitching/decoding text */
.splash-vfx-text {
  display: inline-block;
  background: linear-gradient(135deg, #fff 0%, #00f5ff 50%, #7b2fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  filter: drop-shadow(0 0 20px rgba(0, 245, 255, 0.4));
}

/* Light sweep across text */
.splash-vfx-title::after {
  content: '';
  position: absolute;
  top: -10%;
  left: -20%;
  width: 30%;
  height: 120%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  transform: skewX(-25deg) translateX(-150%);
  animation: vfx-sweep 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 1.5s;
  mix-blend-mode: overlay;
  pointer-events: none;
}

@keyframes vfx-sweep {
  0% { transform: skewX(-25deg) translateX(-150%); }
  100% { transform: skewX(-25deg) translateX(500%); }
}

/* Subtitle pulse */
.splash-vfx-subtitle {
  margin-top: 15px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: rgba(0, 245, 255, 0.7);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  animation: subtitle-fade-in 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 1s;
}

@keyframes subtitle-fade-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Background particle flares */
.splash-flare {
  position: absolute;
  border-radius: 50%;
  background: #00f5ff;
  box-shadow: 0 0 30px #00f5ff, 0 0 60px #7b2fff;
  opacity: 0;
  animation: flare-burst 2s ease-out forwards;
}

@keyframes flare-burst {
  0% { transform: scale(0); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}

/* ── 2. NEURAL GRID BACKGROUND ── */
#neural-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
  overflow: hidden;
}

#neural-grid.visible {
  opacity: 1;
}

#neural-grid canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── 3. CURSOR AURA ── */
#cursor-aura {
  position: fixed;
  width: 400px;
  height: 400px;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(123, 47, 255, 0.08) 0%, rgba(0, 245, 255, 0.04) 40%, transparent 70%);
  border-radius: 50%;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
  will-change: transform;
}

#cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  background: rgba(123, 47, 255, 0.9);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(123, 47, 255, 0.8), 0 0 4px #fff;
  transition: width 0.2s, height 0.2s, background 0.2s;
  will-change: transform;
}

#cursor-dot.hovering {
  width: 40px;
  height: 40px;
  background: rgba(123, 47, 255, 0.15);
  box-shadow: 0 0 30px rgba(123, 47, 255, 0.5);
  border: 1.5px solid rgba(123, 47, 255, 0.6);
}

/* ── 4. HERO SECTION STAGGER ANIMATIONS ── */
.hero-content .hero-badge {
  opacity: 0;
  transform: translateY(30px);
  animation: hero-stagger-in 0.7s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
  animation-delay: 0.1s;
}

.hero-content h1 {
  opacity: 0;
  transform: translateY(40px);
  animation: hero-stagger-in 0.8s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  animation-delay: 0.25s;
}

.hero-content > p {
  opacity: 0;
  transform: translateY(30px);
  animation: hero-stagger-in 0.7s ease forwards;
  animation-delay: 0.4s;
}

.hero-action-buttons {
  opacity: 0;
  transform: translateY(25px);
  animation: hero-stagger-in 0.7s ease forwards;
  animation-delay: 0.55s;
}

.hero-playground {
  opacity: 0;
  transform: translateY(35px) scale(0.97);
  animation: hero-stagger-in 0.8s ease forwards;
  animation-delay: 0.7s;
}

.hero-suggestions {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-stagger-in 0.6s ease forwards;
  animation-delay: 0.85s;
}

@keyframes hero-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Override existing reveal class during load */
body.animating-entrance .reveal {
  opacity: 0 !important;
  transform: translateY(30px) !important;
}

/* ── 5. NAV SLIDE DOWN ── */
nav {
  opacity: 0;
  transform: translateY(-20px);
  animation: nav-slide-in 0.6s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
  animation-delay: 0.05s;
}

@keyframes nav-slide-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ── 6. BUTTON HOVER SPARK ── */
.btn-spark-wrap {
  position: relative;
  overflow: visible;
}

.btn-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: spark-burst 0.6s ease-out forwards;
}

@keyframes spark-burst {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* ── 7. SECTION REVEAL UPGRADE ── */
.reveal {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.reveal.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── 8. SCROLL PROGRESS BAR (top of page) ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #7b2fff, #00f5ff, #ff2d78);
  z-index: 99998;
  width: 0%;
  box-shadow: 0 0 10px rgba(123, 47, 255, 0.8);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── 9. ORB GLOW PULSE (enhanced) ── */
.orb {
  animation: orb-pulse-glow 6s ease-in-out infinite;
}
.orb-1 { animation-delay: 0s; }
.orb-2 { animation-delay: 2s; }
.orb-3 { animation-delay: 4s; }

@keyframes orb-pulse-glow {
  0%, 100% { opacity: 0.45; filter: blur(80px) saturate(1); }
  50%       { opacity: 0.7;  filter: blur(60px) saturate(1.3); }
}

/* ── 10. GLITCH TEXT EFFECT on logo ── */
.nav-logo span {
  position: relative;
  display: inline-block;
}

.nav-logo:hover span {
  animation: glitch-text 0.5s steps(2) forwards;
}

@keyframes glitch-text {
  0%  { text-shadow: none; }
  20% { text-shadow: -2px 0 #00f5ff, 2px 0 #ff2d78; clip-path: inset(0 0 60% 0); }
  40% { text-shadow: 2px 0 #00f5ff, -2px 0 #ff2d78; clip-path: inset(30% 0 30% 0); }
  60% { text-shadow: -2px 0 #7b2fff, 2px 0 #00f5ff; clip-path: inset(50% 0 0 0); }
  80% { text-shadow: none; clip-path: none; }
  100%{ text-shadow: none; clip-path: none; }
}

/* ── 11. CARD SHIMMER on hover ── */
.bento-item::after,
.feature-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.bento-item:hover::after,
.feature-card:hover::after {
  left: 125%;
}

/* ── 12. MAGNETIC BUTTON EFFECT ── */
.btn-primary, .btn-secondary, .nav-btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.6, 0.64, 1),
              box-shadow 0.3s ease !important;
}

/* ── 13. PAGE MOUNT & CONTENT TRANSITIONS ── */
main, .tool-hero, .auth-card, .dashboard-container {
  animation: page-mount-fade 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes page-mount-fade {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── MEDIA QUERIES ── */
@media (max-width: 768px) {
  #cursor-aura, #cursor-dot { display: none; }
  .splash-ring-3 { display: none; }
}

