/**
 * ============================================================
 * EMERALD PARTICLES — Partículas Animadas de Esmeraldas
 * Figuras hexagonales flotantes verdes y doradas
 * Verde Encanto — Efecto Visual Premium
 * ============================================================
 */

/* --------------------------------------------------
   KEYFRAMES
   -------------------------------------------------- */

@keyframes floatEmerald {
  0% {
    transform: translateY(105vh) rotate3d(1, 1, 0, 0deg) scale(1);
    opacity: 0;
  }
  8% {
    opacity: var(--emerald-opacity, 0.18);
  }
  92% {
    opacity: var(--emerald-opacity, 0.18);
  }
  100% {
    transform: translateY(-120px) rotate3d(1, 1, 0, 360deg) scale(0.7);
    opacity: 0;
  }
}

@keyframes floatEmeraldSlow {
  0% {
    transform: translateY(105vh) rotate3d(0, 1, 1, 0deg) scale(1);
    opacity: 0;
  }
  5% {
    opacity: var(--emerald-opacity-slow, 0.14);
  }
  95% {
    opacity: var(--emerald-opacity-slow, 0.14);
  }
  100% {
    transform: translateY(-150px) rotate3d(0, 1, 1, 540deg) scale(0.6);
    opacity: 0;
  }
}

@keyframes floatEmeraldFast {
  0% {
    transform: translateY(105vh) rotate3d(1, 0, 0, 0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: var(--emerald-opacity-fast, 0.22);
  }
  90% {
    opacity: var(--emerald-opacity-fast, 0.22);
  }
  100% {
    transform: translateY(-100px) rotate3d(1, 0, 0, 720deg) scale(0.5);
    opacity: 0;
  }
}

@keyframes emeraldGlow {
  0%, 100% {
    filter: drop-shadow(0 0 1px rgba(212, 175, 55, 0.15));
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.55));
  }
}

/* --------------------------------------------------
   CONTENEDOR DE PARTÍCULAS
   -------------------------------------------------- */

.ve-emerald-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* --------------------------------------------------
   PARTÍCULA BASE — Hexágono Facetado
   -------------------------------------------------- */

.ve-emerald-particle {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
  /* Hexágono tipo esmeralda facetada */
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: radial-gradient(
    circle at 30% 35%,
    #66BB6A 0%,
    #388E3C 40%,
    #1B5E20 100%
  );
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  opacity: 0;
}

/* --------------------------------------------------
   VARIANTE DORADA
   -------------------------------------------------- */

.ve-emerald-particle--gold {
  background: radial-gradient(
    circle at 30% 35%,
    #F4D03F 0%,
    #D4AF37 40%,
    #996515 100%
  );
  animation-name: floatEmerald, emeraldGlow;
}

/* --------------------------------------------------
   VARIANTES DE TAMAÑO
   -------------------------------------------------- */

.ve-emerald-particle--small {
  width: 8px;
  height: 14px;
  animation-name: floatEmeraldFast;
}

.ve-emerald-particle--medium {
  width: 16px;
  height: 28px;
  animation-name: floatEmerald;
}

.ve-emerald-particle--large {
  width: 24px;
  height: 42px;
  animation-name: floatEmeraldSlow;
}

/* --------------------------------------------------
   INTERACCIÓN HOVER — Solo Desktop
   -------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  .ve-emerald-particle:hover {
    transform: scale(2.2) rotate(180deg) !important;
    opacity: 0.7 !important;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.9));
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease,
                filter 0.4s ease;
    animation-play-state: paused;
  }
}

/* --------------------------------------------------
   ACCESIBILIDAD — Reduced Motion
   -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .ve-emerald-particle {
    animation: none !important;
    opacity: 0.06 !important;
  }
}

/* --------------------------------------------------
   PARTÍCULA CHAMPAGNE (delicada, 10% ocurrencia)
   -------------------------------------------------- */

.ve-emerald-particle--champagne {
  background: radial-gradient(
    circle at 30% 35%,
    #FFF8E7 0%,
    #E8D5A3 40%,
    #C4A96A 100%
  );
  animation-name: floatEmeraldFast;
  opacity: 0.10;
}
