/* Loaded only while a seasonal theme is enabled. Small compositor transforms; no animated blur or full-screen filters. */
.season-theme { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.hero.hero--halloween { background: #100b16; }
.hero.hero--halloween .hero-cover-image { object-position: center; }
.hero.hero--halloween .hero-overlay { background: linear-gradient(to top, #0d0810, rgba(13, 8, 16, .12) 28%, transparent 56%), linear-gradient(90deg, rgba(13, 8, 16, .25), transparent 65%); }
@media (max-width: 768px) {
    .hero.hero--halloween { height: clamp(660px, 95svh, 820px); min-height: 660px; padding-bottom: 140px; }
    .hero.hero--halloween .hero-cover-image { object-fit: contain; object-position: center top; }
    .hero.hero--halloween .hero-overlay { background: linear-gradient(to top, #0d0810, rgba(13, 8, 16, .18) 34%, transparent 65%); }
}

/* A single image per creature, without animated masks, leg layers or shadows. */
.halloween-creature { position: absolute; top: 0; left: 0; width: 29px; pointer-events: none; contain: layout style; }
.halloween-creature__body { display: block; width: 100%; }
.halloween-creature img { display: block; width: 100%; height: auto; user-select: none; }
.halloween-creature--spider img { filter: grayscale(1) brightness(.17); }
.halloween-creature--spider.halloween-creature--two { width: 24px; }
.halloween-creature--ant { width: 10px; }
.halloween-creature--ant.halloween-creature--two { width: 9px; }
.halloween-creature--ant.halloween-creature--three { width: 11px; }
.halloween-creature--ant.halloween-creature--four { width: 8px; }
.halloween-creature--ant.halloween-creature--five { width: 10px; }
.halloween-creature--ant.halloween-creature--six { width: 9px; }
.halloween-creature--ant.halloween-creature--seven { width: 10px; }
.halloween-creature--ant.halloween-creature--eight { width: 8px; }

/* Bounded reusable particles; no blur, shadows, canvas or per-frame JavaScript. */
.halloween-pumpkin-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; contain: strict; }
.halloween-pumpkin { position: absolute; top: 0; left: 0; width: 40px; height: auto; pointer-events: none; user-select: none; }
.halloween-pumpkin[hidden] { display: none !important; }

/* Stronger signal loss, painted only during the brief event; no page cloning or filters. */
.halloween-glitch[hidden] { display: none !important; }
.halloween-glitch { position: fixed; inset: 0; z-index: 940; pointer-events: none; overflow: hidden; }
.halloween-glitch::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, rgba(2, 5, 9, .45) 0 1px, transparent 1px 4px), rgba(5, 8, 14, .2);
    box-shadow: inset 3px 0 rgba(221, 82, 111, .42), inset -3px 0 rgba(75, 201, 210, .42);
    animation: halloween-signal-loss 1100ms linear 1;
}
.halloween-glitch i {
    position: absolute; left: -24px; width: calc(100% + 48px); height: clamp(26px, 6vh, 64px);
    background: repeating-linear-gradient(0deg, rgba(178, 209, 218, .34) 0 1px, rgba(8, 15, 23, .5) 1px 4px);
    border-top: 2px solid rgba(82, 216, 225, .65); border-bottom: 2px solid rgba(225, 78, 119, .65);
    animation: halloween-signal-slip 1100ms steps(1, end) 1;
}
.halloween-glitch i:nth-child(1) { top: 23%; }
.halloween-glitch i:nth-child(2) {
    top: 51%; height: clamp(38px, 9vh, 95px);
    background: repeating-linear-gradient(90deg, rgba(2, 5, 10, .72) 0 35px, rgba(141, 172, 181, .38) 35px 37px, rgba(4, 8, 15, .6) 37px 106px);
    animation-direction: reverse;
}
.halloween-glitch i:nth-child(3) { top: 79%; height: 9px; background: rgba(187, 213, 219, .5); }
@keyframes halloween-signal-slip {
    0% { transform: translate(0, 0); opacity: 0; }
    8% { transform: translate(-18px, 12px); opacity: .85; }
    26% { transform: translate(21px, -27px); opacity: .95; }
    45% { transform: translate(-9px, 38px); opacity: .65; }
    67% { transform: translate(14px, -12px); opacity: .9; }
    84% { transform: translate(-5px, 7px); opacity: .45; }
    100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes halloween-signal-loss {
    0%, 100% { opacity: 0; }
    12% { opacity: .9; }
    45% { opacity: .6; }
    68% { opacity: .8; }
    92% { opacity: .35; }
}

@media (max-width: 600px) {
    .halloween-creature--spider { width: 24px; }
    .halloween-creature--spider.halloween-creature--two,
    .halloween-creature--ant.halloween-creature--three,
    .halloween-creature--ant.halloween-creature--five,
    .halloween-creature--ant.halloween-creature--seven,
    .halloween-creature--ant.halloween-creature--eight { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .season-theme *, .season-theme *::before, .season-theme *::after { animation: none !important; }
    .halloween-creature, .halloween-glitch, .halloween-pumpkin-rain { display: none !important; }
}
