/* ===================================
   FIRED UP BBQ - Smoke Animation Styles
   =================================== */

/* Global Smoke Effects */
.smoke-effect {
  position: relative;
  overflow: hidden;
}

.smoke-effect::before,
.smoke-effect::after {
  content: '';
  position: absolute;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

/* Ambient Smoke Layers */
.ambient-smoke {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.ambient-smoke-layer {
  position: absolute;
  width: 200%;
  height: 200%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><filter id="smoke"><feTurbulence baseFrequency="0.01" numOctaves="2" /><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0"/></filter></defs><rect width="100%" height="100%" filter="url(%23smoke)" /></svg>');
  opacity: 0.3;
  animation: driftSmoke 30s linear infinite;
}

@keyframes driftSmoke {
  from {
    transform: translateX(-50%) translateY(0);
  }
  to {
    transform: translateX(0) translateY(-50%);
  }
}

/* Service Card Hover Smoke */
.service-hover-smoke {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(214, 105, 30, 0.3) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(25px);
  opacity: 0;
  transition: all 0.5s ease;
  pointer-events: none;
}

.service-card:hover .service-hover-smoke {
  opacity: 1;
  bottom: -20px;
  animation: smokePulse 2s ease-in-out infinite;
}

@keyframes smokePulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.2);
  }
}

/* Pig Roast Image Smoke */
.image-smoke-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    0deg,
    rgba(139, 69, 19, 0.4) 0%,
    rgba(139, 69, 19, 0.2) 30%,
    transparent 60%
  );
  pointer-events: none;
  animation: smokeRise 8s ease-in-out infinite;
}

@keyframes smokeRise {
  0%,
  100% {
    opacity: 0.8;
    transform: translateY(0);
  }
  50% {
    opacity: 0.4;
    transform: translateY(-10px);
  }
}

/* Rising Smoke Particles */
.rising-smoke-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.smoke-rise {
  position: absolute;
  bottom: -100px;
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(15px);
  animation: riseUp 10s linear infinite;
}

.smoke-rise:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 8s;
}

.smoke-rise:nth-child(2) {
  left: 30%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.smoke-rise:nth-child(3) {
  left: 50%;
  animation-delay: 4s;
  animation-duration: 9s;
}

.smoke-rise:nth-child(4) {
  left: 70%;
  animation-delay: 6s;
  animation-duration: 11s;
}

.smoke-rise:nth-child(5) {
  left: 90%;
  animation-delay: 8s;
  animation-duration: 12s;
}

@keyframes riseUp {
  0% {
    bottom: -100px;
    opacity: 0;
    transform: translateX(0) scale(0.5) rotate(0deg);
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.4;
    transform: translateX(30px) scale(1.5) rotate(180deg);
  }
  90% {
    opacity: 0;
  }
  100% {
    bottom: 100%;
    opacity: 0;
    transform: translateX(-30px) scale(2) rotate(360deg);
  }
}

/* CTA Section Smoke Background */
.cta-smoke-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cta-smoke-bg::before,
.cta-smoke-bg::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(214, 105, 30, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(40px);
  animation: smokeFloat 15s ease-in-out infinite;
}

.cta-smoke-bg::before {
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.cta-smoke-bg::after {
  bottom: -150px;
  right: -150px;
  animation-delay: 7.5s;
}

@keyframes smokeFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -30px) scale(1.2);
  }
  66% {
    transform: translate(-30px, 50px) scale(0.9);
  }
}

/* BBQ Grill Smoke Effect */
.grill-smoke {
  position: relative;
}

.grill-smoke::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  filter: blur(10px);
  border-radius: 50%;
  animation: grillSmoke 4s ease-in-out infinite;
}

@keyframes grillSmoke {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(0) scale(0.5);
  }
  20% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(-50px) scale(1.5);
  }
  80% {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px) scale(2);
  }
}

/* Menu Item Hover Smoke */
.menu-item {
  position: relative;
}

.menu-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    0deg,
    rgba(214, 105, 30, 0.1) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.menu-item:hover::after {
  opacity: 1;
  animation: menuSmoke 2s ease-in-out infinite;
}

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

/* Smoke Text Effect */
.smoke-text {
  position: relative;
  display: inline-block;
}

.smoke-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--ember-orange);
  filter: blur(0);
  animation: smokeText 3s ease-in-out infinite;
}

@keyframes smokeText {
  0%,
  100% {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    filter: blur(3px);
    opacity: 0.7;
    transform: translateY(-5px);
  }
}

/* Smoke Wisp Animation */
.smoke-wisp {
  position: absolute;
  width: 60px;
  height: 60px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(10px);
  animation: wispMove 15s linear infinite;
}

@keyframes wispMove {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  100% {
    transform: translate(200px, -300px) rotate(720deg) scale(3);
    opacity: 0;
  }
}

/* Smoke Ring Effect */
.smoke-ring {
  position: absolute;
  border: 2px solid rgba(214, 105, 30, 0.3);
  border-radius: 50%;
  animation: expandRing 3s ease-out infinite;
}

@keyframes expandRing {
  0% {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transform: translate(-50%, -50%);
  }
  100% {
    width: 200px;
    height: 200px;
    opacity: 0;
    transform: translate(-50%, -50%);
  }
}

/* Smoke Burst Effect */
.smoke-burst {
  position: absolute;
  width: 100px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.smoke-burst-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(
    circle,
    rgba(214, 105, 30, 0.5) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(5px);
}

.smoke-burst.active .smoke-burst-particle {
  animation: burstOut 1s ease-out forwards;
}

.smoke-burst-particle:nth-child(1) {
  --angle: 0deg;
}
.smoke-burst-particle:nth-child(2) {
  --angle: 45deg;
}
.smoke-burst-particle:nth-child(3) {
  --angle: 90deg;
}
.smoke-burst-particle:nth-child(4) {
  --angle: 135deg;
}
.smoke-burst-particle:nth-child(5) {
  --angle: 180deg;
}
.smoke-burst-particle:nth-child(6) {
  --angle: 225deg;
}
.smoke-burst-particle:nth-child(7) {
  --angle: 270deg;
}
.smoke-burst-particle:nth-child(8) {
  --angle: 315deg;
}

@keyframes burstOut {
  0% {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-100px)
      scale(2);
    opacity: 0;
  }
}

/* Ember Particles */
.ember-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.ember {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--ember-orange);
  border-radius: 50%;
  filter: blur(1px);
  box-shadow: 0 0 6px var(--ember-orange);
  animation: floatEmber 10s linear infinite;
}

@keyframes floatEmber {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px) scale(1);
    opacity: 0;
  }
}

.ember:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}
.ember:nth-child(2) {
  left: 20%;
  animation-delay: 2s;
  animation-duration: 10s;
}
.ember:nth-child(3) {
  left: 30%;
  animation-delay: 4s;
  animation-duration: 14s;
}
.ember:nth-child(4) {
  left: 40%;
  animation-delay: 6s;
  animation-duration: 11s;
}
.ember:nth-child(5) {
  left: 50%;
  animation-delay: 8s;
  animation-duration: 13s;
}
.ember:nth-child(6) {
  left: 60%;
  animation-delay: 10s;
  animation-duration: 15s;
}
.ember:nth-child(7) {
  left: 70%;
  animation-delay: 12s;
  animation-duration: 12s;
}
.ember:nth-child(8) {
  left: 80%;
  animation-delay: 14s;
  animation-duration: 10s;
}
.ember:nth-child(9) {
  left: 90%;
  animation-delay: 16s;
  animation-duration: 11s;
}
.ember:nth-child(10) {
  left: 95%;
  animation-delay: 18s;
  animation-duration: 14s;
}

/* Performance Optimization */
@media (prefers-reduced-motion: reduce) {
  .smoke-particle,
  .smoke-rise,
  .smoke-wisp,
  .ember,
  .ambient-smoke-layer,
  .cta-smoke-bg::before,
  .cta-smoke-bg::after,
  .image-smoke-effect,
  .service-hover-smoke,
  .grill-smoke::before {
    animation: none !important;
  }

  .smoke-burst-particle,
  .smoke-ring {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Reduce number of smoke particles on mobile */
  .smoke-rise:nth-child(2),
  .smoke-rise:nth-child(4),
  .ember:nth-child(even) {
    display: none;
  }

  /* Simplify animations */
  .ambient-smoke-layer {
    animation-duration: 40s;
  }

  /* Reduce blur for better performance */
  .smoke-particle,
  .service-hover-smoke {
    filter: blur(15px);
  }
}

/* High Performance Mode */
@media (max-width: 576px), (pointer: coarse) {
  /* Disable complex animations on touch devices */
  .ambient-smoke,
  .rising-smoke-container {
    display: none;
  }

  /* Simplify hover effects */
  .service-hover-smoke,
  .menu-item::after {
    transition: none;
    animation: none;
  }
}
