/* BANZORAMA Halloween atmosphere components.
   Scope: #bz-halloween-story. No typography, controls or article layout.
   Source coordinates: house/cellar/forest 1916 x 821; key 1536 x 1024.
   Keep each complete stage together: photograph and overlays share one space. */
#bz-halloween-story .bzfx-scene {
  --bzfx-ratio: 1916 / 821;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  margin: 0;
  aspect-ratio: var(--bzfx-ratio);
  background: #10101b;
}
#bz-halloween-story .bzfx-scene,
#bz-halloween-story .bzfx-scene * { box-sizing: border-box; }
#bz-halloween-story .bzfx-scene[hidden] { display: none !important; }
#bz-halloween-story .bzfx-scene[data-bzfx-scene="key"] { --bzfx-ratio: 1536 / 1024; }
#bz-halloween-story .bzfx-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--bzfx-ratio);
  overflow: hidden;
}
#bz-halloween-story .bzfx-photo {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
}
#bz-halloween-story .bzfx-effects {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}
#bz-halloween-story .bzfx-effects * { pointer-events: none; }
#bz-halloween-story[data-bzfx-motion="on"] .bzfx-effects { visibility: visible; }

/* HOUSE: approved window polygons, lantern, mist and three bats. */
#bz-halloween-story .bzfx-window-mask,
#bz-halloween-story .bzfx-emerald-tint,
#bz-halloween-story .bzfx-flight { position: absolute; inset: 0; }
#bz-halloween-story .bzfx-window-mask {
  background: #120b1d;
  opacity: 0;
  mix-blend-mode: multiply;
  animation: bzfx-window-dim 19s ease-in-out infinite;
}
#bz-halloween-story .bzfx-window-mask--a {
  clip-path: polygon(62.8914% 10.4750%, 63.1524% 12.0585%, 63.3090% 12.9111%, 63.3090% 16.0780%, 62.4217% 16.1998%, 62.4217% 12.7893%, 62.6305% 11.9367%);
  animation-delay: -1s;
}
#bz-halloween-story .bzfx-window-mask--b {
  clip-path: polygon(73.3299% 10.8404%, 73.5908% 12.1803%, 73.6952% 13.0329%, 73.7474% 16.6870%, 72.9123% 16.6870%, 72.9645% 13.0329%, 73.1211% 11.9367%);
  animation-duration: 23s;
  animation-delay: -10s;
}
#bz-halloween-story .bzfx-window-mask--c {
  clip-path: polygon(61.6910% 21.6809%, 62.1608% 23.0207%, 62.3173% 24.1169%, 62.2651% 29.7199%, 61.0125% 29.7199%, 61.0647% 24.1169%, 61.3779% 22.8989%);
  animation-duration: 29s;
  animation-delay: -5s;
}
#bz-halloween-story .bzfx-emerald-tint {
  background-image: var(--bzfx-photo-url);
  background-size: 100% 100%;
  clip-path: polygon(61.6910% 21.6809%, 62.1608% 23.0207%, 62.3173% 24.1169%, 62.2651% 29.7199%, 61.0125% 29.7199%, 61.0647% 24.1169%, 61.3779% 22.8989%);
  filter: hue-rotate(86deg) saturate(1.15);
  opacity: 0;
  animation: bzfx-emerald 37s ease-in-out infinite;
}
#bz-halloween-story .bzfx-emerald-halo {
  position: absolute;
  left: 59.5%; top: 19%; width: 4.5%; height: 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(100 242 166 / 35%), rgb(27 159 99 / 12%) 40%, transparent 72%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: bzfx-emerald 37s ease-in-out infinite;
}
#bz-halloween-story .bzfx-lantern-glow {
  position: absolute;
  left: 44.35%; top: 24.5%; width: 4.5%; height: 13%;
  background: radial-gradient(ellipse, rgb(255 188 80 / 32%), rgb(245 126 30 / 9%) 42%, transparent 72%);
  mix-blend-mode: screen;
  animation: bzfx-candle 5.7s ease-in-out infinite;
}
#bz-halloween-story .bzfx-house-mist {
  position: absolute;
  width: 136%; height: 37%; left: -18%; bottom: -4%;
  opacity: .22;
  background:
    radial-gradient(ellipse at 17% 65%, rgb(150 153 189 / 55%) 0, transparent 35%),
    radial-gradient(ellipse at 62% 72%, rgb(144 151 180 / 48%) 0, transparent 29%),
    radial-gradient(ellipse at 88% 52%, rgb(136 144 180 / 40%) 0, transparent 26%);
  animation: bzfx-house-mist-near 32s ease-in-out infinite alternate;
}
#bz-halloween-story .bzfx-house-mist--far {
  bottom: 10%; height: 27%; opacity: .15;
  animation: bzfx-house-mist-far 41s ease-in-out infinite alternate;
}
#bz-halloween-story .bzfx-flight { opacity: 0; animation: bzfx-flight 31s linear infinite; }
#bz-halloween-story .bzfx-flight--one { animation-delay: -.4s; }
#bz-halloween-story .bzfx-flight--two { animation-delay: -1.2s; }
#bz-halloween-story .bzfx-flight--three { animation-delay: -2.1s; }
#bz-halloween-story .bzfx-bat {
  position: absolute;
  top: 0; left: 0; width: 2.6%; aspect-ratio: 2.3;
  color: #090713;
  transform: rotate(-10deg);
}
#bz-halloween-story .bzfx-flight--two .bzfx-bat { transform: translateY(-8px) rotate(9deg) scale(.72); }
#bz-halloween-story .bzfx-flight--three .bzfx-bat { transform: translateY(12px) rotate(-8deg) scale(.56); }
#bz-halloween-story .bzfx-wing,
#bz-halloween-story .bzfx-bat-body { position: absolute; display: block; background: currentColor; }
#bz-halloween-story .bzfx-bat-body {
  width: 15%; height: 62%; top: 31%; left: 43%;
  border-radius: 35% 35% 50% 50%;
}
#bz-halloween-story .bzfx-bat-body::before,
#bz-halloween-story .bzfx-bat-body::after {
  content: "";
  position: absolute;
  width: 47%; height: 48%; top: -18%;
  background: currentColor;
  clip-path: polygon(0 0, 100% 38%, 90% 100%, 0 100%);
}
#bz-halloween-story .bzfx-bat-body::after { right: 0; transform: scaleX(-1); }
#bz-halloween-story .bzfx-wing {
  top: 0; width: 47%; height: 95%;
  clip-path: polygon(100% 48%, 70% 23%, 32% 0, 0 11%, 17% 26%, 25% 56%, 39% 42%, 52% 49%, 62% 78%, 75% 66%, 89% 74%, 100% 95%);
  transform-origin: 100% 58%;
  animation: bzfx-wing-left .43s ease-in-out infinite alternate;
}
#bz-halloween-story .bzfx-wing--right {
  right: 0;
  transform-origin: 0 58%;
  animation-name: bzfx-wing-right;
  clip-path: polygon(0 48%, 30% 23%, 68% 0, 100% 11%, 83% 26%, 75% 56%, 61% 42%, 48% 49%, 38% 78%, 25% 66%, 11% 74%, 0 95%);
}

/* CELLAR: only low mist, two tiny candle halos and opacity on water.
   No transform/filter is applied to the photograph or its reflections. */
#bz-halloween-story .bzfx-cellar-mist {
  position: absolute;
  left: 43%; top: 33%; width: 27%; height: 17%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(165 178 201 / 23%), transparent 72%);
  opacity: .38;
  animation: bzfx-low-mist 39s ease-in-out infinite alternate;
}
#bz-halloween-story .bzfx-cellar-mist--near {
  left: 63%; top: 43%; width: 17%; height: 14%;
  opacity: .3;
  animation-duration: 47s;
  animation-direction: alternate-reverse;
}
#bz-halloween-story .bzfx-cellar-candle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(255 199 116 / 42%), rgb(245 139 52 / 15%) 38%, transparent 72%);
  mix-blend-mode: screen;
  animation: bzfx-candle 7.7s ease-in-out infinite;
}
#bz-halloween-story .bzfx-cellar-candle--a {
  left: 47.54697%; top: 25.57856%; width: 3.23591%; height: 11.69306%;
}
#bz-halloween-story .bzfx-cellar-candle--b {
  left: 70.66806%; top: 34.71376%; width: 3.02714%; height: 10.96224%;
  animation-duration: 9.3s;
  animation-delay: -3.8s;
}
#bz-halloween-story .bzfx-water-glimmer {
  position: absolute;
  left: 63.67432%; top: 41.41291%; width: 5.84551%; height: 41.90012%;
  border-radius: 45%;
  background:
    repeating-linear-gradient(174deg, transparent 0 7%, rgb(193 222 255 / 65%) 8%, transparent 10% 16%),
    radial-gradient(ellipse, rgb(155 201 255 / 55%), transparent 68%);
  mix-blend-mode: screen;
  opacity: .03;
  animation: bzfx-water-glimmer 15s ease-in-out infinite alternate;
}

/* FOREST: calibrated local ground mist; the hollow is one broad faint glow.
   The mist travels about 15-20 px across a 1916 px stage over 35-43 seconds. */
#bz-halloween-story .bzfx-forest-mist {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(164 179 207 / 27%), rgb(143 163 195 / 12%) 39%, transparent 73%);
  opacity: .4;
  animation: bzfx-forest-drift 35s ease-in-out infinite alternate;
}
#bz-halloween-story .bzfx-forest-mist--far {
  left: 20.35491%; top: 43.97077%; width: 31.31524%; height: 19.97564%;
}
#bz-halloween-story .bzfx-forest-mist--near {
  left: 36.79541%; top: 60.53593%; width: 27.66180%; height: 13.39829%;
  opacity: .33;
  animation-duration: 43s;
  animation-direction: alternate-reverse;
}
#bz-halloween-story .bzfx-hollow-glow {
  position: absolute;
  left: 84.18580%; top: 41.29111%; width: 3.96660%; height: 13.15469%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #7effb3, rgb(37 178 108 / 45%) 44%, transparent 72%);
  mix-blend-mode: screen;
  opacity: .03;
  animation: bzfx-hollow-breath 17s ease-in-out infinite alternate;
}

/* KEY: static jewel geometry with a small, slow light-green breath. */
#bz-halloween-story .bzfx-gem-light {
  position: absolute;
  inset: 0;
  clip-path: polygon(67.57812% 29.58984%, 71.22396% 32.71484%, 71.35417% 38.86719%, 67.57812% 42.28516%, 63.60677% 38.96484%, 63.60677% 32.71484%);
  background: #a1ffcd;
  mix-blend-mode: screen;
  opacity: .025;
  animation: bzfx-gem-breath 13s ease-in-out infinite alternate;
}
#bz-halloween-story .bzfx-gem-halo {
  position: absolute;
  left: 54.03646%; top: 17.18750%; width: 27.21354%; height: 38.28125%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(118 255 175 / 36%), rgb(41 190 117 / 12%) 42%, transparent 72%);
  mix-blend-mode: screen;
  opacity: .07;
  animation: bzfx-gem-halo 13s ease-in-out infinite alternate;
}
#bz-halloween-story .bzfx-velvet-reflection {
  position: absolute;
  left: 55.79427%; top: 47.07031%; width: 20.18229%; height: 7.42188%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(100 255 175 / 26%), transparent 70%);
  mix-blend-mode: screen;
  opacity: .04;
  animation: bzfx-velvet-breath 13s ease-in-out infinite alternate;
}

@keyframes bzfx-window-dim {
  0%, 5%, 26%, 48%, 77%, 100% { opacity: 0; }
  11% { opacity: .56; }
  16% { opacity: .12; }
  20% { opacity: .46; }
  55% { opacity: .64; }
  62% { opacity: .08; }
  69% { opacity: .48; }
}
@keyframes bzfx-emerald {
  0%, 6%, 21%, 100% { opacity: 0; }
  12% { opacity: .8; }
  15% { opacity: .6; }
}
@keyframes bzfx-candle {
  0%, 100% { opacity: .18; }
  22% { opacity: .46; }
  51% { opacity: .12; }
  75% { opacity: .38; }
}
@keyframes bzfx-house-mist-near {
  from { transform: translate3d(-7%, 3%, 0); }
  to { transform: translate3d(8%, -4%, 0); }
}
@keyframes bzfx-house-mist-far {
  from { transform: translate3d(6%, -2%, 0); }
  to { transform: translate3d(-8%, 3%, 0); }
}
@keyframes bzfx-flight {
  0%, 6% { opacity: 0; transform: translate3d(101%, 16%, 0); }
  7% { opacity: .9; transform: translate3d(95%, 17%, 0); }
  14% { opacity: .9; transform: translate3d(84%, 8%, 0); }
  22% { opacity: .9; transform: translate3d(70%, 5%, 0); }
  29% { opacity: 0; transform: translate3d(59%, -6%, 0); }
  100% { opacity: 0; transform: translate3d(59%, -6%, 0); }
}
@keyframes bzfx-wing-left {
  from { transform: scaleY(.40) rotate(-16deg); }
  to { transform: scaleY(1) rotate(6deg); }
}
@keyframes bzfx-wing-right {
  from { transform: scaleY(.40) rotate(16deg); }
  to { transform: scaleY(1) rotate(-6deg); }
}
@keyframes bzfx-low-mist {
  from { transform: translate3d(-2%, 0, 0); }
  to { transform: translate3d(2%, -1.5%, 0); }
}
@keyframes bzfx-water-glimmer { from { opacity: .03; } to { opacity: .065; } }
@keyframes bzfx-forest-drift {
  from { transform: translate3d(-1.6%, .5%, 0); }
  to { transform: translate3d(1.6%, -.5%, 0); }
}
@keyframes bzfx-hollow-breath { from { opacity: .03; } to { opacity: .06; } }
@keyframes bzfx-gem-breath { from { opacity: .025; } to { opacity: .085; } }
@keyframes bzfx-gem-halo { from { opacity: .07; } to { opacity: .17; } }
@keyframes bzfx-velvet-breath { from { opacity: .04; } to { opacity: .11; } }

/* The house alone is cropped on small screens, as one complete stage.
   Cellar/forest retain the full wide image. The key is never cropped. */
@media (max-width: 560px) {
  #bz-halloween-story .bzfx-scene[data-bzfx-scene="house"] { aspect-ratio: 4 / 3; }
  #bz-halloween-story .bzfx-scene[data-bzfx-scene="house"] .bzfx-stage {
    position: absolute;
    width: 180%;
    left: -67%;
    top: 0;
  }
}

/* Keep play-state AFTER ALL animation shorthands: they reset this property. */
#bz-halloween-story .bzfx-effects *,
#bz-halloween-story .bzfx-effects *::before,
#bz-halloween-story .bzfx-effects *::after { animation-play-state: paused; }
#bz-halloween-story[data-bzfx-motion="on"] .bzfx-scene[data-bzfx-suspended="false"] .bzfx-effects *,
#bz-halloween-story[data-bzfx-motion="on"] .bzfx-scene[data-bzfx-suspended="false"] .bzfx-effects *::before,
#bz-halloween-story[data-bzfx-motion="on"] .bzfx-scene[data-bzfx-suspended="false"] .bzfx-effects *::after { animation-play-state: running; }

/* CSS also protects the static fallback if scripting is unavailable. */
@media (prefers-reduced-motion: reduce) {
  #bz-halloween-story .bzfx-effects { visibility: hidden !important; }
  #bz-halloween-story .bzfx-effects *,
  #bz-halloween-story .bzfx-effects *::before,
  #bz-halloween-story .bzfx-effects *::after {
    animation: none !important;
    animation-play-state: paused !important;
  }
}
