/* Taverna del Fiorentino — animations.css */

/* Hero text reveal */
.hero-reveal {
  clip-path: inset(0 100% 0 0);
  animation: hero-reveal 1.2s cubic-bezier(0.77, 0, 0.18, 1) 0.2s forwards;
}

.hero-reveal--delay {
  animation-delay: 0.45s;
}

.hero-reveal--delay2 {
  animation-delay: 0.65s;
}

.hero-reveal--delay3 {
  animation-delay: 0.85s;
}

@keyframes hero-reveal {
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* CJK float */
.hero-cjk-float {
  animation: hero-cjk-float 0.9s ease-out 0.1s both;
}

@keyframes hero-cjk-float {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Embers (CSS pseudo-elements on hero__embers) */
.hero__embers::before,
.hero__embers::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 80%, rgba(255, 120, 60, 0.35) 0, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(255, 80, 40, 0.25) 0, transparent 35%),
    radial-gradient(circle at 50% 20%, rgba(255, 160, 80, 0.2) 0, transparent 30%);
  animation: embers-drift 18s ease-in-out infinite alternate;
  opacity: 0.65;
}

.hero__embers::after {
  animation-duration: 22s;
  animation-delay: -4s;
  opacity: 0.45;
  filter: blur(1px);
}

@keyframes embers-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-2%, -3%, 0) scale(1.05);
  }
}

/* Spark particles (small dots) */
.hero__ember-sparks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__ember-sparks span {
  position: absolute;
  bottom: -10%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 100, 0.95), rgba(200, 16, 46, 0.2));
  animation: ember-rise linear infinite;
  opacity: 0.5;
}

.hero__ember-sparks span:nth-child(1) {
  left: 12%;
  animation-duration: 9s;
  animation-delay: 0s;
}
.hero__ember-sparks span:nth-child(2) {
  left: 28%;
  animation-duration: 11s;
  animation-delay: -2s;
}
.hero__ember-sparks span:nth-child(3) {
  left: 44%;
  animation-duration: 8s;
  animation-delay: -4s;
}
.hero__ember-sparks span:nth-child(4) {
  left: 58%;
  animation-duration: 12s;
  animation-delay: -1s;
}
.hero__ember-sparks span:nth-child(5) {
  left: 72%;
  animation-duration: 10s;
  animation-delay: -3s;
}
.hero__ember-sparks span:nth-child(6) {
  left: 88%;
  animation-duration: 9s;
  animation-delay: -5s;
}
.hero__ember-sparks span:nth-child(7) {
  left: 18%;
  animation-duration: 10.5s;
  animation-delay: -2.5s;
}
.hero__ember-sparks span:nth-child(8) {
  left: 35%;
  animation-duration: 8.5s;
  animation-delay: -6s;
}
.hero__ember-sparks span:nth-child(9) {
  left: 65%;
  animation-duration: 11.5s;
  animation-delay: -0.5s;
}
.hero__ember-sparks span:nth-child(10) {
  left: 8%;
  animation-duration: 11s;
  animation-delay: -3.5s;
}
.hero__ember-sparks span:nth-child(11) {
  left: 22%;
  animation-duration: 9.2s;
  animation-delay: -1.2s;
}
.hero__ember-sparks span:nth-child(12) {
  left: 50%;
  animation-duration: 10.8s;
  animation-delay: -4.8s;
}
.hero__ember-sparks span:nth-child(13) {
  left: 78%;
  animation-duration: 8.2s;
  animation-delay: -2.8s;
}
.hero__ember-sparks span:nth-child(14) {
  left: 5%;
  animation-duration: 10.3s;
  animation-delay: -4.2s;
}
.hero__ember-sparks span:nth-child(15) {
  left: 33%;
  animation-duration: 9.2s;
  animation-delay: -1.8s;
}
.hero__ember-sparks span:nth-child(16) {
  left: 40%;
  animation-duration: 11.2s;
  animation-delay: -5.5s;
}
.hero__ember-sparks span:nth-child(17) {
  left: 55%;
  animation-duration: 8.8s;
  animation-delay: -0.8s;
}
.hero__ember-sparks span:nth-child(18) {
  left: 70%;
  animation-duration: 10.6s;
  animation-delay: -3.3s;
}
.hero__ember-sparks span:nth-child(19) {
  left: 85%;
  animation-duration: 9.6s;
  animation-delay: -2.1s;
}
.hero__ember-sparks span:nth-child(20) {
  left: 95%;
  animation-duration: 8.6s;
  animation-delay: -4.9s;
}

@keyframes ember-rise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.6);
    opacity: 0;
  }
  10% {
    opacity: 0.85;
  }
  100% {
    transform: translate3d(8px, -120vh, 0) scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-reveal,
  .hero-cjk-float {
    animation: none;
    clip-path: none;
    opacity: 1;
  }

  .hero__embers::before,
  .hero__embers::after,
  .hero__ember-sparks span {
    animation: none;
  }
}

/* Button hover glow (shared) */
.btn-glow-hover {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.btn-glow-hover:hover {
  box-shadow: 0 0 28px rgba(212, 175, 55, 0.35);
}

/* CTA primaria: leggero pulse al focus (solo se motion ok) */
@media (prefers-reduced-motion: no-preference) {
  .btn-jangus-primary:focus-visible {
    animation: cta-pulse 1.4s ease-in-out 1;
  }
}

@keyframes cta-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(200, 16, 46, 0);
  }
}
