/* ===== HALLOWEEN ===== */

/* ===== 01. TOKENS ===== */

:root {
  --hwn-toxic: #22c55e;
  --hwn-toxic-2: #34d399;
  --hwn-toxic-soft: #a7f3d0;
  --hwn-lime: #84cc16;
  --hwn-lime-soft: #bef264;

  --hwn-red: #ef4444;
  --hwn-red-dark: #991b1b;

  --hwn-amber: #f59e0b;
  --hwn-amber-soft: #fbbf24;

  --hwn-black: #050606;
  --hwn-black-soft: #0a0b0c;
  --hwn-metal: #292b2f;
  --hwn-metal-light: #575a60;

  --hwn-shadow-toxic:
    0 0 8px rgba(52, 211, 153, 0.72),
    0 0 18px rgba(34, 197, 94, 0.32);

  --hwn-transition-fast: 160ms;
  --hwn-transition-normal: 280ms;
}

/* ===== 02. ESTADO GENERAL ===== */

.halloween-decoration,
.halloween-interactive {
  box-sizing: border-box;
}

.halloween-decoration {
  pointer-events: none;
}

body:not(.halloween-active) .halloween-decoration,
body:not(.halloween-active) .halloween-interactive {
  display: none;
}

.halloween-position-host {
  position: relative;
}

/* ===== CURSOR SNIPER / RADIACTIVO ===== */

.halloween-sniper-cursor {
  position: fixed;

  top: 0;
  left: 0;

  z-index: 10050;

  width: 34px;
  height: 34px;

  opacity: 0;

  pointer-events: none;

  transform:
    translate3d(
      calc(var(--cursor-x, -100px) - 50%),
      calc(var(--cursor-y, -100px) - 50%),
      0
    );

  transition:
    opacity 120ms ease;

  will-change: transform;
}

body.halloween-active
.halloween-sniper-cursor {
  opacity: 1;
}

.halloween-sniper-ring,
.halloween-sniper-ring-inner,
.halloween-sniper-dot,
.halloween-sniper-line {
  position: absolute;

  pointer-events: none;
}

.halloween-sniper-ring {
  inset: 3px;

  border: 1.5px solid var(--hwn-amber);
  border-radius: 50%;

  box-shadow:
    0 0 5px rgba(245, 158, 11, 0.55),
    inset 0 0 4px rgba(245, 158, 11, 0.22);
}

.halloween-sniper-ring::before {
  position: absolute;

  inset: 3px;

  border:
    1px dashed
    rgba(52, 211, 153, 0.55);

  border-radius: 50%;

  content: "";
}

.halloween-sniper-ring-inner {
  top: 50%;
  left: 50%;

  width: 12px;
  height: 12px;

  border:
    1px solid
    rgba(52, 211, 153, 0.75);

  border-radius: 50%;

  transform:
    translate(-50%, -50%);
}

.halloween-sniper-dot {
  top: 50%;
  left: 50%;

  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--hwn-red);

  box-shadow:
    0 0 5px var(--hwn-red),
    0 0 10px rgba(239, 68, 68, 0.6);

  transform:
    translate(-50%, -50%);
}

.halloween-sniper-line {
  background: var(--hwn-toxic-2);

  box-shadow:
    0 0 4px rgba(52, 211, 153, 0.7);
}

.halloween-sniper-line-top,
.halloween-sniper-line-bottom {
  left: 50%;

  width: 2px;
  height: 7px;

  transform:
    translateX(-50%);
}

.halloween-sniper-line-left,
.halloween-sniper-line-right {
  top: 50%;

  width: 7px;
  height: 2px;

  transform:
    translateY(-50%);
}

.halloween-sniper-line-top {
  top: -3px;
}

.halloween-sniper-line-bottom {
  bottom: -3px;
}

.halloween-sniper-line-left {
  left: -3px;
}

.halloween-sniper-line-right {
  right: -3px;
}

/* ===== CURSOR · ESTADO DE DISPARO ===== */

@keyframes hwnSniperShot {
  0% {
    transform:
      scale(1)
      rotate(0deg);
  }

  30% {
    transform:
      scale(0.72)
      rotate(-5deg);
  }

  62% {
    transform:
      scale(1.16)
      rotate(3deg);
  }

  100% {
    transform:
      scale(1)
      rotate(0deg);
  }
}

@keyframes hwnSniperShotDot {
  0%,
  100% {
    background: var(--hwn-red);

    box-shadow:
      0 0 5px var(--hwn-red),
      0 0 10px rgba(239, 68, 68, 0.6);
  }

  35% {
    background: #ffffff;

    box-shadow:
      0 0 7px #ffffff,
      0 0 17px var(--hwn-red);
  }
}

.halloween-sniper-cursor.is-firing {
  animation:
    hwnSniperShot
    230ms
    cubic-bezier(0.2, 0.8, 0.3, 1);
}

.halloween-sniper-cursor.is-firing
.halloween-sniper-dot {
  animation:
    hwnSniperShotDot
    230ms
    ease-out;
}

/* ===== FLASH PEQUEÑO DEL DISPARO ===== */

.halloween-shot-flash {
  position: fixed;

  z-index: 10049;

  width: 34px;
  height: 34px;

  border:
    1px solid
    rgba(239, 68, 68, 0.9);

  border-radius: 50%;

  pointer-events: none;

  transform:
    translate(-50%, -50%)
    scale(0.45);

  box-shadow:
    0 0 8px var(--hwn-red),
    0 0 22px rgba(239, 68, 68, 0.65);
}

@keyframes hwnShotFlash {
  0% {
    opacity: 1;

    transform:
      translate(-50%, -50%)
      scale(0.45);
  }

  100% {
    opacity: 0;

    transform:
      translate(-50%, -50%)
      scale(1.7);
  }
}

.halloween-shot-flash {
  animation:
    hwnShotFlash
    280ms
    ease-out
    forwards;
}

/* ===== RASTRO TÓXICO DEL CURSOR ===== */

.halloween-cursor-particle {
  position: fixed;

  z-index: 10020;

  width: var(--cursor-size, 8px);
  height: var(--cursor-size, 8px);

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      #d9f99d,
      var(--hwn-toxic-2) 48%,
      transparent 78%
    );

  box-shadow:
    0 0 8px var(--hwn-toxic);

  pointer-events: none;

  transform:
    translate(-50%, -50%);
}

@keyframes hwnCursorParticle {
  0% {
    opacity: 0.82;

    transform:
      translate(-50%, -50%)
      scale(1);
  }

  100% {
    opacity: 0;

    transform:
      translate(
        calc(-50% + var(--cursor-particle-x)),
        calc(-50% + var(--cursor-particle-y))
      )
      scale(0);
  }
}

.halloween-cursor-particle {
  animation:
    hwnCursorParticle
    720ms
    ease-out
    forwards;
}

/* ===== CURSOR NATIVO ===== */

@media (hover: hover) and (pointer: fine) {
  body.halloween-active,
  body.halloween-active a,
  body.halloween-active button,
  body.halloween-active [role="button"] {
    cursor: none;
  }

  body.halloween-active input,
  body.halloween-active textarea,
  body.halloween-active select {
    cursor: auto;
  }
}

/* ===== TOUCH / REDUCED MOTION ===== */

@media (hover: none), (pointer: coarse) {
  .halloween-sniper-cursor,
  .halloween-cursor-particle,
  .halloween-shot-flash {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .halloween-sniper-cursor,
  .halloween-sniper-dot,
  .halloween-cursor-particle,
  .halloween-shot-flash {
    animation: none;
  }
}

/* ===== 04. TOGGLE ON / OFF ===== */

.halloween-toggle {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;

  min-width: 44px;
  min-height: 42px;

  padding: 0.5rem 0.68rem;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;

  background:
    linear-gradient(
      180deg,
      rgba(31, 33, 36, 0.98),
      rgba(14, 15, 17, 0.98)
    );

  color: #b8b8b8;

  font-family:
    "IBM Plex Mono",
    monospace;

  font-size: 0.59rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.055em;

  text-transform: uppercase;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 4px 14px rgba(0, 0, 0, 0.3);

  transition:
    border-color var(--hwn-transition-fast) ease,
    color var(--hwn-transition-fast) ease,
    background var(--hwn-transition-fast) ease,
    box-shadow var(--hwn-transition-fast) ease,
    transform var(--hwn-transition-fast) ease;
}

.halloween-toggle:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #ffffff;
}

.halloween-toggle:active {
  transform: scale(0.97);
}

.halloween-toggle:focus-visible {
  outline: 2px solid var(--hwn-amber);
  outline-offset: 3px;
}

.halloween-toggle-indicator {
  position: relative;

  width: 7px;
  height: 7px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: #737373;

  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.04);
}

.halloween-toggle-state {
  color: #8b8b8b;
}

body.halloween-active .halloween-toggle {
  border-color: rgba(52, 211, 153, 0.58);

  background:
    linear-gradient(
      180deg,
      rgba(11, 33, 24, 0.98),
      rgba(3, 18, 12, 0.98)
    );

  color: var(--hwn-toxic-soft);

  box-shadow:
    inset 0 1px 0 rgba(167, 243, 208, 0.07),
    0 0 11px rgba(34, 197, 94, 0.18);
}

body.halloween-active .halloween-toggle-indicator {
  background: var(--hwn-toxic-2);

  box-shadow:
    0 0 5px var(--hwn-toxic-2),
    0 0 10px rgba(34, 197, 94, 0.8);
}

body.halloween-active .halloween-toggle-state {
  color: var(--hwn-toxic-2);
}

@keyframes hwnTogglePulse {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1.16);
  }
}

body.halloween-active .halloween-toggle-indicator {
  animation:
    hwnTogglePulse
    1.45s
    ease-in-out
    infinite;
}

/* ===== 05. HEADER · ALERTA RADIACTIVA ===== */

.halloween-radiation-alert {
  position: absolute;

  top: 50%;
  left: clamp(13.5rem, 22vw, 20rem);

  z-index: 3;

  display: flex;
  align-items: center;
  gap: 0.4rem;

  padding: 0.24rem 0.48rem;

  border: 1px solid rgba(239, 68, 68, 0.58);
  border-radius: 0.35rem;

  background: rgba(0, 0, 0, 0.9);

  color: #f87171;

  font-family:
    "IBM Plex Mono",
    monospace;

  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  line-height: 1;

  text-transform: uppercase;

  transform: translateY(-50%);

  box-shadow:
    0 0 13px rgba(239, 68, 68, 0.28);

  white-space: nowrap;
}

.halloween-beacon {
  position: relative;

  display: grid;
  place-items: center;

  width: 14px;
  height: 14px;
}

.halloween-beacon-core {
  width: 9px;
  height: 9px;

  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;

  background: var(--hwn-red);

  box-shadow:
    0 0 10px var(--hwn-red);
}

.halloween-beacon-wave {
  position: absolute;

  inset: 1px;

  border-radius: 50%;

  background: rgba(220, 38, 38, 0.5);
}

@keyframes hwnBeaconPing {
  0% {
    opacity: 0.85;
    transform: scale(0.7);
  }

  75%,
  100% {
    opacity: 0;
    transform: scale(1.85);
  }
}

@keyframes hwnBeaconStrobe {
  0%,
  100% {
    opacity: 0.4;

    filter:
      drop-shadow(
        0 0 4px var(--hwn-red)
      );
  }

  50% {
    opacity: 1;

    filter:
      drop-shadow(
        0 0 13px var(--hwn-red)
      );
  }
}

body.halloween-active .halloween-beacon-wave {
  animation:
    hwnBeaconPing
    1.1s
    ease-out
    infinite;
}

body.halloween-active .halloween-beacon-core,
body.halloween-active .halloween-radiation-alert-text {
  animation:
    hwnBeaconStrobe
    850ms
    ease-in-out
    infinite;
}

/* ===== 06. HEADER · GOTEOS ===== */

.halloween-header-drips {
  position: absolute;

  right: 0;
  bottom: -7px;
  left: 0;

  z-index: 52;

  display: flex;
  align-items: flex-start;
  justify-content: space-around;

  height: 18px;

  overflow: visible;
}

.halloween-static-drip {
  position: relative;

  width: var(--drip-width, 6px);
  height: var(--drip-height, 13px);

  border-radius:
    0 0
    999px 999px;

  background:
    linear-gradient(
      to bottom,
      var(--hwn-lime),
      var(--hwn-toxic-2)
    );

  box-shadow:
    0 0 8px rgba(132, 204, 22, 0.7);
}

.halloween-static-drip:nth-child(even) {
  background:
    linear-gradient(
      to bottom,
      var(--hwn-toxic-2),
      var(--hwn-toxic)
    );

  box-shadow:
    0 0 10px rgba(52, 211, 153, 0.75);
}

.halloween-static-drip::after {
  position: absolute;

  bottom: -6px;
  left: 50%;

  width: calc(var(--drip-width, 6px) * 0.62);
  height: calc(var(--drip-width, 6px) * 0.9);

  border-radius: 50%;

  background: var(--hwn-lime-soft);

  content: "";

  transform: translateX(-50%);

  box-shadow:
    0 0 7px rgba(132, 204, 22, 0.75);
}

@keyframes hwnStaticDripPulse {
  0%,
  100% {
    opacity: 0.72;
  }

  50% {
    opacity: 1;
  }
}

body.halloween-active
.halloween-static-drip:nth-child(2n) {
  animation:
    hwnStaticDripPulse
    1.4s
    ease-in-out
    infinite;
}

/* ===== 07. ÁCIDO QUE CAE POR EL VIEWPORT ===== */

.halloween-acid-layer {
  position: fixed;

  inset: 0;

  z-index: 35;

  overflow: hidden;

  pointer-events: none;
}

.halloween-acid-drop {
  position: absolute;

  top: -20px;

  width: var(--acid-width);
  height: var(--acid-height);

  border-radius:
    50% 50% 50% 50% /
    60% 60% 40% 40%;

  background:
    linear-gradient(
      to bottom,
      #d9f99d,
      var(--hwn-lime) 32%,
      var(--hwn-toxic-2) 72%,
      #16a34a
    );

  opacity: 0;

  filter:
    drop-shadow(
      0 0 9px var(--hwn-toxic)
    )
    drop-shadow(
      0 0 17px var(--hwn-lime)
    );
}

.halloween-acid-drop-1 {
  left: 15%;

  --acid-width: 10px;
  --acid-height: 16px;
}

.halloween-acid-drop-2 {
  left: 52%;

  --acid-width: 12px;
  --acid-height: 18px;
}

.halloween-acid-drop-3 {
  left: 82%;

  --acid-width: 8px;
  --acid-height: 14px;
}

@keyframes hwnAcidFall1 {
  0% {
    opacity: 0;

    transform:
      translateY(0)
      scaleY(1);
  }

  10% {
    opacity: 0.95;

    transform:
      translateY(10px)
      scaleY(1.3);
  }

  80% {
    opacity: 0.9;

    transform:
      translateY(85vh)
      scaleY(1.8)
      scaleX(0.7);
  }

  92% {
    opacity: 0.95;

    transform:
      translateY(92vh)
      scale(1.6);
  }

  100% {
    opacity: 0;

    transform:
      translateY(95vh)
      scale(2.4);
  }
}

@keyframes hwnAcidFall2 {
  0% {
    opacity: 0;

    transform:
      translateY(0)
      scaleY(1);
  }

  8% {
    opacity: 0.95;

    transform:
      translateY(12px)
      scaleY(1.2);
  }

  75% {
    opacity: 0.9;

    transform:
      translateY(82vh)
      scaleY(1.9)
      scaleX(0.65);
  }

  90% {
    opacity: 0.95;

    transform:
      translateY(90vh)
      scale(1.7);
  }

  100% {
    opacity: 0;

    transform:
      translateY(94vh)
      scale(2.5);
  }
}

@keyframes hwnAcidFall3 {
  0% {
    opacity: 0;

    transform:
      translateY(0)
      scaleY(1);
  }

  12% {
    opacity: 0.95;

    transform:
      translateY(8px)
      scaleY(1.4);
  }

  82% {
    opacity: 0.9;

    transform:
      translateY(88vh)
      scaleY(1.7)
      scaleX(0.75);
  }

  93% {
    opacity: 0.95;

    transform:
      translateY(93vh)
      scale(1.5);
  }

  100% {
    opacity: 0;

    transform:
      translateY(96vh)
      scale(2.3);
  }
}

body.halloween-active .halloween-acid-drop-1 {
  animation:
    hwnAcidFall1
    6.8s
    cubic-bezier(0.45, 0.05, 0.55, 0.95)
    infinite;
}

body.halloween-active .halloween-acid-drop-2 {
  animation:
    hwnAcidFall2
    8.4s
    cubic-bezier(0.42, 0, 0.58, 1)
    2.2s
    infinite;
}

body.halloween-active .halloween-acid-drop-3 {
  animation:
    hwnAcidFall3
    7.2s
    cubic-bezier(0.5, 0, 0.5, 1)
    4.1s
    infinite;
}

/* ===== 08. HERO · DISPOSITIVO DE CONTENCIÓN ===== */

.halloween-hero-canister-wrap {
  position: absolute;

  right: clamp(0.75rem, 5vw, 4rem);
  bottom: clamp(1.25rem, 7vh, 4.5rem);

  z-index: 20;

  width: 112px;
  height: 150px;

  opacity: 0.95;
}

.halloween-toxic-vapor {
  position: absolute;

  top: -58px;
  left: -42px;

  width: 190px;
  height: 190px;

  border-radius: 50%;

  background:
    radial-gradient(
      ellipse at center,
      rgba(34, 197, 94, 0.55),
      rgba(16, 185, 129, 0.3) 40%,
      transparent 75%
    );

  filter: blur(22px);

  opacity: 0.8;
}

@keyframes hwnToxicVapor {
  0%,
  100% {
    opacity: 0.5;

    transform:
      scale(0.92)
      translateY(5px);
  }

  50% {
    opacity: 0.9;

    transform:
      scale(1.08)
      translateY(-5px);
  }
}

body.halloween-active .halloween-toxic-vapor {
  animation:
    hwnToxicVapor
    4.4s
    ease-in-out
    infinite;
}

.halloween-canister {
  position: absolute;

  inset: 9px 8px 7px;

  border: 2px solid rgba(87, 83, 78, 0.82);
  border-radius: 16px;

  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      #292524 0%,
      #1c1917 42%,
      #0c0a09 100%
    );

  filter:
    drop-shadow(
      0 12px 24px rgba(0, 0, 0, 0.95)
    );

  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.45);
}

.halloween-canister-cap {
  position: absolute;

  top: 0;
  right: 0;
  left: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 16px;

  padding-inline: 8px;

  border-bottom:
    1px solid rgba(87, 83, 78, 0.8);

  background:
    linear-gradient(
      90deg,
      #44403c,
      #292524,
      #1c1917
    );
}

.halloween-canister-bolt {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #78716c;
}

.halloween-canister-center {
  position: absolute;

  inset:
    17px 4px 13px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.halloween-radiation-plate {
  display: grid;
  place-items: center;

  width: 46px;
  height: 46px;

  border:
    1px solid rgba(245, 158, 11, 0.65);

  border-radius: 50%;

  background:
    rgba(0, 0, 0, 0.9);

  color: var(--hwn-amber);

  box-shadow:
    0 0 14px rgba(245, 158, 11, 0.6);
}

.halloween-radiation-svg {
  width: 27px;
  height: 27px;

  fill: currentColor;
}

.halloween-canister-bottom {
  position: absolute;

  right: 0;
  bottom: 0;
  left: 0;

  height: 13px;

  border-top:
    1px solid rgba(87, 83, 78, 0.75);

  background:
    linear-gradient(
      90deg,
      #292524,
      #44403c,
      #1c1917
    );
}

.halloween-canister-electric {
  position: absolute;

  inset: 5px;

  width: calc(100% - 10px);
  height: calc(100% - 10px);

  overflow: visible;
}

.halloween-canister-electric path {
  fill: none;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.halloween-canister-electric-main {
  stroke: var(--hwn-toxic-2);
  stroke-width: 2.4;

  filter:
    drop-shadow(
      0 0 6px #10b981
    );
}

.halloween-canister-electric-secondary {
  stroke: var(--hwn-lime);
  stroke-width: 1.8;
}

.halloween-canister-electric-third {
  stroke: var(--hwn-toxic-soft);
  stroke-width: 1.4;
}

@keyframes hwnElectricCrack {
  0%,
  100% {
    opacity: 0.35;

    stroke-dasharray:
      4 5;
  }

  45% {
    opacity: 1;

    stroke-dasharray:
      18 2;
  }

  48% {
    opacity: 0.15;
  }

  54% {
    opacity: 0.92;
  }
}

body.halloween-active
.halloween-canister-electric path {
  animation:
    hwnElectricCrack
    1.65s
    ease-in-out
    infinite;
}

.halloween-canister-leak {
  position: absolute;

  top: 53px;
  right: 4px;

  width: 10px;
  height: 80px;

  border-radius: 999px;

  background:
    linear-gradient(
      to bottom,
      var(--hwn-lime),
      var(--hwn-toxic-2),
      #16a34a
    );

  box-shadow:
    0 0 16px var(--hwn-toxic-2);
}

.halloween-canister-drop {
  position: absolute;

  right: 5px;
  bottom: -11px;

  width: 10px;
  height: 25px;

  border-radius: 999px;

  background:
    var(--hwn-lime-soft);

  box-shadow:
    0 0 10px #10b981;
}

.halloween-canister-puddle {
  position: absolute;

  right: -4px;
  bottom: 2px;

  width: 48px;
  height: 14px;

  border-radius: 50%;

  background: var(--hwn-toxic-2);

  filter: blur(1px);

  box-shadow:
    0 0 14px var(--hwn-toxic);
}

@keyframes hwnCanisterLeak {
  0%,
  100% {
    opacity: 0.65;
  }

  50% {
    opacity: 1;
  }
}

body.halloween-active .halloween-canister-drop,
body.halloween-active .halloween-canister-puddle {
  animation:
    hwnCanisterLeak
    1.7s
    ease-in-out
    infinite;
}

/* ===== 09. HERO · MOTAS TÓXICAS ===== */

.halloween-toxic-mote {
  position: absolute;

  width: var(--mote-size);
  height: var(--mote-size);

  border-radius: 50%;

  background:
    var(--mote-color);

  box-shadow:
    0 0 12px
    var(--mote-color);

  opacity: 0;
}

@keyframes hwnMote1 {
  0% {
    opacity: 0;

    transform:
      translate(0, 10px)
      scale(0.6);
  }

  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate(-24px, -82px)
      scale(0.1);
  }
}

@keyframes hwnMote2 {
  0% {
    opacity: 0;

    transform:
      translate(0, 5px)
      scale(0.6);
  }

  30% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;

    transform:
      translate(19px, -105px)
      scale(0.15);
  }
}

@keyframes hwnMote3 {
  0% {
    opacity: 0;

    transform:
      translate(0, 8px)
      scale(0.8);
  }

  35% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;

    transform:
      translate(-8px, -74px)
      scale(0.1);
  }
}

.halloween-mote-1 {
  top: -32px;
  left: 6px;

  --mote-size: 10px;
  --mote-color: #84cc16;
}

.halloween-mote-2 {
  top: -50px;
  right: 10px;

  --mote-size: 12px;
  --mote-color: #6ee7b7;
}

.halloween-mote-3 {
  top: -66px;
  left: 43px;

  --mote-size: 8px;
  --mote-color: #22c55e;
}

.halloween-mote-4 {
  top: -18px;
  right: 41px;

  --mote-size: 8px;
  --mote-color: #bef264;
}

body.halloween-active .halloween-mote-1,
body.halloween-active .halloween-mote-4 {
  animation:
    hwnMote1
    4s
    ease-out
    infinite;
}

body.halloween-active .halloween-mote-2 {
  animation:
    hwnMote2
    5.2s
    ease-out
    0.8s
    infinite;
}

body.halloween-active .halloween-mote-3 {
  animation:
    hwnMote3
    4.7s
    ease-out
    1.5s
    infinite;
}

/* ===== 10. MURCIÉLAGOS SVG ===== */

.halloween-bat-flight {
  position: absolute;

  top: 1.6rem;
  left: -9rem;

  z-index: 12;

  display: flex;
  align-items: center;
  gap: 1.7rem;

  pointer-events: none;
}

.halloween-bat-svg {
  fill: #09090b;

  filter:
    drop-shadow(
      0 2px 6px rgba(0, 0, 0, 0.9)
    )
    drop-shadow(
      0 0 5px rgba(34, 197, 94, 0.5)
    );
}

.halloween-bat-1 {
  width: 32px;
  height: 24px;
}

.halloween-bat-2 {
  width: 24px;
  height: 18px;

  margin-top: -12px;

  opacity: 0.88;
}

.halloween-bat-3 {
  width: 28px;
  height: 20px;

  margin-top: 8px;

  opacity: 0.94;
}

@keyframes hwnBatPath {
  0% {
    opacity: 0;

    transform:
      translateX(-8rem)
      translateY(10px);
  }

  9% {
    opacity: 0.85;
  }

  46% {
    transform:
      translateX(52vw)
      translateY(-12px);
  }

  82% {
    opacity: 0.85;
  }

  100% {
    opacity: 0;

    transform:
      translateX(calc(100vw + 14rem))
      translateY(12px);
  }
}

@keyframes hwnBatFlap {
  0%,
  100% {
    transform:
      rotateX(0deg)
      scaleY(1);
  }

  50% {
    transform:
      rotateX(52deg)
      scaleY(0.68);
  }
}

body.halloween-active .halloween-bat-flight {
  animation:
    hwnBatPath
    15s
    linear
    infinite;
}

body.halloween-active .halloween-bat-svg {
  animation:
    hwnBatFlap
    420ms
    ease-in-out
    infinite;
}

/* ===== 11. ARAÑAS SVG ===== */

.halloween-spider-svg {
  display: block;

  width: 100%;
  height: 100%;

  fill: var(--hwn-toxic-2);
  color: var(--hwn-toxic-2);

  filter:
    drop-shadow(
      0 0 6px var(--hwn-toxic-2)
    );
}

.halloween-spider-svg path {
  fill: none;

  stroke: currentColor;

  stroke-linecap: round;
}

/* ===== 12. ARAÑA HERO ===== */

.halloween-hero-spider {
  position: absolute;

  top: 0;
  left: clamp(0.75rem, 4vw, 3.5rem);

  z-index: 24;

  display: flex;
  flex-direction: column;
  align-items: center;

  width: 44px;

  padding: 0;

  border: 0;

  background: transparent;

  pointer-events: auto;

  transform-origin: top center;
}

.halloween-hero-spider-thread {
  width: 2px;
  height: clamp(80px, 11vw, 112px);

  background:
    linear-gradient(
      to bottom,
      #6ee7b7,
      var(--hwn-lime),
      var(--hwn-toxic-2)
    );

  box-shadow:
    0 0 8px var(--hwn-toxic-2);
}

.halloween-hero-spider-body {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  margin-top: -3px;

  padding: 4px;

  border:
    1px solid rgba(52, 211, 153, 0.82);

  border-radius: 50%;

  background:
    rgba(9, 9, 11, 0.92);

  box-shadow:
    0 0 11px rgba(34, 197, 94, 0.8);
}

.halloween-hero-spider-body .halloween-spider-svg {
  width: 26px;
  height: 26px;
}

@keyframes hwnHeroSpider {
  0%,
  100% {
    transform:
      rotate(-2deg)
      translateY(0);
  }

  30% {
    transform:
      rotate(3deg)
      translateY(2px);
  }

  67% {
    transform:
      rotate(-4deg)
      translateY(-1px);
  }
}

@keyframes hwnHeroSpiderHit {
  0% {
    transform:
      translateY(0)
      rotate(0deg);
  }

  32% {
    transform:
      translateY(22px)
      rotate(-10deg)
      scale(1.12);
  }

  65% {
    transform:
      translateY(-4px)
      rotate(9deg);
  }

  100% {
    transform:
      translateY(0)
      rotate(0);
  }
}

body.halloween-active .halloween-hero-spider {
  animation:
    hwnHeroSpider
    4.8s
    ease-in-out
    infinite;
}

body.halloween-active
.halloween-hero-spider.is-reacting {
  animation:
    hwnHeroSpiderHit
    850ms
    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== 13. CUATRO ARAÑAS GLOBALES ===== */

.halloween-spider-hanging-layer {
  position: fixed;

  inset: 0;

  z-index: 30;

  overflow: hidden;

  pointer-events: none;
}

.halloween-spider-anchor {
  position: absolute;

  top: 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  width: 44px;

  transform-origin: top center;

  will-change: transform;
}

.halloween-spider-anchor-1 {
  left: 12%;
}

.halloween-spider-anchor-2 {
  left: 38%;
}

.halloween-spider-anchor-3 {
  left: 68%;
}

.halloween-spider-anchor-4 {
  left: 88%;
}

.halloween-global-thread {
  width: var(--thread-width, 2px);
  height: var(--thread-height);

  background:
    linear-gradient(
      to bottom,
      #6ee7b7,
      var(--hwn-lime),
      var(--hwn-toxic-2)
    );

  box-shadow:
    0 0 8px var(--hwn-toxic-2);
}

.halloween-spider-anchor-1 {
  --thread-height: 144px;
  --thread-width: 2px;
}

.halloween-spider-anchor-2 {
  --thread-height: 96px;
  --thread-width: 1.5px;
}

.halloween-spider-anchor-3 {
  --thread-height: 176px;
  --thread-width: 2px;
}

.halloween-spider-anchor-4 {
  --thread-height: 80px;
  --thread-width: 1.5px;
}

.halloween-global-spider-shell {
  display: grid;
  place-items: center;

  width: var(--spider-shell-size, 30px);
  height: var(--spider-shell-size, 30px);

  margin-top: -2px;

  padding: 4px;

  border:
    1px solid rgba(52, 211, 153, 0.82);

  border-radius: 50%;

  background:
    rgba(9, 9, 11, 0.93);

  box-shadow:
    0 0 10px rgba(34, 197, 94, 0.75);
}

.halloween-spider-anchor-1 {
  --spider-shell-size: 30px;
}

.halloween-spider-anchor-2 {
  --spider-shell-size: 26px;
}

.halloween-spider-anchor-3 {
  --spider-shell-size: 34px;
}

.halloween-spider-anchor-4 {
  --spider-shell-size: 26px;
}

.halloween-global-spider-shell
.halloween-spider-svg {
  width: 100%;
  height: 100%;
}

@keyframes hwnSpiderBreeze1 {
  0%,
  100% {
    rotate: 0deg;
  }

  25% {
    rotate: 6deg;
  }

  50% {
    rotate: -5deg;
  }

  75% {
    rotate: 4deg;
  }
}

@keyframes hwnSpiderBreeze2 {
  0%,
  100% {
    rotate: 0deg;
  }

  20% {
    rotate: -7deg;
  }

  55% {
    rotate: 5deg;
  }

  80% {
    rotate: -3deg;
  }
}

@keyframes hwnSpiderBreeze3 {
  0%,
  100% {
    rotate: 0deg;
  }

  30% {
    rotate: 8deg;
  }

  65% {
    rotate: -6deg;
  }
}

@keyframes hwnSpiderBreeze4 {
  0%,
  100% {
    rotate: 0deg;
  }

  22% {
    rotate: -5deg;
  }

  60% {
    rotate: 7deg;
  }

  85% {
    rotate: -4deg;
  }
}

body.halloween-active
.halloween-spider-anchor-1 {
  animation:
    hwnSpiderBreeze1
    5.2s
    ease-in-out
    infinite
    alternate;
}

body.halloween-active
.halloween-spider-anchor-2 {
  animation:
    hwnSpiderBreeze2
    4.4s
    ease-in-out
    infinite
    alternate;
}

body.halloween-active
.halloween-spider-anchor-3 {
  animation:
    hwnSpiderBreeze3
    6.1s
    ease-in-out
    infinite
    alternate;
}

body.halloween-active
.halloween-spider-anchor-4 {
  animation:
    hwnSpiderBreeze4
    4.8s
    ease-in-out
    infinite
    alternate;
}

/* ===== 14. PROMOCIONES · ARAÑA QUE ESCAPA ===== */

.halloween-promo-spider {
  position: absolute;

  top: 0.5rem;
  right: 1rem;

  z-index: 25;

  display: flex;
  align-items: center;

  min-width: 44px;
  min-height: 44px;

  padding: 0;

  border: 0;

  background: transparent;

  pointer-events: auto;

  opacity: 0.76;
}

.halloween-promo-spider-line {
  width: 28px;
  height: 1px;

  margin-right: 1px;

  background:
    linear-gradient(
      to right,
      transparent,
      rgba(52, 211, 153, 0.45),
      #78716c
    );
}

.halloween-promo-spider
.halloween-spider-svg {
  width: 18px;
  height: 18px;

  color: #a8a29e;

  fill: #a8a29e;

  transform: rotate(45deg);
}

.halloween-promo-spider:hover
.halloween-spider-svg {
  color: var(--hwn-toxic-soft);
  fill: var(--hwn-toxic-2);
}

@keyframes hwnSpiderSkitter {
  0% {
    transform:
      translateX(0)
      rotate(0);
  }

  25% {
    transform:
      translateX(-28px)
      rotate(-8deg);
  }

  48% {
    transform:
      translateX(9px)
      rotate(7deg);
  }

  72% {
    transform:
      translateX(-15px)
      rotate(-4deg);
  }

  100% {
    transform:
      translateX(0)
      rotate(0);
  }
}

.halloween-promo-spider.is-reacting,
.halloween-ambient-spider.is-reacting {
  animation:
    hwnSpiderSkitter
    800ms
    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== 15. TELARAÑAS ===== */

.halloween-web {
  position: absolute;

  z-index: 2;

  width: 110px;
  height: 110px;

  opacity: 0.28;

  pointer-events: none;
}

.halloween-web-svg {
  display: block;

  width: 100%;
  height: 100%;

  fill: none;
  stroke: currentColor;
  stroke-width: 0.8;

  color: #78716c;
}

.halloween-web-top-right {
  top: 0;
  right: 0;
}

.halloween-web-top-left {
  top: 0;
  left: 0;
}

/* ===== 16. CARTA ===== */

.halloween-menu-glow {
  position: absolute;

  top: 0;
  right: 0;
  left: 0;

  height: 176px;

  background:
    radial-gradient(
      ellipse at top,
      rgba(34, 197, 94, 0.11),
      transparent 70%
    );

  filter: blur(22px);
}

.halloween-menu-title-spider {
  display: inline-flex;
  align-items: center;

  width: 22px;
  height: 22px;

  margin-left: 0.45rem;

  vertical-align: middle;

  color: var(--hwn-toxic-2);

  filter:
    drop-shadow(
      0 0 6px var(--hwn-toxic)
    );
}

/* ===== 17. MUTANTE GALERÍA · SVG ORIGINAL ===== */

.halloween-mutant-layer {
  position: absolute;

  inset: 0;

  z-index: 0;

  overflow: hidden;
}

.halloween-mutant-wrap {
  position: absolute;

  bottom: clamp(1.5rem, 3vw, 2.5rem);
  left: 50%;

  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  width: clamp(128px, 12vw, 176px);
  height: clamp(192px, 18vw, 256px);

  padding: 0;

  border: 0;

  background: transparent;

  pointer-events: auto;

  transform:
    translateX(-50%);

  transform-origin:
    center bottom;
}

.halloween-mutant-aura {
  position: absolute;

  inset: -24px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(34, 197, 94, 0.45),
      rgba(16, 185, 129, 0.2) 50%,
      transparent 75%
    );

  filter: blur(23px);

  opacity: 0.86;
}

.halloween-mutant-svg {
  position: relative;

  z-index: 2;

  display: block;

  width: 100%;
  height: 100%;

  fill: var(--hwn-toxic-2);

  filter:
    drop-shadow(
      0 0 20px rgba(34, 197, 94, 0.85)
    );

  transition:
    transform 300ms ease,
    filter 300ms ease;
}

.halloween-mutant-wrap:hover
.halloween-mutant-svg {
  transform: scale(1.05);

  filter:
    drop-shadow(
      0 0 30px rgba(52, 211, 153, 1)
    );
}

.halloween-mutant-radiation {
  position: absolute;

  top: -18px;
  left: 50%;

  z-index: 4;

  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border:
    1px solid var(--hwn-amber);

  border-radius: 50%;

  background: rgba(9, 9, 11, 0.95);

  color: var(--hwn-amber);

  transform: translateX(-50%);

  box-shadow:
    0 0 16px var(--hwn-amber);
}

.halloween-mutant-radiation svg {
  width: 19px;
  height: 19px;

  fill: currentColor;
}

@keyframes hwnMutantFloat {
  0%,
  100% {
    transform:
      translateX(-50%)
      translateY(0)
      rotate(-0.6deg);
  }

  50% {
    transform:
      translateX(-50%)
      translateY(-5px)
      rotate(0.8deg);
  }
}

body.halloween-active
.halloween-mutant-wrap:not(.is-destroying):not(.is-respawning) {
  animation:
    hwnMutantFloat
    4.8s
    ease-in-out
    infinite;
}

@keyframes hwnMutantDestroy {
  0% {
    opacity: 1;

    transform:
      translateX(-50%)
      scale(1)
      rotate(0);

    filter:
      drop-shadow(
        0 0 15px var(--hwn-toxic)
      );
  }

  30% {
    opacity: 0.9;

    transform:
      translateX(-50%)
      scale(1.4)
      rotate(8deg);

    filter:
      drop-shadow(
        0 0 35px var(--hwn-red)
      )
      hue-rotate(120deg)
      brightness(1.8);
  }

  70% {
    opacity: 0.4;

    transform:
      translateX(-50%)
      scale(0.4)
      rotate(-15deg);

    filter:
      drop-shadow(
        0 0 40px var(--hwn-toxic)
      )
      blur(6px);
  }

  100% {
    opacity: 0;

    transform:
      translateX(-50%)
      scale(0.1);

    filter: blur(12px);
  }
}

@keyframes hwnMutantRespawn {
  0% {
    opacity: 0;

    transform:
      translateX(-50%)
      scale(0.2);

    filter: blur(8px);
  }

  70% {
    opacity: 0.95;

    transform:
      translateX(-50%)
      scale(1.15);

    filter:
      drop-shadow(
        0 0 20px var(--hwn-toxic-2)
      );
  }

  100% {
    opacity: 0.95;

    transform:
      translateX(-50%)
      scale(1);

    filter:
      drop-shadow(
        0 0 14px var(--hwn-toxic)
      );
  }
}

.halloween-mutant-wrap.is-destroying {
  animation:
    hwnMutantDestroy
    1.2s
    cubic-bezier(0.25, 1, 0.5, 1)
    forwards;
}

.halloween-mutant-wrap.is-respawning {
  animation:
    hwnMutantRespawn
    700ms
    cubic-bezier(0.18, 0.89, 0.32, 1.28)
    forwards;
}

/* ===== 18. SUJETO-09 · FANTASMA RADIACTIVO ORIGINAL ===== */

.halloween-radioactive-ghost {
  position: fixed;

  bottom: 5rem;
  left: 0;

  z-index: 10000;

  width: 96px;

  padding: 0;

  border: 0;

  background: transparent;

  pointer-events: auto;

  opacity: 0;

  transform-origin: center;

  will-change:
    transform,
    opacity,
    filter;
}

.halloween-ghost-inner {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;

  opacity: 0.86;

  transition:
    opacity var(--hwn-transition-fast) ease;
}

.halloween-radioactive-ghost:hover
.halloween-ghost-inner {
  opacity: 1;
}

.halloween-ghost-aura {
  position: absolute;

  top: -20px;
  left: 50%;

  width: 128px;
  height: 128px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(34, 197, 94, 0.45),
      rgba(16, 185, 129, 0.2) 50%,
      transparent 75%
    );

  filter: blur(22px);

  transform:
    translateX(-50%);

  pointer-events: none;
}

.halloween-ghost-figure {
  position: relative;

  width: 80px;
  height: 112px;

  filter:
    drop-shadow(
      0 12px 24px rgba(0, 0, 0, 0.95)
    );
}

.halloween-ghost-svg {
  width: 100%;
  height: 100%;

  fill: #09090b;

  stroke:
    rgba(16, 185, 129, 0.45);

  stroke-width: 1;

  filter:
    drop-shadow(
      0 0 14px var(--hwn-toxic)
    );
}

.halloween-ghost-label {
  display: flex;
  align-items: center;
  gap: 4px;

  margin-top: 4px;

  padding:
    3px 6px;

  border:
    1px solid rgba(16, 185, 129, 0.62);

  border-radius: 5px;

  background:
    rgba(0, 0, 0, 0.92);

  color: var(--hwn-toxic-soft);

  font-family:
    "IBM Plex Mono",
    monospace;

  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;

  text-transform: uppercase;

  box-shadow:
    0 0 8px var(--hwn-toxic-2);
}

.halloween-ghost-label-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--hwn-toxic-2);

  box-shadow:
    0 0 6px var(--hwn-toxic-2);
}

.halloween-ghost-boo {
  position: absolute;

  top: -34px;
  left: 50%;

  z-index: 5;

  color: var(--hwn-amber);

  font-family:
    "Barlow Condensed",
    sans-serif;

  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.06em;

  text-transform: uppercase;

  opacity: 0;

  transform:
    translateX(-50%)
    scale(0.7);

  text-shadow:
    0 0 14px var(--hwn-red);
}

.halloween-radioactive-ghost.is-spooked
.halloween-ghost-boo {
  animation:
    hwnGhostBoo
    900ms
    ease-out
    forwards;
}

@keyframes hwnGhostBoo {
  0% {
    opacity: 0;

    transform:
      translateX(-50%)
      translateY(8px)
      scale(0.7);
  }

  18% {
    opacity: 1;

    transform:
      translateX(-50%)
      translateY(-6px)
      scale(1.15);
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translateX(-50%)
      translateY(-28px)
      scale(0.9);
  }
}

/* ===== 19. SUJETO-09 · RUTA ERRÁTICA ORIGINAL ===== */

@keyframes hwnErraticTeleport {
  0% {
    opacity: 0;

    transform:
      translate3d(2vw, -20px, 0)
      scale(0.92);

    filter: blur(4px);
  }

  2% {
    opacity: 0.9;
    filter: blur(0);
  }

  14% {
    opacity: 0.95;

    transform:
      translate3d(18vw, -140px, 0)
      scale(1);
  }

  18% {
    opacity: 0;

    transform:
      translate3d(24vw, -160px, 0)
      scale(0.85);

    filter: blur(6px);
  }

  23% {
    opacity: 0;

    transform:
      translate3d(
        calc(85vw - 90px),
        -360px,
        0
      )
      scale(0.8);
  }

  25% {
    opacity: 0.88;

    transform:
      translate3d(
        calc(82vw - 90px),
        -340px,
        0
      )
      scale(0.95);

    filter: blur(0);
  }

  38% {
    opacity: 0.95;

    transform:
      translate3d(
        calc(60vw - 90px),
        -210px,
        0
      )
      scale(1.05);
  }

  45% {
    opacity: 0.1;

    transform:
      translate3d(
        calc(50vw - 90px),
        -120px,
        0
      )
      scale(0.7);
  }

  48% {
    opacity: 0;
  }

  52% {
    opacity: 0;

    transform:
      translate3d(
        6vw,
        -440px,
        0
      )
      scale(0.85);
  }

  55% {
    opacity: 0.92;

    transform:
      translate3d(
        10vw,
        -410px,
        0
      )
      scale(1);

    filter: blur(0);
  }

  68% {
    opacity: 0.95;

    transform:
      translate3d(
        36vw,
        -290px,
        0
      )
      scale(0.95);
  }

  72% {
    opacity: 0;

    transform:
      translate3d(
        40vw,
        -260px,
        0
      )
      scale(0.6);

    filter: blur(8px);
  }

  76% {
    opacity: 0;

    transform:
      translate3d(
        calc(75vw - 90px),
        -80px,
        0
      );
  }

  78% {
    opacity: 0.9;

    transform:
      translate3d(
        calc(72vw - 90px),
        -60px,
        0
      )
      scale(1.02);

    filter: blur(0);
  }

  88% {
    opacity: 0.92;

    transform:
      translate3d(
        calc(30vw - 90px),
        -40px,
        0
      )
      scale(0.95);
  }

  96% {
    opacity: 0;

    transform:
      translate3d(
        calc(12vw - 90px),
        -10px,
        0
      )
      scale(0.7);

    filter: blur(4px);
  }

  100% {
    opacity: 0;

    transform:
      translate3d(
        2vw,
        -20px,
        0
      )
      scale(0.92);

    filter: blur(4px);
  }
}

body.halloween-active
.halloween-radioactive-ghost:not(.is-shattering):not(.is-respawning) {
  animation:
    hwnErraticTeleport
    26s
    cubic-bezier(0.45, 0.05, 0.55, 0.95)
    infinite;
}

/* ===== 20. SUJETO-09 · DESTRUCCIÓN / RESPAWN ===== */

@keyframes hwnGhostShatter {
  0% {
    opacity: 1;

    transform: scale(1);

    filter:
      drop-shadow(
        0 0 15px var(--hwn-toxic)
      );
  }

  30% {
    opacity: 0.9;

    transform:
      scale(1.35)
      rotate(-10deg);

    filter:
      drop-shadow(
        0 0 35px var(--hwn-red)
      )
      hue-rotate(140deg)
      brightness(2);
  }

  70% {
    opacity: 0.3;

    transform:
      scale(0.3)
      rotate(20deg);

    filter:
      blur(6px)
      drop-shadow(
        0 0 25px var(--hwn-toxic)
      );
  }

  100% {
    opacity: 0;

    transform: scale(0);

    filter: blur(10px);
  }
}

@keyframes hwnGhostRespawn {
  0% {
    opacity: 0;

    transform: scale(0.2);

    filter: blur(8px);
  }

  60% {
    opacity: 0.9;

    transform: scale(1.15);

    filter:
      drop-shadow(
        0 0 20px var(--hwn-toxic-2)
      );
  }

  100% {
    opacity: 0.85;

    transform: scale(1);

    filter:
      drop-shadow(
        0 0 14px var(--hwn-toxic)
      );
  }
}

.halloween-radioactive-ghost.is-shattering {
  animation:
    hwnGhostShatter
    900ms
    cubic-bezier(0.2, 0.8, 0.4, 1)
    forwards;
}

.halloween-radioactive-ghost.is-respawning {
  animation:
    hwnGhostRespawn
    600ms
    cubic-bezier(0.18, 0.89, 0.32, 1.28)
    forwards;
}

/* ===== 21. PARTÍCULAS DE MUERTE ===== */

.halloween-death-particle {
  position: fixed;

  z-index: 10030;

  width: var(--particle-size);
  height: var(--particle-size);

  border-radius: 50%;

  background:
    var(--particle-color);

  box-shadow:
    0 0 10px
    var(--particle-color);

  pointer-events: none;
}

@keyframes hwnParticleFly {
  0% {
    opacity: 1;

    transform:
      translate(0, 0)
      scale(1);
  }

  100% {
    opacity: 0;

    transform:
      translate(
        var(--particle-x),
        var(--particle-y)
      )
      scale(0);
  }
}

.halloween-death-particle {
  animation:
    hwnParticleFly
    850ms
    cubic-bezier(0.15, 0.8, 0.3, 1)
    forwards;
}

/* ===== 22. BADGE DE IMPACTO ===== */

.halloween-hit-badge {
  position: fixed;

  z-index: 10031;

  padding:
    0.38rem 0.7rem;

  border:
    1px solid var(--hwn-toxic-2);

  border-radius: 999px;

  background:
    rgba(0, 0, 0, 0.95);

  color:
    var(--hwn-toxic-soft);

  font-family:
    "Barlow Condensed",
    sans-serif;

  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;

  text-transform: uppercase;

  pointer-events: none;

  box-shadow:
    0 0 16px var(--hwn-toxic);

  transform:
    translate(-50%, 0);
}

@keyframes hwnBadgeFloat {
  0% {
    opacity: 0;

    transform:
      translate(-50%, 0)
      scale(0.8);
  }

  15% {
    opacity: 1;

    transform:
      translate(-50%, -15px)
      scale(1.1);
  }

  75% {
    opacity: 1;

    transform:
      translate(-50%, -45px)
      scale(1);
  }

  100% {
    opacity: 0;

    transform:
      translate(-50%, -65px)
      scale(0.85);
  }
}

.halloween-hit-badge {
  animation:
    hwnBadgeFloat
    1.1s
    cubic-bezier(0.16, 1, 0.3, 1)
    forwards;
}

/* ===== 23. JUMPSCARE ===== */

.halloween-jumpscare {
  position: fixed;

  inset: 0;

  z-index: 10040;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

.halloween-jumpscare.is-visible {
  opacity: 1;
  visibility: visible;
}

.halloween-jumpscare-bg {
  position: absolute;

  inset: 0;

  background:
    rgba(0, 0, 0, 0.91);

  -webkit-backdrop-filter: blur(4px);
  backdrop-filter:
    blur(4px);

  transition:
    background-color 120ms ease;
}

.halloween-jumpscare.is-red
.halloween-jumpscare-bg {
  background:
    rgba(127, 29, 29, 0.78);
}

.halloween-jumpscare.is-green
.halloween-jumpscare-bg {
  background:
    rgba(6, 78, 59, 0.78);
}

.halloween-jumpscare-content {
  position: relative;

  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;

  transform: scale(0.5);

  transition:
    transform 180ms
    cubic-bezier(0.16, 1, 0.3, 1);
}

.halloween-jumpscare.is-visible
.halloween-jumpscare-content {
  transform: scale(1.2);
}

.halloween-jumpscare-title {
  color: var(--hwn-lime);

  font-family:
    "Barlow Condensed",
    sans-serif;

  font-size:
    clamp(
      4rem,
      13vw,
      8rem
    );

  font-weight: 900;
  line-height: 0.85;
  letter-spacing: 0.045em;

  text-transform: uppercase;

  text-shadow:
    0 0 20px var(--hwn-toxic-2),
    0 0 40px rgba(34, 197, 94, 0.8);
}

.halloween-jumpscare-message {
  margin-top: 0.75rem;

  padding:
    0.42rem 0.8rem;

  border:
    1px solid var(--hwn-toxic-2);

  border-radius: 999px;

  background:
    rgba(0, 0, 0, 0.86);

  color:
    var(--hwn-toxic-soft);

  font-family:
    "IBM Plex Mono",
    monospace;

  font-size:
    clamp(
      0.62rem,
      1.8vw,
      0.82rem
    );

  font-weight: 700;
  letter-spacing: 0.08em;

  text-align: center;
  text-transform: uppercase;

  box-shadow:
    0 0 14px var(--hwn-toxic);
}

@keyframes hwnJumpscareShake {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }

  20% {
    translate: 7px -4px;
    rotate: -2deg;
  }

  40% {
    translate: -8px 5px;
    rotate: 2deg;
  }

  60% {
    translate: 5px -3px;
    rotate: -1deg;
  }

  80% {
    translate: -4px 2px;
    rotate: 1deg;
  }
}

.halloween-jumpscare.is-visible
.halloween-jumpscare-content {
  animation:
    hwnJumpscareShake
    260ms
    linear
    1;
}

/* ===== 24. AMBIENTE · ARAÑA ===== */

.halloween-ambient-spider {
  position: absolute;

  top: 0.7rem;
  right: 1.5rem;

  z-index: 20;

  display: flex;
  align-items: center;

  min-width: 44px;
  min-height: 44px;

  padding: 0;

  border: 0;

  background: transparent;

  pointer-events: auto;
}

.halloween-ambient-spider-line {
  width: 32px;
  height: 1px;

  background:
    linear-gradient(
      to right,
      transparent,
      rgba(52, 211, 153, 0.5),
      #57534e
    );
}

.halloween-ambient-spider
.halloween-spider-svg {
  width: 21px;
  height: 21px;

  margin-left: 2px;

  transform: rotate(12deg);
}

/* ===== 25. AMBIENTE · LÁMPARA / ELECTRICIDAD ===== */

.halloween-industrial-lamp-wrap {
  position: absolute;

  top: 0;
  right: clamp(2rem, 7vw, 6rem);
  left: clamp(2rem, 7vw, 6rem);

  z-index: 10;

  height: 180px;
}

.halloween-industrial-lamp {
  width: min(100%, 36rem);
  height: 4px;

  margin-inline: auto;

  border-radius: 999px;

  background:
    rgba(52, 211, 153, 0.85);

  box-shadow:
    0 0 12px var(--hwn-toxic-2);
}

.halloween-electric-arc {
  position: absolute;

  top: -4px;
  left: 26%;

  width: 208px;
  height: 176px;

  overflow: visible;
}

.halloween-electric-arc path {
  fill: none;

  stroke: var(--hwn-toxic-soft);

  stroke-linecap: round;
  stroke-linejoin: round;

  filter:
    drop-shadow(
      0 0 8px var(--hwn-toxic)
    );
}

.halloween-electric-arc-main {
  stroke-width: 2.2;
}

.halloween-electric-arc-branch {
  stroke-width: 1.4;
}

@keyframes hwnElectricArc {
  0%,
  100% {
    opacity: 0.23;

    stroke-dasharray:
      9 8;
  }

  42% {
    opacity: 1;

    stroke-dasharray:
      26 2;
  }

  47% {
    opacity: 0.12;
  }

  54% {
    opacity: 0.9;
  }

  65% {
    opacity: 0.3;
  }
}

body.halloween-active
.halloween-electric-arc path {
  animation:
    hwnElectricArc
    1.15s
    linear
    infinite;
}

/* ===== 26. RESEÑAS · VIALES ===== */

.halloween-vials {
  position: absolute;

  top: 0.75rem;
  right: clamp(1rem, 4vw, 2.5rem);

  z-index: 6;

  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}

.halloween-vial {
  position: relative;

  width: 14px;
  height: var(--vial-height);

  padding: 2px;

  border:
    1px solid rgba(87, 83, 78, 0.72);

  border-radius:
    2px 2px 5px 5px;

  background:
    rgba(29, 31, 35, 0.92);

  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.35);
}

.halloween-vial::before {
  position: absolute;

  top: -4px;
  right: 2px;
  left: 2px;

  height: 4px;

  border-radius:
    2px 2px 0 0;

  background: #44403c;

  content: "";
}

.halloween-vial-liquid {
  position: absolute;

  right: 2px;
  bottom: 2px;
  left: 2px;

  height: var(--vial-level);

  border-radius:
    0 0 3px 3px;

  background:
    var(--vial-color);

  box-shadow:
    0 0 6px
    var(--vial-color);
}

/* ===== 27. EQUIPO · ESCÁNER ===== */

.halloween-team-scan {
  position: absolute;

  inset: 0;

  z-index: 10;

  overflow: hidden;

  border-radius: inherit;

  opacity: 0.32;
}

.halloween-team-scan::before {
  position: absolute;

  right: 0;
  left: 0;

  height: 1px;

  background:
    linear-gradient(
      to right,
      transparent,
      var(--hwn-toxic-soft),
      transparent
    );

  box-shadow:
    0 0 7px var(--hwn-toxic);

  content: "";
}

@keyframes hwnTeamScan {
  0% {
    top: 0;
    opacity: 0;
  }

  10% {
    opacity: 0.9;
  }

  90% {
    opacity: 0.9;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

body.halloween-active
.halloween-team-scan::before {
  animation:
    hwnTeamScan
    6.2s
    linear
    infinite;
}

/* ===== 28. CTA · MINI BARRIL ===== */

.halloween-cta-barrel {
  position: absolute;

  bottom: 0.75rem;
  left: clamp(1rem, 5vw, 4rem);

  z-index: 8;

  width: 48px;
  height: 64px;

  opacity: 0.86;
}

.halloween-barrel-shell {
  position: absolute;

  inset: 0;

  overflow: hidden;

  border:
    1px solid rgba(87, 83, 78, 0.75);

  border-radius: 8px;

  background:
    linear-gradient(
      90deg,
      #292524,
      #44403c,
      #1c1917
    );

  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.6);
}

.halloween-barrel-band {
  position: absolute;

  right: 0;
  left: 0;

  height: 4px;

  background: #0c0a09;
}

.halloween-barrel-band-top {
  top: 8px;
}

.halloween-barrel-band-bottom {
  bottom: 8px;
}

.halloween-barrel-center {
  position: absolute;

  top: 20px;
  right: 0;
  left: 0;

  display: grid;
  place-items: center;

  height: 16px;

  background: #09090b;
}

.halloween-barrel-light {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--hwn-toxic-2);

  box-shadow:
    0 0 6px var(--hwn-toxic);
}

.halloween-barrel-aura {
  position: absolute;

  bottom: -10px;
  left: 8px;

  width: 24px;
  height: 24px;

  border-radius: 50%;

  background:
    rgba(16, 185, 129, 0.26);

  filter: blur(8px);
}

/* ===== 29. FOOTER ===== */

.halloween-footer-drips {
  position: absolute;

  top: 0;
  right: 0;
  left: 0;

  z-index: 6;

  display: flex;
  justify-content: space-around;

  height: 16px;
}

.halloween-footer-web {
  position: absolute;

  top: 0;
  right: 0;

  z-index: 1;

  width: 100px;
  height: 100px;

  opacity: 0.25;
}

/* ===== 31. RESPONSIVE · TABLET ===== */

@media (max-width: 1199px) {
  .halloween-radiation-alert {
    display: none;
  }
}

@media (max-width: 1023px) {
  .halloween-toggle-text {
    display: none;
  }

  .halloween-toggle {
    width: 44px;
    padding-inline: 0;
  }

  .halloween-hero-canister-wrap {
    width: 92px;
    height: 128px;
  }

  .halloween-canister-center {
    inset:
      15px 3px 12px;
  }

  .halloween-radiation-plate {
    width: 39px;
    height: 39px;
  }

  .halloween-canister-leak {
    top: 46px;
    height: 63px;
  }

  .halloween-spider-anchor-2,
  .halloween-spider-anchor-4 {
    display: none;
  }

  .halloween-spider-anchor-1 {
    --thread-height: 112px;
  }

  .halloween-spider-anchor-3 {
    --thread-height: 136px;
  }
}

/* ===== 32. RESPONSIVE · MOBILE ===== */

@media (max-width: 767px) {
  .halloween-header-drips {
    opacity: 0.7;
  }

  .halloween-header-drips
  .halloween-static-drip:nth-child(even) {
    display: none;
  }

  .halloween-hero-canister-wrap {
    right: 0.4rem;
    bottom: 1.1rem;

    width: 74px;
    height: 103px;

    opacity: 0.8;
  }

  .halloween-toxic-vapor {
    top: -40px;
    left: -40px;

    width: 140px;
    height: 140px;
  }

  .halloween-radiation-plate {
    width: 32px;
    height: 32px;
  }

  .halloween-radiation-svg {
    width: 20px;
    height: 20px;
  }

  .halloween-canister-center {
    inset:
      13px 3px 11px;
  }

  .halloween-canister-leak {
    top: 38px;
    width: 7px;
    height: 50px;
  }

  .halloween-canister-drop {
    width: 7px;
  }

  .halloween-canister-puddle {
    width: 35px;
    height: 10px;
  }

  .halloween-bat-flight {
    top: 2rem;

    gap: 1rem;
  }

  .halloween-hero-spider {
    left: 0.35rem;
  }

  .halloween-hero-spider-thread {
    height: 76px;
  }

  .halloween-spider-anchor-1 {
    left: 8%;
  }

  .halloween-spider-anchor-3 {
    left: 81%;
  }

  .halloween-mutant-wrap {
    bottom: 0.5rem;

    width: 112px;
    height: 168px;

    opacity: 0.82;
  }

  .halloween-radioactive-ghost {
    bottom:
      calc(
        5.2rem +
        env(safe-area-inset-bottom, 0px)
      );

    width: 72px;
  }

  .halloween-ghost-figure {
    width: 64px;
    height: 96px;
  }

  .halloween-industrial-lamp-wrap {
    right: 1rem;
    left: 1rem;

    height: 130px;
  }

  .halloween-electric-arc {
    left: 8%;

    width: 145px;
    height: 130px;
  }

  .halloween-vials {
    display: none;
  }

  .halloween-web {
    width: 78px;
    height: 78px;
  }

  .halloween-cta-barrel {
    transform:
      scale(0.82);

    transform-origin:
      bottom left;
  }
}

/* ===== 33. TOUCH ===== */

@media (hover: none), (pointer: coarse) {
  .halloween-cursor-particle {
    display: none;
  }
}

/* ===== 34. REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  body.halloween-active
  .halloween-toggle-indicator,

  body.halloween-active
  .halloween-beacon-wave,

  body.halloween-active
  .halloween-beacon-core,

  body.halloween-active
  .halloween-radiation-alert-text,

  body.halloween-active
  .halloween-acid-drop,

  body.halloween-active
  .halloween-toxic-vapor,

  body.halloween-active
  .halloween-toxic-mote,

  body.halloween-active
  .halloween-bat-flight,

  body.halloween-active
  .halloween-bat-svg,

  body.halloween-active
  .halloween-hero-spider,

  body.halloween-active
  .halloween-spider-anchor,

  body.halloween-active
  .halloween-canister-electric path,

  body.halloween-active
  .halloween-mutant-wrap,

  body.halloween-active
  .halloween-radioactive-ghost,

  body.halloween-active
  .halloween-electric-arc path,

  body.halloween-active
  .halloween-team-scan::before,

  .halloween-death-particle,

  .halloween-hit-badge,

  .halloween-cursor-particle,

  .halloween-jumpscare-content {
    animation: none;
  }

  .halloween-radioactive-ghost {
    right: 1rem;
    bottom: 6rem;
    left: auto;

    opacity: 0.82;

    transform: none;
  }

  .halloween-mutant-wrap {
    opacity: 0.8;
  }

  .halloween-jumpscare {
    display: none;
  }
}
/* ===== AISLAMIENTO Y ACCESIBILIDAD ===== */

body:not(.halloween-active) .halloween-decoration,
body:not(.halloween-active) .halloween-interactive { display: none; }

@media (prefers-reduced-motion: reduce) {
  .halloween-decoration, .halloween-interactive,
  .halloween-decoration *, .halloween-interactive * { animation: none; transition: none; }
}
@media (forced-colors: active) {
  .halloween-interactive:focus-visible, .halloween-toggle:focus-visible { outline: 3px solid Highlight; }
}
