/* ==========================================================
   SCENA HORROR comună (loader + hero): perete luminat de bec, becul care se leagănă
   cu conul lui de lumină, ceață pe două planuri, praf, granulație de film, vinietă.
   Containerul setează variabilele (din JS): --swing (unghiul becului), --lx (lumina pe perete),
   --lamp (intensitatea 0..1). Containerul trebuie să fie position:relative/absolute + overflow:hidden.
   ========================================================== */
.hs-scope { --swing: 0deg; --lx: 50%; --lamp: 1; }
/* zidul din spate, luminat de bec */
.hs-wall { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(36% 46% at var(--lx) 40%, rgba(150, 112, 84, calc(.2 * var(--lamp))), transparent 72%),
  radial-gradient(70% 60% at 50% 55%, #121014, #050506 75%); }

/* becul care se leagănă (pivot sus); conul de lumină se rotește cu el */
.hs-lamp { position: absolute; top: 0; left: 50%; z-index: 2; width: 0; height: 30vh; transform: rotate(var(--swing)); transform-origin: 50% 0; pointer-events: none; }
.hs-wire { position: absolute; left: -1px; top: 0; width: 2px; height: 100%; background: linear-gradient(#000, #2a2622); }
.hs-bulb { position: absolute; left: -9px; bottom: -14px; width: 18px; height: 24px; border-radius: 45% 45% 50% 50% / 40% 40% 60% 60%;
  background: radial-gradient(circle at 50% 60%, #fff8ea, #ffd59a 45%, #c97b2c 100%);
  opacity: calc(.35 + .65 * var(--lamp));
  box-shadow: 0 0 calc(40px * var(--lamp)) calc(14px * var(--lamp)) rgba(255, 196, 120, .55), 0 0 calc(120px * var(--lamp)) calc(40px * var(--lamp)) rgba(255, 170, 90, .18); }
.hs-bulb::before { content: ''; position: absolute; left: 4px; top: -8px; width: 10px; height: 10px; border-radius: 2px; background: #2a2622; }
.hs-cone { position: absolute; left: 0; top: 100%; width: 120vh; height: 100vh; transform: translateX(-50%); mix-blend-mode: screen; filter: blur(14px);
  /* pană de lumină cu margini moi, care se stinge spre podea */
  background: conic-gradient(from 152deg at 50% 0%, transparent 0deg, rgba(255, 222, 180, calc(.3 * var(--lamp))) 16deg, rgba(255, 228, 190, calc(.6 * var(--lamp))) 28deg, rgba(255, 222, 180, calc(.3 * var(--lamp))) 40deg, transparent 56deg, transparent 360deg);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 92%); mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 92%); }

.hs-dust { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }

/* ceață: un strat în spate, unul în față (adâncime) */
.hs-fog { position: absolute; top: -10%; bottom: -10%; left: -100%; width: 300%; pointer-events: none; mix-blend-mode: screen;
  /* o singură imagine mare, fără repetare (fără îmbinări), care alunecă încet stânga-dreapta */
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2700' height='900' preserveAspectRatio='none'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0016 .0045' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .8  0 0 0 0 .82  0 0 0 0 .86  0 0 0 1.3 -.35'/%3E%3C/filter%3E%3Crect width='2700' height='900' filter='url(%23f)'/%3E%3C/svg%3E");
  animation: hs-fog-drift 34s ease-in-out infinite alternate; }
.hs-fog--a { z-index: 1; opacity: .16; }
.hs-fog--b { z-index: 5; opacity: .09; animation-duration: 22s; animation-direction: alternate-reverse; filter: blur(6px); }
@keyframes hs-fog-drift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }

.hs-grain { position: absolute; inset: -50%; z-index: 6; pointer-events: none; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: hs-grain-jitter .5s steps(4) infinite; }
@keyframes hs-grain-jitter { 25% { transform: translate(-7%, 4%); } 50% { transform: translate(5%, -6%); } 75% { transform: translate(-3%, -2%); } 100% { transform: translate(6%, 7%); } }
.hs-vignette { position: absolute; inset: 0; z-index: 7; pointer-events: none; background: radial-gradient(70% 66% at 50% 50%, transparent 40%, rgba(0, 0, 0, .85) 100%); }


@media (max-width: 700px) { .hs-lamp { height: 34vh; } }
@media (prefers-reduced-motion: reduce) { .hs-fog, .hs-grain { animation: none; } }
