/*
 * Advertising Visual Effects Library
 * Professional marketing animations for product reveals, brand animations,
 * call-to-action effects, and promotional banners
 * Created for enhanced user engagement and conversion optimization
 */

/* ===== PRODUCT REVEAL EFFECTS ===== */

/* Product Spotlight Reveal */
.product-spotlight {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, #ff6b35, #f7931e, transparent);
  animation: productSpotlightRotate 3s linear infinite;
  z-index: 1;
}

.product-spotlight::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: inherit;
  border-radius: inherit;
  z-index: 2;
}

.product-spotlight .content {
  position: relative;
  z-index: 3;
  padding: 2rem;
  text-align: center;
}

@keyframes productSpotlightRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Product Unveil Animation */
.product-unveil {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.product-unveil .curtain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 2;
}

.product-unveil:hover .curtain {
  transform: scaleX(0);
}

.product-unveil .product-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: scale(0.8) rotateY(15deg);
  transition: all 1s ease-out 0.3s;
}

.product-unveil:hover .product-content {
  opacity: 1;
  transform: scale(1) rotateY(0deg);
}

/* 3D Product Showcase */
.product-3d-showcase {
  perspective: 1000px;
  position: relative;
  width: 300px;
  height: 300px;
  margin: 2rem auto;
}

.product-3d-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.product-3d-showcase:hover .product-3d-card {
  transform: rotateY(180deg);
}

.product-3d-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
}

.product-3d-front {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.product-3d-back {
  background: linear-gradient(135deg, #4834d4, #686de0);
  transform: rotateY(180deg);
}

/* ===== BRAND ANIMATION EFFECTS ===== */

/* Logo Pulse Animation */
.brand-logo-pulse {
  display: inline-block;
  animation: brandPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.5));
}

@keyframes brandPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(255, 107, 53, 0.8));
  }
}

/* Brand Text Reveal */
.brand-text-reveal {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.brand-text-reveal .text {
  display: inline-block;
  transform: translateY(100%);
  animation: brandTextSlideUp 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.brand-text-reveal .text:nth-child(2) { animation-delay: 0.1s; }
.brand-text-reveal .text:nth-child(3) { animation-delay: 0.2s; }
.brand-text-reveal .text:nth-child(4) { animation-delay: 0.3s; }

@keyframes brandTextSlideUp {
  to {
    transform: translateY(0);
  }
}

/* Brand Color Morph */
.brand-color-morph {
  background: linear-gradient(45deg, #ff6b35, #f7931e, #ff6b35);
  background-size: 300% 300%;
  animation: brandColorShift 3s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
  font-size: 2rem;
}

@keyframes brandColorShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== CALL-TO-ACTION EFFECTS ===== */

/* Magnetic CTA Button */
.cta-magnetic {
  position: relative;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
}

.cta-magnetic::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.cta-magnetic:hover::before {
  left: 100%;
}

.cta-magnetic:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

/* Ripple Effect CTA */
.cta-ripple {
  position: relative;
  padding: 1rem 2rem;
  background: #ff6b35;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.cta-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Glowing CTA */
.cta-glow {
  position: relative;
  padding: 1rem 2rem;
  background: #1a1a1a;
  border: 2px solid #ff6b35;
  border-radius: 8px;
  color: #ff6b35;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-glow:hover {
  background: #ff6b35;
  color: white;
  box-shadow: 
    0 0 20px rgba(255, 107, 53, 0.5),
    0 0 40px rgba(255, 107, 53, 0.3),
    0 0 60px rgba(255, 107, 53, 0.1);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* ===== PROMOTIONAL BANNER EFFECTS ===== */

/* Sliding Banner */
.promo-banner-slide {
  position: relative;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  padding: 1rem;
  overflow: hidden;
  text-align: center;
  font-weight: bold;
}

.promo-banner-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: bannerSlide 3s ease-in-out infinite;
}

@keyframes bannerSlide {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Pulsing Banner */
.promo-banner-pulse {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 1rem;
  text-align: center;
  font-weight: bold;
  animation: bannerPulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

@keyframes bannerPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
}

/* Countdown Banner */
.promo-banner-countdown {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.countdown-unit {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  min-width: 60px;
  animation: countdownFlip 1s ease-in-out infinite;
}

@keyframes countdownFlip {
  0%, 50%, 100% { transform: rotateX(0); }
  25% { transform: rotateX(90deg); }
  75% { transform: rotateX(-90deg); }
}

/* ===== INTERACTIVE HOVER EFFECTS ===== */

/* Product Card Hover */
.product-card-interactive {
  position: relative;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.product-card-interactive:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.product-card-interactive .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(247, 147, 30, 0.9));
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.product-card-interactive:hover .overlay {
  opacity: 1;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
  .product-3d-showcase {
    width: 250px;
    height: 250px;
  }
  
  .brand-color-morph {
    font-size: 1.5rem;
  }
  
  .countdown-timer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .countdown-unit {
    min-width: 50px;
    padding: 0.3rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .product-3d-showcase {
    width: 200px;
    height: 200px;
  }
  
  .cta-magnetic,
  .cta-ripple,
  .cta-glow {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .promo-banner-countdown {
    padding: 1rem;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .product-spotlight::before,
  .brand-logo-pulse,
  .brand-color-morph,
  .promo-banner-slide::before,
  .promo-banner-pulse,
  .countdown-unit {
    animation: none;
  }
  
  .product-unveil .curtain,
  .product-unveil .product-content,
  .product-3d-card,
  .cta-magnetic,
  .product-card-interactive {
    transition: none;
  }
}

/* GPU acceleration for smooth animations */
.product-spotlight,
.product-3d-card,
.cta-magnetic,
.product-card-interactive {
  will-change: transform;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* Focus states for keyboard navigation */
.cta-magnetic:focus,
.cta-ripple:focus,
.cta-glow:focus {
  outline: 3px solid #ff6b35;
  outline-offset: 2px;
}

.product-card-interactive:focus {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .product-spotlight {
    border: 2px solid currentColor;
  }
  
  .cta-magnetic,
  .cta-ripple {
    border: 2px solid currentColor;
  }
}

/* ===== UTILITY CLASSES ===== */

.ad-fade-in {
  animation: adFadeIn 1s ease-out forwards;
}

@keyframes adFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ad-slide-in-left {
  animation: adSlideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes adSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ad-bounce-in {
  animation: adBounceIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes adBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== CONVERSION OPTIMIZATION EFFECTS ===== */

/* Urgency Indicator */
.urgency-indicator {
  position: relative;
  background: #e74c3c;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  animation: urgencyPulse 1.5s ease-in-out infinite;
}

@keyframes urgencyPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }
}

/* Social Proof Animation */
.social-proof {
  background: #27ae60;
  color: white;
  padding: 1rem;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  animation: socialProofSlide 0.5s ease-out;
}

@keyframes socialProofSlide {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.social-proof::before {
  content: '✓';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  animation: checkmarkPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
}

@keyframes checkmarkPop {
  0% {
    transform: translateY(-50%) scale(0);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}