/* Estudoca, public site: Halloween (24 Oct to 1 Nov every year, or ?halloween). See assets/halloween.js. */
.hw { display: none; }
.halloween .hw { display: inline; }

/* the hero at dusk: a warmer, darker grid */
.halloween .hw-hero { position: relative; background-color: #F6EFE6; }

/* webs in the corners */
.hw-web { position: absolute; z-index: 1; top: 0; width: 120px; height: 120px; color: rgba(0, 12, 31, .28); pointer-events: none; }
.hw-web svg { width: 100%; height: 100%; display: block; }
.hw-web-l { left: 0; }
.hw-web-r { right: 0; transform: scaleX(-1); }
@media (min-width: 900px) { .hw-web { width: 180px; height: 180px; } }

/* the spider on its thread */
.hw-spider { position: absolute; z-index: 4; top: -40px; left: 6%; width: 40px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; transform: translateY(0); animation: hw-dangle 4.5s ease-in-out infinite; transform-origin: 50% 0; }
.hw-spider .hw-thread { display: block; width: 1.4px; height: 70px; background: rgba(0, 12, 31, .45); transition: height .9s cubic-bezier(.5, 0, .3, 1); }
.hw-spider svg { width: 40px; height: 40px; display: block; }
.hw-spider.up .hw-thread { height: 6px; }
@media (min-width: 900px) { .hw-spider { top: -120px; left: 4%; } .hw-spider .hw-thread { height: 150px; } }
@keyframes hw-dangle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* bats crossing the first screen now and then */
.hw-bat { position: absolute; z-index: 1; top: 30%; left: -90px; width: 64px; pointer-events: none; animation: hw-fly 16s linear infinite; }
.hw-bat svg { width: 100%; display: block; }
.hw-bat .bw { transform-origin: 40px 20px; animation: hw-flap .28s ease-in-out infinite alternate; }
.hw-bat-1 { top: 12%; width: 44px; animation-delay: 7s; animation-duration: 19s; }
@keyframes hw-fly { 0% { transform: translate(0, 0); } 30% { transform: translate(55vw, -30px); } 60%, 100% { transform: translate(115vw, 10px); } }
@keyframes hw-flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }

/* the pumpkin beside the Mocho: tap and it lights up */
.hw-pumpkin { position: absolute; z-index: 3; top: 58px; right: 4px; width: 64px; height: 64px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.hw-pumpkin svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hw-pumpkin:active { transform: scale(.9); }
.hw-pumpkin .pk-face { transition: fill .3s; }
.hw-pumpkin.lit .pk-face { fill: #FFE07A; }
.hw-pumpkin.lit svg { filter: drop-shadow(0 0 14px rgba(255, 196, 70, .85)); }
@media (min-width: 900px) { .hw-pumpkin { top: 92px; right: 0; width: 84px; height: 84px; } }
.hw-pumpkin-sm { position: relative; display: inline-block; width: 48px; height: 48px; top: auto; right: auto; vertical-align: bottom; margin-left: -10px; }

@media (prefers-reduced-motion: reduce) {
  .hw-spider, .hw-bat, .hw-bat .bw { animation: none; }
  .hw-bat { display: none; }
}

/* the Mocho's lines can be longer this week: they wrap instead of leaving the screen */
.halloween .owl-say { white-space: normal; max-width: min(230px, 60vw); text-align: center; }
