/* ==========================================================================
   footer-newsletter.css — Footer newsletter interactive states
   Moved out of partials/footer.php. Loaded last (after page styles) exactly as before.
   Every value is written out (no CSS variables) and every selector has its
   own rule, so changing one block never touches another.
   ========================================================================== */

.nl-wrap {
  position: relative;
}

.footer-newsletter {
  position: relative;
  transition: opacity .5s,transform .5s;
}

.footer-newsletter[hidden] {
  display: none;
}

.footer-newsletter.is-gone {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.nl-field {
  position: relative;
}

.nl-field input {
  width: 100%;
}

.nl-spark {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  opacity: 0;
  transition: transform .35s cubic-bezier(.34,1.8,.5,1),opacity .3s;
  pointer-events: none;
}

.footer-newsletter.is-ready .nl-spark {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  animation: nlTwirl 2s ease-in-out infinite;
}

@keyframes nlTwirl {
  50% {
    transform: translateY(-50%) scale(1.25) rotate(18deg);
  }
}

.footer-newsletter.is-ready .nl-field input {
  border-color: #f7d4e6;
  box-shadow: 0 0 0 3px #f7d4e640;
}

.nl-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 48px;
  transition: background .3s,color .3s,transform .25s,box-shadow .3s;
}

.footer-newsletter.is-ready .nl-btn {
  animation: nlPulse 1.8s ease-out infinite;
}

@keyframes nlPulse {
  0% {
    box-shadow: 0 0 0 0 #f7d4e6a6;
  }
  100% {
    box-shadow: 0 0 0 16px #f7d4e600;
  }
}

.nl-label {
  transition: opacity .25s,transform .25s;
}

.nl-dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.nl-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a154b;
  animation: nlDot .8s ease-in-out infinite;
}

.nl-dots i:nth-child(2) {
  animation-delay: .12s;
}

.nl-dots i:nth-child(3) {
  animation-delay: .24s;
}

@keyframes nlDot {
  0%,100% {
    transform: translateY(0);
    opacity: .4;
  }
  50% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

.footer-newsletter.is-loading .nl-label {
  opacity: 0;
  transform: scale(.9);
}

.footer-newsletter.is-loading .nl-dots {
  opacity: 1;
}

.footer-newsletter.is-loading .nl-btn {
  animation: none;
  pointer-events: none;
}

.nl-check {
  width: 0;
  height: 22px;
  fill: none;
  stroke: #4a154b;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: width .3s,margin .3s;
  overflow: visible;
}

.nl-check path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
}

.footer-newsletter.is-done .nl-btn {
  background: #f7d4e6;
  border-color: #f7d4e6;
  color: #4a154b;
  animation: none;
}

.footer-newsletter.is-done .nl-check {
  width: 22px;
  margin-right: 8px;
}

.footer-newsletter.is-done .nl-check path {
  animation: nlDraw .55s ease-out .1s forwards;
}

@keyframes nlDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.nl-msg {
  min-height: 1.2em;
  margin: 0;
  font-size: .82rem;
  line-height: 1.4;
  color: #f7d4e6;
  text-align: center;
}

.footer-newsletter.is-error .nl-field input {
  border-color: #f7d4e6;
  background: #f7d4e62e;
}

.footer-newsletter.is-error .nl-msg {
  color: #fff;
  font-weight: 600;
}

.footer-newsletter.is-error .nl-msg::before {
  content: "⚠ ";
}

.footer-newsletter.is-shake .nl-field {
  animation: nlShake .5s;
}

.footer-newsletter.is-shake .nl-btn {
  animation: nlShake .5s;
}

@keyframes nlShake {
  0%,100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}

.nl-fx {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}

.nl-fx i {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 15px;
  border-radius: 70% 0 70% 0;
  background: linear-gradient(135deg,#fbd0e3,#ee7fae);
  animation: nlBurst 1.5s cubic-bezier(.15,.7,.3,1) forwards;
}

.nl-fx i.s {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px #ffffffb2;
}

.nl-fx i.p {
  background: linear-gradient(135deg,#fff,#d8b4e2);
}

@keyframes nlBurst {
  0% {
    opacity: 1;
    transform: translate(0,0) rotate(0) scale(.4);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx),var(--dy)) rotate(var(--r)) scale(1);
  }
}

.nl-welcome {
  text-align: center;
  padding: 6px 4px 0;
}

.nl-welcome[hidden] {
  display: none;
}

.nl-env {
  width: 92px;
  height: 82px;
  display: block;
  margin: 0 auto 10px;
  overflow: visible;
}

.nl-welcome .nl-letter {
  transform: translateY(10px);
  opacity: 0;
}

.nl-welcome .nl-letter-heart {
  transform: translateY(10px);
  opacity: 0;
}

.nl-flap {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.nl-welcome.play .nl-flap {
  animation: nlFlap .6s .25s cubic-bezier(.5,0,.3,1) forwards;
}

@keyframes nlFlap {
  to {
    transform: scaleY(-1);
    fill: #f7d4e6;
  }
}

.nl-welcome.play .nl-letter {
  animation: nlLetter .8s .7s cubic-bezier(.3,1.4,.5,1) forwards;
}

.nl-welcome.play .nl-letter-heart {
  animation: nlLetter .8s .7s cubic-bezier(.3,1.4,.5,1) forwards;
}

@keyframes nlLetter {
  to {
    transform: translateY(-22px);
    opacity: 1;
  }
}

.nl-welcome.play .nl-env {
  animation: nlEnv .9s cubic-bezier(.34,1.6,.5,1) both;
}

@keyframes nlEnv {
  from {
    transform: scale(.3) rotate(-14deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.nl-wtitle {
  font-family: var(--font-display,"Cormorant Garamond",serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 6px;
  opacity: 0;
  transform: translateY(8px);
}

.nl-wtext {
  font-size: .86rem;
  line-height: 1.6;
  color: #ffffffd9;
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
}

.nl-welcome.play .nl-wtitle {
  animation: nlUp .6s 1.1s ease-out forwards;
}

.nl-welcome.play .nl-wtext {
  animation: nlUp .6s 1.4s ease-out forwards;
}

@keyframes nlUp {
  to {
    opacity: 1;
    transform: none;
  }
}

.nl-community {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #f7d4e673;
  opacity: 0;
  transform: translateY(14px);
}

.nl-welcome.play .nl-community {
  animation: nlUp .8s 2.1s ease-out forwards;
}

.nl-ctitle {
  font-family: var(--font-display,"Cormorant Garamond",serif);
  font-size: 1.25rem;
  color: #f7d4e6;
  margin: 0 0 4px;
}

.nl-cdesc {
  font-size: .82rem;
  line-height: 1.55;
  color: #ffffffe0;
  margin: 0 0 12px;
}

.nl-cdesc strong {
  color: #fff;
}

.nl-qr {
  position: relative;
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 12px;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 3px #f7d4e659,0 10px 30px #00000059;
  transform: scale(.6);
  opacity: 0;
}

.nl-welcome.play .nl-qr {
  animation: nlQr .7s 2.3s cubic-bezier(.34,1.6,.5,1) forwards;
}

@keyframes nlQr {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.nl-qr img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
}

.nl-qr:hover {
  box-shadow: 0 0 0 3px #f7d4e6,0 10px 30px #00000066;
  text-decoration: none;
}

.nl-scan {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 6px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg,#00000000,#ee7fae,#00000000);
  box-shadow: 0 0 12px 3px #ee7faeb2;
  animation: nlScan 2.2s ease-in-out 3s infinite alternate;
  pointer-events: none;
}

@keyframes nlScan {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(116px);
  }
}

.nl-cbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 50px;
  background: #fff;
  color: #4a154b;
  border: 2px solid #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.2;
}

.nl-cbtn svg {
  fill: #25d366;
  flex-shrink: 0;
  transition: fill .25s;
}

.nl-welcome.play .nl-cbtn {
  animation: nlCta 2.4s 3.2s ease-in-out infinite;
}

@keyframes nlCta {
  0%,100% {
    box-shadow: 0 0 0 0 #f7d4e699;
  }
  60% {
    box-shadow: 0 0 0 14px #f7d4e600;
  }
}

.nl-cbtn:hover {
  background: #f7d4e6;
  border-color: #f7d4e6;
  color: #4a154b;
  transform: translateY(-2px);
  text-decoration: none;
}

.nl-cbtn:hover svg {
  fill: #4a154b;
}

.nl-cnote {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #ffffffb2;
}

@media (prefers-reduced-motion:reduce) {
  .nl-fx {
    display: none;
  }

  .nl-scan {
    display: none;
  }

  .footer-newsletter * {
    animation-duration: .01ms !important;
  }

  .nl-welcome * {
    animation-duration: .01ms !important;
  }

}
