/* ===== GLOBAL PREMIUM ENHANCEMENTS ===== */

/* Premium button ripple effect */
.btn::after {
  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::after {
  width: 200px;
  height: 200px;
}

/* ===== PREMIUM ANIMATION LIBRARY ===== */

/* Fade In */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Slide Up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slide Down */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-down {
  animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bounce */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

.bounce {
  animation: bounce 1s ease;
}

/* Shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s ease;
}

/* Pulse */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Spin */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* Float */
@keyframes float {
  0%, 100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(10px, -10px);
  }
  66% {
    transform: translate(-5px, 5px);
  }
}

.float {
  animation: float 6s ease-in-out infinite;
}

/* Glow */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 30px rgba(99, 102, 241, 0.4);
  }
}

.glow {
  animation: glow 2s ease-in-out infinite;
}

/* Modal Animation */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Loading Spinner */
@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-white);
  animation: spinner 0.8s linear infinite;
}

/* Skeleton Loading */
@keyframes skeleton {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--color-slate-100) 25%, var(--color-slate-50) 50%, var(--color-slate-100) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius);
}

/* Tooltip Animation */
@keyframes tooltipIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[title] {
  position: relative;
}

[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--color-slate-900);
  color: var(--color-white);
  font-size: 0.8125rem;
  border-radius: var(--radius);
  white-space: nowrap;
  z-index: 1000;
  animation: tooltipIn 0.2s ease;
  pointer-events: none;
}

/* Counter Animation */
.counter {
  display: inline-block;
  transition: all 0.3s ease;
}

.counter:hover {
  transform: scale(1.1);
  color: var(--color-brand-600);
}

/* Icon Animation */
.icon-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-hover:hover {
  transform: scale(1.2) rotate(5deg);
}

/* Image Hover Effect */
.img-hover {
  overflow: hidden;
  border-radius: var(--radius);
}

.img-hover img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-hover:hover img {
  transform: scale(1.1);
}

/* Text Gradient Animation */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-text-animated {
  background: var(--gradient-brand);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

/* Border Animation */
@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(99, 102, 241, 0.3);
  }
  50% {
    border-color: rgba(99, 102, 241, 0.8);
  }
}

.border-glow {
  animation: borderGlow 2s ease-in-out infinite;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, var(--color-slate-100) 0%, var(--color-slate-50) 50%, var(--color-slate-100) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Typing Animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--color-brand-600);
  animation: 
    typing 3s steps(40, end),
    blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--color-brand-600);
  }
}

/* Notification Badge Animation */
@keyframes badgePop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.badge-pop {
  animation: badgePop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Page Transition */
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-transition {
  animation: pageIn 0.5s ease-out;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-brand);
  z-index: 10001;
  transition: width 0.1s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Cursor Glow Effect */
.cursor-glow {
  display: none;
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .nav-toggle,
  .btn {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .section {
    page-break-inside: avoid;
  }
}

/* Ripple Effect */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===== COSMIC / OUT-OF-THIS-WORLD ENHANCEMENTS ===== */

/* Spotlight — cosmic radial gradient following the cursor */
.spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  margin-left: -240px;
  margin-top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, rgba(99, 102, 241, 0.06) 40%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.spotlight.active,
body.loaded .spotlight {
  opacity: 1;
}

@media (max-width: 1024px) {
  .spotlight { display: none; }
}

/* Animated noise overlay for subtle film texture */
.hero-noise {
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  background-repeat: repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  animation: noiseShift 0.3s steps(10) infinite;
}

@keyframes noiseShift {
  0% { background-position: 0 0; }
  100% { background-position: 500px 500px; }
}

/* Hero canvas particle field */
.hero-canvas-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Floating geometric SVG shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  width: 120px;
  height: 120px;
  color: var(--color-brand-500);
  opacity: 0.45;
}

.hero-shape-1 { top: 12%; left: 8%; animation: driftFloat 28s infinite ease-in-out; }
.hero-shape-2 { bottom: 10%; right: 12%; width: 140px; height: 140px; animation: driftFloat 34s infinite ease-in-out reverse; }
.hero-shape-3 { top: 45%; left: 50%; animation: driftFloat 40s infinite ease-in-out; }
.hero-shape-4 { bottom: 30%; left: 18%; width: 100px; height: 100px; animation: driftFloat 30s infinite ease-in-out reverse; }

@keyframes driftFloat {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(18px, -16px) rotate(8deg) scale(1.06); }
  50% { transform: translate(-8px, 22px) rotate(-5deg) scale(1.03); }
  75% { transform: translate(14px, 10px) rotate(4deg) scale(1.04); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

@media (max-width: 768px) {
  .hero-shapes {
    opacity: 0.2;
  }
  .hero-noise {
    opacity: 0.04;
  }
  .bg-orb {
    filter: blur(50px);
  }
  .bg-orb-1,
  .bg-orb-2,
  .bg-orb-3 {
    opacity: 0.15;
  }
  .navbar,
  .footer,
  .glass-card,
  .nav-menu {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .glow-2d {
    will-change: auto;
  }
}
/* Badge glowing ring */
.badge-glow {
  position: absolute;
  inset: -4px;
  border-radius: 100px;
  background: var(--gradient-brand);
  filter: blur(8px);
  opacity: 0.6;
  animation: pulse-ring 2.5s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.3; filter: blur(6px) scale(1); }
  50% { opacity: 0.6; filter: blur(10px) scale(1.05); }
}

/* Hero title line reveal */
.hero-title-line {
  display: block;
}

.hero-title-line.loaded,
body.loaded .hero-title-line {
  opacity: 1;
  transform: translateY(0);
}

/* Animated gradient text */
.gradient-text-animated {
  background: var(--gradient-brand);
  background-size: 250% 250%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== GLOW & TILT ENHANCEMENTS ===== */

/* Neon hover glow — additive box-shadow, works on all backgrounds */
.glow-2d {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-2d:hover {
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3), 0 20px 40px 0 rgba(99, 102, 241, 0.28);
}

.glow-2d.will-tilt {
  will-change: transform;
}

/* SVG path-draw preparation */
[data-pathdraw] svg path,
[data-pathdraw] svg line,
[data-pathdraw] svg rect,
[data-pathdraw] svg circle,
[data-pathdraw] svg polygon,
[data-pathdraw] svg polyline {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.draw-icon {
  overflow: hidden;
}

.draw-icon svg {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.draw-icon:hover svg {
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.6));
}

/* Hero actions SVG entry */
.hero .btn svg {
  transition: transform 0.3s ease;
}

.hero .btn:hover svg {
  transform: translateX(2px);
}

/* Back-to-top hover spin */
.back-to-top:hover svg {
  animation: spin 0.8s linear;
}

/* Contact item icon pulse on hover */
.contact-item:hover .contact-icon {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}

/* Testimonial star rating pulse */
.testimonial-rating {
  animation: starTwinkle 3s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.85; filter: brightness(1.1) saturate(1.2); }
}

/* Process number glow on hover */
.process-item:hover .process-number {
  box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.3), 0 0 16px rgba(99, 102, 241, 0.5);
  transform: scale(1.08) rotate(2deg);
}

/* Tech item icon spin on hover */
.tech-item:hover .tech-icon {
  animation: spin 4s linear infinite;
}

/* Hosting card popular badge pulse */
.hosting-card.popular .popular-badge {
  animation: pulse-pop 2s ease-in-out infinite;
}

@keyframes pulse-pop {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 0.9; }
}

/* ===== HERO STATS ENHANCEMENT ===== */
.stat-number {
  position: relative;
  z-index: 1;
}

.hero-stat .stat-value-wrapper:hover .stat-number {
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

/* Scroll progress bar enhanced glow */
.scroll-progress {
  height: 4px;
}

/* Navbar link hover glow */
.nav-link:hover .nav-link-text {
  filter: brightness(1.1);
}

/* Reveal animation overrides for 3D tiles */
.glow-2d {
  will-change: transform;
}

/* ===== COSMIC SECTION DIVIDERS ===== */
.section + .section,
section.section + section,
.cta-section,
.results-section,
.testimonials-section {
  position: relative;
}

section.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-brand-500) 50%, transparent 100%);
  opacity: 0.4;
}

.results-section::before,
.testimonials-section::before {
  opacity: 0.3;
}

@media (prefers-reduced-motion: reduce) {
  .gradient-text-animated {
    animation: none !important;
  }

  .hero-stat .stat-value-wrapper:hover .stat-number {
    filter: none !important;
  }

  .contact-item:hover .contact-icon {
    animation: none !important;
  }

  .testimonial-rating {
    animation: none !important;
  }

  .process-item:hover .process-number {
    transform: none !important;
  }

  .back-to-top:hover svg {
    animation: none !important;
  }

  .hero .btn:hover svg {
    transform: none !important;
  }

  .draw-icon:hover svg {
    filter: none !important;
    transform: none !important;
  }
}
