/*
 * CRASH LENS - Shared Styles
 * Color scheme based on the main application
 */

:root {
  /* Primary Colors */
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #dbeafe;
  --primary-gradient: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #3b82f6 100%);

  /* Secondary Colors */
  --secondary: #7c3aed;
  --secondary-light: #ede9fe;

  /* Status Colors */
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;

  /* Neutral Colors */
  --dark: #1e293b;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --light: #f8fafc;
  --white: #ffffff;
  --border: #cbd5e1;

  /* Dark Theme (for marketing pages) */
  --bg-dark: #0a1a2e;
  --bg-dark-secondary: #061220;
  --bg-dark-card: #0c2e4e;
  --border-dark: #1a3045;
  --text-dark: #adbdcc;

  /* Effects */
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(30, 64, 175, 0.3);

  /* Spacing */
  --radius: 8px;
  --radius-lg: 12px;
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
}

/* Dark theme body */
body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-gradient {
  background: var(--primary-gradient);
  color: var(--white);
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dark);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-light {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--white);
}

.btn-outline-light:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-light);
}

.card-dark {
  background: linear-gradient(135deg, var(--bg-dark-card) 0%, var(--bg-dark-secondary) 100%);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card-dark:hover {
  border-color: rgba(30, 64, 175, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(6, 18, 32, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.nav-logo img {
  height: 32px;
  width: 32px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-input::placeholder {
  color: var(--gray);
}

/* Input with icon */
.input-icon-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
  z-index: 1;
}

.input-icon-wrapper .form-input {
  padding-left: 2.75rem;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-dark);
}

.divider span {
  padding: 0 1rem;
  color: var(--gray);
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-100 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-200 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-300 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-400 { animation-delay: 0.4s; opacity: 0; }

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-gray { color: var(--text-dark); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Background glows */
.glow-primary {
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--primary);
  opacity: 0.15;
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}

.glow-secondary {
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--secondary);
  opacity: 0.1;
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ============================================================
   LANDING PAGE ANIMATION & POLISH SYSTEM
   Premium micro-interactions for marketing pages
   ============================================================ */

/* --- Smooth Scroll Behavior --- */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Enhanced Animation Keyframes --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(30, 64, 175, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(30, 64, 175, 0.5);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInStagger {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Animation Utility Classes --- */
.animate-fadeInUp {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* Staggered delay classes */
.animate-delay-100 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-200 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-300 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-400 { animation-delay: 0.4s; opacity: 0; }
.animate-delay-500 { animation-delay: 0.5s; opacity: 0; }
.animate-delay-600 { animation-delay: 0.6s; opacity: 0; }
.animate-delay-700 { animation-delay: 0.7s; opacity: 0; }
.animate-delay-800 { animation-delay: 0.8s; opacity: 0; }

/* --- Scroll-Triggered Animation Classes --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.25s ease-out,
              transform 0.25s ease-out;
}

.animate-on-scroll.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.from-left {
  transform: translateX(-15px);
}

.animate-on-scroll.from-left.animate-visible {
  transform: translateX(0);
}

.animate-on-scroll.from-right {
  transform: translateX(15px);
}

.animate-on-scroll.from-right.animate-visible {
  transform: translateX(0);
}

.animate-on-scroll.scale-in {
  transform: scale(0.95);
}

.animate-on-scroll.scale-in.animate-visible {
  transform: scale(1);
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease-out,
              transform 0.2s ease-out;
}

.stagger-children.animate-visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.animate-visible > *:nth-child(2) { transition-delay: 0.03s; }
.stagger-children.animate-visible > *:nth-child(3) { transition-delay: 0.06s; }
.stagger-children.animate-visible > *:nth-child(4) { transition-delay: 0.09s; }
.stagger-children.animate-visible > *:nth-child(5) { transition-delay: 0.12s; }
.stagger-children.animate-visible > *:nth-child(6) { transition-delay: 0.15s; }
.stagger-children.animate-visible > *:nth-child(7) { transition-delay: 0.18s; }
.stagger-children.animate-visible > *:nth-child(8) { transition-delay: 0.21s; }

.stagger-children.animate-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Enhanced Button Interactions --- */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-gradient {
  position: relative;
  z-index: 1;
}

.btn-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-gradient);
  border-radius: inherit;
  z-index: -1;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.4), 0 0 0 1px rgba(30, 64, 175, 0.1);
}

.btn-gradient:hover::after {
  opacity: 0.9;
}

/* Primary CTA with glow */
.btn-cta-primary {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.5), 0 0 40px rgba(30, 64, 175, 0.2);
}

.btn-cta-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* --- Enhanced Card Hover Effects --- */
.card-dark {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-dark:hover {
  border-color: rgba(30, 64, 175, 0.5);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(30, 64, 175, 0.2);
}

/* Feature card with icon glow on hover */
.feature-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.feature-card:hover .feature-icon {
  background: rgba(30, 64, 175, 0.3);
  box-shadow: 0 0 30px rgba(30, 64, 175, 0.3);
}

.feature-icon {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Stats Count-Up Animation --- */
.stat-value,
.trust-stat-value,
.roi-result-value {
  transition: all 0.3s ease;
}

.stat-value.counting,
.trust-stat-value.counting,
.roi-result-value.counting {
  animation: countUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Trust Logo Hover Effects --- */
.trusted-logo-item {
  transition: all 0.3s ease;
}

.trusted-logo-item:hover {
  transform: scale(1.1);
}

.trusted-logo-item img {
  transition: all 0.4s ease;
}

/* --- Pricing Card Enhancements --- */
.pricing-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pricing-card.featured {
  box-shadow: 0 0 0 2px var(--primary), 0 20px 40px rgba(30, 64, 175, 0.3);
}

.pricing-card.featured:hover {
  box-shadow: 0 0 0 2px var(--primary), 0 30px 60px rgba(30, 64, 175, 0.4);
}

/* --- Step/Process Animation --- */
.step {
  transition: all 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
}

.step:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(30, 64, 175, 0.4);
}

.step-number {
  transition: all 0.3s ease;
}

/* --- Video Play Button Enhancement --- */
.demo-play-btn {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-video-placeholder:hover .demo-play-btn {
  transform: scale(1.15);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

/* --- Case Study Card Enhancement --- */
.case-study-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-study-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.case-study-card:hover .case-study-image img {
  transform: scale(1.05);
}

.case-study-image {
  overflow: hidden;
}

.case-study-image img {
  transition: transform 0.5s ease;
}

/* --- Navigation Enhancement --- */
.nav {
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(6, 18, 32, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Hero Badge Enhancement --- */
.hero-badge {
  animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

/* --- Trust Indicator Enhancement --- */
.trust-item {
  transition: all 0.3s ease;
}

.trust-item:hover {
  color: var(--white);
  transform: translateX(3px);
}

.trust-item svg {
  transition: all 0.3s ease;
}

.trust-item:hover svg {
  transform: scale(1.2);
}

/* --- ROI Calculator Enhancement --- */
.roi-input-group input {
  transition: all 0.3s ease;
}

.roi-input-group input:focus {
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
  border-color: var(--primary);
}

.roi-result-card {
  transition: all 0.3s ease;
}

.roi-result-card:hover {
  transform: translateY(-3px);
}

/* --- Section Header Animation --- */
.features-header,
.pricing-preview-header,
.case-studies-header,
.how-it-works-header,
.demo-video-header,
.roi-calculator-header {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.features-header.animate-visible,
.pricing-preview-header.animate-visible,
.case-studies-header.animate-visible,
.how-it-works-header.animate-visible,
.demo-video-header.animate-visible,
.roi-calculator-header.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Focus States (Accessibility) --- */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.2);
}

/* --- Print Optimization --- */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   MODERN LANDING PAGE ENHANCEMENTS
   Cool developer vibes - 2024/2025 trends
   ============================================================ */

/* --- Animated Gradient Mesh Background --- */
.gradient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.gradient-mesh::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(30, 64, 175, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 40% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(30, 64, 175, 0.12) 0%, transparent 40%);
  animation: meshFloat 20s ease-in-out infinite;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2%, -1%) rotate(1deg); }
  50% { transform: translate(-1%, -2%) rotate(-1deg); }
  75% { transform: translate(1%, -1%) rotate(0.5deg); }
}

/* --- Floating Particles System --- */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(59, 130, 246, 0.4);
  border-radius: 50%;
  animation: particleFloat 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 20s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 22s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 19s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 21s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 17s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 23s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 20s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3s; animation-duration: 18s; }
.particle:nth-child(11) { left: 45%; animation-delay: 0s; animation-duration: 24s; }
.particle:nth-child(12) { left: 75%; animation-delay: 2s; animation-duration: 15s; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) scale(1);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-10vh) scale(0.5);
    opacity: 0;
  }
}

/* --- Animated Gradient Text --- */
.gradient-text-animated {
  background: linear-gradient(
    90deg,
    #60a5fa 0%,
    #a78bfa 25%,
    #60a5fa 50%,
    #34d399 75%,
    #60a5fa 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s ease infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Enhanced Glassmorphism --- */
.glass {
  background: rgba(12, 46, 78, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: linear-gradient(
    135deg,
    rgba(30, 58, 95, 0.8) 0%,
    rgba(12, 46, 78, 0.6) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* --- Neon Glow Effects --- */
.neon-glow {
  text-shadow:
    0 0 10px rgba(59, 130, 246, 0.5),
    0 0 20px rgba(59, 130, 246, 0.3),
    0 0 40px rgba(59, 130, 246, 0.2);
}

.neon-border {
  position: relative;
}

.neon-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #3b82f6);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.neon-border:hover::before {
  opacity: 0.6;
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%, 100% { opacity: 0.4; filter: blur(8px); }
  50% { opacity: 0.7; filter: blur(12px); }
}

/* --- Modern Button Styles --- */
.btn-glow {
  position: relative;
  background: var(--primary-gradient);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-glow:hover::before {
  left: 100%;
}

.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 30px rgba(30, 64, 175, 0.4),
    0 0 40px rgba(59, 130, 246, 0.2);
}

/* --- Morphing Background Blobs --- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: blobMorph 8s ease-in-out infinite;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  top: 50%;
  right: 10%;
  animation-delay: 2s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  bottom: 10%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes blobMorph {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translate(0, 0) scale(1);
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: translate(10px, -20px) scale(1.05);
  }
  50% {
    border-radius: 50% 60% 30% 60% / 30% 40% 70% 50%;
    transform: translate(-10px, 20px) scale(0.95);
  }
  75% {
    border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    transform: translate(20px, 10px) scale(1.02);
  }
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* --- Magnetic Cursor Effect (for elements) --- */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Text Reveal Animation --- */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  animation: textReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes textReveal {
  to { transform: translateY(0); }
}

/* --- Stagger reveal for lists --- */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(30px);
}

.stagger-reveal.reveal > *:nth-child(1) { animation: staggerIn 0.2s 0s ease-out forwards; }
.stagger-reveal.reveal > *:nth-child(2) { animation: staggerIn 0.2s 0.03s ease-out forwards; }
.stagger-reveal.reveal > *:nth-child(3) { animation: staggerIn 0.2s 0.06s ease-out forwards; }
.stagger-reveal.reveal > *:nth-child(4) { animation: staggerIn 0.2s 0.09s ease-out forwards; }
.stagger-reveal.reveal > *:nth-child(5) { animation: staggerIn 0.2s 0.12s ease-out forwards; }
.stagger-reveal.reveal > *:nth-child(6) { animation: staggerIn 0.2s 0.15s ease-out forwards; }

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Typing Animation --- */
.typing {
  overflow: hidden;
  border-right: 2px solid #3b82f6;
  white-space: nowrap;
  animation:
    typing 3s steps(40) 1s forwards,
    blinkCaret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blinkCaret {
  from, to { border-color: transparent; }
  50% { border-color: #3b82f6; }
}

/* --- Tilt Card Effect --- */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.3s ease;
}

.tilt-card:hover {
  transform: rotateX(5deg) rotateY(5deg);
}

.tilt-card-content {
  transform: translateZ(40px);
}

/* --- Hover Line Animation --- */
.hover-line {
  position: relative;
  display: inline-block;
}

.hover-line::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

.hover-line:hover::after {
  width: 100%;
}

/* --- Badge with Pulse --- */
.badge-pulse {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50px;
  color: #60a5fa;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(59, 130, 246, 0.5);
  animation: badgePulse 2s ease-out infinite;
}

@keyframes badgePulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* --- Interactive Cursor Follower --- */
.cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  background: rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-follower.active {
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.5);
}

/* --- Mobile Menu Enhancement --- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 100;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
}

/* --- Page Transition --- */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: 10000;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-transition.active {
  transform: scaleY(1);
  transform-origin: top;
}

/* --- Smooth Section Transitions --- */
section {
  position: relative;
}

/* --- Interactive Number Counter --- */
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* --- Spotlight Effect --- */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(59, 130, 246, 0.15) 0%,
    transparent 25%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
}

/* --- Footer Enhancement --- */
.footer-modern {
  position: relative;
  overflow: hidden;
}

.footer-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

/* --- Nav Scrolled State --- */
.nav.scrolled {
  background: rgba(6, 18, 32, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

/* --- Fade In Animations --- */
.animate-fadeInUp {
  animation: fadeInUp 0.3s ease-out forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 0.3s ease-out forwards;
}

.animate-delay-100 { animation-delay: 0.05s; }
.animate-delay-200 { animation-delay: 0.1s; }
.animate-delay-300 { animation-delay: 0.15s; }
.animate-delay-400 { animation-delay: 0.2s; }
.animate-delay-500 { animation-delay: 0.25s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- From Direction Animations --- */
.from-left {
  transform: translateX(-20px);
}

.from-right {
  transform: translateX(20px);
}

.from-left.animate-visible,
.from-right.animate-visible {
  transform: translate(0, 0);
}
