/* ==========================================================================
   halloween.css — decoración de temporada (la activa js/halloween.js)
   ========================================================================== */

.halloween {
  --halloween-web: rgba(255, 255, 255, 0.5);
  --halloween-opacidad: 0.1;
}

:root[data-theme="dark"] .halloween {
  --halloween-web: rgba(255, 255, 255, 0.45);
}

:root:not([data-theme="dark"]) .halloween {
  --halloween-web: rgba(0, 0, 0, 0.28);
}

/* Guirnalda superior: cuerda y banderines negros con letras naranjas */
.halloween-banner {
  position: relative;
  z-index: 60;
  height: 104px;
  padding: 0 16px;
  background: var(--color-bg);
}

.garland__cuerda {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 26px;
  fill: none;
  stroke: #5a4a3a;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.garland__fila {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  padding: 0 12px;
}

.garland__banderin {
  display: flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  height: 58px;
  padding-top: 4px;
  background: #141414;
  color: #ff8a1f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.garland__calabaza {
  flex: 0 0 auto;
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

@media (max-width: 600px) {
  .halloween-banner {
    height: 82px;
  }

  .garland__fila {
    gap: 4px;
    padding: 0 6px;
  }

  .garland__banderin {
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
    font-size: 1rem;
  }

  .garland__calabaza {
    font-size: 1.5rem;
  }
}

/* Capa decorativa: no bloquea clics ni el desplazamiento */
.halloween-capa {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.halloween-item {
  position: absolute;
  color: var(--halloween-web);
  opacity: 0.9;
}

.telarana {
  display: block;
  width: 100%;
  height: 100%;
}

.telarana--tr {
  transform: scaleX(-1);
}

.telarana--bl {
  transform: scaleY(-1);
}

.telarana--br {
  transform: scale(-1, -1);
}

.calabaza {
  position: absolute;
  opacity: var(--halloween-opacidad);
  line-height: 1;
  user-select: none;
}

/* Murciélagos volando de izquierda a derecha */
.murcielago {
  position: absolute;
  left: 0;
  font-size: 26px;
  line-height: 1;
  opacity: 0.3;
  animation-name: vuelo;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.murcielago__ala {
  display: inline-block;
  animation: aleteo 0.45s ease-in-out infinite alternate;
}

@keyframes vuelo {
  from {
    transform: translate(-10vw, 0);
  }
  50% {
    transform: translate(55vw, -28px);
  }
  to {
    transform: translate(112vw, 0);
  }
}

@keyframes aleteo {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0.7);
  }
}

@media (max-width: 600px) {
  .calabaza:nth-of-type(n + 7) {
    display: none;
  }

  .telarana {
    opacity: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .murcielago,
  .murcielago__ala {
    animation: none;
  }

  .murcielago {
    display: none;
  }
}
