/*
 * Helovino puošmenos – veikia tik kai <html> turi klasę „halloween“ (žr. js/halloween.js).
 * Animuojama tik transform/opacity, kad telefone neletėtų.
 */
.hw-hero, .hw-hero > * { position: absolute; pointer-events: none; }
.hw-hero { inset: 0; z-index: -1; overflow: hidden; }
.hw-hero svg, .hw-mini svg, .hw-peek svg, .hw-foot svg { display: block; width: 100%; height: auto; }

/* Vaiduokliai – permatomi, lėtai plaukioja (kreminis švytėjimas kaip logotipo) */
.hw-ghost { width: 70px; opacity: 0.6; filter: drop-shadow(0 0 22px rgba(255, 251, 224, 0.28)); animation: hwFloat 7s ease-in-out infinite; }
.hw-g1 { left: 7%; top: 24%; }
.hw-g2 { right: 9%; top: 34%; width: 56px; opacity: 0.5; animation-duration: 8.5s; animation-delay: -3s; }
.hw-g3 { left: 16%; bottom: 22%; width: 42px; opacity: 0.32; animation-duration: 9.5s; animation-delay: -5s; }
.hw-g2 svg { transform: scaleX(-1); }
@keyframes hwFloat {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50% { transform: translate(14px, -22px) rotate(5deg); }
}

/* Moliūgai apačios kampuose, su švytinčiu veidu */
.hw-pumpkin { width: 104px; bottom: 22px; filter: drop-shadow(0 6px 28px rgba(244, 226, 59, 0.28)); }
.hw-p1 { left: 4%; transform: rotate(-8deg); }
.hw-p2 { right: 130px; width: 74px; transform: rotate(7deg); } /* ne po pokalbio mygtuku */
.hw-face { animation: hwFlicker 3.2s steps(1) infinite; }
.hw-p2 .hw-face { animation-delay: -1.4s; }
@keyframes hwFlicker {
  0%, 100% { opacity: 1; } 42% { opacity: 0.72; } 46% { opacity: 1; } 71% { opacity: 0.85; } 74% { opacity: 1; }
}

/* Voratinklis ir voras viršutiniame dešiniajame kampe */
.hw-web { top: 0; right: 0; width: 200px; transform: scaleX(-1); opacity: 0.8; }
.hw-thread { position: absolute; left: 70px; top: 70px; width: 1px; height: 90px; background: rgba(255, 251, 224, 0.28); transform-origin: top; animation: hwDrop 6s ease-in-out infinite; }
.hw-spider { position: absolute; left: 63px; top: 155px; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a3828, #050505 70%); box-shadow: 0 0 0 1px rgba(255, 251, 224, 0.18), 0 0 10px rgba(244, 226, 59, 0.2); animation: hwSpider 6s ease-in-out infinite; }
@keyframes hwDrop { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
@keyframes hwSpider { 0%, 100% { transform: translateY(-50px); } 50% { transform: translateY(0); } }

/* Šikšnosparniai praskrenda kas ~16 s */
.hw-bats { left: 0; top: 16%; width: 100%; height: 120px; }
.hw-bats span { position: absolute; left: 0; top: 0; width: 52px; opacity: 0; animation: hwBat 16s linear infinite; filter: drop-shadow(0 0 6px rgba(244, 226, 59, 0.22)); }
.hw-bats span:nth-child(2) { top: 34px; width: 38px; animation-delay: 0.6s; }
.hw-bats span:nth-child(3) { top: 12px; width: 30px; animation-delay: 1.1s; }
.hw-bats svg { animation: hwFlap 0.28s ease-in-out infinite alternate; transform-origin: center; }
@keyframes hwBat {
  0% { transform: translate(-80px, 40px); opacity: 0; }
  2% { opacity: 1; }
  30% { transform: translate(calc(100vw + 80px), -30px); opacity: 1; }
  31%, 100% { transform: translate(calc(100vw + 80px), -30px); opacity: 0; }
}
@keyframes hwFlap { from { transform: scaleY(1); } to { transform: scaleY(0.45); } }

/* Mažas moliūgas prie logotipo */
.hw-mini { width: 24px; margin-left: -4px; align-self: flex-start; transform: rotate(10deg); filter: drop-shadow(0 2px 8px rgba(244, 226, 59, 0.35)); }

/* Vaiduoklis žvilgčioja iš dienos dėžutės apačios */
.hw-peek { position: absolute; right: 22%; bottom: -26px; width: 42px; opacity: 0.55; pointer-events: none; animation: hwPeek 6s ease-in-out infinite; }
@keyframes hwPeek { 0%, 100% { transform: translateY(18px); } 40%, 70% { transform: translateY(0); } }

/* Moliūgai ir vaiduoklis poraštėje */
.hw-foot { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: -14px 0 24px; pointer-events: none; }
.hw-foot svg { width: 34px; }
.hw-foot svg:nth-child(2) { width: 28px; opacity: 0.75; animation: hwFloat 7s ease-in-out infinite; }

/* Telefone – mažiau ir mažesni, kad neuždengtų teksto */
@media (max-width: 899px) {
  .hw-ghost { width: 40px; }
  .hw-g1 { left: 4%; top: 15%; }
  .hw-g2 { right: 5%; top: 19%; width: 34px; }
  .hw-g3 { display: none; }
  .hw-pumpkin { width: 58px; bottom: 18px; }
  .hw-p2 { right: auto; left: calc(4% + 52px); width: 40px; bottom: 16px; }
  .hw-web { width: 120px; }
  .hw-thread { left: 42px; top: 42px; height: 60px; }
  .hw-spider { left: 36px; top: 96px; width: 12px; height: 12px; }
  .hw-bats { top: 9%; }
  .hw-mini { width: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .hw-hero *, .hw-peek, .hw-foot svg { animation: none !important; }
  .hw-bats { display: none; }
  .hw-peek { transform: none; }
}
