@import "tailwindcss";
@plugin "@tailwindcss/typography";

@layer base {
  html {
    font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="url"],
  select,
  textarea {
    @apply border-slate-300 rounded-lg text-slate-900 placeholder:text-slate-400 text-sm;
    @apply focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-violet-500 transition-shadow;
  }

  input[type="file"] {
    @apply text-sm text-slate-500;
  }
}

/* ═══ Landing Page Animations ═══ */

/* Hero entrance animations */
.hero-pre-enter {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-pre-enter.hero-entered {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll reveal */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Animated gradient text */
.gradient-text-animated {
  background: linear-gradient(
    135deg,
    #a78bfa 0%,
    #818cf8 16%,
    #c084fc 32%,
    #a78bfa 48%,
    #818cf8 64%,
    #c084fc 80%,
    #a78bfa 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating orb animations */
.orb-float-1 {
  animation: orbFloat1 8s ease-in-out infinite;
}

.orb-float-2 {
  animation: orbFloat2 10s ease-in-out infinite;
}

.orb-float-3 {
  animation: orbFloat3 12s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.08); }
  66% { transform: translate(25px, -35px) scale(0.92); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, 30px) scale(0.95); }
  66% { transform: translate(-30px, -25px) scale(1.05); }
}

/* Typewriter cursor */
.typewriter-cursor::after {
  content: '|';
  animation: cursorBlink 0.8s ease infinite;
  color: #a78bfa;
  font-weight: 300;
  margin-left: 2px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Glowing pulse ring */
.glow-ring {
  position: relative;
}

.glow-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, #a78bfa, #818cf8, #c084fc, #a78bfa);
  background-size: 300% 300%;
  animation: glowRotate 3s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-ring:hover::before {
  opacity: 1;
}

@keyframes glowRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Shimmer effect for badges */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Noise grain overlay */
.noise-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Tilt card base */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

[data-tilt] > * {
  transform: translateZ(20px);
}

/* Stagger animation helper */
.stagger-1 { transition-delay: 0ms; }
.stagger-2 { transition-delay: 100ms; }
.stagger-3 { transition-delay: 200ms; }
.stagger-4 { transition-delay: 300ms; }
.stagger-5 { transition-delay: 400ms; }
.stagger-6 { transition-delay: 500ms; }

/* Morphing blob shape */
.morph-blob {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morphBlob 8s ease-in-out infinite;
}

@keyframes morphBlob {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50%  { border-radius: 50% 60% 30% 60% / 30% 50% 70% 50%; }
  75%  { border-radius: 40% 30% 60% 50% / 60% 40% 30% 70%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Particle canvas */
.particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Smooth scrollbar for hero visual mockup */
.hero-mockup-scroll {
  animation: mockupScroll 6s ease-in-out infinite;
}

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

/* Counter glow */
.counter-glow {
  text-shadow: 0 0 30px rgba(167, 139, 250, 0.4);
}

/* CTA button pulse */
.cta-pulse {
  animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4),
                0 10px 25px -3px rgba(139, 92, 246, 0.25);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(139, 92, 246, 0),
                0 10px 25px -3px rgba(139, 92, 246, 0.4);
  }
}

/* Grid line animation in hero bg */
.grid-lines {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* Pricing card hover lift */
.pricing-card {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pricing-card:hover {
  transform: translateY(-8px);
}

/* Smooth section transitions */
.section-fade {
  position: relative;
}

.section-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, white);
  pointer-events: none;
}
